Advertisement
mcspinner123

Untitled

Jul 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. command /melonwars [<text>]:
  2. trigger:
  3. if arg 1 is not set:
  4. message "&e&l[&a&lMelonWars&e&l] &c実行名を指定してください"
  5. if arg 1 is "join":
  6. if {melonwars.join.%player%} is 0:
  7. if {suikagun.join} is 1:
  8. message "&e&l[&a&lMelonWars&e&l] &aメロン軍に参加しました。"
  9. add 1 to {melongun.join}
  10. set {melongun.join.%player%} to 1
  11. add 1 to {melonwars.join}
  12. set {melonwars.join.%player%} to 1
  13. remove 1 from {suikagun.join}
  14. execute console command "/tp %player% 163 109 -155"
  15. if {melongun.join} is 1:
  16. message "&e&l[&a&lMelonWars&e&l] &aスイカ軍に参加しました。"
  17. add 1 to {suikagun.join}
  18. set {suikagun.join.%player%} to 1
  19. add 1 to {melonwars.join}
  20. set {melonwars.join.%player%} to 1
  21. remove 1 from {melongun.join}
  22. execute console command "/tp %player% 162 109 -51"
  23. if {melonwars.join} is more than 2:
  24. broadcast "&e&l[&a&lMelonWars&e&l] &aメロンウォーズに%{melonwars.join}%人参加しました。あと20秒で開始します。参加したい方はあと20秒以内に参加してください。/melonwars join"
  25. wait 20 seconds
  26. broadcast "&e&l[&a&lMelonWars&e&l] &aゲームを開始します。"
  27. execute console command "/setblock 228 139 -35 redstone_block"
  28. wait 1 seconds
  29. broadcast "&e&l[&a&lMelonWars&e&l] &a3秒前..."
  30. wait 1 seconds
  31. broadcast "&e&l[&a&lMelonWars&e&l] &a2秒前..."
  32. wait 1 seconds
  33. broadcast "&e&l[&a&lMelonWars&e&l] &a1秒前..."
  34. wait 1 seconds
  35. broadcast "&e&l[&a&lMelonWars&e&l] &aスタート!"
  36. set {melonwars.start} to 1
  37. execute console command "/fill 163 108 -50 161 108 -52 air"
  38. execute console command "/fill 164 108 -156 162 108 -154 air"
  39. if {melonwars.join.%player%} is 1:
  40. message "&e&l[&a&lMelonWars&e&l] &c常にゲームに参加しています。"
  41.  
  42. on break of light green stained terracotta:
  43. if {melonwars.start} is 1:
  44. if {suikagun.join.%player%} is 1:
  45. remove 1 from {melongun.health}
  46. broadcast "&e&l[&a&lMelonWars&e&l] &cメロン軍のメロンが削られました。"
  47. if {melongun.health} is 0:
  48. broadcast "&e&l[&a&lMelonWars&e&l] &a今回はメロン軍の体力が0になりました。よってスイカ軍の勝利です!"
  49. execute console command "/setblock 228 139 -35 air"
  50. set {melonwars.start} to 0
  51. set {melonwars.time} to 600
  52. set {melongun.health} to 15
  53. set {suikagun.health} to 15
  54. set {melonwars.join} to 0
  55. set {melongun.join} to 1
  56. set {suikagun.join} to 0
  57. loop all players:
  58. execute player command "/warsback"
  59.  
  60.  
  61.  
  62. on break of green terracotta block:
  63. if {melonwars.start} is 1:
  64. if {melongun.join.%player%} is 1:
  65. remove 1 from {suikagun.health}
  66. broadcast "&e&l[&a&lMelonWars&e&l] &cスイカ軍のスイカが削られました。"
  67. if {melongun.health} is 0:
  68. broadcast "&e&l[&a&lMelonWars&e&l] &a今回はメロン軍の体力が0になりました。よってスイカ軍の勝利です!"
  69. execute console command "/setblock 228 139 -35 air"
  70. set {melonwars.start} to 0
  71. set {melonwars.time} to 600
  72. set {melongun.health} to 15
  73. set {suikagun.health} to 15
  74. set {melonwars.join} to 0
  75. set {melongun.join} to 1
  76. set {suikagun.join} to 0
  77. loop all players:
  78. execute player command "/warsback"
  79.  
  80. command /warsback:
  81. trigger:
  82. if {melonwars.join.%player%} is 1:
  83. execute player command "/spawn"
  84.  
  85. every seconds:
  86. if {melonwars.start} is 1:
  87. remove 1 from {melonwars.time}
  88. if {melonwars.time} is 0:
  89. broadcast "&e&l[&a&lMelonWars&e&l] &d10分以上が経過しています。ゲームはあと30秒後に引き分けという結果になります。"
  90. wait 30 seconds
  91. execute console command "/setblock 228 139 -35 air"
  92. set {melonwars.start} to 0
  93. set {melonwars.time} to 600
  94. set {melongun.health} to 15
  95. set {suikagun.health} to 15
  96. set {melonwars.join} to 0
  97. set {melongun.join} to 1
  98. set {suikagun.join} to 0
  99. loop all players:
  100. if {melonwars.join.%loop-player%} is 1:
  101. wipe loop-player's sidebar
  102. set name of sidebar of loop-player to "&a&lメロンウォーズステータス"
  103. set score "メロン軍体力" in sidebar of loop-player to {melongun.health}
  104. set score "スイカ軍体力" in sidebar of loop-player to {suikagun.health}
  105. set score "残り時間" in sidebar of loop-player to {melonwars.time}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement