Guest User

Untitled

a guest
Mar 14th, 2017
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.20 KB | None | 0 0
  1. command /battlebuild <text>:
  2. trigger:
  3. if {gameplayer.%player%} is set:
  4. message "&7[&9Game&7]&f You already joined game %{gameplayer.%player%}%"
  5. stop
  6. if arg-1 is not "A":
  7. message "&7[&cBattleBuild&7]&f This is not a valid Arena"
  8. stop
  9. if {battlebuildstart.%arg-1%} is "true":
  10. message "&7[&cBattleBuild&7]&f This arena is already started!"
  11. stop
  12. loop 14 times:
  13. if {battlebuild.%arg-1%.%loop-number%} is set:
  14. if loop-number is 14:
  15. message "&7[&cBattleBuild&7]&f This BattleBuild Arena is Full!"
  16. stop
  17. else:
  18. wipe player sidebar
  19. add 1 to {battlebuildmember.%arg-1%}
  20. add player to {battlebuildlistplayer.%arg-1%::*}
  21. set {gameplayer.%player%} to "battlebuild%arg-1%"
  22. set {battlebuild.%arg-1%.%loop-number%} to player
  23. set {gamelocation.%player%} to "battlebuild%arg-1%%loop-number%"
  24. execute player command "/worldinventorysave talesofmemorybigproject"
  25. wait 1 ticks
  26. teleport player to {teleport.%{gamelocation.%player%}%}
  27. wait 1 ticks
  28. execute console command "/gmc %player%"
  29. if {battlebuildmember.%arg-1%} is smaller than 5:
  30. loop all players:
  31. loop-player is in world "Game":
  32. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  33. message "%player% Joined the game" to loop-player
  34. message "&7[&cBattleBuild&7]&f Need %5-{battlebuildmember.%arg-1%}% player more to start the game" to loop-player
  35. if loop-number is 5:
  36. loop all players:
  37. loop-player is in world "Game":
  38. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  39. message "&7[&cBattleBuild&7]&f 10 seconds to start game!" to loop-player
  40. wait 10 seconds
  41. if {battlebuildmember.%arg-1%} is smaller than 5:
  42. loop all players:
  43. loop-player is in world "Game":
  44. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  45. message "&7[&cBattleBuild&7]&f Game cancelled because not enough player!" to loop-player
  46. else:
  47. execute console command "/startbattlebuild %arg-1%"
  48. exit loop
  49.  
  50.  
  51.  
  52. command /startbattlebuild <text>:
  53. permission: buildbattle.admin
  54. trigger:
  55. if {battlebuildstart.%arg-1%} is "true":
  56. message "&7[&cBattleBuild&7]&f This arena is already started!"
  57. stop
  58. set {battlebuildstart.%arg-1%} to "true"
  59. set {_namescore} to "&9&lBattle Build"
  60. set {_minutes} to 7
  61. set {_seconds} to 0
  62. set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&7%{_seconds}%"
  63. execute console command "/setthemebattlebuild %arg-1%"
  64. wait 1 seconds
  65. loop all players:
  66. loop-player is in world "Game":
  67. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  68. wipe loop-player sidebar
  69. message "&7[&cBattleBuild&7]&f Game will end after 7 minutes!" to loop-player
  70. loop 7 times:
  71. remove 1 from {_minutes}
  72. set {_seconds} to 60
  73. loop 60 times:
  74. remove 1 from {_seconds}
  75. set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&7%{_seconds}%"
  76. if {_seconds} is less than 10:
  77. set {_time} to "&6Duration&f&l: &70%{_minutes}%&f:&70%{_seconds}%"
  78. loop all players:
  79. loop-player is in world "Game":
  80. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  81. if {stopbuild.%arg-1%} is "true":
  82. wipe loop-player sidebar
  83. stop
  84. wipe loop-player sidebar
  85. set name of sidebar of loop-player to {_namescore}
  86. set score "&d-=-=-=-=-=-=-=-=-=-=-" in sidebar of loop-player to 8
  87. set score "&f" in sidebar of loop-player to 7
  88. set score "%{themebattlebuild.%arg-1%}%" in sidebar of loop-player to 6
  89. set score "&f" in sidebar of loop-player to 5
  90. set score {_time} in sidebar of loop-player to 4
  91. set score "&f" in sidebar of loop-player to 3
  92. set score "&3Player&7&l: &a%{battlebuildmember.%arg-1%}%" in sidebar of loop-player to 2
  93. set score "&f" in sidebar of loop-player to 1
  94. set score "&btalesofmemory.mcph.co" in sidebar of loop-player to 0
  95. wait 1 seconds
  96. loop all players:
  97. loop-player is in world "Game":
  98. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  99. message "&7[&cBattleBuild&7]&6 End of minigame!" to loop-player
  100. delete {allowbuild.%loop-player%}
  101. wait 1 seconds
  102. loop all players:
  103. loop-player is in world "Game":
  104. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  105. message "&7[&cBattleBuild&7]&6 Time to Vote!" to loop-player
  106. wait 2 seconds
  107. loop 15 times:
  108. if {battlebuild.%arg-1%.%loop-number%} is set:
  109. loop all players:
  110. loop-player is in world "Game":
  111. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  112. teleport loop-player to {teleport.battlebuild%arg-1%%loop-number%}
  113. message "&6Plot of %{battlebuild.%arg-1%.%loop-number%}%" to loop-player
  114. if {stopbuild.%arg-1%} is "true":
  115. wipe loop-player sidebar
  116. stop
  117. wipe loop-player sidebar
  118. set name of sidebar of loop-player to {_namescore}
  119. set score "&d-=-=-=-=-=-=-=-=-=-=-" in sidebar of loop-player to 8
  120. set score "&f" in sidebar of loop-player to 7
  121. set score "%{themebattlebuild.%arg-1%}%" in sidebar of loop-player to 6
  122. set score "&f" in sidebar of loop-player to 5
  123. set score "&cOwner&7&l: %{battlebuild.%arg-1%.%loop-number%}%" in sidebar of loop-player to 4
  124. set score "&f" in sidebar of loop-player to 3
  125. set score "&3Player&7&l: &a%{battlebuildmember.%arg-1%}%" in sidebar of loop-player to 2
  126. set score "&f" in sidebar of loop-player to 1
  127. set score "&btalesofmemory.mcph.co" in sidebar of loop-player to 0
  128. wait 20 seconds
  129. loop all players:
  130. loop-player is in world "Game":
  131. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  132. if {battlebuild.%arg-1%.%loop-number%} is loop-player:
  133. message "&6All player will vote your plot" to {battlebuild.%arg-1%.%loop-number%}
  134. else:
  135. message "&7[&cBattleBuild&7]&f 5 seconds to left to view and then vote this plot" to loop-player
  136. wait 5 seconds
  137. loop all players:
  138. loop-player is in world "Game":
  139. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  140. {battlebuild.%arg-1%.%loop-number%} is not loop-player:
  141. execute loop-player command "/battlebuildvotearena %arg-1% %loop-number% battlebuildvotearena"
  142. wait 5 seconds
  143. set {_winner} to "<None>"
  144. set {_winnerpoint} to 0
  145. set {_winnerlocation} to "<None>"
  146. loop 15 times:
  147. if {_winnerpoint} is greater than {battlebuildpoint.%arg-1%.%loop-number%}:
  148. set {_winner} to {_winner}
  149. set {_winnerpoint} to {_winnerpoint}
  150. set {_winnerlocation} to {_winnerlocation}
  151. else if {_winnerpoint} is smaller than {battlebuildpoint.%arg-1%.%loop-number%}:
  152. set {_winner} to {battlebuild.%arg-1%.%loop-number%}
  153. set {_winnerpoint} to {battlebuildpoint.%arg-1%.%loop-number%}
  154. set {_winnerlocation} to "battlebuild%arg-1%%loop-number%"
  155. else:
  156. chance of 50%:
  157. set {_winner} to {battlebuild.%arg-1%.%loop-number%}
  158. set {_winnerpoint} to {battlebuildpoint.%arg-1%.%loop-number%}
  159. set {_winnerlocation} to "battlebuild%arg-1%%loop-number%"
  160. loop all players:
  161. loop-player is in world "Game":
  162. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  163. teleport loop-player to {teleport.%{_winnerlocation}%}
  164. wait 1 seconds
  165. message "&7[&cBattleBuild&7]&f player &6%{_winner}%&f has won BattleBuild!" to all players
  166. message "&7You get %{battlebuildmember.%arg-1%}% Point Battlebuild!" to {_winner}
  167. add {battlebuildmember.%arg-1%} to {minigamepoint.%{_winner}%}
  168. wait 10 seconds
  169. loop all players:
  170. loop-player is in world "Game":
  171. {gameplayer.%loop-player%} is "battlebuild%arg-1%":
  172. wipe loop-player sidebar
  173. execute player command "/scoreboard digitalscoreboardtom"
  174. execute console command "/purgebattlebuild A"
Advertisement
Add Comment
Please, Sign In to add comment