So I have created a Skript that will summon my custom boss 1 hour after the server starts, and 12 hours after it is defeated. However I have a feature where players can use an ingame currency to buy a boss spawn. I tried to create a feature where if there is already a ravager in the process of countdown, the second ravager would never reach the announcement stage, but I somehow broke the skript even further. Can someone take a look at my code and see if i did anything wrong?
[doublepost=1616431677,1616001892][/doublepost]Bump
[doublepost=1616525266][/doublepost]Bump 2
Code:
on death of ravager:
wait a tick
if {spawnbossravager} is true:
if {ravagertimer} is not 0:
stop trigger
else if {ravagertimer} is 0:
set {ravagertimer} to 1
wait 1 minute
broadcast ""
broadcast "&b&lThe Next Ravager Boss will spawn in 12 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 11 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 10 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 9 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 8 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 7 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 6 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 5 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 4 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 3 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 2 hours!"
broadcast ""
wait 1 hour
broadcast ""
broadcast "&bThe Ravager Boss will spawn in 1 hours!"
broadcast ""
wait 1 hour
if {ravagertimer} is 0:
stop trigger
else if {ravagertimer} is not 0:
execute console command "/minecraft:summon minecraft:ravager 30 6 -30 {CustomName:""\""RavagerBoss\"""",Attributes:[{Name:""generic.max_health"",Base:1000}],Health:1000}"
wait a tick
console command "/minecraft:effect give @e[type=ravager,limit=1] minecraft:speed 999999 1 true"
broadcast ""
broadcast "&bThe Ravager Boss has appeared!"
broadcast ""
set {ravagertimer} to 0
on skript start:
set {ravagertimer} to 0
wait 1 hour
console command "/ravager"
#/ravager just is a command i made to manually spawn a ravager
[doublepost=1616525266][/doublepost]Bump 2