Guys i really need a help here. My code
And the problem is.. when i click the kit3, it activates kit5. (Shown in the GIF below.)
(http://i.imgur.com/Unp0U3Z.gif - incase if it don't work)
code_language.skript:
#GUI
loop {SuperDuels::kitlist::*}:
if loop-index parsed as integer = 8:
stop loop
if {SuperDuels::kitlogo::%loop-value%} is set:
format slot "%loop-index%" parsed as integer of player with {SuperDuels::kitlogo::%loop-value%} named "&e&n%loop-value%" with lore "&7Click to add %loop-value% to the kitgui." to run [arenakitSelector("%loop-value%", "%loop-index%" parsed as integer, "%{SuperDuels::kitlogo::%loop-value%}%" parsed as item type, 0, "%{SuperDuels::%player%::editmode}%", player)]
else:
format slot "%loop-index%" parsed as integer of player with grass named "&e&n%loop-value%" with lore "&7Click to add %loop-value% to the kitgui." to run [arenakitSelector("%loop-value%", "%loop-index%" parsed as integer, "2" parsed as item type, 0, "%{SuperDuels::%player%::editmode}%", player)]
format slot 8 of player with arrow named "&6Next" to be unstealable
code_language.skript:
# The Function
function arenakitSelector(k: text, n: number, l: item type, g: number, a: text, p: player):
wait 2 ticks
if {_n} is 0:
stop
else:
if inventory name of {_p}'s current inventory is "Select a kit":
if {_g} = 0:
format slot {_n} of {_p} with glowing "%{_l}%" parsed as item type named "&e&n%{_k}%" with lore "&7Click to add %{_k}% to the kitgui." to run [arenakitSelector("%{_k}%", {_n}, {_l}, 1, "%{_a}%", {_p})]
else:
format slot {_n} of {_p} with "%{_l}%" parsed as item type named "&e&n%{_k}%" with lore "&7Click to add %{_k}% to the kitgui." to run [arenakitSelector("%{_k}%", {_n}, {_l}, 0, "%{_a}%", {_p})]
stop
(http://i.imgur.com/Unp0U3Z.gif - incase if it don't work)