I'm creating a skript for a /sell, and i do it, the thing is that when I try the script, when I have more than 64 blocks of the item that I'm going to sell, the message appears again, how can I solve that?
When i have 64 diamonds:
When i have 65 diamonds:
Part of code is this:
When i have 64 diamonds:
When i have 65 diamonds:
Part of code is this:
code_language.skript:
on command "/sell":
cancel event
sender is a player
if "%region at player%" contains "minapvp":
loop all items in the inventory of player:
loop-item is diamond:
set {_diamantes} to item amount of loop-item
set {_diamantes.dinerototal} to 78 * {booster.%player%} * {_diamantes}
add {_diamantes.dinerototal} to player's balance
remove loop-item from player's inventory
send "&8&m-------------------------"
send "&7Se te removieron &2&lDiamantes de tu inventario"
send "&7Se te agregaron &2&l$%{_diamantes.dinerototal}%&7 a tu dinero"
send " "
send "&7Multiplicador X%{booster.%player%}%"
send "&8&m-------------------------"