Solved Repair tools gui

  • 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.

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hi, im making a repair gui, and im having trouble on making the tool repair. I have the gui made out now. I made a few ways to to repair the player's tool, but it never did repair. Here is what I have so far. But like I said, I tried a few ways and I didn't have good luck. So if anyone can help me resolve this issue, it will be very much appreciated!

Thanks!

code_language.skript:
command /repairtool:
    trigger:
        open chest with 5 rows named "&4Repair Tool!" to player
        format gui slot 0 of player with iron ingot of unbreaking 10 named ""
        format gui slot 36 of player with iron ingot of unbreaking 10 named ""
        format gui slot 44 of player with iron ingot of unbreaking 10 named ""
        format gui slot 20 of player with glass:10 named ""
        format gui slot 21 of player with glass:10 named ""
        format gui slot 23 of player with glass:10 named ""
        format gui slot 24 of player with glass:10 named ""
        format gui slot 25 of player with glass:10 named ""
        format gui slot 26 of player with glass:10 named ""
        format gui slot 27 of player with glass:10 named ""
        format gui slot 28 of player with glass:10 named ""
        format gui slot 29 of player with glass:10 named ""
        format gui slot 30 of player with glass:10 named ""
        format gui slot 31 of player with glass:10 named ""
        format gui slot 32 of player with glass:10 named ""
        format gui slot 33 of player with glass:10 named ""
        format gui slot 34 of player with glass:10 named ""
        format gui slot 35 of player with glass:10 named ""
        format gui slot 37 of player with glass:10 named ""
        format gui slot 38 of player with glass:10 named ""
        format gui slot 39 of player with glass:10 named ""
        format gui slot 41 of player with glass:10 named ""
        format gui slot 42 of player with glass:10 named ""
        format gui slot 43 of player with glass:10 named ""
        loop 20 times:
            format gui slot 8 of player with iron ingot of unbreaking 10 named ""
            format gui slot {_num} of player with glass:10 named ""
            add 1 to {_num}
            format gui slot 40 of player with anvil named "(&6Right&f-&6Click&f)" with lore "&b&m----------||&cTo repair||&cYour Tool!||&b&m----------" to run:
                repair slot 22 of player by 200
 
what about set durability of tool of player to 0?
Se that’s the thing. I don’t want to repair the tool in the players inventory. I want to repair the tool that’s in slot 22. But if the tools in slot 22 you have to click the anvil in slot 40 to repair it.
 
Se that’s the thing. I don’t want to repair the tool in the players inventory. I want to repair the tool that’s in slot 22. But if the tools in slot 22 you have to click the anvil in slot 40 to repair it.
You're saying you want to the tool to repair in a slot in the GUI once the anvil is clicked in the GUI?
 
Status
Not open for further replies.