I found a way to enchant item in players hand, but it can enchant that item only for level 1. I want to enchant that item to higher level. Please help me.
[doublepost=1634907521,1634895793][/doublepost]
EDIT: I found way to enchant with just testing things for 2h!
My command works now like this:
command /emeenchant <text> [<enchantment type>] [<text>]:
description: Enchants item in player's hand.
permission: eme.rename
trigger:
set {enchant_} to "%arg-2% %arg-3%" parsed as enchantment type
if arg-1 is set:
if arg-1 is "add":
if player's held item is not air:
if arg-2 is set:
enchant player's tool with {enchant_}
if arg-1 is "set":
if player's held item is not air:
if arg-2 is set:
disenchant player's tool
enchant player's tool with {enchant_}
if arg-1 is "disenchant":
if player's held item is not air:
disenchant player's tool
else:
message "/emeenchant <add|set|disenchant> <enchant> <level>"
Code:
command /emeenchant <enchantment type> [<text>]:
description: Enchants item in player's hand.
permission: eme.rename
trigger:
if player's held item is not air:
if arg-1 is set:
enchant player's tool with arg-1
I found a way to enchant item in players hand, but it can enchant that item only for level 1. I want to enchant that item to higher level. Please help me.
Code:command /emeenchant <enchantment type> [<text>]: description: Enchants item in player's hand. permission: eme.rename trigger: if player's held item is not air: if arg-1 is set: enchant player's tool with arg-1
EDIT: I found way to enchant with just testing things for 2h!
command /emeenchant <text> [<enchantment type>] [<text>]:
description: Enchants item in player's hand.
permission: eme.rename
trigger:
set {enchant_} to "%arg-2% %arg-3%" parsed as enchantment type
if arg-1 is set:
if arg-1 is "add":
if player's held item is not air:
if arg-2 is set:
enchant player's tool with {enchant_}
if arg-1 is "set":
if player's held item is not air:
if arg-2 is set:
disenchant player's tool
enchant player's tool with {enchant_}
if arg-1 is "disenchant":
if player's held item is not air:
disenchant player's tool
else:
message "/emeenchant <add|set|disenchant> <enchant> <level>"