Hello. So I want to create a like thing which makes it so my custom mobs can’t go out of a certain region.
Code:
on damage:
attacker is a zombie
attacker's display name contains "Zombie"
set attacker's final damage to final damage + 6
command /setpos1:
permission: op
trigger:
set {pos1} to player's location
every 10 seconds:
set {zombiecount} to 0 if {zombiecount} is not set
if {zombiecount} < 7:
add 1 to {zombiecount}
spawn 1 zombie at {pos1}
set max health of last spawned zombie to 100
set health of last spawned zombie to 100
set the display name of the last spawned zombie to "&8[&71&8] &cZombie &a%health of last spawned zombie%&7/&a%max health of last spawned zombie%&c❤"
clear the helmet of the last spawned zombie
clear the chestplate of the last spawned zombie
clear the leggings of the last spawned zombie
clear the boots of the last spawned zombie
set tool of last spawned zombie to wooden hoe
on skript start:
set {zombiecount} to 0
on death:
victim is a zombie
victim's display name contains "Zombie"
remove 1 from {zombiecount}
Code:
on damage:
attacker is a zombie
attacker's display name contains "Zombie"
set attacker's final damage to final damage + 6
command /setpos1:
permission: op
trigger:
set {pos1} to player's location
every 10 seconds:
set {zombiecount} to 0 if {zombiecount} is not set
if {zombiecount} < 7:
add 1 to {zombiecount}
spawn 1 zombie at {pos1}
set max health of last spawned zombie to 100
set health of last spawned zombie to 100
set the display name of the last spawned zombie to "&8[&71&8] &cZombie &a%health of last spawned zombie%&7/&a%max health of last spawned zombie%&c❤"
clear the helmet of the last spawned zombie
clear the chestplate of the last spawned zombie
clear the leggings of the last spawned zombie
clear the boots of the last spawned zombie
set tool of last spawned zombie to wooden hoe
on skript start:
set {zombiecount} to 0
on death:
victim is a zombie
victim's display name contains "Zombie"
remove 1 from {zombiecount}