Advertisement
Gamebuster

Puddles.sk v0.7.7

Aug 3rd, 2014
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. #Version 0.7.7
  2. #In order to download or use this software, you must agree to it's license: http://pastebin.com/raw.php?i=JGSLhFdU
  3.  
  4. every 1 tick:
  5. loop players:
  6. if is raining or thundering in loop-player's world:
  7. set {_valid.%loop-player%} to true
  8. set {_loc} to location of loop-player
  9. set {_horizontalX} to a random integer between (-100 + loop-player's location's x-coordinate) and (100 + loop-player's location's x-coordinate)
  10. set {_horizontalZ} to a random integer between (-100 + loop-player's location's z-coordinate) and (100 + loop-player's location's z-coordinate)
  11. set {_vertical} to a random integer between (-20 + loop-player's location's y-coordinate) and (20 + loop-player's location's y-coordinate)
  12. set {_world} to loop-player's world
  13. set {_puddleLoc} to loop-player's location
  14. set the x-coordinate of {_puddleLoc} to {_horizontalX} - 0.5
  15. set the y-coordinate of {_puddleLoc} to {_vertical} - 0.5
  16. set the z-coordinate of {_puddleLoc} to {_horizontalZ}
  17. if block at {_puddleLoc} is air:
  18. 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:
  19. 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:
  20. set {_valid.%loop-player%} to false
  21. else:
  22. #Height conditions go here
  23. loop blocks above block at {_puddleLoc}:
  24. if loop-block is not air, leaves, water item, or flowing water:
  25. set {_valid.%loop-player%} to false
  26. else:
  27. set {_valid.%loop-player%} to false
  28. else:
  29. set {_valid.%loop-player%} to false
  30. if {_valid.%loop-player%} is true:
  31. set block at {_puddleLoc} to water
  32. set data value of block at {_puddleLoc} to 7
  33. if {puddle.debug} is on:
  34. message "Puddle added at %{_puddleLoc}%" to loop-player
  35. add {_puddleLoc} to {puddleLocations.%loop-player's world%::*}
  36.  
  37. every 1 second:
  38. loop worlds:
  39. if is raining or thundering in loop-world:
  40. set {_chance} to 1%
  41. else:
  42. set {_chance} to 20%
  43. chance of {_chance}:
  44. set {_loc} to a random location out of {puddleLocations.%loop-world%::*}
  45. if {_loc} is set:
  46. if block at {_loc} is water:
  47. if data value of block at {_loc} is 7:
  48. set block at {_loc} to air
  49. if {puddle.debug} is on:
  50. broadcast "Puddle removed at %{_loc}%"
  51. else if {puddle.debug} is on:
  52. broadcast "Puddle no longer exists at %{_loc}%"
  53. else if {puddle.debug} is on:
  54. broadcast "Puddle no longer exists at %{_loc}%"
  55. wait 1 tick
  56. remove all {_loc} from {puddleLocations.%loop-world%::*}
  57.  
  58. command /puddles [<text>] [<text="%command sender's world%">]:
  59. trigger:
  60. if player is an op:
  61. if argument 1 is "clear":
  62. if argument 2 is "all":
  63. loop worlds:
  64. loop {puddleLocations.%loop-world%::*}:
  65. set block at loop-value to air
  66. remove all loop-value from {puddleLocations.%loop-world%::*}
  67. else:
  68. loop {puddleLocations.%argument 2%::*}:
  69. set block at loop-value to air
  70. remove all loop-value from {puddleLocations.%argument 2%::*}
  71. else if argument 1 is "list":
  72. if argument 2 is "all":
  73. loop worlds:
  74. loop {puddleLocations.%loop-world%::*}:
  75. message "%loop-value% in world ""%loop-world%"""
  76. else:
  77. loop {puddleLocations.%argument 2 parsed as world%::*}:
  78. message "%loop-value%" to command sender
  79.  
  80. on physics:
  81. if event-block is water:
  82. if data value of event-block is 7:
  83. set {_persist} to false
  84. set {_loc} to event-block's location
  85. subtract 0.5 from the z-coordinate of {_loc}
  86. loop {puddleLocations.%event-world%::*}:
  87. if "%loop-value%" = "%{_loc}%":
  88. cancel the event
  89. set {_persist} to true
  90. if {puddle.debug} is true:
  91. if {_persist} is true:
  92. broadcast "Puddle persisting at %event-location%"
  93.  
  94. command /pdebug <boolean>:
  95. trigger:
  96. if command sender is an op:
  97. set {puddle.debug} to argument 1
  98.  
  99. command /rain:
  100. trigger:
  101. if command sender is an op:
  102. set weather to rain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement