Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- block_in: location(7008, 100, 7015, world "katedra")
- block_out: location(6966, 100, 7014, world "katedra")
- tp_start: location(7010, 99, 7001, world "katedra", 90, 0)
- srodek: location(6987, 100, 7001, world "katedra")
- on load:
- set block at {@block_in} to air
- set block at {@block_out} to air
- delete {diglet.hp}
- command /odlicz <integer>:
- trigger:
- odliczanie(player, arg)
- command /adddiglet:
- permission: wlasciciel
- trigger:
- set {_b} to block at player
- if "%{diglet.spawny::*}%" do not contain "%location at {_b}%":
- add {_b}'s location to {diglet.spawny::*}
- send "&2Pomyslnie dodano lokalizacje &7%{_b}'s location% &2jako spawn digleta"
- else:
- send "&cJuz istnieje taka lokalizacja w liscie"
- function odliczanie(p: player, i: integer):
- if metadata value "odliczanie.czas" of {_p} is true:
- stop
- if metadata value "odliczanie.czas" of {_p} is false:
- set metadata value "odliczanie.czas" of {_p} to true
- stop
- else:
- set metadata value "odliczanie.czas" of {_p} to false
- loop {_i} times:
- if "%region at {_p}%" do not contain "diglet":
- stop
- set {_s} to mod({_i} - loop-number, 60)
- set {_m} to floor(({_i} - loop-number)/60)
- if {_m} < 10:
- set {_m} to "0%{_m}%"
- if {_s} < 10:
- set {_s} to "0%{_s}%"
- if {diglet.hp} <= 0:
- play 100 smoke particle at {_p}
- wait 3 tick
- play 500 smoke particle at {_p}
- wait 3 tick
- play 1000 smoke particle at {_p}
- wait 3 tick
- play 2000 smoke particle at {_p}
- wait 3 tick
- play 5000 smoke particle at {_p}
- wait 3 tick
- play 5000 smoke particle at {_p}
- wait 5 ticks
- end({_p})
- apply blindness to {_p} for 5 seconds
- play 5000 smoke particle at {_p}
- wait 5 ticks
- play 5000 smoke particle at {_p}
- wait 5 ticks
- play 5000 smoke particle at {_p}
- clear metadata value "odliczanie.czas" of {_p}
- send actionbar "" to {_p}
- stop
- send actionbar "&4%{_m}%:%{_s}%:&kaa&r &e&lWytrzymalosc sali: &f&l%{diglet.hp}%" to {_p}
- if metadata value "odliczanie.czas" of {_p} is true:
- clear metadata value "odliczanie.czas" of {_p}
- send actionbar "" to {_p}
- stop
- wait 1 second
- send actionbar "" to {_p}
- clear metadata value "odliczanie.czas" of {_p}
- #on xp spawn:
- # event-location is in region "diglet":
- # broadcast "xp"
- # cancel event
- #on death of powered creeper:
- # set {_l::*} to regions at event-location
- # loop {_l::*}:
- # broadcast loop-value
- # loop-value is "diglet":
- # broadcast "wyczyszczono"
- # clear drops
- # event-location is in region "diglet":
- # broadcast "jest"
- # clear drops
- command /remdiglet:
- permission: wlasciciel
- trigger:
- set {_b} to block at player
- if "%{diglet.spawny::*}%" contains "%location at {_b}%":
- remove location at {_b} from {diglet.spawny::*}
- send "&2Pomyslnie usunieto lokalizacje &7%{_b}'s location% &2jako spawn digleta"
- else:
- send "&cLokalizacja &7%{_b}'s location% &cnie jest dodana do listy"
- command /listdiglet:
- permission: wlasciciel
- trigger:
- send "&a&lW sumie: &b&l%size of {diglet.spawny::*}%"
- loop {diglet.spawny::*}:
- send "&a&l%loop-index%. &2%loop-value%"
- function randMob(i: integer):
- if {_i} > size of {diglet.spawny::*}:
- set {_i} to size of {diglet.spawny::*}
- wait 1 tick
- set {_t} to random integer between 2 and 5
- set {_m} to random integer between 1 and size of {diglet.spawny::*}
- loop all entities in radius 0.7 of {diglet.spawny::%{_m}%}:
- type of loop-entity is creeper:
- set {_i} to "%{_i} - 1%" parsed as integer
- randMob({_i})
- stop
- spawn powered creeper at {diglet.spawny::%{_m}%}
- set {_c} to spawned entity
- set {_c}'s health to 0.01
- apply slowness 100 to {_c}
- if {_i} > 1:
- set {_i} to "%{_i} - 1%" parsed as integer
- randMob({_i})
- set {_t} to "%{_t}% seconds" parsed as timespan
- wait {_t}
- if {_c} is not alive:
- stop
- apply levitation 15 to {_c}
- loop 10 times:
- if block 2 meters above {_c} is not air:
- exit 2 sections
- wait 5 ticks
- if {_c} is not alive:
- stop
- remove (random integer between 2 and 5) * 5 from {diglet.hp}
- make fake explosion at {_c}
- teleport {_c} to location(0, -100, 0, {_c}'s world)
- kill {_c}
- command /sztest <integer>:
- trigger:
- if {diglet.hp} is set:
- stop
- set block at {@block_in} to redstone block
- set {diglet.hp} to 100
- set {_cz} to 0
- loop all players in radius 20 around {@srodek}:
- if "%region at loop-player%" contains "diglet":
- odliczanie(loop-player, arg)
- while {_cz} < arg:
- if {diglet.hp} < 1:
- set metadata value "odliczanie.czas" of {_p} to true
- set block at {@block_in} to air
- delete {diglet.hp}
- stop
- set {_i} to random integer between 5 and 12
- add {_i} to {_cz}
- set {_i} to "%{_i}% seconds" parsed as timespan
- randMob(random integer between 1 and 4)
- wait {_i}
- set block at {@block_out} to redstone block
- wait 30 seconds
- delete {diglet.hp}
- set block at {@block_in} to air
- set block at {@block_out} to air
- function end(p: player):
- if metadata value "diglet.pozostalo" of {_p} >= 2:
- send {_p} title "&c&lGratulacje!" with subtitle "&7Szatan sie zalamal jak patrzyl na Twoje zmagania..." for 5 seconds
- wait 10 ticks
- run {_p} command "warp katedra" as op
- else:
- set {_m} to metadata value "diglet.pozostalo" of {_p}
- add 1 to {_m}
- set metadata value "diglet.pozostalo" of {_p} to {_m}
- send {_p} title "&4&lUmarles" with subtitle "&eCreepery pogrzebaly cie zywcem w gruzach. Zostalo Ci %3-{_m}% szans" for 5 seconds
- wait 10 ticks
- teleport {_p} to {@tp_start}
- on disconnect:
- clear metadata value "diglet.pozostalo" of player
- on exit region "diglet_quest":
- clear metadata value "diglet.pozostalo" of player
- on explosion prime:
- if event-entity is a creeper:
- if "%region at creeper%" contain "diglet":
- cancel the event
Add Comment
Please, Sign In to add comment