#Random Boss spawn (previous one automatically killed)

1 messages ยท Page 1 of 1 (latest)

odd rain
#

Could you send code?

odd rain
#

@blissful tapir

blissful tapir
#

I deleted it, it didn't work and I had things there that shouldn't even be there...

odd rain
#

Alright

#

You want help making a new one?

blissful tapir
#

Yes please

odd rain
#

So you have the spawning of the bosses?

blissful tapir
#

Do you think location? world or?

odd rain
#

So you deleted all the code?

blissful tapir
#

No ๐Ÿ˜„

#

I have the code of the 2 bosses

odd rain
#

You have a command to spawn the boss, which I assume spawns it at the player

blissful tapir
#

No at location

#

In world "boss"

odd rain
#

Ah alrighg

#

I recommend moving the code in the command into a function, and then call the function from the command so that you don't have thes same code in two different places

#
  //Your code here
  Set {zombiebossisalive} to true```
#
  If {zombiebossisalive} is false:
    spawnZombieBoss()```
#
  If victim is zombie named "&2&lZombie Boss":
    Set {zombiebossisalive} to false```
#

With this, there is a possibility that the boss is spawned right before the timer goes off

#

So I can write a timer

#

If you want @blissful tapir

blissful tapir
#

well, I think I somehow understand it for a timer, I'll be happy ๐Ÿ™‚

#

I'd rather make a backup of the script and try the new method as soon as I have time

odd rain
#

You can also do on death: If victim is zombie named "x": Wait 5 hours spawnZombieBoss()

odd rain
#
  set {_loc} to location(0, 70, 0, world "bossworld")
  spawn 1 adult zombie at {_loc}
  set display name of last spawned zombie to "&e&lZombie Boss"
  set {_e} to last spawned zombie
  set helmet of {_e} to diamond helmet
  set chestplate of {_e} to diamond chestplate
  set leggings of {_e} to diamond leggings
  set boots of {_e} to diamond boots
  set {_e}'s tool to diamond sword
  set {_e}'s max health to 400
  heal {_e}
  apply speed 1 without particles to {_e} for 999 days
  apply resistance 2 without particles to {_e} for 999 days
#
  if victim is zombie named "&e&lZombie Boss":
    wait 5 hours
    spawnZombieBoss();```
blissful tapir
#
function spawnZombieBoss():
    command /zombieboss:
        permission: op
        permission message: nemas prava
        trigger:
            summon zombie at location at 36.500, -2, 71.500 in world "boss"
            set display name of last spawned zombie to "&2&lZombie Boss"
            set maximum health of last spawned zombie to 650
            set health of last spawned zombie to 650
            apply potion of speed of tier 4 to last spawned zombie for 9999 days
            apply strength of tier 2 to last spawned zombie for 9999 days
            apply glowing of tier 1 to last spawned zombie for 9999 days
            wait 1 ticks
            set last spawned zombie's held item to iron hoe
            equip last spawned zombie with iron helmet of unbreaking 1000
        Set {zombiebossisalive} to true

every 5 hours:
  If {zombiebossisalive} is false:
    spawnZombieBoss()

on death:
  If victim is zombie named "&2&lZombie Boss":
    Set {zombiebossisalive} to false```
blissful tapir
blissful tapir
#

or to spawn in the order zombie boss, skeleton boss, pigman boss, wither skeleton boss and loop this, but if the boss is not killed, it will automatically kill itself and spawn the next one so that 5 bosses do not spawn there

#

now I have one error

#
function spawnZombieBoss():
    summon zombie at location at 36.500, -2, 71.500 in world "boss"
    set display name of last spawned zombie to "&2&lZombie Boss"
    set maximum health of last spawned zombie to 650
    set health of last spawned zombie to 650
    apply potion of speed of tier 4 to last spawned zombie for 9999 days
    apply strength of tier 2 to last spawned zombie for 9999 days
    apply glowing of tier 1 to last spawned zombie for 9999 days
    wait 1 ticks
    set last spawned zombie's held item to iron hoe
    equip last spawned zombie with iron helmet of unbreaking 1000
    Set {zombiebossisalive} to true

every 5 hours:
  If {zombiebossisalive} is false:
    spawnZombieBoss()

on death:
  if victim is zombie named "&e&lZombie Boss":
    wait 5 hours
    spawnZombieBoss();```
odd rain
#

Yah

#

My bad

#

You have to split that into two conditions

#
  If victim is zombie:
    If display name of victim is "name":
      Wait 5 hours
      spawnZombieBoss()```
blissful tapir
blissful tapir
odd rain
#

Add an a

#

Like victim is a zombie

#

I don't have skript installed on my server so I couldn't test anything when I was home

blissful tapir
#

it's ok i'll wait

#

and I guess I have to do it this way for all bosses? @odd rain

odd rain
#

Wdym

blissful tapir
#

that I should do functions on all bosses

blissful tapir
#

or so that the system of automatic killing and spawning does not have to be created, I can create 4 arenas and put bosses in them ๐Ÿ˜€

odd rain
#

Yes create Function for each boss

blissful tapir
#

2/4 done

blissful tapir
#

3/4 done

blissful tapir
#

Im done with this script @odd rain tysm blobagree ๐Ÿ‘