Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function spawn(p: offlineplayer):
- teleport {_p} to spawn of world "world"
- heal {_p}
- feed {_p}
- clear {_p}'s inventory
- on right click:
- if event-block is sign:
- if line 3 of event-block contains "sumo":
- if {insumo::*} contains player:
- send "&cYou can not toggle queue while ingame!" to player
- stop
- if {insumoqueue::*} contains player:
- send "&cYou have left the sumo queue!" to player
- spawn(player)
- remove player from {insumoqueue::*}
- stop
- if size of {insumo::*} is not 0:
- send "&cA game is currently progressing!"
- stop
- send "&aYou have joined the sumo queue!" to player
- add player to {insumoqueue::*}
- teleport player to {sumo::center}
- set player's gamemode to survival
- sumoStart()
- function sumoStart():
- wait 1 second
- send title "&a&lThe game will start in 10 seconds" to all players where [{insumoqueue::*} contains input] for 1 second
- wait 5 seconds
- set {_cd} to 5
- while {_cd} > 0:
- send title "&a&l%{_cd}%" to all players where [{insumoqueue::*} contains input] for 1 second
- wait 1 second
- set {_cd} to {_cd} - 1
- send title "&a&lStart!" to all players where [{insumoqueue::*} contains input] for 1 second
- loop all players where [{insumoqueue::*} contains input]:
- give loop-player stick named "Sumo Stick"
- function checkWinner():
- if size of {insumoqueue::*} <= 1:
- set {_winner} to first element out of {insumo::*}
- broadcast "&3&lSumo &7The winner of the sumo round is &3%{_winner} ? (""No one"")%&7!"
- if {_winner} is set:
- add 1 to {sumowins::%{_winner}%}
- clear {insumo::*}
- clear {insumoqueue::*}
- spawn({_winner})
- clear {_winner}'s inventory
- on damage of player:
- if attacker is a player:
- if {insumoqueue::*} contains attacker:
- if attacker is holding stick:
- set damage to 0
- else:
- cancel event
- else if "%damage cause%" is "void":
- set victim's flight mode to true
- spawn(victim)
- set victim's flight mode to false
- checkWinner()
- if {insumoqueue::*} contains player:
- remove player from {insumoqueue::*}
- remove player from {insumo::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement