how can i summon a zombie with 100hp and in specific location?
and how can i do it each 30 minutes?
and how can i do it each 30 minutes?
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
options:
opZombSpawn: true
on load:
while {@opZombSpawn} is true:
spawn a zombie named "&cOP Zombie" at [x coord], [y coord], [z coord]
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
wait 30 minutes
while {@opZombSpawn} is false:
stop
This code does works, but there is an option to make it drop an item and make the name of the zombie as an health or smth?I haven't tested this yet so if it doesnt work let me know
Code:options: opZombSpawn: true on load: while {@opZombSpawn} is true: spawn a zombie named "&cOP Zombie" at [x coord], [y coord], [z coord] set last spawned zombie's max health to 100 set last spawned zombie's health to 100 wait 30 minutes while {@opZombSpawn} is false: stop
In order to disable spawning you'll need to create a command that sets {@opZombSpawn} to false but I'll leave that to you
[doublepost=1619541621,1618933906][/doublepost]Was your problem solved?
options:
opZombSpawn: true
on load:
while {@opZombSpawn} is true:
set {_h} to last spawned zombie's health
spawn a zombie named "&6%{_h}%&c/&6100 &cHP" at [x coord], [y coord], [z coord]
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
wait 30 minutes
while {@opZombSpawn} is false:
stop
on death of zombie:
if event-entity's max health is 100:
cancel event
drop 2 golden apples
drop 1 pink wool named "&dBrain" with lore "&bYummy..."
This should work
Code:options: opZombSpawn: true on load: while {@opZombSpawn} is true: set {_h} to last spawned zombie's health spawn a zombie named "&6%{_h}%&c/&6100 &cHP" at [x coord], [y coord], [z coord] set last spawned zombie's max health to 100 set last spawned zombie's health to 100 wait 30 minutes while {@opZombSpawn} is false: stop on death of zombie: if event-entity's max health is 100: cancel event drop 2 golden apples drop 1 pink wool named "&dBrain" with lore "&bYummy..."
Again, I haven't tested it so let me know if there are any problems
options:
opZombSpawn: true
on load:
while {@opZombSpawn} is true:
set {_h} to last spawned zombie's health
spawn a zombie at [x coord], [y coord], [z coord]
set last spawned zombie's name to "&6%{_h}%&c/&6100 &cHP"
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
wait 30 minutes
while {@opZombSpawn} is false:
stop
on death of zombie:
if event-entity's max health is 100:
drop 2 golden apples
drop 1 pink wool named "&dBrain" with lore "&bYummy..."
Should be fixed now.
Code:options: opZombSpawn: true on load: while {@opZombSpawn} is true: set {_h} to last spawned zombie's health spawn a zombie at [x coord], [y coord], [z coord] set last spawned zombie's name to "&6%{_h}%&c/&6100 &cHP" set last spawned zombie's max health to 100 set last spawned zombie's health to 100 wait 30 minutes while {@opZombSpawn} is false: stop on death of zombie: if event-entity's max health is 100: drop 2 golden apples drop 1 pink wool named "&dBrain" with lore "&bYummy..."
Let me know if there are anymore issues.
options:
opZombSpawn: true
zombHPListener: false
on load:
while {@opZombSpawn} is true:
set {@zombHPListener} to true
spawn a zombie at [x coord], [y coord], [z coord] in world "pvp"
set last spawned zombie's name to "&6%{_h}%&c/&6100 &cHP"
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
wait 30 minutes
while {@opZombSpawn} is false:
set {@zombHPListener} to false
stop
while {@zombHPListener} is true:
set {_h} to last spawned zombie's health
while {@zombHPListener} is false:
stop
on death of zombie:
if event-entity's max health is 100:
if event-entity is in world "pvp":
drop 2 golden apples
drop 1 pink wool named "&dBrain" with lore "&bYummy..."
Let's try adding an HP event listener:
Code:options: opZombSpawn: true zombHPListener: false on load: while {@opZombSpawn} is true: set {@zombHPListener} to true spawn a zombie at [x coord], [y coord], [z coord] in world "pvp" set last spawned zombie's name to "&6%{_h}%&c/&6100 &cHP" set last spawned zombie's max health to 100 set last spawned zombie's health to 100 wait 30 minutes while {@opZombSpawn} is false: set {@zombHPListener} to false stop while {@zombHPListener} is true: set {_h} to last spawned zombie's health while {@zombHPListener} is false: stop on death of zombie: if event-entity's max health is 100: if event-entity is in world "pvp": drop 2 golden apples drop 1 pink wool named "&dBrain" with lore "&bYummy..."
Is it dropping the correct items on death?
bump
The zombie does spawn, it shows <none>/100 as the name and doesn't drop anything
bump
The zombie does spawn, it shows <none>/100 as the name and doesn't drop anything
[doublepost=1621075297,1619890669][/doublepost]
bump