Im trying to make a custom item on a server and everything works EXCEPT for the applying strength portion. Am i doing something wrong?
I have some other items that apply potion effects but they all work fine.
I have some other items that apply potion effects but they all work fine.
Code:
on right click:
if player is holding a cooked mutton named "&c&lMeat Shank":
if player's health > 1:
set {_shankdamage} to (player's health / 2)
damage player by {_shankdamage} hearts
set {rightClickDamage.%player%} to true
else:
send "&7&oNot enough health!" to player
delete {rightClickDamage.%player%}
on damage:
if damage was caused by custom:
if victim is holding a cooked mutton named "&c&lMeat Shank":
if {rightClickDamage.%victim%} is true:
remove strength from victim
apply potion of strength 2 to the victim for 3 seconds
send "&7&otook damage from right click" to victim #debug code
#spawn lightning bolt at victim #debug code
delete {rightClickDamage.%victim%}