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.

Solved Add durability to tools in menus

Discussion in 'Skript' started by Davi3684, Dec 30, 2017.

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

    Davi3684 Member

    Joined:
    Dec 29, 2017
    Messages:
    15
    Likes Received:
    0
    Minecraft Version:1.8
    ---
    Full Code:

    Code (Skript):
    1.  
    2. command /mmenu:
    3.     trigger:
    4.         open chest with 5 rows named "Main menu" to player
    5.      
    6.         # Assault class #
    7.         format slot 0 of player with paper named "Assault" to close
    8.         if {bc.rifle.%player%} is 0:
    9.             format slot 9 of player with wooden pickaxe  named "Rifle 0" to close
    10.         if {bc.pistol.%player%} is 0:
    11.             format slot 18 of player with wooden shovel named "Pistol 0" to close
    12.  
    13.         # Recon class #
    14.         format slot 2 of player with paper named "Recon" to close
    15.         if {bc.sniper.%player%} is 0:
    16.             format slot 11 of player with wooden hoe named "Sniper 0" to close
    17.         if {bc.pistol.%player%} is 0:
    18.             format slot 20 of player with wooden shovel named "Pistol 0" to close      
    19.  
    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 (Skript):
    1.  
    2. format slot 9 of player with wooden pickaxe of durability 1 named "Rifle 0" to close
    3.  
    # Edit
    Code (Skript):
    1.  
    2. format slot 9 of player with wooden pickaxe:1 named "Rifle 0" to close
    3.  
    This works but I cant use a variable to represent the number?
    Code (Skript):
    1.  
    2. format slot 9 of player with wooden pickaxe:{exp.%player%} named "Rifle 0" to close
    3.  
    that doesn't work?
     
    #1 Davi3684, Dec 30, 2017
    Last edited: Dec 30, 2017
  2. Best Answer:
    Post #2 by ChisleLP, Dec 30, 2017
  3. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    did you maybe tried that way

    Code (Skript):
    1. set {_item} to wooden "pickaxe:%{exp.%player%}%" parsed as item
    2. format slot 9 of player with {_item} named "..."
    3.  
    Btw just a hint. This addonds (format slot) Its very bugged, Everyone recommend you to using Tuske.
     
    • Useful Useful x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...