on load:
set {lifesteal::%player's uuid%.hearts} to 10
on death:
if event-world is "lifesteal":
subtract 1 from max health of victim
set {lifesteal::%victim's uuid%.hearts} to {lifesteal::%victim's uuid%.hearts} - 1
add 1 to max health of attacker
set {lifesteal::%attacker's uuid%.hearts} to {lifesteal::%attacker's uuid%.hearts} + 1
#heart item
on rightclick:
if player is holding red dye named "&4Heart" with lore "&6Right Click to redeem":
add 1 to max health of player
set {lifesteal::%player's uuid%.hearts} to {lifesteal::%player's uuid%.hearts} + 1
remove 1 of red dye named "&4Heart" with lore "&6Right Click to redeem" from player's inventory
on drop:
if player is holding red dye named "&4Heart" with lore "&6Right Click to redeem":
if {drop.warn} is 0:
cancel event
set {drop.warn} to 1
send "&4Are you sure you want to drop this?" to player
if {drop.warn} is 1:
set {drop.warn} to 0
command /itemheart [<offline player>]:
permission: get.heart
trigger:
if player does not have permission "get.heart":
send "&4You do not have permission to do this!"
else:
if event-world is "lifesteal":
if arg-1 is set:
set {_target} to arg-1
give {_target} red dye named "&4Heart" with lore "&6Right Click to redeem"
if arg-1 isn't set:
give player red dye named "&4Heart" with lore "&6Right Click to redeem"
else:
send "&4You can not do that here!" to player
and i need to add:
if event-world is not "lifesteal":
set max health of player to 10
if event-world is "lifesteal":
set max health of player to {lifesteal::%player's uuid%.hearts}
but i just dont know where to put it.