This code works on one item, but when you need to press another item, it just makes it unstealable.
Please, help me if there is a fix for this.
Thanks in advance.
on rightclick on painting:
if {Tasks.%player%::*} contains "Shields - Prime Shields":
if "%region at player%" contains "shieldstask":
openGUI(player, "&4Prime Shields")
wait 3 ticks
chance of 50%:
format slot 4 of player with white stained glass to run [execute player command "makered 4"]
format slot 11 of player with white stained glass to run [execute player command "makered 11"]
format slot 15 of player with white stained glass to run [execute player command "makered 15"]
format slot 22 of player with white stained glass to run [execute player command "makered 22"]
format slot 29 of player with white stained glass to run [execute player command "makered 29"]
format slot 33 of player with white stained glass to run [execute player command "makered 33"]
format slot 40 of player with white stained glass to run [execute player command "makered 40"]
command /makered [<number>]:
trigger:
format slot arg-1 of player with red stained glass named "%arg-1%" to run [execute player command "makewhite arg-1"]
send "%arg-1%"
command /makewhite [<number>]:
trigger:
format slot arg-1 of player with white stained glass to run [execute player command "makered arg-1"]
send "%arg-1%"
Please, help me if there is a fix for this.
Thanks in advance.
on rightclick on painting:
if {Tasks.%player%::*} contains "Shields - Prime Shields":
if "%region at player%" contains "shieldstask":
openGUI(player, "&4Prime Shields")
wait 3 ticks
chance of 50%:
format slot 4 of player with white stained glass to run [execute player command "makered 4"]
format slot 11 of player with white stained glass to run [execute player command "makered 11"]
format slot 15 of player with white stained glass to run [execute player command "makered 15"]
format slot 22 of player with white stained glass to run [execute player command "makered 22"]
format slot 29 of player with white stained glass to run [execute player command "makered 29"]
format slot 33 of player with white stained glass to run [execute player command "makered 33"]
format slot 40 of player with white stained glass to run [execute player command "makered 40"]
command /makered [<number>]:
trigger:
format slot arg-1 of player with red stained glass named "%arg-1%" to run [execute player command "makewhite arg-1"]
send "%arg-1%"
command /makewhite [<number>]:
trigger:
format slot arg-1 of player with white stained glass to run [execute player command "makered arg-1"]
send "%arg-1%"