Advertisement
Gamebuster

Untitled

Aug 3rd, 2014
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. #Version 0.8.6
  2.  
  3. every 1 tick:
  4. loop players:
  5. if is raining or thundering in loop-player's world:
  6. set {_valid.%loop-player%} to true
  7. set {_loc} to location of loop-player
  8. set {_horizontalX} to a random integer between (-100 + loop-player's location's x-coordinate) and (100 + loop-player's location's x-coordinate)
  9. set {_horizontalZ} to a random integer between (-100 + loop-player's location's z-coordinate) and (100 + loop-player's location's z-coordinate)
  10. set {_vertical} to a random integer between (-20 + loop-player's location's y-coordinate) and (20 + loop-player's location's y-coordinate)
  11. set {_world} to loop-player's world
  12. set {_puddleLoc} to loop-player's location
  13. set the x-coordinate of {_puddleLoc} to {_horizontalX} - 0.5
  14. set the y-coordinate of {_puddleLoc} to {_vertical} - 0.5
  15. set the z-coordinate of {_puddleLoc} to {_horizontalZ}
  16. if block at {_puddleLoc} is air:
  17. if block below {_puddleLoc} is dirt, stone, grass, cobblestone, bedrock, any sand, any wood, any log, gravel, any stone bricks, coal ore, iron ore, redstone ore, gold ore, emerald ore, diamond ore, or lapis ore:
  18. if biome at {_puddleLoc} is Frozen River, Ice Plains, Cold Beach, Cold Taiga, Desert, Savanna, Mesa, Mesa Bryce, savanna plateau, Desert Hills, frozen river, ice mountains, stone beach, or hell:
  19. set {_valid.%loop-player%} to false
  20. else:
  21. #Height conditions go here
  22. loop blocks above block at {_puddleLoc}:
  23. if loop-block is not air, leaves, water item, or flowing water:
  24. set {_valid.%loop-player%} to false
  25. else:
  26. set {_valid.%loop-player%} to false
  27. else:
  28. set {_valid.%loop-player%} to false
  29. if {_valid.%loop-player%} is true:
  30. set block at {_puddleLoc} to water
  31. set data value of block at {_puddleLoc} to 7
  32. if {puddle.debug} is on:
  33. message "Puddle added at %{_puddleLoc}%" to loop-player
  34. add {_puddleLoc} to {puddleLocations.%loop-player's world%::*}
  35.  
  36. every 1 second:
  37. loop worlds:
  38. if is raining or thundering in loop-world:
  39. set {_chance} to 1%
  40. else:
  41. set {_chance} to 20%
  42. chance of {_chance}:
  43. set {_loc} to a random location out of {puddleLocations.%loop-world%::*}
  44. if {_loc} is set:
  45. if block at {_loc} is water:
  46. if data value of block at {_loc} is 7:
  47. set block at {_loc} to air
  48. if {puddle.debug} is on:
  49. broadcast "Puddle removed at %{_loc}%"
  50. else if {puddle.debug} is on:
  51. broadcast "Puddle no longer exists at %{_loc}%"
  52. else if {puddle.debug} is on:
  53. broadcast "Puddle no longer exists at %{_loc}%"
  54. wait 1 tick
  55. remove all {_loc} from {puddleLocations.%loop-world%::*}
  56.  
  57. command /puddles [<text>] [<text="%command sender's world%">]:
  58. trigger:
  59. if player is an op:
  60. if argument 1 is "clear":
  61. if argument 2 is "all":
  62. loop worlds:
  63. loop {puddleLocations.%loop-world%::*}:
  64. set block at loop-value to air
  65. remove all loop-value from {puddleLocations.%loop-world%::*}
  66. else:
  67. loop {puddleLocations.%argument 2%::*}:
  68. set block at loop-value to air
  69. remove all loop-value from {puddleLocations.%argument 2%::*}
  70. else if argument 1 is "list":
  71. if argument 2 is "all":
  72. loop worlds:
  73. loop {puddleLocations.%loop-world%::*}:
  74. message "%loop-value% in world ""%loop-world%"""
  75. else:
  76. loop {puddleLocations.%argument 2 parsed as world%::*}:
  77. message "%loop-value%" to command sender
  78.  
  79. on physics:
  80. if event-block is water:
  81. if data value of event-block is 7:
  82. set {_persist} to false
  83. set {_loc} to event-block's location
  84. subtract 0.5 from the z-coordinate of {_loc}
  85. loop {puddleLocations.%event-world%::*}:
  86. if "%loop-value%" = "%{_loc}%":
  87. cancel the event
  88. set {_persist} to true
  89. if {puddle.debug} is true:
  90. if {_persist} is true:
  91. broadcast "Puddle persisting at %event-location%"
  92.  
  93. command /pdebug <boolean>:
  94. trigger:
  95. if command sender is an op:
  96. set {puddle.debug} to argument 1
  97.  
  98. command /rain:
  99. trigger:
  100. if command sender is an op:
  101. set weather to rain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement