Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- tag: &9[&6GLADIATORZY&9]
- max_players: 2
- accept_time: 30
- on script load:
- if {turniej::gra::status} is not set:
- set {turniej::gra::status} to false
- on join:
- if {turniej::status::%player%} is not set:
- set {turniej::status::%player%} to false
- command /turniej [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is not set:
- if player doesn't have permission "turniej.*" or "turniej.pomoc":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- send "{@tag} &aKomendy:"
- send "&3/turniej zapros <gracz>"
- send "&3/turniej akceptuj"
- send "&3/turniej odrzuc"
- send "&3/turniej opusc"
- send "&3/turniej druzyna <0|1|2> <gracz>"
- send "&3/turniej wyrzuc <gracz>"
- send "&3/turniej info"
- send "&3/turniej ustawlobby"
- send "&3/turniej ustawwidownie"
- send "&3/turniej ustawspawn <1|2>"
- stop
- if arg 1 is "wyrzuc":
- if player doesn't have permission "turniej.*" or "turniej.wyrzuc":
- send "{@tag} Nie masz uprawnien do tej komendy!"
- stop
- if arg 2 is not set:
- send "{@tag} &cPoprawne uzycie: &3/turniej wyrzuc <gracz>"
- stop
- if {turniej::status::%arg 2%} is false:
- send "{@tag} &cTen gracz nie bierze udzialu w turnieju!"
- stop
- set {_target} to arg 2 parsed as player
- send "{@tag} &6%{_target}% &czostal wyrzucony z turnieju!" to {turniej::gra::gracze::*}
- remove {_target} from {turniej::gra::gracze::*}
- remove {_target} from {turniej::gra::team%{turniej::status::%{_target}%::team}%::*}
- clear {turniej::status::%{_target}%::*}
- set {turniej::status::%{_target}%} to false
- teleport {_target} to {turniej::cache::%{_target}%::pos}
- clear {_target}'s inventory
- set {_target}'s helmet to air
- set {_target}'s chestplate to air
- set {_target}'s leggings to air
- set {_target}'s boots to air
- add {turniej::cache::%{_target}%::items::*} to {_target}
- set {_target}s level to {turniej::cache::%{_target}%::level}
- set {_target}'s level progress to {turniej::cache::%{_target}%::levelprogress}
- set {_target}'s gamemode to {turniej::cache::%{_target}%::gm}
- clear {turniej::cache::%{_target}%::*}
- stop
- if arg 1 is "druzyna":
- if player doesn't have permission "turniej.*" or "turniej.druzyna":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if arg 2 is not "0" or "1" or "2":
- send "{@tag} &cPoprawne uzycie: &3/turniej druzyna <0|1|2> <gracz>"
- stop
- if arg 3 is not set:
- send "{@tag} &cPoprawne uzycie: &3/turniej druzyna <0|1|2> <gracz>"
- stop
- if {turniej::status::%arg 3%} is false:
- send "{@tag} &cTen gracz nie bierze udzialu w turnieju!"
- stop
- if {turniej::gra::status} is true:
- send "{@tag} &cGra juz wystartowala!"
- stop
- if arg 2 is "0":
- if {turniej::status::%arg 3%::team} is not set:
- send "{@tag} &6%arg 3% &cnie jest przypisany do zadnej druzyny!"
- stop
- remove arg 3 from {turniej::gra::team%{turniej::status::%arg 3%::team}%::*}
- send "{@tag} &3Gracz &6%arg 3% &3zostal usuniety z druzyny nr %{turniej::status::%arg 3%::team}%." to {turniej::gra::gracze::*}
- clear {turniej::status::%arg 3%::team}
- stop
- if {turniej::status::%arg 3%::team} is arg 2:
- send "{@tag} &6%arg 3% &cjest juz w druzynie nr %arg 2%!"
- stop
- send "{@tag} &6%arg 3% &3zostal przeniesiony do druzyny nr %arg 2%." to {turniej::gra::gracze::*}
- remove arg 3 from {turniej::gra::team%{turniej::status::%arg 3%::team}%::*}
- add arg 3 to {turniej::gra::team%arg 2%::*}
- set {turniej::status::%arg 3%::team} to arg 2
- if (size of {turniej::gra::team1::*} + size of {turniej::gra::team2::*}) is size of {turniej::gra::gracze::*}:
- send "{@tag} &3Turniej rozpocznie sie za &c30 &3sekund." to {turniej::gra::gracze::*}
- wait 10 seconds
- send "{@tag} &3Turniej rozpocznie sie za &c20 &3sekund." to {turniej::gra::gracze::*}
- wait 10 seconds
- send "{@tag} &3Turniej rozpocznie sie za &c10 &3sekund." to {turniej::gra::gracze::*}
- wait 7 seconds
- send "{@tag} &3Turniej rozpocznie sie za &c3 &3sekundy." to {turniej::gra::gracze::*}
- wait a second
- send "{@tag} &3Turniej rozpocznie sie za &c2 &3sekundy." to {turniej::gra::gracze::*}
- wait a second
- send "{@tag} &3Turniej rozpocznie sie za &c1 &3sekunde." to {turniej::gra::gracze::*}
- wait a second
- send "{@tag} &3Turniej rozpoczal sie! Powodzenia!" to {turniej::gra::gracze::*}
- set {turniej::gra::status} to true
- loop {turniej::gra::gracze::*}:
- teleport loop-value to {turniej::gra::spawn%{turniej::status::%loop-value%::team}%}
- #Zbroja
- equip loop-value with all diamond armour
- #Przedmioty
- add diamond sword to "%loop-value%" parsed as player
- add 16 cooked beef to "%loop-value%" parsed as player
- add 4 enchanted golden apple to "%loop-value%" parsed as player
- add 8 golden apple to "%loop-value%" parsed as player
- if arg 1 is "info":
- if player doesn't have permission "turniej.*" or "turniej.info":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if {turniej::gra::spawn1} is set:
- send "&6Spawn druzyny nr 1: &austawiony"
- else:
- send "&6Spawn druzyny nr 1: &cnieustawiony"
- if {turniej::gra::spawn2} is set:
- send "&6Spawn druzyny nr 2: &austawiony"
- else:
- send "&6Spawn druzyny nr 2: &cnieustawiony"
- if {turniej::gra::lobby} is set:
- send "&6Looby: &austawione"
- else:
- send "&6Lobby: &cnieustawione"
- if {turniej::gra::widownia} is set:
- send "&6Widownia: &austawiona"
- else:
- send "&6Widownia: &cnieustawiona"
- stop
- if arg 1 is "opusc":
- if player doesn't have permission "turniej.*" or "turniej.opusc" or "turniej.gracz":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if {turniej::status::%player%} is false:
- send "{@tag} &cNie bierzesz udzialu w turnieju!"
- stop
- send "{@tag} &6%player% &copuscil turniej!" to {turniej::gra::gracze::*}
- remove player from {turniej::gra::gracze::*}
- remove player from {turniej::gra::team%{turniej::status::%player%::team}%::*}
- clear {turniej::status::%player%::*}
- set {turniej::status::%player%} to false
- teleport player to {turniej::cache::%player%::pos}
- clear player's inventory
- set player's helmet to air
- set player's chestplate to air
- set player's leggings to air
- set player's boots to air
- add {turniej::cache::%player%::items::*} to player
- set player's level to {turniej::cache::%player%::level}
- set player's level progress to {turniej::cache::%player%::levelprogress}
- set player's gamemode to {turniej::cache::%player%::gm}
- clear {turniej::cache::%player%::*}
- if arg 1 is "ustawspawn":
- if player doesn't have permission "turniej.*" or "turniej.ustawspawn":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if arg 2 is not set:
- send "&cPoprawne uzycie: &3/turniej ustawspawn <1|2>"
- stop
- if arg 2 is not "1" or "2":
- send "&cPoprawne uzycie: &3/turniej ustawspawn <1|2>"
- stop
- set {turniej::gra::spawn%arg 2%} to location of player
- send "{@tag} &3Ustawiono spawn druzyny nr &6%arg 2%&3."
- stop
- if arg 1 is "ustawlobby":
- if player doesn't have permission "turniej.*" or "turniej.ustawlobby":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- set {turniej::gra::lobby} to location of player
- send "{@tag} &3Ustawiono lobby."
- stop
- if arg 1 is "ustawwidownie":
- if player doesn't have permission "turniej.*" or "turniej.ustawwidownie":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- set {turniej::gra::widownia} to location of player
- send "{@tag} &3Ustawiono widownie."
- stop
- if arg 1 is "zapros":
- if player doesn't have permission "turniej.*" or "turniej.zapros":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if arg 2 is not set:
- send "{@tag} &cPoprawne uzycie: &3/turniej zapros <gracz>"
- stop
- if arg 2 parsed as player is not set:
- send "{@tag} &cNie ma takiego gracza na serwerze!"
- stop
- if {turniej::gra::status} is true:
- send "{@tag} &cGra juz trwa!"
- stop
- if {turniej::gra::gracze::*} is {@max_players}:
- send "{@tag} Osiagnieto maksymalna liczbe graczy!"
- stop
- if {turniej::status::%arg 2 parsed as player%} is true:
- send "{@tag} &cTen gracz bierze juz udzial w turnieju!"
- stop
- if {turniej::status::%arg 2 parsed as player%::czas} is set:
- send "{@tag} &cTen gracz zostal juz zaproszony!"
- stop
- set {turniej::status::%arg 2 parsed as player%::czas} to {@accept_time}
- set {turniej::status::%arg 2 parsed as player%::invitator} to player
- send "{@tag} &3Zaproszono gracza &6%arg 2 parsed as player% &3do turnieju."
- send "{@tag} &6%player% &3zaprosil Cie do turnieju." to arg 2 parsed as player
- send "{@tag} &3Aby akceptowac zaproszenie uzyj komendy &6/turniej akceptuj&3. Masz na to &c{@accept_time} &3sekund." to arg 2 parsed as player
- stop
- if arg 1 is "odrzuc":
- if player doesn't have permission "turniej.*" or "turniej.odrzuc" or "turniej.gracz":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if {turniej::status::%player%::invitator} is not set:
- send "{@tag} &cNie masz zadnego zaproszenia do turnieju!"
- stop
- send "{@tag} &cZaproszenie do turnieju zostalo odrzucone!" to player
- send "{@tag} &6%player% &codrzucil zaproszenie do turnieju!" to {turniej::status::%player%::invitator}
- clear {turniej::status::%player%::czas}
- clear {turniej::status::%player%::invitator}
- stop
- if arg 1 is "akceptuj":
- if player doesn't have permission "turniej.*" or "turniej.akceptuj" or "turniej.gracz":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if {turniej::status::%player%::invitator} is not set:
- send "{@tag} &cNie masz zadnego zaproszenia do turnieju!"
- stop
- if {turniej::gra::status} is true:
- send "{@tag} &cGra juz trwa!"
- stop
- set {turniej::cache::%player%::pos} to location of player
- loop items in player's inventory:
- add loop-value to {turniej::cache::%player%::items::*}
- if player's helmet is any helmet:
- add player's helmet to {turniej::cache::%player%::items::*}
- if player's chestplate is any chestplate:
- add player's chestplate to {turniej::cache::%player%::items::*}
- if player's leggings is any leggings:
- add player's leggings to {turniej::cache::%player%::items::*}
- if player's boots is any boots:
- add player's boots to {turniej::cache::%player%::items::*}
- set {turniej::cache::%player%::level} to player's level
- set {turniej::cache::%player%::levelprogress} to player's level progress
- set {turniej::cache::%player%::gm} to player's gamemode
- set player's gamemode to survival
- set player's level to 0
- set player's level progress to 0
- clear player's inventory
- set player's helmet to air
- set player's chestplate to air
- set player's leggings to air
- set player's boots to air
- teleport player to {turniej::gra::lobby}
- set {turniej::status::%player%} to true
- add player to {turniej::gra::gracze::*}
- send "{@tag} &6%player% &3akceptowal twoje zaproszenie do turnieju." to {turniej::status::%player%::invitator}
- send "{@tag} &6%player% &3dolaczyl do turnieju &7(&c%size of {turniej::gra::gracze::*}%&7/&c{@max_players}&7)" to {turniej::gra::gracze::*}
- clear {turniej::status::%player%::czas}
- clear {turniej::status::%player%::invitator}
- every 1 second:
- loop {turniej::status::*}:
- if {turniej::status::%loop-index parsed as player%} is false:
- if {turniej::status::%loop-index parsed as player%::czas} is more than 0:
- remove 1 from {turniej::status::%loop-index parsed as player%::czas}
- if {turniej::status::%loop-index parsed as player%::czas} is 0:
- send "{@tag} &cZaproszenie do turnieju zostalo anulowane!" to loop-index parsed as player
- send "{@tag} &6%loop-index parsed as player% &cnie odpowiedzial na zaproszenie!" to {turniej::status::%loop-index parsed as player%::invitator}
- clear {turniej::status::%loop-index parsed as player%::czas}
- clear {turniej::status::%loop-index parsed as player%::invitator}
- if {turniej::gra::status} is true:
- if size of {turniej::gra::team1::*} is 0:
- send "{@tag} &3Turniej wygrala druzyna nr 2!" to {turniej::gra::gracze::*}
- loop {turniej::gra::team2::*}:
- clear loop-value's inventory
- set loop-value's helmet to air
- set loop-value's chestplate to air
- set loop-value's leggings to air
- set loop-value's boots to air
- #Nagroda
- add 64 diamonds to {nagrody::%loop-value%::*}
- add 64 emeralds to {nagrody::%loop-value%::*}
- clear {turniej::gra::team2::*}
- loop {turniej::gra::gracze::*}:
- teleport loop-value to {turniej::cache::%loop-value%::pos}
- set loop-value's level to {turniej::cache::%loop-value%::level}
- set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
- set loop-value's gamemode to {turniej::cache::%loop-value%::gm}
- add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
- clear {turniej::cache::%loop-value%::*}
- clear {turniej::status::%loop-value%::*}
- set {turniej::status::%loop-value%} to false
- set {turniej::gra::status} to false
- clear {turniej::gra::gracze::*}
- else if size of {turniej::gra::team2::*} is 0:
- send "{@tag} &3Turniej wygrala druzyna nr 1!" to {turniej::gra::gracze::*}
- loop {turniej::gra::team1::*}:
- clear loop-value's inventory
- set loop-value's helmet to air
- set loop-value's chestplate to air
- set loop-value's leggings to air
- set loop-value's boots to air
- #Nagroda
- add 64 diamonds to {nagrody::%loop-value%::*}
- add 64 emeralds to {nagrody::%loop-value%::*}
- clear {turniej::gra::team1::*}
- loop {turniej::gra::gracze::*}:
- teleport loop-value to {turniej::cache::%loop-value%::pos}
- set loop-value's level to {turniej::cache::%loop-value%::level}
- set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
- add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
- set loop-value's gamemode to {turniej::cache::%loop-value%::gm}
- clear {turniej::cache::%loop-value%::*}
- clear {turniej::status::%loop-value%::*}
- set {turniej::status::%loop-value%} to false
- set {turniej::gra::status} to false
- clear {turniej::gra::gracze::*}
- on quit:
- if {turniej::status::%player%} is true:
- send "{@tag} &6%player% &copuscil turniej!" to {turniej::gra::gracze::*}
- remove player from {turniej::gra::gracze::*}
- remove player from {turniej::gra::team%{turniej::status::%player%::team}%::*}
- clear {turniej::status::%player%::*}
- clear {turniej::status::%player%}
- teleport player to {turniej::cache::%player%::pos}
- clear player's inventory
- set player's helmet to air
- set player's chestplate to air
- set player's leggings to air
- set player's boots to air
- add {turniej::cache::%player%::items::*} to player
- set player's level to {turniej::cache::%player%::level}
- set player's level progress to {turniej::cache::%player%::levelprogress}
- set player's gamemode to {turniej::cache::%player%::gm}
- clear {turniej::cache::%player%::*}
- click:
- loop {turniej::cache::*}:
- add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
- on damage:
- if attacker is a player:
- if victim is a player:
- if {turniej::status::%attacker%} is true:
- if {turniej::gra::status} is false:
- cancel event
- if {turniej::status::%attacker%::team} is {turniej::status::%victim%::team}:
- cancel event
- on death of player:
- if {turniej::status::%victim%} is true:
- if {turniej::gra::status} is true:
- clear drops
- send "{@tag} &6%attacker% &3pokonal &6%victim%&3." to {turniej::gra::gracze::*}
- remove victim from {turniej::gra::team%{turniej::status::%victim%::team}%::*}
- on respawn:
- wait a second
- if {turniej::status::%player%} is true:
- teleport player to {turniej::gra::widownia}
- set player's gamemode to creative
Add Comment
Please, Sign In to add comment