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

Item Regeneration

Discussion in 'Skript' started by ItsMCB, May 31, 2018.

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

    ItsMCB Active Member

    Joined:
    May 20, 2018
    Messages:
    26
    Likes Received:
    1
    I have been looking for a way to change item durability. I have found a forum post (https://forums.skunity.com/threads/item-durability.2731/) on the item taking no damage. Is their a way for a player to execute a command and add durability back into their item?

    Ex. If my diamond pickaxe has only 5 hits left and its selected in my hand, I can execute a command /regentool and it will add +1000 durability back into my pick.
     
  2. sagp15

    sagp15 Member

    Joined:
    Jun 16, 2017
    Messages:
    19
    Likes Received:
    1
    Try this
    Code (Skript):
    1. command /regentool:
    2.     trigger:
    3.         if player is holding any pickaxe:
    4.             repair tool of player
     
    • Like Like x 1
  3. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
  4. Stegoleopluradon2

    Stegoleopluradon2 Active Member

    Joined:
    Apr 12, 2017
    Messages:
    36
    Likes Received:
    0
    Code (Skript):
    1. command /repairtool [<number=1000>]:
    2.     trigger:
    3.         player has permission "repair.tool"
    4.         repair player's tool by arg-2
    Is this what you are looking for? I don't know if its bug proof, i just typed it. Gl.
     
Thread Status:
Not open for further replies.
Loading...