repair slot isnt working

  • 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 community!

    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

Supporter
Aug 5, 2018
225
7
18
Hi, i updated my server, and alot of addons broke, so now i dont have many addons and im trying to repair all my skript. Why wont this repair slot 4 of the player? I dont get any errors. It was working in 1.14.2, but not in 1.15.2.
Thanks!
~Matt

Server version:
Paperspigot 1.15.2

Skript version:
2.4

CODE:

Code:
on inventory click:
    if "%event.getView().getTitle()%" = "&a&lTools and Armor repair":
        if index of event-slot is 2:
            cancel event
            if {rings::%player%} >= 250:
                set {_s} to slot 4 of player's current inventory
                broadcast "%{_s}%"
                if slot 4 of player's current inventory != any pickaxe or any sword or any hoe or any shovel or any axe or any armor or fishing rod:
                    remove 250 from {rings::%player%}
                    play sound "BLOCK_ANVIL_USE" at location of player for player
                    repair slot 4 of current inventory of player
                else:
                    cancel event
                    send "&c(&4!&c) &7you must have a pickaxe in this slot!"
            else:
                send "&c(&4!&c) &7Sorry, but you don't have enough rings to repair anything!"
                loop 3 times:
                    play sound "AMBIENT_CAVE" at location of player for player
on inventory click:
    if event.getView().getTitle() = "&a&lTools and Armor repair":
        if player's held item isn't any pickaxe or air or any sword or any hoe or any shovel or any axe or any armor or fishing rod:
            if clicked inventory is not inventory of player:
                cancel event
            else:
                uncancel event
 
Status
Not open for further replies.