Can't set durability on a item?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KingDooms

Member
Jun 10, 2020
26
0
1
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
 
Status
Not open for further replies.