Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /team random:
- trigger:
- set {_pnum} to 0
- set {_lnum} to 0
- delete {teamred::*}
- delete {teamblue::*}
- delete {teamwhite::*}
- execute console command "/scoreboard teams empty red"
- execute console command "/scoreboard teams empty blue"
- execute console command "/scoreboard teams join red Red"
- execute console command "/scoreboard teams join blue Blue"
- loop all players:
- add loop-player to {teamwhite::*}
- add 1 to {_pnum}
- loop {_pnum} times:
- add 1 to {_lnum}
- set {_random} to a random player out of {teamwhite::*}
- remove {_random} from {teamwhite::*}
- if {_lnum} is 1:
- add {_random} to {teamred::*}
- set {team.%{_random}%} to red
- execute console command "/scoreboard teams join red %{_random}%"
- else if {_lnum} is 2:
- add {_random} to {teamblue::*}
- set {team.%{_random}%} to blue
- execute console command "/scoreboard teams join blue %{_random}%"
- remove 2 from {_lnum}
- message "<red>%{teamred::*}%<white>,<blue>%{teamblue::*}%"
- on chat:
- cancel event
- if {team.%player%} is red:
- loop all players:
- if {team.%loop-player%} is red:
- message "%message%" to loop-player
- if {team.%player%} is blue:
- loop all players:
- if {team.%loop-player%} is blue:
- message "<%player%> %message%" to loop-player
- on break:
- if location of event-block is {bluecore}:
- {team.%player%} is red
- remove 1 from {bluehp}
- execute console command "/scoreboard players set Blue Core %{bluehp}%"
- execute console command "/displaycore"
- wait 6 ticks
- set block at location of event-block to anvil
- if {bluehp} is smaller than 0:
- message "<magenta>赤チームの勝利!"
- if location of event-block is {redcore}:
- {team.%player%} is blue
- remove 1 from {redhp}
- execute console command "/scoreboard players set Red Core %{redhp}%"
- execute console command "/displaycore"
- wait 6 ticks
- set block at location of event-block to anvil
- if {redhp} is smaller than 0:
- message "<magenta>青チームの勝利!"
- on break:
- distance between location of event-block and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 5:
- cancel event
- on place:
- distance between location of event-block and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 5:
- cancel event
- on explode:
- distance between location of the entity and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 8:
- cancel event
- on rightclick on an anvil:
- cancel event
- execute console command "/scoreboard objectives add Core dummy"
- if player is holding blue dye:
- set {bluecore} to location of event-block
- set {bluehp} to 100
- execute console command "/scoreboard players set Blue Core %{bluehp}%"
- message "青コアの位置を決定しました"
- if player is holding red dye:
- set {redcore} to location of event-block
- set {redhp} to 100
- execute console command "/scoreboard players set Red Core %{redhp}%"
- message "赤コアの位置を決定しました"
- if player is holding white dye:
- if location of event-block is {bluecore}:
- delete {bluecore}
- message "青コアを削除しました"
- if location of event-block is {redcore}:
- delete {redcore}
- message "赤コアを削除しました"
- on rightclick on an beacon:
- if player is holding blue dye:
- set {bluespawn} to location of event-block
- message "青拠点の位置を決定しました"
- if player is holding red dye:
- set {redspawn} to location of event-block
- message "赤拠点の位置を決定しました"
- if player is holding white dye:
- if location of event-block is {bluespawn}:
- delete {blue.spawn}
- message "青拠点を削除しました"
- if location of event-block is {redspawn}:
- delete {redspawn}
- message "赤拠点を削除しました"
- on rightclick with yellow dye:
- if {bluecore} is not set:
- message "青コアを設定してください"
- stop
- if {redcore} is not set:
- message "赤コアを設定してください"
- stop
- message "<magenta>スタート!"
- loop all players:
- if {team.%loop-player%} is blue:
- teleport loop-player to {bluespawn}
- if {team.%loop-player%} is red:
- teleport loop-player to {redspawn}
- loop all players:
- set name of sidebar of loop-player to "Core"
- command /displaycore:
- trigger:
- loop all players:
- set name of sidebar of loop-player to "Core"
- set score "<bold><blue>Blue" in sidebar of loop-player to {bluehp}
- set score "<bold><red>Red" in sidebar of loop-player to {redhp}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement