Hello guys, i need some help with my script that i am developing and what i am trying to do is, i want to right click the emeralds then once i do it loops the player 2304 times (player inventory) and i want it to remove all the emeralds and add all those emeralds converted into the /gems balance or my variable {gems.balance.%player%}
CODE:
CODE:
Code:
on right click with Emerald:
loop 2304 times:
if lore of player's held item contains "gems":
remove 1 emerald from player
add 1 to {gems.balance.%player%}
add 1 to {gems.counter.%player%}
loop 1 times:
if lore of player's held item contains "gems":
send "&2&lGEMS &8&l> &7You redeemed &2%{gems.counter.%player%}% &lGem(s)&7!"
set {gems.counter.%player%} to 0