Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- tag: &8[&6Castle&8]
- command /castle [<text="info">] [<text>] [<text>]:
- trigger:
- if arg 1 is "info":
- send "{@tag}"
- send " "
- send "&6/castle add &8- &7Dodaje nowa arene"
- send "&6/castle remove &8- &7Usuwa arene"
- send "&6/castle list &8- &7Lista aren"
- send "&6/castle setspawn &8- &7Ustawia spawny"
- send "&6/castle active &8- &7Aktywuje arene"
- send "&6/castle minplayers &8- &7Ustawia minimalna liczbe graczy na arenie"
- send "&6/castle join &8- &7Dolacza do areny"
- send "&6/castle leave &8- &7Opuszcza arene"
- if arg 1 is "active":
- if arg 2 is set:
- loop {castle::list::*}:
- if loop-value is arg 2:
- if {castle::REDresp::%arg 2%} is set:
- if {castle::BLUEresp::%arg 2%} is set:
- if {castle::lobby::%arg 2%} is set:
- if {castle::minplayers::%arg 2%} is set:
- set {castle::status::%arg 2%} to "oczekuje"
- send "{@tag} &7Aktywowales arene &6%arg 2%"
- else:
- send "{@tag} &7Ustaw liczbe graczy wymagana do startu gry, &6/castle minplayers <arena> <liczba>"
- else:
- send "{@tag} &7Ustaw lobby areny, &6/castle setspawn LOBBY <arena>"
- else:
- send "{@tag} &7Ustaw BLUE resp areny, &6/castle setspawn BLUE <arena>"
- else:
- send "{@tag} &7Ustaw RED resp areny, &6/castle setspawn RED <arena>"
- stop
- send "{@tag} &7Taka arena nie istnieje!"
- else:
- send "{@tag} &6/castle active <arena>"
- if arg 1 is "add":
- if arg 2 is set:
- loop {castle::list::*}:
- if loop-value is arg 2:
- send "{@tag} &7Taka arena juz istnieje!"
- stop
- add arg 2 to {castle::list::*}
- set {castle::minplayers::%arg 2%} to 16
- set {castle::status::%arg 2%} to "niedostepna"
- send "{@tag} &7Dodano arene o nazwie &6%arg 2%&7."
- else:
- send "&6/castle add <name>"
- if arg 1 is "remove":
- if arg 2 is set:
- loop {castle::list::*}:
- if loop-value is arg 2:
- delete {castle::REDresp::%arg 2%}
- delete {castle::BLUEresp::%arg 2%}
- delete {castle::lobby::%arg 2%}
- delete {castle::status::%arg 2%}
- delete {castle::minplayers::%arg 2%}
- remove arg 2 from {castle::list::*}
- send "{@tag} &7Usunieto arene o nazwie &6%arg 2%&7."
- stop
- send "{@tag} &7Arena nie istnieje!"
- else:
- send "&6/castle remove <name>"
- if arg 1 is "setspawn":
- if arg 2 is set:
- if arg 3 is set:
- loop {castle::list::*}:
- if loop-value is arg 3:
- if arg 2 is "RED":
- set {castle::REDresp::%arg 3%} to location of player
- send "{@tag} &7Ustawiono RED resp dla areny &6%arg 3%&7."
- if arg 2 is "BLUE":
- set {castle::BLUEresp::%arg 3%} to location of player
- send "{@tag} &7Ustawiono BLUE resp dla areny &6%arg 3%&7."
- if arg 2 is "LOBBY":
- set {castle::lobby::%arg 3%} to location of player
- send "{@tag} &7Ustawiono LOBBY resp dla areny &6%arg 3%&7."
- stop
- send "{@tag} &7Arena nie istnieje!"
- else:
- send "&6/castle setspawn BLUE / RED / LOBBY <arena>"
- else:
- send "&6/castle setspawn BLUE / RED / LOBBY <arena>"
- if arg 1 is "minplayers":
- if arg 2 is set:
- loop {castle::list::*}:
- if loop-value is arg 2:
- if arg 3 is set:
- set {castle::minplayers::%arg 2%} to arg 3
- send "{@tag} &7Ustawiono &6%arg 3% &7minimalnych garczy dla areny &6%arg 2%&7."
- else:
- send "&6/castle minplayers <name> <number>"
- stop
- send "{@tag} &7Arena nie istnieje!"
- else:
- send "&6/castle minplayers <name> <number>"
- if arg 1 is "list":
- loop {castle::list::*}:
- send "&8%loop-index%. &6%loop-value%"
- if arg 1 is "join":
- if arg 2 is set:
- loop {castle::list::*}:
- if loop-value is arg 2:
- if {castle::status::%arg 2%} is "oczekuje":
- if {castle::join::%player%} is set:
- add player to {castle::players::%arg 2%::*}
- set {castle::join::%player%} to arg 2
- teleport player to {castle::lobby::%arg 2%}
- send "{@tag} &6%player% &7dolaczyl do gry. &8[&6%size of {castle::players::%arg 2%::*}%&8/&6%{castle::minplayers::%arg 2%}%&8]" to {castle::players::%arg 2%::*}
- if (size of {castle::players::%arg 2%::*}) = {castle::minplayers::%arg 2%}:
- set {castle::status::%arg 2%} to "w trakcie"
- loop {castle::players::%arg 2%::*}:
- set level of loop-value-2 to 30
- loop 30 times:
- if (size of {castle::players::%arg 2%::*}) = {castle::minplayers::%arg 2%}:
- loop {castle::players::%arg 2%::*}:
- set {_value} to loop-value-2
- play raw sound "note.pling" at {_value} with pitch 1 volume 5
- set {_x} to level of {_value} - 1
- set level of {_value} to {_x}
- send "{@tag} &7Gra rozpocznie sie za &6%{_x}% sekund &7!" to {_value}
- wait 1 second
- else:
- exit loop
- set {castle::status::%arg 2%} to "oczekuje"
- send "{@tag} &6%player% &7Opuscil gre. &8[&6%{castle::players::%arg 2%::*}%&8/&6%{castle::minplayers::%arg 2%}%&8]" to {castle::players::%arg 2%::*}
- send "{@tag} &cOdliczanie zatrzymane." to {castle::players::%arg 2%::*}
- play raw sound "note.pling" at {castle::players::%arg 2%::*} with pitch 2 volume 5
- set level of {castle::players::%arg 2%::*} to 0
- set {_number} to size of {castle::players::%arg 2%::*}
- loop {castle::players::%arg 2%::*}:
- set {_y} to loop-value-2
- loop {_number}/2 times:
- set {_x%loop-number%} to random element out of {_y}
- add {_x%loop-number%} to {castle::REDteam::%arg 2%}
- remove {_x%loop-number%} from {_y}
- add {_y} to {castle::BLUEteam::%arg 2%}
- teleport {castle::REDteam::%arg 2%} to {castle::REDresp::%arg 2%}
- teleport {castle::BLUEteam::%arg 2%} to {castle::BLUEresp::%arg 2%}
- else:
- send "{@tag} &7Jestes juz na arenie."
- else if {castle::status::%arg 2%} is "w trakcie":
- send "{@tag} &7Arena jest w trakcie gry."
- else if {castle::status::%arg 2%} is "niedostepna":
- send "{@tag} &7Arena nie jest dostepna."
- stop
- send "{@tag} &7Ta arena nie jest dostepna"
- else:
- send "{@tag} &6/castle join <nazwa>"
- if arg 1 is "leave":
- if {castle::join::%player%} is set:
- send "{@tag} &6%player% &7Opuscil gre. &8[&6%{castle::players::%{castle::join::%player%}%::*}%&8/&6%{castle::minplayers::%{castle::join::%player%}%}%&8]" to {castle::players::%{castle::join::%player%}%::*}
- clear {castle::join::%player%}
- remove player from {castle::players::%{castle::join::%player%}%::*}
- command /test:
- trigger:
- delete {castle::join::%player%}
- every 1 seconds:
- loop all players:
- loop all blocks in radius 20 of loop-player:
- if loop-block is sign:
- if line 1 of loop-block is "{@tag}":
- if line 2 of loop-block is set:
- if {castle::status::%uncolored line 2 of loop-block%} is set:
- if {castle::status::%uncolored line 2 of loop-block%} is "oczekuje":
- set line 3 of loop-block to "&aOczekuje"
- et line 4 of loop-block to "&8[&6%size of {castle::players::%uncolored line 2 of loop-block%::*}%&8/&6%{castle::minplayers::%uncolored line 2 of loop-block%}%&8]"
- else if {castle::status::%uncolored line 2 of loop-block%} is "w trackie":
- set line 3 of loop-block to "&cW trakcie"
- set line 4 of loop-block to "&8[&6%size of {castle::players::%uncolored line 2 of loop-block%::*}%&8/&6%{castle::minplayers::%uncolored line 2 of loop-block%}%&8]"
- else if {castle::status::%uncolored line 2 of loop-block%} is "niedostepna":
- set line 3 of loop-block to "&6Niedostepna"
- set line 4 of loop-block to " "
- on sign change:
- if line 1 is "castle":
- set line 1 to "{@tag}"
- if line 2 is set:
- loop {castle::list::*}:
- if loop-value is line 2:
- set line 2 to "&l%line 2%"
- stop
- set line 2 to "&c<none>"
- on rightclick on sign:
- if line 1 of clicked block is "{@tag}":
- if line 2 of clicked block is set:
- loop {castle::list::*}:
- if loop-value is line 2:
- execute player command "/castle join %uncolored line 2 of clicked block%"
- on quit:
- if {castle::join::%player%} is true:
- execute player command "castle leave"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement