My code, as listed below, shows no errors or problems when running through the server, yet when I tested it, it did not work. I meant that sometimes the monsters spawned, and sometimes they did not. Sometimes they die randomly (not accompanied with the sea lanterns appearing), and sometimes they die when the lights appear.
.One note is that the monsters do not spawn during the time in which the sea lanterns appear. Please help me with my code!
every 19 ticks:
chance of 10%:
set {_loc1} to location(-213,54,-261)
set {_loc2} to location(-323,54,-332)
if the blocks within location(-213,54,-261) and location(-323,54,-332) do not contain sea lanterns:
loop all blocks within block at {_loc1} and block at {_loc2}:
set loop-block to polished andesite
chance of 7.5%:
set loop-block to sea lantern
loop all zombies within 200 blocks of location(-323,54,-332):
kill loop-zombie
every 20 ticks:
chance of 6%:
set all blocks within location(-213,54,-261) and location(-323,54,-332) to polished andesite
spawn 3 of zombie at location(-265,50,-319)
loop all zombies within 10 blocks of location(-265,49,-319):
set the health of the loop-zombie to 10000
apply swiftness 4 to the loop-zombie for 2000 years
apply resistance 100 to the loop-zombie for 2000 years
apply strength 7 to the loop-zombie for 2000 years
wait 3 ticks
equip the loop-zombie with tinted glass of infinity
set the name of loop-zombie to "&4Entity"
.One note is that the monsters do not spawn during the time in which the sea lanterns appear. Please help me with my code!
every 19 ticks:
chance of 10%:
set {_loc1} to location(-213,54,-261)
set {_loc2} to location(-323,54,-332)
if the blocks within location(-213,54,-261) and location(-323,54,-332) do not contain sea lanterns:
loop all blocks within block at {_loc1} and block at {_loc2}:
set loop-block to polished andesite
chance of 7.5%:
set loop-block to sea lantern
loop all zombies within 200 blocks of location(-323,54,-332):
kill loop-zombie
every 20 ticks:
chance of 6%:
set all blocks within location(-213,54,-261) and location(-323,54,-332) to polished andesite
spawn 3 of zombie at location(-265,50,-319)
loop all zombies within 10 blocks of location(-265,49,-319):
set the health of the loop-zombie to 10000
apply swiftness 4 to the loop-zombie for 2000 years
apply resistance 100 to the loop-zombie for 2000 years
apply strength 7 to the loop-zombie for 2000 years
wait 3 ticks
equip the loop-zombie with tinted glass of infinity
set the name of loop-zombie to "&4Entity"