command /gravity [] [] []: trigger: arg 1 is not set: send "&7&m----------&7{ &5&lGRAVITY &7}&m----------" send "&5/gravity create &a- Tworzy arene" send "&5/gravity delete &a- Usuwa arene" send "&5/gravity setplayers &a- Ustawia maxymalna ilosc graczy na arenie" send "&5/gravity setspawn &a- Ustawia lokacje etapu na arenie" arg 1 is "create": arg 2 is set: if {gravity::arena::%arg 2%} is set: send "&5&lGRAVITY -> &ePrzepraszam arena o tej nazwie jest juz Aktywna!" else: send "&5&lGRAVITY -> &eStworzono arene &a%arg 2%!" set {gravity::arena::%arg 2%} to true add arg 2 to {gravity::areny::*} set {gravity::maxplayers::%arg 2%} to 8 set {gravity::arena::%arg 2%} to "dostepna" arg 1 is "delete": arg 2 is set: if {gravity::arena::%arg 2%} is not set: send "&5&lGRAVITY -> &ePrzepraszam nie ma takiej aktywnej areny" else: send "&5&lGRAVITY -> &eUsunoles arene o nazwie &a%arg 2%!" clear {gravity::arena::%arg 2%} remove arg 2 from {gravity::areny::*} clear {gravity::maxplayers::%arg 2%} arg 1 is "setplayers": arg 2 is set: arg 3 is set: if {gravity::arena::%arg 3%} is not set: send "&5&lGRAVITY -> &ePrzepraszam nie ma takiej aktywnej areny" else: send "&5&lGRAVITY -> &eOd teraz maxymalna liczba graczy na arenie &a%arg 3% &eto: &a%arg 2%" set {gravity::maxplayers::%arg 3%} to arg 2 arg 1 is "setspawn": arg 2 is set: arg 3 is set: if {gravity::arena::%arg 3%} is not set: send "&5&lGRAVITY -> &ePrzepraszam nie ma takiej aktywnej areny" else: send "&5&lGRAVITY -> &eEtap &a%arg 2% &ezostal ustawiony!" set {gravity::etap::%arg 2%::%arg 3%} to location of player arg 1 is "zmienstatus": arg 2 is set: arg 3 is set: if {gravity::arena::%arg 2%} is set: set {gravity::arena::%arg 2%} to "%arg 3%" send "&5&lGRAVITY -> &eZmieniono status areny &a%arg 2% &ena &a%arg 3%" else: send "&cNie ma takiej areny!" command /graj []: trigger: open chest with 6 rows named "&5&lGRAVITY &8- &eARENY" to player wait 4 tick loop (size of {gravity::areny::*}) times: set {arena::graj::%player%} to random element out of {gravity::areny::*} if {gravity::arena::%{arena::graj::%player%}%} is "dostepna": format slot loop-number of player with 1 of water bucket named "&7-----{ &5&lGRAVITY &7}-----" with lore "&eGra: &aDostepna||&eMapa: &b%{arena::graj::%player%}%||&eGraczy: &b%{players::%{arena::graj::%player%}%}%/%{gravity::maxplayers::%{arena::graj::%player%}%}%" to close then run [execute player command "graj %{arena::graj::%player%}%"] if {gravity::arena::%{arena::graj::%player%}%} is "niedostepna": format slot loop-number of player with 1 of lava bucket named "&7-----{ &5&lGRAVITY &7}-----" with lore "&eGra: &4W toku||&eMapa: &b%{arena::graj::%player%}%||&eGraczy: &b%{players::%{arena::graj::%player%}%}%/%{gravity::maxplayers::%{arena::graj::%player%}%}%" to close then run [execute player command "graj %{arena::graj::%player%}%"] arg 1 is set: if {gravity::arena::%arg 1%} is "dostepna": if {gravity::dolacz::%player%} is set: send "&cJuz jestes w grze!" stop set {gravity::etap::%player%} to 1 add 1 to {players::%arg 1%} set {gravity::dolacz::%player%} to arg 1 add player to {gravity::%arg 1%::*} loop {gravity::%{gravity::dolacz::%player%}%::*}: send "&5&lGRAVITY -> &eGracz %player% dolaczyl do gry &a(%{players::%{gravity::dolacz::%player%}%}%/%{gravity::maxplayers::%{gravity::dolacz::%player%}%}%" to loop-value if {players::%{gravity::dolacz::%player%}%} is {gravity::maxplayers::%{gravity::dolacz::%player%}%}: set {gravity::arena::%{gravity::dolacz::%player%}%} to "niedostepna" loop {players::%{gravity::dolacz::%player%}%} times: loop {gravity::%{gravity::dolacz::%player%}%::*}: teleport loop-value to {gravity::etap::1::%{gravity::dolacz::%player%}%} send loop-value title "&ePrzygotuj sie" with subtitle "&65 sekund" for 1 seconds wait 1 seconds send loop-value title "&ePrzygotuj sie" with subtitle "&64 sekundy" for 1 seconds wait 1 seconds send loop-value title "&aGotow?" with subtitle "&63 sekundy" for 1 seconds wait 1 seconds send loop-value title "&aGotow?" with subtitle "&62 sekundy" for 1 seconds wait 1 seconds send loop-value title "&aGotow?" with subtitle "&61 sekunda" for 1 seconds wait 1 seconds send loop-value title "&a&lSTART!" with subtitle "&a&lSTART!" for 1 seconds loop all blocks in radius 25 around loop-value: if loop-block is glass: set loop-block to air on damage: victim is a player damage was caused by fall: if {gravity::dolacz::%victim%} is not set: stop loop all players: loop {gravity::%{gravity::dolacz::%loop-player%}%::*}: if {gravity::etap::%victim%} is 1: teleport victim to {gravity::etap::1::%{gravity::dolacz::%victim%}%} if {gravity::etap::%victim%} is 2: teleport victim to {gravity::etap::2::%{gravity::dolacz::%victim%}%} if {gravity::etap::%victim%} is 3: teleport victim to {gravity::etap::3::%{gravity::dolacz::%victim%}%} if {gravity::etap::%victim%} is 4: teleport victim to {gravity::etap::4::%{gravity::dolacz::%victim%}%} if {gravity::etap::%victim%} is 5: teleport victim to {gravity::etap::5::%{gravity::dolacz::%victim%}%} send "&c&lUMIERA &e%victim%" to loop-value send victim title "&c&lUMIERASZ" for 1 seconds every 5 seconds: loop all players: if {gravity::dolacz::%loop-player%} is not set: stop loop {gravity::%{gravity::dolacz::%loop-player%}%::*}: display board named "&8---------- { &5&lGRAVITY &8 } ----------" to loop-value make score "&dMiejsce &e1: %{gravity::miejsce1::%{gravity::dolacz::%loop-player%}%}%" in board of loop-value to 1 make score "&dMiejsce &72: %{gravity::miejsce2::%{gravity::dolacz::%loop-player%}%}%" in board of loop-value to 2 make score "&dMiejsce &63: %{gravity::miejsce3::%{gravity::dolacz::%loop-player%}%}%" in board of loop-value to 3 make score "&dEtap: &a%{gravity::etap::%loop-player%}%/&c5" in board of loop-value to 4 move display of loop-value to sidebar on walking on water: wait 2 seconds if {gravity::dolacz::%player%} is set: add 1 to {gravity::etap::%player%} if {gravity::etap::%player%} is 2: teleport player to {gravity::etap::2::%{gravity::dolacz::%player%}%} send player title "&aEtap 2/5" for 1 seconds if {gravity::etap::%player%} is 3: teleport player to {gravity::etap::3::%{gravity::dolacz::%player%}%} send player title "&aEtap 3/5" for 1 seconds if {gravity::etap::%player%} is 4: teleport player to {gravity::etap::4::%{gravity::dolacz::%player%}%} send player title "&aEtap 4/5" for 1 seconds if {gravity::etap::%player%} is 5: teleport player to {gravity::etap::5::%{gravity::dolacz::%player%}%} send player title "&aEtap 5/5" for 1 seconds if {gravity::etap::%player%} is 6: if {gravity::miejsce1::%{gravity::dolacz::%player%}%} is not set: set {gravity::miejsce1::%{gravity::dolacz::%player%}%} to "%player%" wait 120 seconds loop {gravity::%{gravity::dolacz::%player%}%::*}: loop {players::%{gravity::dolacz::%player%}%} times: clear {gravity::etap::%loop-value%} remove loop-value from {gravity::%{gravity::dolacz::%player%}%::*} set {gravity::arena::%{gravity::dolacz::%player%}%} to "dostepna" set {players::%{gravity::dolacz::%player%}%} to 0 clear {gravity::dolacz::%player%} set {gravity::miejsce1::%{gravity::dolacz::%player%}%} to "Nikt" set {gravity::miejsce1::%{gravity::dolacz::%player%}%} to "Nikt" set {gravity::miejsce1::%{gravity::dolacz::%player%}%} to "Nikt" if {gravity::miejsce2::%{gravity::dolacz::%player%}%} is not set: set {gravity::miejsce2::%{gravity::dolacz::%player%}%} to "%player%" if {gravity::miejsce3::%{gravity::dolacz::%player%}%} is not set: set {gravity::miejsce3::%{gravity::dolacz::%player%}%} to "%player%" teleport player to {gravity::etap::1::%{gravity::dolacz::%player%}%} send player title "&aUkonczyles wszystkie etapy" with subtitle "&czobacz jak inni sobie radza :)" for 1 seconds set player's gamemode to creative add 1 compass named "&cTeleport" to player set slot 8 of player to wooden door named "&bWyjdz" on rightclick on wooden door: if name of player's tool is "&bWyjdz": if {gravity::dolacz::%player%} is set: teleport player to {spawn} remove 1 from {players::%{gravity::dolacz::%player%}%} clear {gravity::etap::%player%} remove player from {gravity::%{gravity::dolacz::%player%}%::*} clear {gravity::dolacz::%player%} command /gravitysetspawn: permission: admin.gravity trigger: set {spawn} to location of player