variables: {boss.spawnowanie} = 0 {boss.zespawnowany} = 0 {boss.zycie} = 2000 {boss.skin} = "FuriousDestroyer" {boss.l.m} = 0 {boss.l.h} = 0 {boss.l.d} = 0 {boss.czas.minuty} = 0 {boss.czas.godziny} = 1 {boss.czas.dni} = 0 command /boss [] [] [] [] : trigger: if player has permission "boss": if argument 1 is not set: if {boss.spawnowanie} is 1: set {_spawnowanie} to "&2wlaczone" else: set {_spawnowanie} to "&4wylaczone" set {_dni} to {boss.czas.dni}-{boss.l.d} set {_godziny} to {boss.czas.godziny}-{boss.l.h} set {_minuty} to {boss.czas.minuty}-{boss.l.m} if {_minuty} is less than 0: set {_minuty} to 60+{_minuty} set {_godziny} to {_godziny}-1 if {_godziny} is less than 0: set {_godziny} to 24+{_godziny} set {_dni} to {_dni}-1 send "&6Informacje o BOSSie" send "&2- Spawnowanie: &9%{_spawnowanie}%" send "&2- Nastepne odnowienie za:&9 %{_dni}% dni, %{_godziny}% godzin, %{_minuty}% minut" send "&2- Miejsce spawnu: &9%{boss.miejsce}%" send "&2- Co ile się odnawia:&9 %{boss.czas.dni}% dni, %{boss.czas.godziny}% godzin, %{boss.czas.minuty}% minut" send "&2- Zycie: &4%{boss.zycie}%" send "&2- Skin: &9%{boss.skin}%" send "&6Komendy:" send "&2- /boss miejsce &6- &9ustawia miejsce spawnu bossa" send "&2- /boss czas &6- &9ustawia co ile ma sie odnawiac boss" send "&2- /boss wlacz &6- &9wlacza odnawianie bossa" send "&2- /boss wylacz &6- &9wylacza odnawianie bossa" send "&2- /boss odnow &6- &9odnawia bossa" send "&2- /boss skin &6- &9zmienia skin bossa na napisany na chacie po wpisaniu komendy" send "&2- /boss drop &6- &9ustawia drop z bossa na itemy w skrzynce na która sie patrzysz" send "&2- /boss zycie &6- &9ustawia ilosc zycia bossa" if argument 1 is "miejsce": set {boss.miejsce} to location of player send "&2Ustawiono miejsce spawnu bossa na %{boss.miejsce}%" if argument 1 is "wlacz": if {boss.czas.dni} is not set: send "&cNajpier ustaw czas co ile ma sie odnawiac boss! /boss czas " else: if {boss.miejsce} is not set: send "&cNajpierw ustaw gdzie ma sie spawnowac boss! /boss miejsce" else: if {boss.zespawnowany} is 0: create a citizen named "&4BOSS" at {boss.miejsce} set {boss} to last created citizen change citizen {boss} skin to "%{boss.skin}%" set {boss.spawnowanie} to 1 make citizen {boss} vulnerable set rf max hp of citizen {boss} to {boss.zycie} set {boss.zespawnowany} to 1 heal citizen {boss} loop 10 times: strike lightning effect at {boss.miejsce} make citizen {boss} hold diamond sword equip citizen {boss} with all diamond armour set {boss.l.d} to 0 set {boss.l.h} to 0 set {boss.l.m} to 0 else: set {boss.spawnowanie} to 1 respawn citizen {boss} at {boss.miejsce} send all players title "&cBOSS zostal odnowiony" for 5 seconds loop 10 times: strike lightning effect at {boss.miejsce} set {boss.l.d} to 0 set {boss.l.h} to 0 set {boss.l.m} to 0 make citizen {boss} vulnerable set rf max hp of citizen {boss} to {boss.zycie} heal citizen {boss} make citizen {boss} hold diamond sword equip citizen {boss} with all diamond armour teleport citizen {boss} to {boss.miejsce} send "&2Wlaczono spawnowanie bossa" if argument 1 is "wylacz": set {boss.spawnowanie} to 0 despawn citizen {boss} send "&2Wylaczono spawnowanie bossa" if argument 1 is "czas": if argument 2 is set: if argument 3 is set: if argument 4 is set: set {boss.czas.dni} to argument 2 set {boss.czas.godziny} to argument 3 set {boss.czas.minuty} to argument 4 set {boss.l.d} to 0 set {boss.l.h} to 0 set {boss.l.m} to 0 send "&2ustawiono czas na %{boss.czas.dni}% dni, %{boss.czas.godziny}% godzin, %{boss.czas.minuty}% minut" else: send "&cMusisz napisac co ile minut ma sie odnawiac boss" else: send "&cMusisz napisac co ile godzin ma sie odnawiac boss" else: send "&cMusisz napisac co ile dni ma sie odnawiac boss" if argument 1 is "odnow": respawn citizen {boss} at {boss.miejsce} send all players title "&cBOSS zostal odnowiony" for 5 seconds loop 10 times: strike lightning effect at {boss.miejsce} set {boss.l.d} to 0 set {boss.l.h} to 0 set {boss.l.m} to 0 make citizen {boss} vulnerable set rf max hp of citizen {boss} to {boss.zycie} heal citizen {boss} make citizen {boss} hold diamond sword equip citizen {boss} with all diamond armour teleport citizen {boss} to {boss.miejsce} if argument 1 is "drop": if target block is chest: clear {boss.drop::*} loop items in target block: add loop-item to {boss.drop::*} send "&2Zmieniono drop z bossa" else: loop {boss.drop::*}: send "&6%loop-value%" if argument 1 is "skin": set {boss.skin.%player%} to 1 send "&2napisz na chacie nick gracza ze skinem na który chcesz zmienic skin bossa" if argument 1 is "zycie": set {boss.zycie} to argument 2 else: set {_dni} to {boss.czas.dni}-{boss.l.d} set {_godziny} to {boss.czas.godziny}-{boss.l.h} set {_minuty} to {boss.czas.minuty}-{boss.l.m} if {_minuty} is less than 0: set {_minuty} to 60+{_minuty} set {_godziny} to {_godziny}-1 if {_godziny} is less than 0: set {_godziny} to 24+{_godziny} set {_dni} to {_dni}-1 send "&2Nastepne odnowienie za %{_dni}% dni, %{_godziny}% godzin, %{_minuty}% minut" on chat: if {boss.skin.%player%} is 1: cancel event set {boss.skin} to message change citizen {boss} skin to "%{boss.skin}%" make citizen {boss} vulnerable set rf max hp of citizen {boss} to {boss.zycie} heal citizen {boss} make citizen {boss} hold diamond sword equip citizen {boss} with all diamond armour set {boss.skin.%player%} to 0 every minute: if {boss.spawnowanie} is 1: add 1 to {boss.l.m} if {boss.l.m} is 60: set {boss.l.m} to 0 add 1 to {boss.l.h} if {boss.l.h} is 24: add 1 to {boss.l.d} set {boss.l.h} to 0 if {boss.l.d} is {boss.czas.dni}: if {boss.l.h} is {boss.czas.godziny}: if {boss.l.m} is {boss.czas.minuty}: respawn citizen {boss} at {boss.miejsce} send all players title "&cBOSS zostal odnowiony" for 5 seconds loop 10 times: strike lightning effect at {boss.miejsce} set {boss.l.d} to 0 set {boss.l.h} to 0 set {boss.l.m} to 0 make citizen {boss} vulnerable set rf max hp of citizen {boss} to {boss.zycie} heal citizen {boss} make citizen {boss} hold diamond sword equip citizen {boss} with all diamond armour teleport citizen {boss} to {boss.miejsce} every tick: set {_yb} to y coordinate of citizen {boss} loop players in radius 1 around citizen {boss}: push loop-player upwards at speed 0.5 push loop-player backwards at speed 0.5 create a fake explosion 1 above citizen {boss} damage loop-player by 1 hearts chance of 50%: chance of 50%: ignite the loop-player for 3 second else: ignite the loop-player for 5 second chance of 10%: strike lightning effect at the loop-player chance of 10%: apply nausea to the loop-player for 10 second chance of 5%: apply blindness to the loop-player for 5 second loop players in radius 1 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop wait 1 tick loop players in radius 2 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop wait 1 tick loop players in radius 3 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop wait 1 tick loop players in radius 4 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop wait 1 tick loop players in radius 5 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop wait 1 tick loop players in radius 25 around citizen {boss}: set {_yp} to y coordinate of loop-player if {_yp}-{_yb} is more than 5: stop else: if block under loop-player is air: if block 2 under loop-player is air: stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop else: make citizen {boss} attack loop-player move citizen {boss} to location of loop-player at speed 2 stop on damage of player: victim is "&4BOSS": attacker is player: damage was caused by projectile: projectile is arrow: cancel event on death of a player: player is "&4BOSS": loop drops: remove loop-item from drops respawn citizen {boss} at {boss.miejsce} despawn citizen {boss} loop {boss.drop::*}: drop loop-value at player every 1 second: set {_a} to health of citizen {boss} set {_zycie} to {_a}*2/{boss.zycie}*100 loop players in radius 50 around citizen {boss}: display "&4BOSS" on bossbar with {_zycie} percent by 1 seconds for loop-player