Solved Add durability to tools in menus

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

Davi3684

Member
Dec 29, 2017
15
0
0
21
Minecraft Version:1.8
---
Full Code:

code_language.skript:
command /mmenu:
    trigger:
        open chest with 5 rows named "Main menu" to player
      
        # Assault class #
        format slot 0 of player with paper named "Assault" to close
        if {bc.rifle.%player%} is 0:
            format slot 9 of player with wooden pickaxe  named "Rifle 0" to close
        if {bc.pistol.%player%} is 0:
            format slot 18 of player with wooden shovel named "Pistol 0" to close

        # Recon class #
        format slot 2 of player with paper named "Recon" to close
        if {bc.sniper.%player%} is 0:
            format slot 11 of player with wooden hoe named "Sniper 0" to close
        if {bc.pistol.%player%} is 0:
            format slot 20 of player with wooden shovel named "Pistol 0" to close
the variables are just what leve your weapons are in

Is there a way to give custom durability to tools in GUI/menus? I've been looking all over the docs and forums but just can't seem to find a solution.

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it?
code_language.skript:
format slot 9 of player with wooden pickaxe of durability 1 named "Rifle 0" to close

# Edit
code_language.skript:
format slot 9 of player with wooden pickaxe:1 named "Rifle 0" to close
This works but I cant use a variable to represent the number?
code_language.skript:
format slot 9 of player with wooden pickaxe:{exp.%player%} named "Rifle 0" to close
that doesn't work?
 
Last edited:
did you maybe tried that way

code_language.skript:
set {_item} to wooden "pickaxe:%{exp.%player%}%" parsed as item
format slot 9 of player with {_item} named "..."

Btw just a hint. This addonds (format slot) Its very bugged, Everyone recommend you to using Tuske.
 
Status
Not open for further replies.