So i'm trying to make a forge to be able to repair a pickaxe, but everything works except the durability, the durability doesn't change, giving no errors but the rest of the code works. Any help?
Code:
command /forgegui:
permission: op
trigger:
open chest with 3 rows named "&0&lForge?" to player
set {ForgeLoop} to 0
loop 27 times:
set slot {ForgeLoop} of player's current inventory to black stained glass pane named "&r"
set {ForgeLoop} to {ForgeLoop} +1
set slot 13 of player's current inventory to air
on inventory click:
if name of event-inventory is "&0&lForge?":
if event-slot contains black stained glass pane named "&r":
cancel event
stop
if inventory action is swap with cursor:
set {TestingSlots} to slot 13 of event-inventory
if name of {TestingSlots} is "&f&l&oBroken Miner Pickaxe":
if name of cursor is "&f&lIron Token":
set {TestingSlots}'s durability to 10
set slot 13 of event-inventory to {TestingSlots}
remove 1 of player's cursor slot from player's cursor slot
send "q" to player
cancel the event