So i wrote this code for a minigame im working on. I want the pickaxe u get to be enchanted but without any ecnhatnemt(like an enchanted book with no enchantments)(only the enchanment effect)
Also i use 2 spaces and not a tab
Also i use 2 spaces and not a tab
Code:
command /buywoodenpickaxe [<player>]:
permission:sk.developer
trigger:
if {glass::%arg-1%} is bigger than 4:
if {fortune::%arg-1%} is 0:
wait 5 ticks
remove 5 from {glass::%arg-1%}
wait 3 ticks
add 1 wooden pickaxe named "&bWooden Pickaxe &aLevel 1" to arg-1
wait 5 ticks
send "&bUpgrade Successful" to arg-1
else if {fortune::%arg-1%} is 1:
wait 5 ticks
remove 5 from {glass::%arg-1%}
wait 3 ticks
add 1 wooden pickaxe named "&bWooden Pickaxe &aLevel 1" to arg-1
wait 5 ticks
send "&bUpgrade Successful" to arg-1
else:
Send "&cYou don't have enough glass to buy it" to arg-1
Last edited: