Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if arg 1 is "join":
- if arg 2 is set:
- set {_create} to yaml value "areny.%arg 2%.create" from "TDM/config.yml"
- if {_create} is "true":
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "false":
- set {_gracze.red::*} to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
- set {_gracze.blue::*} to yaml list "areny.%arg 2%.gracze.blue" from "TDM/config.yml"
- set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
- if {_status} is "&4&l&nOtwarta":
- set yaml value "online" from "TDM/players/%player%/config.yml" to "true"
- set yaml value "arena" from "TDM/players/%player%/config.yml" to "%arg 2%"
- set {_gracze.red::*} to yaml list "areny.%{_arena}%.gracze.red" from "TDM/config.yml"
- set {_gracze.blue::*} to yaml list "areny.%{_arena}%.gracze.blue" from "TDM/config.yml"
- set {_gracze} to (size of {_gracze.red::*})+(size of {_gracze.blue::*})+1
- if (size of {_gracze.red::*}) <= (size of {_gracze.blue::*}):
- set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
- add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
- send "&eDolaczyles do areny &6%arg 2%&e druzyny &c&lCzerwononych&e. &6%{_gracze}%&e/&62"
- while {_status} is "&4&l&nOtwarta":
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l10 &esekund rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 5 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l5 &esekund rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l4 &esekundy rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l3 &esekundy rozpocznie sie runda!"
- else:
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l2 &esekundy rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l1 &esekunde rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "false":
- function "tdm.ekwipunek" {player and "start"};
- stop
- clear player's inventory
- set {_spawn.x} to yaml value "areny.%arg 2%.spawn.red.x" from "TDM/config.yml"
- set {_spawn.y} to yaml value "areny.%arg 2%.spawn.red.y" from "TDM/config.yml"
- set {_spawn.z} to yaml value "areny.%arg 2%.spawn.red.z" from "TDM/config.yml"
- set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
- teleport player to {_spawn}
- function "tdm.ekwipunek" {player and "red"};
- send "&eRunda rozpoczeta!"
- stop
- if (size of {_gracze.red::*}) >= (size of {_gracze.blue::*}):
- set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
- add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
- send "&eDolaczyles do areny &6%arg 2%&e druzyny &3&lNiebieskich&e. &6%{_gracze}%&e/&610"
- while {_status} is "&4&l&nOtwarta":
- wait 1 seconds
- set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
- if {_online} is "true":
- set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l10 &esekund rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 5 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l5 &esekund rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l4 &esekundy rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l3 &esekundy rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l2 &esekundy rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "true":
- send "&eZa &6&l1 &esekunde rozpocznie sie runda!"
- else:
- function "tdm.ekwipunek" {player and "start"};
- stop
- wait 1 seconds
- set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
- if {_online} is "false":
- function "tdm.ekwipunek" {player and "start"};
- stop
- clear player's inventory
- set {_spawn.x} to yaml value "areny.%arg 2%.spawn.blue.x" from "TDM/config.yml"
- set {_spawn.y} to yaml value "areny.%arg 2%.spawn.blue.y" from "TDM/config.yml"
- set {_spawn.z} to yaml value "areny.%arg 2%.spawn.blue.z" from "TDM/config.yml"
- set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
- teleport player to {_spawn}
- function "tdm.ekwipunek" {player and "blue"};
- send "&eRunda rozpoczeta!"
- stop
- else if {_status} is "&4&l&nW trakcie":
- set yaml value "online" from "TDM/players/%player%/config.yml" to "true"
- set yaml value "arena" from "TDM/players/%player%/config.yml" to "%arg 2%"
- if (size of {_gracze.red::*}) <= (size of {_gracze.blue::*}):
- set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
- add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
- send "&eDolaczyles do areny &6%arg 2%&e druzyny &c&lCzerwononych&e."
- clear player's inventory
- set {_spawn.x} to yaml value "areny.%arg 2%.spawn.red.x" from "TDM/config.yml"
- set {_spawn.y} to yaml value "areny.%arg 2%.spawn.red.y" from "TDM/config.yml"
- set {_spawn.z} to yaml value "areny.%arg 2%.spawn.red.z" from "TDM/config.yml"
- set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
- teleport player to {_spawn}
- function "tdm.ekwipunek" {player and "red"};
- stop
- if (size of {_gracze.red::*}) >= (size of {_gracze.blue::*}):
- set yaml value "team" from "TDM/players/%player%/config.yml" to "blue"
- add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
- send "&eDolaczyles do areny &6%arg 2%&e druzyny &3&lNiebieskich&e."
- clear player's inventory
- set {_spawn.x} to yaml value "areny.%arg 2%.spawn.blue.x" from "TDM/config.yml"
- set {_spawn.y} to yaml value "areny.%arg 2%.spawn.blue.y" from "TDM/config.yml"
- set {_spawn.z} to yaml value "areny.%arg 2%.spawn.blue.z" from "TDM/config.yml"
- set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
- teleport player to {_spawn}
- function "tdm.ekwipunek" {player and "blue"};
- stop
- else:
- send "&eJestes podczas gry!"
- stop
- else:
- send "&eNie istnieje taka arena!"
- stop
Advertisement
Add Comment
Please, Sign In to add comment