In this code, when I put the command, but it does not give me the money of all the items I have, that is, if I have 40 leather does not give me 25 x 40, it gives me only 25 for all
Thanks so much.
Thanks so much.
code_language.skript:
command /FixerDevSKxe:
permission: porros.shop
trigger:
set {_amount} to 0
loop all items in player's inventory:
if loop-item is leather:
set {_n} to "%loop-item%"
set {_t::*} to {_n} split at " "
if {_t::2} is not set:
add 1 to {_amount}
else:
set {_final} to {_t::1} parsed as an integer
add {_final} to {_amount}
if {_amount} is bigger than 0:
remove all leather from player's inventory
add 25 to player's balance
send player title "&5You get" with subtitle "&a25$ Dolars" for 3 seconds
else:
message "{@Prefix} {@MsgPorros}"
Last edited: