options: block: obsidian swiat: demontower # TUTAJ WPISZ NAZWE SWIATA Z DEMONTOWER! # Ustawienia 1 rodzaju moba nazwa1: &cDemonTower Mob zycie1: 500 damage1: 50 # Ustawienia 2 rodzaju moba nazwa2: &6DemonTower Mob zycie2: 450 damage2: 45 # :: FUNKCJE :: function spawnMob(poziom: number): loop 6 times: loop 10 times: spawn 10 zombie at {dt.exp%loop-number%::%{_poziom}%} set the last spawned zombie display name to "{@nazwa1}" set the last spawned entity max health to {@zycie1} heal the last spawned entity loop 10 times: spawn 10 skeleton at {dt.exp%loop-number%::%{_poziom}%} set the last spawned skeleton display name to "{@nazwa2}" set the last spawned entity max health to {@zycie2} heal the last spawned entity function dtDolacz(p: player): if {dt.aktualnypoziom} is not set: set {dt.aktualnypoziom} to 0 if {dt.aktualnypoziom} is less than 3: if {dt.aktualnypoziom} is 0: set {dt.aktualnypoziom} to 1 teleport {_p} to {dt.poziom::%{dt.aktualnypoziom}%} spawnMob(1) else: teleport {_p} to {dt.poziom::%{dt.aktualnypoziom}%} else: send "Musisz zaczekac az skonczy sie aktualny DemonTower!" to {_p} # :: DALSZY KOD :: command /dt-spawn : usage: /dt-spawn [NUMER_SPAWNERU] [POZIOM_WIERZY] permission: dt.admin trigger: if arg 1 is more than 6: send "Mozna ustawic max. 6 spawnow!" to player else if arg 1 is less than 1: send "Nie mozesz ustawic spawnu mniejszego niz 1!" to player else: set {dt.exp%arg 1%::%arg 2%} to location of player send "Spawn %number-arg% zostal ustawiony na koordynatach: %{dt.exp%number-arg%}%" to player command /dt-kamien: permission: dt.admin trigger: add 1 of {@block} named "&cDT KAMIEN" to player's inventory send "Otrzymales &cDT KAMIEN&r!!" to player on place: if player's tool is {@block} named "&cDT KAMIEN": if player has permissions "dt.admin": set {dt.kamien::%location of event-block%} to now send "Postawiles &cDT KAMIEN&r! Aby zmienic jego polozenie zniszcz go &6ZLOTYM KILOFEM&r! Gracze niszczac go zlotym kilofem nie beda go niszczyc!" else: cancel event send "&cDT KAMIEN&r Moze stawiac tylko admin!" to player on break: if player's tool is golden pickaxe: if {dt.kamien::%location of event-block%} is set: if player has permissions "dt.admin": clear {dt.kamien::%location of event-block%} else: cancel event dtDolacz(%player%) else: if {dt.kamien::%location of event-block%} is set: cancel event dtDolacz(%player%) command /dt-poziom-set : usage: /dt-poziom-set [POZIOM_WIERZY] permission: dt.admin trigger: if arg is not 999: set {dt.poziom::%number-arg%} to location of player send "Poziom DemonTower: &c%number-arg%&r zostal ustawiony na %{dt.poziom::%number-arg%}%" to player else: send "Ustawiles ostatni poziom!" to player set {dt.poziom::ostatnie} to location of player on death: if attacker is a player: if world of attacker is "{@swiat}": if victim is not a player: add 1 to {dt.zabite} if {dt.zabite} is less than 120: stop else: set {_z} to ({dt.aktualnypoziom} +1) if {dt.poziom::%{_z}%} is set: loop all players: if world of loop-player is "{@swiat}": teleport loop-player to {dt.poziom::%{_z}%} spawnMob(%{_z}%) send "&aKolejna fala rozpoczeta!" to loop-player else: loop all players: if world of loop-player is "{@swiat}": teleport loop-player to {dt.poziom::ostatnie} send "&aUkonczyles DEMONTOWER!" to loop-player on damage: if name of attacker is "{@nazwa1}": set damage to {@damage1} if name of attacker is "{@nazwa2}": set damage to {@damage2}