Advertisement
thelikepvp

Untitled

Apr 27th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.29 KB | None | 0 0
  1.  
  2.  
  3. on block land:
  4. {listoffallingblock::%entity%} is set:
  5. clear {listoffallingblock::%entity%}
  6. cancel event
  7.  
  8. command /checkregen:
  9. trigger:
  10. message "Soft blocks to regen: %size of {fallingblocks.soft.location::*}%"
  11. message "Hard blocks to regen: %size of {fallingblocks.hard.location::*}%"
  12.  
  13. every tick:
  14. set {_count} to 0
  15. if {fallingblocks.activate} is set:
  16. if size of {fallingblocks.hard.time::*} is greater than 0:
  17. if {fallingblocks.catch} is not set:
  18. loop 30 times:
  19. set {_loopvalue} to random element out of {fallingblocks.hard.location::*}
  20. if {fallingblocks.hard.time::%{_loopvalue}%} was more than 8 seconds ago:
  21.  
  22. set {_count} to {_count} + 1
  23. set block at {_loopvalue} to {fallingblocks.hard.blocktype::%{_loopvalue}%}
  24. set {_id} to id of {fallingblocks.hard.blocktype::%{_loopvalue}%}
  25. clear {fallingblocks.hard.location::%{_loopvalue}%}
  26. clear {fallingblocks.hard.blocktype::%{_loopvalue}%}
  27. clear {fallingblocks.hard.time::%{_loopvalue}%}
  28.  
  29. if size of {fallingblocks.hard.location::*} is less than 200:
  30. if size of {fallingblocks.hard.location::*} is less than 1:
  31. clear {fallingblocks.activate}
  32. stop
  33. else if size of {fallingblocks.hard.location::*} is less than 400:
  34. if {_count} is greater than 1:
  35. stop
  36. else if size of {fallingblocks.hard.location::*} is less than 1000:
  37. if {_count} is greater than 4:
  38. stop
  39. else if size of {fallingblocks.hard.location::*} is less than 2000:
  40. if {_count} is greater than 7:
  41. stop
  42. else:
  43. if {_count} is greater than 12:
  44. stop
  45.  
  46.  
  47. if size of {fallingblocks.hard.time::*} is 0:
  48. if size of {fallingblocks.soft.location::*} is greater than 0:
  49. if {fallingblocks.catch} is not set:
  50. set {_loopvalue} to random element out of {fallingblocks.soft.location::*}
  51. if {fallingblocks.soft.time::%{_loopvalue}%} was more than 8 seconds ago:
  52. set {_count} to {_count} + 1
  53. set block at {_loopvalue} to {fallingblocks.soft.blocktype::%{_loopvalue}%}
  54. if "%{fallingblocks.soft.blocktype::%{_loopvalue}%}%" contains "sign":
  55. wait 1 tick
  56. if {fallingblocks.soft.sign.1::%{_loopvalue}%} is set:
  57. set line 1 of block at {_loopvalue} to "%{fallingblocks.soft.sign.1::%{_loopvalue}%}%"
  58. set line 2 of block at {_loopvalue} to "%{fallingblocks.soft.sign.2::%{_loopvalue}%}%"
  59. set line 3 of block at {_loopvalue} to "%{fallingblocks.soft.sign.3::%{_loopvalue}%}%"
  60. set line 4 of block at {_loopvalue} to "%{fallingblocks.soft.sign.4::%{_loopvalue}%}%"
  61.  
  62. clear {fallingblocks.soft.sign.1::%{_loopvalue}%}
  63. clear {fallingblocks.soft.sign.2::%{_loopvalue}%}
  64. clear {fallingblocks.soft.sign.3::%{_loopvalue}%}
  65. clear {fallingblocks.soft.sign.4::%{_loopvalue}%}
  66.  
  67. clear {fallingblocks.soft.location::%{_loopvalue}%}
  68. clear {fallingblocks.soft.blocktype::%{_loopvalue}%}
  69. clear {fallingblocks.soft.time::%{_loopvalue}%}
  70.  
  71.  
  72. if size of {fallingblocks.hard.location::*} is greater than 0:
  73. clear {fallingblocks.activate}
  74. stop
  75. else if size of {fallingblocks.soft.location::*} is 0:
  76. stop
  77. else if size of {fallingblocks.soft.location::*} is less than 400:
  78. if {_count} is greater than 5:
  79. stop
  80. else:
  81. if {_count} is greater than 12:
  82. stop
  83.  
  84. on explosion:
  85. cancel event
  86. add east to {_listofdirections::*}
  87. add west to {_listofdirections::*}
  88. add south to {_listofdirections::*}
  89. add north to {_listofdirections::*}
  90. set {_loc} to event-location
  91. #loop blocks in radius 4 around block at {_loc}:
  92. loop blocks in radius 5.5 around block at {_loc}:
  93. #message "%loop-block's type%" to all players
  94. "%loop-block%" does not contain "air" or "water" or "lava":
  95. clear {_check}
  96. distance between loop-block and {_loc} is greater than 3.2:
  97. chance of 50%:
  98. set {_check} to true
  99. distance between loop-block and {_loc} is greater than 5:
  100. set {_check} to true
  101. if "%loop-block%" contains "torch" or "lever" or "sign" or "wheat" or "carrot" or "layer" or "potato" or "cake" or "button" or "long" or "stem" or "redstone" or "fire" or "wire" or "diode" or "door" or "sand" or "gravel" or "sapling" or "leaves" or "mushroom" or "poppy" or "dandelion" or "fern" or "orchid" or "allium" or "bluet" or "tulip" or "daisy" or "ladder" or "carpet" or "vine" or "lily" or "anvil" or "lilac" or "flower" or "rose" or "peony" or "bed" or "diode" or "comparator" or "plate" or "hook" or "rail":
  102. if "%loop-block%" does not contain "block":
  103. if "%loop-block%" contains "sign":
  104. set {fallingblocks.soft.sign.1::%location of loop-block%} to "%line 1 of loop-block%"
  105. set {fallingblocks.soft.sign.2::%location of loop-block%} to "%line 2 of loop-block%"
  106. set {fallingblocks.soft.sign.3::%location of loop-block%} to "%line 3 of loop-block%"
  107. set {fallingblocks.soft.sign.4::%location of loop-block%} to "%line 4 of loop-block%"
  108.  
  109. #message "Soft" to all players
  110. set {fallingblocks.soft.location::%location of loop-block%} to location of loop-block
  111. set {fallingblocks.soft.blocktype::%location of loop-block%} to loop-block's type
  112. set {fallingblocks.soft.time::%location of loop-block%} to now
  113. add loop-block's location to {_blocks.soft::*}
  114.  
  115. if {fallingblocks.soft.location::%location of loop-block%} is not set:
  116. if {_check} is not set:
  117. #message "Hard" to all players
  118. set {fallingblocks.hard.location::%location of loop-block%} to location of loop-block
  119. #message "%loop-block's type%" to all players
  120. set {fallingblocks.hard.blocktype::%location of loop-block%} to loop-block's type
  121. set {fallingblocks.hard.time::%location of loop-block%} to now
  122. add loop-block's location to {_blocks.hard::*}
  123. else if "%loop-block%" is "air":
  124. if {fallingblocks.hard.time::%location of loop-block%} is set:
  125. set {fallingblocks.hard.time::%location of loop-block%} to now
  126. else if {fallingblocks.soft.time::%location of loop-block%} is set:
  127. set {fallingblocks.soft.time::%location of loop-block%} to now
  128.  
  129.  
  130. loop {_blocks.soft::*}:
  131. set {_looploc} to location 1 above block at loop-value
  132. set {_block} to type of block at loop-value
  133. set block at loop-value to air
  134. spawn falling block of {_block} at {_looploc}
  135. wait 1 tick
  136. loop {_blocks.hard::*}:
  137. set {_looploc} to location 1 above block at loop-value
  138. set {_block} to type of block at loop-value
  139. set block at loop-value to air
  140. spawn falling block of {_block} at {_looploc}
  141. wait 1 tick
  142. loop entities in radius 6 around block at {_loc}:
  143. message "%loop-entity%"
  144. "%loop-entity%" is "falling block":
  145. set {listoffallingblock::%loop-entity%} to true
  146.  
  147. set {_speed} to a random number between .3 and 1.2
  148.  
  149. push loop-entity up at speed {_speed}
  150.  
  151. set {_dir.1} to random element out of {_listofdirections::*}
  152. set {_dir.2} to random element out of {_listofdirections::*}
  153. set {_dir.3} to random element out of {_listofdirections::*}
  154.  
  155. set {_dir.1.speed} to random number between .1 and .6
  156. set {_dir.2.speed} to random number between .1 and .6
  157. set {_dir.3.speed} to random number between .1 and .6
  158.  
  159. push loop-entity {_dir.1} at speed {_dir.1.speed}
  160. push loop-entity {_dir.2} at speed {_dir.2.speed}
  161. push loop-entity {_dir.3} at speed {_dir.3.speed}
  162.  
  163. wait 1 tick
  164. if size of {fallingblocks.hard.location::*} is greater than 0:
  165. set {fallingblocks.activate} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement