Hello, I have a question about custom enchantments. Im currently making about 5-10 enchantments. But the issue im having is, when I try to add a enantment LvL 1-5, it just adds another lore instead of adding a level. Ill post the code I currently have now. But if someone can show me how to add many levels to a custom enchantment, it will be very much appreciated! I also tried to make a variable to show the level, but I couldn't get it to work.
Thanks!
Thanks!
code_language.skript:
command /Cursed [<player>]:
permission: gooey.*
trigger:
give player a enchanted book named "&cCursed" with lore "&7&m---------------||&7- &bThere is a small chance||&7- &byou can wither your enemy!||&7&m---------------||&7- &cDrag and drop||&7- &cThe enchantment||&7- &cOnto your tool!||&7&m---------------"
on inventory click:
if player's gamemode is survival or creative:
if type of clicked slot is any chestplate:
if player's cursor slot is an enchanted book:
if name of player's cursor slot is "&cCursed":
if player is holding any chestplate:
set {_lore} to lore of player's cursor slot
if {_lore} contains colored "you can wither your enemy!":
cancel event
set player's cursor slot to air
execute player command "/cursedbook"
command /cursedbook2:
trigger:
set {_lore::*} to lore of player's held item
set {_size} to size of {_lore::*} + 1
set {_lore::%{_size}%} to "&cCursed II"
set lore of player's held item to join {_lore::*} with "||"