Check slot of player?

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

NewbyZ

Member
Jan 26, 2017
75
2
0
Hi, I'm making a book that by right clicking adds +200 durability to the tool in slot 0. The problem is that if the object in slot 0 has no durability (example: book, stone, wood etc ... ) Erases it. So I want to do something similar to (example) "if slot 0 is a sword or pickaxe:"

Like this:

code_language.skript:
on rightclick holding book:
    if slot 0 is a sword or pickaxe: #This not work
        if lore of player's tool contains "&7&l* &7Habilidad: &6Reparación I":
            if food level is greater than 2:
                repair slot 0 of player by 200
                add -8.0 to hunger bar of player
                send "&e&l(!) &eHas añadido &l+200&e de durabilidad en el slot 1."
                stop
            else:
            send "&c&l(!) &c¡No tienes suficiente comida!"

Please help me :emoji_slight_smile:
[doublepost=1487042751,1487036065][/doublepost]Resolved.
 
Status
Not open for further replies.