Hello, i have skripted a custom boss and i just wanted to know how i can display his health in his nametag. I tried some but it wouldent update. Thanks!
Code:
command /rstbs:
permission: op
trigger:
set {alive} to false
every 1 second:
if {alive} is false:
spawn 1 adult zombie at location 110, 64, 101 in world "skyblock"
equip last spawned zombie with iron chestplate of protection 4
equip last spawned zombie with iron leggings of protection 4
equip last spawned zombie with iron boots of protection 4
set last spawned zombie's held item to iron sword of sharpness 4 and knockback 1
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
set display name of last spawned zombie to "&6Zombie King"
set {alive} to true
on death:
if display name of victim is "&6Zombie King":
cancel drops
set {loot} to 0
chance of 2%:
set {loot} to 1
chance of 1%:
set {loot} to 2
send "&9Boss Down!" to attacker
if {loot} is 1:
play sound "block.note_block.harp" with pitch 1 to the attacker
wait 0.2 seconds
play sound "block.note_block.harp" with pitch 1.2 to the attacker
wait 0.2 seconds
play sound "block.note_block.harp" with pitch 1.4 to the attacker
send "&l&3Boss Drop! &2Zombie Knight Chestplate &7(1/50 Drop!)" to attacker
give attacker unbreakable gold chestplate named "&6Zombie Knight Chestplate" with lore "&3Gives Permenant Strength 1"
if {loot} is 2:
play sound "block.note_block.harp" with pitch 1 to the attacker
wait 0.2 seconds
play sound "block.note_block.harp" with pitch 1.2 to the attacker
wait 0.2 seconds
play sound "block.note_block.harp" with pitch 1.4 to the attacker
send "&l&3Boss Drop! &2Zombie Knight Sword &7(1/100 Drop!)" to attacker
give attacker unbreakable gold sword named "&6Zombie Knight Sword" with lore "&3+50 Damage"
set {alive} to false