Help with a boss timer

  • Welcome to skUnity!

    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 community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ZsCortzones

Member
Feb 18, 2021
32
1
8
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?

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=1616431677,1616001892][/doublepost]Bump
[doublepost=1616525266][/doublepost]Bump 2
 
You can just do
Code:
on death of ravager:
  if {spawnabble} is true:
    wait 1 hour
    broadcast "ravager 11h"
    if {spawnabble} is true:
      #etc
 
Status
Not open for further replies.