Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if arg 1 is "join":
- if player has permission "castle.join" or "castle.*":
- if {castle.started} is false:
- if {castle.lobby} is set:
- if {castle.%player%.ingame} is false:
- if {castle.spawn.attackers} is set:
- if {castle.spawn.defenders} is set:
- if {castle.flag} is set:
- if size of items in player's inventory is 0:
- if size of {castle.players::*} is smaller than {@maximum_players}:
- set {castle.%player%.position} to player's location
- set {castle.%player%.ingame} to true
- add player to {castle.players::*}
- teleport player to {castle.lobby}
- send "{@tag} %player% dolaczyl do gry. &c%size of {castle.players::*}%&7/&c{@maximum_players}" to {castle.players::*}
- wait 1 second
- if size of {castle.players::*} is {@need_to_naturally_start}:
- send "{@tag} Gra zacznie sie za {@time_to_start} sekund!" to {castle.players::*}
- set {castle.started} to true
- wait {@time_to_start} seconds
- if size of {castle.players::*} is larger than 0:
- loop all players:
- if {castle.%loop-player%.ingame} is true:
- if size of {castle.defenders::*} is smaller than {@need_to_naturally_start}/2:
- add loop-player to {castle.defenders::*}
- equip loop-player with diamond helmet of protection 4
- equip loop-player with diamond chestplate of protection 4
- equip loop-player with diamond leggings of protection 4
- equip loop-player with diamond boots of protection 4
- add diamond sword of sharpness 5 and fire aspect 2 to loop-player
- add bow of power 5 and fire aspect 2 and infinity 1 to loop-player
- add 1 arrow to loop-player
- add 2 enchanted golden apple to loop-player
- add 4 golden apple to loop-player
- add 64 cooked porkchop to loop-player
- add water bucket to loop-player
- add 64 cobblestone to loop-player
- send "{@tag} Jestes w druzynie broniacych. Powodzenia !" to loop-player
- else:
- add loop-player to {castle.attackers::*}
- add loop-player to {castle.defenders::*}
- equip loop-player with diamond helmet of protection 4
- equip loop-player with diamond chestplate of protection 4
- equip loop-player with diamond leggings of protection 4
- equip loop-player with diamond boots of protection 4
- add diamond sword of sharpness 5 and fire aspect 2 to loop-player
- add bow of power 5 and fire aspect 2 and infinity 1 to loop-player
- add 1 arrow to loop-player
- add 2 enchanted golden apple to loop-player
- add 4 golden apple to loop-player
- add 64 cooked porkchop to loop-player
- add water bucket to loop-player
- add 64 cobblestone to loop-player
- add 64 tnt to loop-player
- add 32 redstone block to loop-player
- add flint and steel to loop-player
- send "{@tag} Jestes w druzynie atakujacych. Powodzenia !" to loop-player
- teleport {castle.defenders::*} to {castle.spawn.defenders}
- teleport {castle.attackers::*} to {castle.spawn.attackers}
- else:
- execute console command "castle restart"
- else if size of {castle.players::*} is {@maximum_players}:
- send "{@tag} Spozniles sie. Nie ma juz miejsc."
- else:
- send "{@tag} Aby dolaczyc do gry musisz oproznic swoj ekwipunek!"
- else:
- send "{@tag} Blad. Skontaktuj sie z administratorem."
- else:
- send "{@tag} Blad. Skontaktuj sie z administratorem."
- else:
- send "{@tag} Blad. Skontaktuj sie z administratorem."
- else:
- send "{@tag} Jestes juz w grze!"
- else:
- send "{@tag} Blad. Skontaktuj sie z administratorem."
- else:
- send "{@tag} Gra juz sie zaczela!"
- else:
- send "{@tag} Nie masz uprawnien do tej komendy!"
Advertisement
Add Comment
Please, Sign In to add comment