Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /sumo [<text>] [<player>]:
- trigger:
- if arg 1 is set:
- if arg 1 is "invite":
- if arg 2 is set:
- if {matchison} is true:
- send "&8[&aSumo&8]&r &aThere are is already a match on!"
- stop
- if {matchplayer.%arg 2%} is set:
- send "&8[&aSumo&8]&r &aThe player already got invited."
- stop
- message "&8[&aSumo&8]&r &aYou got invited by &f%player%&a for a sumo match" to arg 2
- message "&8[&aSumo&8]&r &a/sumo accept &for &a/sumo deceline" to arg 2
- set {matchplayer.%arg 2%} to player
- set {matchplayer.%player%} to arg-2
- set {matchplayer.%arg 2%.uuid} to player's UUID
- set {matchplayer.%player%.uuid} to arg-2's UUID
- set {invited.%arg 2%} to true
- message "&8[&aSumo&8]&r &aYou invited has been send to %arg 2%" to player
- stop
- else if arg 1 is "accept":
- if {invited.%player%} is set:
- clear {invited.%player%}
- if {matchison} is true:
- message "&8[&aSumo&8]&r &aYou was too late someone else was already started a sumo match" to player
- message "&8[&aSumo&8]&r &f%player%&c was too late with accepting someone else already started a sumo match" to {matchplayer.%player%}
- clear {matchplayer.%player%}
- clear {matchplayer.%{matchplayer.%player%}%}
- stop
- set {matchison} to true
- message "&8[&aSumo&8]&r &aYou has accepted &f%player%'s &arequest. &fYou will be teleported over 10 seconds" to player
- message "&8[&aSumo&8]&r &a&f%player% &ahas accepted your sumo match request &fYou will be teleported over 10 seconds" to {matchplayer.%player%}
- wait 200 ticks
- teleport player to {matchplayer1spawn}
- set {tempplayer} to {matchplayer.%player%}
- teleport {tempplayer} to {matchplayer2spawn}
- set {donotmove.%player%} to true
- set {donotmove.%{matchplayer.%player%}%} to true
- set {_countt} to 0
- loop 36 times:
- set {in.%player%.%{_countt}%} to slot {_countt} of player's inventory
- set {in.%{matchplayer.%player%}%.%{_countt}%} to slot {_countt} of {matchplayer.%player%}'s inventory
- add 1 to {_countt}
- set {in.%player%.h} to player's helmet
- set {in.%{matchplayer.%player%}%.h} to {matchplayer.%player%}'s helmet
- set {in.%player%.c} to player's chestplate
- set {in.%{matchplayer.%player%}%.c} to {matchplayer.%player%}'s chestplate
- set {in.%player%.l} to player's leggings
- set {in.%{matchplayer.%player%}%.l} to {matchplayer.%player%}'s leggings
- set {in.%player%.b} to player's boots
- set {in.%{matchplayer.%player%}%.b} to {matchplayer.%player%}'s boots
- message "&8[&aSumo&8]&r &aYou get your items back after the match ended" to player
- message "&8[&aSumo&8]&r &aYou get your items back after the match ended" to {matchplayer.%player%}
- clear player's inventory
- clear {matchplayer.%player%}'s inventory
- send player title "&bSumo match begin over" with subtitle "&a3 seconds" for 1 seconds
- send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a3 seconds" for 1 seconds
- wait 20 ticks
- send player title "&bSumo match begin over" with subtitle "&a2 seconds" for 1 seconds
- send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a2 seconds" for 1 seconds
- wait 20 ticks
- send player title "&bSumo match begin over" with subtitle "&a1 second" for 1 seconds
- send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a1 second" for 1 seconds
- wait 20 ticks
- clear {donotmove.%player%}
- clear {donotmove.%{matchplayer.%player%}%}
- message "&8[&aSumo&8]&r &b&lBEGIN!" to player
- message "&8[&aSumo&8]&r &b&lBEGIN!" to {matchplayer.%player%}
- stop
- else:
- send "&c(!) &aSorry, you don't has been invited"
- else if arg 1 is "decline":
- if {matchplayer.%player%} is set:
- send "&8[&aSumo&8]&r aYou has declined &f%{matchplayer.%player%}%&c sumo match"
- message "&8[&aSumo&8] &f%player%&c has declined your sumo match" to {matchplayer.%player%}
- set {tempmatchplayer} to {matchplayer.%player%}
- clear {matchplayer.%player%}
- clear {matchplayer.%{tempmatchplayer}%}
- clear {tempmatchplayer}
- else:
- send "&c(!) &aSorry, you don't has been invited"
- else if arg 1 is "leave":
- if {matchplayer.%player%} is set:
- send "&8[&aSumo&8]&r &aYou lose the sumo match"
- message "&8[&aSumo&8] &aYou won the sumo match!" to {matchplayer.%player%}
- execute console command "espawn %{matchplayer.%player%}%"
- execute console command "espawn %player%"
- add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
- add 1 to {sumostats.lose.%player's UUID%}
- set {matchison} to false
- set {_count} to 0
- loop 36 times:
- set slot {_count} of player's inventory to {in.%player%.%{_count}%}
- set slot {_count} of {matchplayer.%player%}'s inventory to {in.%{matchplayer.%player%}%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%player%.h}
- set the chestplate of player to {in.%player%.c}
- set the leggings of player to {in.%player%.l}
- set the boots of player to {in.%player%.b}
- set the helmet of player to {in.%{matchplayer.%player%}%.h}
- set the chestplate of player to {in.%{matchplayer.%player%}%.c}
- set the leggings of player to {in.%{matchplayer.%player%}%.l}
- set the boots of player to {in.%{matchplayer.%player%}%.b}
- clear {matchplayer.%{matchplayer.%player%}%}
- clear {matchplayer.%player%}
- stop
- else if arg 1 is "stats":
- if {sumostats.win.%player's UUID%} is not set:
- set {sumostats.win.%player's UUID%} to 0
- if {sumostats.lose.%player's UUID%} is not set:
- set {sumostats.lose.%player's UUID%} to 0
- send "&a=-=-=-=-=-=-= &bStats &a=-=-=-=-=-=-="
- send "&r"
- send "&r"
- send "&r &r &aWins: &f%{sumostats.win.%player's UUID%}%"
- send "&r &r &aLoses: &f%{sumostats.lose.%player's UUID%}%"
- send "&r"
- else if arg 1 is "spectate":
- if {matchison} is true:
- teleport player to {sumospectate}
- send "&c(!) &aYou has been teleported to watch the match."
- stop
- else:
- send "&4(!)&c There is no current match"
- stop
- else:
- make player execute "sumo"
- else:
- send "&b=-=-=-=-=-= &a&lHelp Menu &b=-=-=-=-=-="
- send "&r"
- send "&r"
- send "&b/sumo leave &f||&a Leave current sumo match"
- send "&b/sumo invite [player] &f||&a Invite a player for a sumo match"
- send "&b/sumo accept &f||&a Accept sumo match when you got invited"
- send "&b/sumo decline &f||&a Deceline sumo match when you get invited"
- send "&b/sumo stats ||&a See all sumo stats"
- send "&b/sumo spectate &f||&a Spectate current sumo match"
- send "&b/sumop &f||&a Admin help menu"
- stop
- on any movement:
- if {donotmove.%player%} is set:
- cancel event
- message "&8[&aSumo&8]&r &aYou can move when timer is done" to player
- on death:
- if {matchplayer.%player%} is set:
- set {giveitemsback.%player%} to true
- message "&8[&aSumo&8]&r &aYou lose the sumo match" to player
- message "&8[&aSumo&8]&r &aYou won the sumo match! The other died" to {matchplayer.%player%}
- execute console command "espawn %{matchplayer.%player%}%"
- execute console command "espawn %player%"
- add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
- add 1 to {sumostats.lose.%player's UUID%}
- set {matchison} to false
- set {_count} to 0
- loop 36 times:
- set slot {_count} of {matchplayer.%player%}'s inventory to {in.%{matchplayer.%player%}%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%{matchplayer.%player%}%.h}
- set the chestplate of player to {in.%{matchplayer.%player%}%.c}
- set the leggings of player to {in.%{matchplayer.%player%}%.l}
- set the boots of player to {in.%{matchplayer.%player%}%.b}
- clear {matchplayer.%{matchplayer.%player%}%}
- clear {matchplayer.%player%}
- stop
- on quit:
- if {matchplayer.%player%} is set:
- set {giveitemsback.%player%} to true
- execute console command "espawn %{matchplayer.%player%}%"
- execute console command "espawn %player%"
- message "&8[&aSumo&8]&r &aYou won the sumo match!" to {matchplayer.%player%}
- add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
- add 1 to {sumostats.lose.%player's UUID%}
- set {matchison} to false
- set {_count} to 0
- loop 36 times:
- set slot {_count} of {matchplayer.%player%}'s inventory to {i.%{matchplayer.%player%}%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%{matchplayer.%player%}%.h}
- set the chestplate of player to {in.%{matchplayer.%player%}%.c}
- set the leggings of player to {in.%{matchplayer.%player%}%.l}
- set the boots of player to {in.%{matchplayer.%player%}%.b}
- clear {matchplayer.%{matchplayer.%player%}%}
- clear {matchplayer.%player%}
- stop
- on respawn:
- if {giveitemsback.%player%} is true:
- clear {giveitemsback.%player%}
- set {_count} to 0
- loop 36 times:
- set slot {_count} of player's inventory to {in.%player%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%player%.h}
- set the chestplate of player to {in.%player%.c}
- set the leggings of player to {in.%player%.l}
- set the boots of player to {in.%player%.b}
- on join:
- if {giveitemsback.%player%} is true:
- clear {giveitemsback.%player%}
- set {_count} to 0
- loop 36 times:
- set slot {_count} of player's inventory to {in.%player%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%player%.h}
- set the chestplate of player to {in.%player%.c}
- set the leggings of player to {in.%player%.l}
- set the boots of player to {in.%player%.b}
- stop
- command /sumop [<text>]:
- permission: "sumo.*"
- trigger:
- if arg 1 is set:
- if arg 1 is "spectate":
- set {sumospectate} to player's location
- send "&c(!) &aYou set spectate location!"
- else if arg 1 is "player1spawn":
- set {matchplayer1spawn} to player's location
- send "&c(!) &aYou set player 1 spawn location!"
- else if arg 1 is "player2spawn":
- set {matchplayer2spawn} to player's location
- send "&c(!) &aYou set player 2 spawn location!"
- else if arg 1 is "forceend":
- if {matchison} is true:
- loop all players:
- if {matchplayer.%loop-player%} is set:
- execute console command "espawn %loop-player%"
- message "&8[&aSumo&8]&r &f%player%&a Has ended your sumo match, stats are not affected" to loop-player
- clear {matchison}
- set {_count} to 0
- loop 36 times:
- set slot {_count} of loop-player's inventory to {in.%loop-player%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {in.%loop-player%.h}
- set the chestplate of player to {in.%loop-player%.c}
- set the leggings of player to {in.%loop-player%.l}
- set the boots of loop-layer to {in.%loop-player%.b}
- else:
- send "&8[&aSumo&8]&r aThere is no current match on."
- else:
- execute player command "sumop"
- else:
- send "&a=-=-=-=-=-= &b&lAdmin Help &a=-=-=-=-=-="
- send "&r"
- send "&r"
- send "&b/sumop spectate &f|| &aSet spectate spawn location"
- send "&b/sumop player1spawn &f|| &aSet 1 player spawn location"
- send "&b/sumop player2spawn &f|| &aSet 2 player spawn location"
- send "&b/sumop forceend &f|| &aForce end the match"
- send "&r"
- on walking on water:
- if {matchplayer.%player%} is set:
- if block above the block below player is water:
- kill player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement