Item Regeneration

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

ItsMCB

Member
May 20, 2018
46
1
8
23
www.vexel.media
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.
 
Try this
code_language.skript:
command /regentool:
    trigger:
        if player is holding any pickaxe:
            repair tool of player
 
  • Like
Reactions: L0v0lup
code_language.skript:
command /repairtool [<number=1000>]:
    trigger:
        player has permission "repair.tool"
        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.
 
Status
Not open for further replies.