Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- tag: &9[&6GLADIATORZY&9]
- max_players: 6
- 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>]:
- 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 nagroda"
- send "&3/turniej info"
- send "&3/turniej ustawlobby"
- send "&3/turniej ustawwidownie"
- send "&3/turniej ustawspawn <1|2>"
- stop
- if arg 1 is "nagroda":
- if size of {nagroda::%player%::*} is 0:
- send "{@tag} &cNie masz zadnych nagrod do odebrania!"
- stop
- send "{@tag} &cPo zamknieciu ekwipunku przedmioty znikna!"
- open chest with 6 rows named "{@tag} &6Nagroda" to player
- add {nagroda::%player%::*} to current inventory of player
- clear {nagroda::%player%::*}
- stop
- if arg 1 is "info":
- 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}%::*}
- if {turniej::gra::status} is true:
- if {turniej::status::%player%::team} is 1:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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}
- 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 {turniej::status::%player%::team} is 2:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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
- 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::*}
- 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}
- 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 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}
- if size of {turniej::gra::gracze::*}-1 is smaller than rounded up {@max_players}/2:
- set {turniej::status::%player%::team} to 1
- send "{@tag} &3Jestes w druzynie nr &61&3."
- add player to {turniej::gra::team1::*}
- else:
- set {turniej::status::%player%::team} to 2
- send "{@tag} &3Jestes w druzynie nr &62&3."
- add player to {turniej::gra::team2::*}
- if size of {turniej::gra::gracze::*} is {@max_players}:
- 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
- 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}
- 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}%::*}
- if {turniej::gra::status} is true:
- if {turniej::status::%player%::team} is 1:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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}
- 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 {turniej::status::%player%::team} is 2:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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
- 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::*}
- 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}
- 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 set:
- 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}%::*}
- if {turniej::status::%victim%::team} is 1:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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}
- 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 {turniej::status::%victim%::team} is 2:
- 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 {nagroda::%loop-value%::*}
- add 64 emeralds to {nagroda::%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
- 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 respawn:
- wait a tick
- if player is in {turniej::gra::gracze::*}:
- teleport player to {turniej::gra::widownia}
Add Comment
Please, Sign In to add comment