Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /arena [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is "join":
- if arg 2 is set:
- if {arena.nazwa.%arg 2%} is true:
- if {arena.stan.%arg 2%} is "wait":
- add 1 to {arena.ile.%arg 2%}
- set {arena.stan.player.%player%} to true
- set {arena.nazwa.player.%player%} to arg 2
- add player to {arena.lista.%arg 2%::*}
- send "pomyślnie dołączyłeś do areny %arg 2%"
- if {arena.ile.%arg 2%} more than or equal to {arena.ile.max.%arg 2%}:
- set {arena.stan.%arg 2%} to "start"
- loop {arena.lista.%arg 2%::*}:
- set {_nick} to loop-value parsed as player
- set {_index} to random integer between 1 and {arena.%arg 2%.ile.spawny}
- set {_poz} to {arena.%arg 2%.spawny::%{_index}%}
- if {arena.%arg 2%.spawn.%{_poz}%} is set:
- teleport {_nick} to {arena.%arg 2%.spawn.%{_poz}%}
- else:
- send "Wylosowana lokalizacja nie istnieje... Zgłoś się do administratora!" to {_nick}
- execute {_nick} command "arena leave"
- stop
- if {arena.nazwa.%arg 2%} is "start":
- send "arena już trwa"
- stop
- else:
- send "nieznany błąd! Napisz do administratora"
- else:
- send "podana arena nie istnieje!"
- else:
- send "musisz podać nazwę areny do której chcesz dołączyć"
- stop
- if arg 1 is "leave":
- if {arena.stan.player.%player%} is true:
- remove 1 from {arena.ile.%{arena.nazwa.player.%player%}%}
- remove player from {arena.lista.%{arena.nazwa.player.%player%}%::*}
- set {arena.stan.player.%player%} to false
- send "pomyślnie wyszedłęś z areny %{arena.nazwa.player.%player%}%"
- teleport player to {arena.lobby.loc}
- execute console command "arena sprawdz"
- else:
- send "nie jesteś na żadnej arenie!"
- stop
- if arg 1 is "setlobby":
- if player have permission "arena.setlobby" or "arena.*":
- set {arena.lobby.loc} to location of player
- send "zmieniłeś lokalizację lobby!"
- else:
- send "nie masz do tego praw!"
- stop
- if arg 1 is "create":
- if player have permission "arena.create" or "arena.*":
- if arg 2 is set:
- if arg 3 is set:
- set {_max} to arg 3 parsed as number
- if {_max} is set:
- if {arena.nazwa.%arg 2%} is not true:
- set {arena.nazwa.%arg 2%} to true
- set {arena.ile.max.%arg 2%} to {_max}
- set {arena.stan.%arg 2%} to "wait"
- set {arena.%arg 2%.ile.spawny} to 0
- send "pomyślnie utworzono arenę o nazwie %arg 2%"
- else:
- send "arena już istnieje!"
- else:
- send "%arg 3% to nie prawidłowa liczba"
- else:
- send "Musisz podać maksymalą ilość graczy mogących być na arenie!"
- else:
- send "Musisz podać nazwę areny!"
- else:
- send "nie masz do tego praw!"
- stop
- if arg 1 is "setspawn":
- if player have permission "arena.setspawn" or "arena.*":
- if arg 2 is set:
- if {arena.nazwa.%arg 2%} is not true:
- if arg 3 is set:
- set {_numer} to arg 3 parsed as number
- if {_number} is set:
- add 1 to {arena.%arg 2%.ile.spawny}
- set {arena.%arg 2%.spawn.%{_number}%} to location of player
- send "Pomyślnie ustawiono spawn dla areny %arg 2%!"
- set {_numerek} to "%{_number}%"
- add {_numerek} to {arena.%arg 2%.spawny::*}
- else:
- send "Podałeś błędną liczbę"
- else:
- send "Musisz podać numer spawnu"
- else:
- send "podana arena już istnieje"
- else:
- send "Musisz podać nazwę areny!"
- else:
- send "nie masz do tego praw!"
- stop
- if arg 1 is "sprawdz":
- if sender is player:
- if player do not have permission "arena.sprwadz" or "arena.*":
- send "nie masz do tego praw"
- stop
- if arg 2 is set:
- if {arena.nazwa.%arg 2%} is true:
- if {arena.ile.%arg 2%} is 1:
- set {_nick} to {arena.lista.%arg 2%::1} parsed as player
- send "Wygrałeś arene!" to {_nick}
- run {_nick} command "co rollback r:50 t:1h"
- execute {_nick} command "arena leave"
- set {arena.stan.%arg 2%} to "wait"
- if {arena.ile.%arg 2%} less than 1:
- Broadcast "Nikt nie wygrał areny %arg 2%"
- if {arena.ile.%arg 2%} is more than 1:
- loop {arena.lista.%arg 2%::*}:
- set {_nick} to loop-value parsed as player
- send "na arenie pozostało %% graczy" to {_nick}
- else:
- send "arena %arg 2% nie istnieje"
- else:
- send "Musisz pdoac nazwe areny"
- send "Nie odnaleziono polecania"
- on death of player:
- if {arena.stan.player.%victim%} is true:
- execute player command "arena leave"
- on quit:
- if {arena.stan.player.%victim%} is true:
- execute player command "arena leave"
- on chat:
- if {arena.stan.player.%victim%} is true:
- cancel event
- loop {arena.lista.%{arena.nazwa.player.%player%}%::*}:
- set {_nick} to loop-value parsed as player
- send "%player%: %message%" to {_nick}
Advertisement
Add Comment
Please, Sign In to add comment