Item wont enchant

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

fds

Member
Jan 8, 2020
4
0
1
23
Im trying to enchant a item with a protection level based off a variable which is the protection level basically just increasing the prot level by 1 every time I have this but it doesent work

send "{@prefix} &8> &7You don't have enough money to do this." to {_p}
if {_u} is "protectionhelm":
if {_p}'s balance is more than or equal to {ProthlevelCost::%{_p}%}:
add 1 to {ProthLevel::%{_p}%}
enchant {_p}'s tool with "%{_u}% %{ProthLevel::%{_p}%}%" parsed as enchantment type
remove {ProthlevelCost::%{_p}%} from {_p}'s balance
add 200*{ProthLevel::%{_p}%}*{ProthLevel::%{_p}%} to {ProthlevelCost::%{_p}%}

ik if I remove the h it will fix it, but i need it for a variable because i am trying to create multiple separate ones (one for each peace of gear) and if i just do Protlevel it will be the same for all instead of seperate.
Please help
 
Status
Not open for further replies.