1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't set durability on a item?

Discussion in 'Skript' started by KingDooms, Nov 13, 2021.

Thread Status:
Not open for further replies.
  1. KingDooms

    KingDooms Member

    Joined:
    Jun 10, 2020
    Messages:
    23
    Likes Received:
    0
    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 (Text):
    1. command /forgegui:
    2.     permission: op
    3.     trigger:
    4.         open chest with 3 rows named "&0&lForge?" to player
    5.         set {ForgeLoop} to 0
    6.         loop 27 times:
    7.             set slot {ForgeLoop} of player's current inventory to black stained glass pane named "&r"
    8.             set {ForgeLoop} to {ForgeLoop} +1
    9.         set slot 13 of player's current inventory to air
    10.  
    11. on inventory click:
    12.     if name of event-inventory is "&0&lForge?":
    13.         if event-slot contains black stained glass pane named "&r":
    14.             cancel event
    15.             stop
    16.         if inventory action is swap with cursor:
    17.             set {TestingSlots} to slot 13 of event-inventory
    18.             if name of {TestingSlots} is "&f&l&oBroken Miner Pickaxe":
    19.                 if name of cursor is "&f&lIron Token":
    20.                     set {TestingSlots}'s durability to 10
    21.                     set slot 13 of event-inventory to {TestingSlots}
    22.                     remove 1 of player's cursor slot from player's cursor slot
    23.                     send "q" to player
    24.                     cancel the event
     
Thread Status:
Not open for further replies.

Share This Page

Loading...