• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

/fix command (repair tools/weapons/armor)

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.
#1
No advertisement.
Code:
cmd create fix repair your tools
cmd add fix if varset(%args%[1]) then goto 26
cmd add fix let %tools% = array(256,257,258,259,261,269,270,271,273,274,275,277,278,279,284,285,286,291,292,293,294,346,359)
cmd add fix let %weapons% = array(267,268,272,276,283)
cmd add fix let %armor% = array(298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,443)
cmd add fix let %hand% = playerhand(%p%)
cmd add fix let %id% = %hand%["id"]
cmd add fix if (%id% in %tools%) or (%id% in %weapons%) or (%id% in %armor%) then goto 10
cmd add fix message %p% §cThe item you are holding is not repairable!
cmd add fix exit
cmd add fix let %variant% = %hand%["variant"]
cmd add fix if %variant% = 0 then goto 29
cmd add fix let %inv% = playerinventory(%p%)
cmd add fix let %hand%["invslot"] =
cmd add fix async
cmd add fix let %slot% = size(%inv%)
cmd add fix let %slot% = %slot% - 1
cmd add fix if %slot% = -1 then exit
cmd add fix if %inv%[%slot%] != %hand% then goto 16
cmd add fix sync
cmd add fix let %hand%["variant"] = 0
cmd add fix let %inv%[%slot%] = %hand%
cmd add fix carry %p% %inv%
cmd add fix let %name% = %hand%["name"]
cmd add fix message %p% §a%name%§r§7 (%id%:0) §arepaired!
cmd add fix exit
cmd add fix #please do not edit this in anyway! If there are any problems contact  in the leet forums!
cmd add fix message %p% \"§7To use this command, hold the item you want to fix and type in /fix\"
cmd add fix exit
cmd add fix message %p% §aThis tool is already repaired!
cmd add fix exit
 
Last edited by a moderator: