siso_

Untitled

Feb 12th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. on break:
  2.   if location of event-block is {bluecore}:
  3.     {team.%player%} is red
  4.     remove 1 from {bluehp}
  5.     execute console command "/scoreboard players set Blue Core %{bluehp}%"
  6. #   execute console command "/displaycore"
  7.     wait 6 ticks
  8.     set block at location of event-block to anvil
  9.     if {bluehp} is smaller than 0:
  10.       message "<magenta>赤チームの勝利!"
  11.   if location of event-block is {redcore}:
  12.     {team.%player%} is blue
  13.     remove 1 from {redhp}
  14.     execute console command "/scoreboard players set Red Core %{redhp}%"
  15. #   execute console command "/displaycore"
  16.     wait 6 ticks
  17.     set block at location of event-block to anvil
  18.     if {redhp} is smaller than 0:
  19.       message "<magenta>青チームの勝利!"
  20.  
  21. on break:
  22.   distance between location of event-block and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 5:
  23.     cancel event
  24.  
  25. on place:
  26.   distance between location of event-block and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 5:
  27.     cancel event
  28.  
  29. on explode:
  30.   distance between location of the entity and location of {bluecore} or {redcore} or {bluespawn} or {redspawn} is smaller than 8:
  31.     cancel event
  32.  
  33. on rightclick on an anvil:
  34.   player has permission "Admin"
  35.   cancel event
  36.   execute console command "/scoreboard objectives add Core dummy"
  37.   if player is holding blue dye:
  38.     set {bluecore} to location of event-block
  39.     set {bluehp} to 100
  40.     execute console command "/scoreboard players set Blue Core %{bluehp}%"
  41.     message "青コアの位置を決定しました"
  42.   if player is holding red dye:
  43.     set {redcore} to location of event-block
  44.     set {redhp} to 100
  45.     execute console command "/scoreboard players set Red Core %{redhp}%"
  46.     message "赤コアの位置を決定しました"
  47.   if player is holding white dye:
  48.     if location of event-block is {bluecore}:
  49.       delete {bluecore}
  50.       message "青コアを削除しました"
  51.     if location of event-block is {redcore}:
  52.       delete {redcore}
  53.       message "赤コアを削除しました"
  54.  
  55. on rightclick on an beacon:
  56.  
  57.   player has permission "Admin"
  58.   if player is holding blue dye:
  59.     set {bluespawn} to location of event-block
  60.     message "青拠点の位置を決定しました"
  61.   if player is holding red dye:
  62.     set {redspawn} to location of event-block
  63.     message "赤拠点の位置を決定しました"
  64.   if player is holding white dye:
  65.     if location of event-block is {bluespawn}:
  66.       delete {blue.spawn}
  67.       message "青拠点を削除しました"
  68.     if location of event-block is {redspawn}:
  69.       delete {redspawn}
  70.       message "赤拠点を削除しました"
  71.  
  72. on rightclick with yellow dye:
  73.   player has permission "Admin"
  74.   if {bluecore} is not set:
  75.     message "青コアを設定してください"
  76.     stop
  77.   if {redcore} is not set:
  78.     message "赤コアを設定してください"
  79.     stop
  80.   message "<magenta>スタート!"
  81.   loop all players:
  82.   if {team.%loop-player%} is blue:
  83.     teleport loop-player to {bluespawn}
  84.   if {team.%loop-player%} is red:
  85.     teleport loop-player to {redspawn}
  86.  
  87. # loop all players:
  88. #   set name of sidebar of loop-player to "Core"
  89.  
  90.  
  91.  
  92. #command /displaycore:
  93. # trigger:
  94. #   loop all players:
  95. #     set name of sidebar of loop-player to "Core"
  96. #     set score "<bold><blue>Blue" in sidebar of loop-player to {bluehp}
  97. #     set score "<bold><red>Red" in sidebar of loop-player to {redhp}
  98.  
  99. #追加コマンド
  100. #(/displaycore サイドバーにコアのHPを表示します。)
  101. #コア・スポーン地点の設定
  102. #青色染料(ラピスラズリ)で金床を叩くと青コア、ビーコンを叩くと青スポーンが設定されます。
  103. #赤チームの場合赤色染料を使用してください。
  104. #コアを削除したい場合は骨粉です。
  105.  
  106. #開始するときは黄色染料です
Add Comment
Please, Sign In to add comment