Oxalist

Untitled

Apr 14th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.20 KB | None | 0 0
  1. variables:
  2. {frosted::%player%} = "False"
  3.  
  4. command /frosted:
  5. trigger:
  6. if {frostedgame::started} is "True":
  7. send "&b&lFrosted &8&l» &7The game is already running, please wait"
  8. stop
  9. if {frosted::%player%} is "True":
  10. set {frosted::%player%} to "False"
  11. remove 1 from {frosted}
  12. set the player's tablist name to "&7%player%"
  13. remove player from {frosted::list}
  14. broadcast "&b&lFrosted &8&l» &b%player% &7has left the queue (%{frosted}%/12)"
  15. stop
  16. if {frosted::%player%} is "False":
  17. set {frosted::%player%} to "True"
  18. add 1 to {frosted}
  19. set the player's tablist name to "&e%player%"
  20. add player to {frosted::list}
  21. broadcast "&b&lFrosted &8&l» &b%player% &7has joined the queue (%{frosted}%/12)"
  22. if {frosted} is more than 1:
  23. loop players:
  24. if {frosted::%loop-player%} is "True":
  25. wait 1 second
  26. if {frosted::%loop-player%} is "True":
  27. send player title "&b&lFrosted" with subtitle "&7Game starting in 10 seconds" for 2 seconds
  28. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 10 seconds" for 2 seconds
  29. wait 5 seconds
  30. if {frosted::%loop-player%} is "True":
  31. send player title "&b&lFrosted" with subtitle "&7Game starting in 5 seconds" for 1 second
  32. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 5 seconds" for 1 second
  33. wait 1 second
  34. if {frosted::%loop-player%} is "True":
  35. send player title "&b&lFrosted" with subtitle "&7Game starting in 4 seconds" for 1 second
  36. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 4 seconds" for 1 second
  37. wait 1 second
  38. if {frosted::%loop-player%} is "True":
  39. send player title "&b&lFrosted" with subtitle "&7Game starting in 3 seconds" for 1 second
  40. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 3 seconds" for 1 second
  41. wait 1 second
  42. if {frosted::%loop-player%} is "True":
  43. send player title "&b&lFrosted" with subtitle "&7Game starting in 2 seconds" for 1 second
  44. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 2 seconds" for 1 second
  45. wait 1 second
  46. if {frosted::%loop-player%} is "True":
  47. send player title "&b&lFrosted" with subtitle "&7Game starting in 1 second" for 1 second
  48. send loop-player title "&b&lFrosted" with subtitle "&7Game starting in 1 second" for 1 second
  49. wait 1 second
  50. if {frosted::%loop-player%} is "True":
  51. set {frostedhealth::%player%} to 5
  52. set {frostedlives::%player%} to 5
  53. set {frostedhealth::%loop-player%} to 5
  54. set {frostedlives::%loop-player%} to 5
  55. set the loop-player's tablist name to "&b%player% &f%{frostedlives::%player%}%"
  56. set the player's tablist name to "&b%player% &f%{frostedlives::%player%}%"
  57. set {_loc} to a random element out of {frosted::spawns::*}
  58. teleport player to {_loc}
  59. teleport loop-player to {_loc}
  60. set slot 0 of player's inventory to 1 slimeball of knockback 2 named "&b&lFrosted &8&l» &7Default Kit"
  61. set slot 0 of loop-player's inventory to 1 slimeball of knockback 2 named "&b&lFrosted &8&l» &7Default Kit"
  62. send player title "&b&lFrosted" with subtitle "&7The game has started" for 2 seconds
  63. send loop-player title "&b&lFrosted" with subtitle "&7The game has started" for 2 seconds
  64. set {frostedgame::started} to "True"
  65. set {frostedingame::%player%} to "True"
  66. set {frostedingame::%loop-player%} to "True"
  67. stop
  68.  
  69. on rightclick on a sign:
  70. if line 2 of event-block is "&9&lFrosted":
  71. make player execute command "/frosted"
  72. set line 3 of event-block to "&0%{frosted}% queued"
  73.  
  74. every second:
  75. loop all players:
  76. if {frostedingame::%loop-player%} is "True":
  77. set the loop-player's tablist name to "&b%loop-player% &f%{frostedlives::%loop-player%}%"
  78. if {frosted} is equal to 0:
  79. if {frostedgame::started} is "True":
  80. broadcast "&b&lFrosted &8&l» &7The game has ended, please play again"
  81. set {frostedhealth::%loop-player%} to 5
  82. set {frostedgame::started} to "False"
  83. set {frostedlives::%loop-player%} to 5
  84. set {frostedingame::%loop-player%} to "False"
  85. remove 1 slimeball named "&b&lFrosted &8&l» &7Default Kit" from loop-player
  86. set {frosted::%loop-player%} to "False"
  87. set the loop-player's tablist name to "&7%loop-player%"
  88. delete {frosted::list}
  89. teleport loop-player to {spawn}
  90. delete {frosted}
  91. stop
  92.  
  93. every second:
  94. loop all players:
  95. if {frostedingame::%loop-player%} is "True":
  96. If block below loop-player is bedrock:
  97. remove 1 from {frostedhealth::%loop-player%}
  98. if {frostedlives::%loop-player%} is equal to 0:
  99. send "&b&lFrosted &8&l» &7You have died" to loop-player
  100. set {frostedhealth::%loop-player%} to 5
  101. set {frostedlives::%loop-player%} to 5
  102. set {ingame::%loop-player%} to "False"
  103. set {frostedfrosted::%loop-player%} to "False"
  104. set the loop-player's tablist name to "&7%loop-player%"
  105. remove loop-player from {frosted::list}
  106. remove 1 from {frosted}
  107. teleport loop-player to {spawn}
  108. if {frostedhealth::%loop-player%} is equal to 0:
  109. send "&b&lFrosted &8&l» &7You have lost 1 life" to loop-player
  110. set {frostedhealth::%loop-player%} to 5
  111. remove 1 from {frostedlives::%loop-player%}
  112. set {_loc} to a random element out of {frosted::spawns::*}
  113. teleport loop-player to {_loc}
  114.  
  115. every tick:
  116. loop all players:
  117. if {frostedingame::%loop-player%} is "True":
  118. set action bar of loop-player to "&b&lHealth %{frostedhealth::%loop-player%}% "
  119.  
  120.  
  121. every second:
  122. loop all players:
  123. if {frostedingame::%loop-player%} is "True":
  124. wipe loop-player's sidebar
  125. set name of sidebar of loop-player to "&7 &b&l&nFrosted"
  126. set score "&9" in sidebar of loop-player to 6
  127. set score "&7Players: &f%{frosted}%" in sidebar of loop-player to 5
  128. set score "&7Health: &f%{frostedhealth::%loop-player%}%" in sidebar of loop-player to 4
  129. set score "&a" in sidebar of loop-player to 3
  130. set score "&7Lives: &f%{frostedlives::%loop-player%}%" in sidebar of loop-player to 2
  131. set score "&6" in sidebar of loop-player to 1
  132.  
  133. every second:
  134. loop all players:
  135. if {frostedingame::%loop-player%} is "False":
  136. wipe loop-player's sidebar
  137. set name of sidebar of loop-player to "&7 &b&l&nLobby"
  138. set score "&a" in sidebar of loop-player to 3
  139. set score "&7Online: &f%number of all players%" in sidebar of loop-player to 2
  140. set score "&6" in sidebar of loop-player to 1
  141.  
  142. on damage:
  143. if {frostedingame::%attacker%} is "True":
  144. stop
  145. if {frostedingame::%attacker%} is "False":
  146. cancel event
  147. send "&b&lPvP &8&l» &7You cannot pvp when you are not in a game" to attacker
  148. stop
  149.  
  150.  
  151. command /setspawnpoints-frosted:
  152. trigger:
  153. add location of player to {frosted::spawns::*}
  154. send "&b&lFrosted &8&l» &7Successfully set a spawn point"
  155.  
  156. command /list:
  157. trigger:
  158. send "%{frosted}%"
  159.  
  160. command /resetqueue:
  161. trigger:
  162. loop all players:
  163. remove 1 slimeball named "&b&lFrosted &8&l» &7Default Kit" from loop-player
  164. remove 1 slimeball named "&b&lFrosted &8&l» &7Default Kit" from player
  165. set {frostedgame::started} to "False"
  166. set {frosted::%loop-player%} to "False"
  167. set {frostedingame::%loop-player%} to "False"
  168. set {frosted} to 0
  169.  
  170. options:
  171. databasePrefix: jdogdatabase_
  172. nopermission: &cNo Permission.
  173. version: 1.0.0
  174.  
  175. on any movement:
  176. if {frostedingame::%player%} is "True":
  177. if block at location of player is water:
  178. stop
  179. if block 1 above player is water:
  180. stop
  181. if block 2 above player is water:
  182. stop
  183. if block 3 above player is water:
  184. stop
  185. if block 1 below player is air:
  186. stop
  187. loop blocks in radius 2 of player:
  188. if loop-block is water:
  189. set loop-block to ice
  190. add location of loop-block to {blocks%player%::*}
  191. loop blocks in radius 2 of player:
  192. if loop-block is ice:
  193. if block 1 above loop-block is ice:
  194. set loop-block to water
  195. if block 2 above loop-block is ice:
  196. set loop-block to water
  197. set {loc%player%} to location of player
  198. stop
  199. wait 2 seconds
  200. loop {blocks%player%::*}:
  201. loop all entities in radius 3 of loop-value-1:
  202. if loop-entity is player:
  203. stop
  204. set block at location of loop-value to water
  205.  
  206. every 3 seconds:
  207. loop all players:
  208. if {blocks%loop-player%::*} is set:
  209. loop {blocks%loop-player%::*}:
  210. set {loc2%loop-player%} to location of loop-value-2
  211. if distance between {loc%loop-player%} and {loc2%loop-player%} is more than 2:
  212. chance of 75%:
  213. set block at location of loop-value-2 to water
  214. remove location of loop-value-2 from {blocks%loop-player%::*}
Advertisement
Add Comment
Please, Sign In to add comment