Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
815
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. #- Originally By Mortimier for Chunk Apocalypse
  2. #- Edited By DancingNinjas_ for Underground Parallel
  3.  
  4. options:
  5. P: &c[&eUP&c]
  6.  
  7. command /undergroundparallel <integer> <integer> <world>:
  8. permission: skript.op
  9. usage: /undergroundparallel <map radius> <radius of blocks to change every 5 ticks> <world name>
  10. trigger:
  11. set {_chunknum} to 2*arg 1/arg 2
  12. set {_chunkx} to arg 1
  13. set {_chunkz} to arg 1
  14. set {_size} to arg 2
  15. if {_chunkz} is not divisible by {_size}:
  16. send "{@P} %{_chunkz}% is not divisible by %{_size}%!"
  17. send "{@P} Please change %{_size}% to a new value or increase the map radius!"
  18. stop
  19. broadcast "{@P} Generating Underground Parallel in '%arg 3%'! There may be lag!"
  20. loop {_chunknum} times:
  21. loop {_chunknum} times:
  22. {undergroundparallel.cancel} is true:
  23. set {undergroundparallel.cancel} to false
  24. stop trigger
  25. send "{@P} Creating Underground Parallel at x: %{_chunkx}%, z: %{_chunkz}%" to all ops
  26. loop blocks from (block at (the location at {_chunkx}, 55, {_chunkz} in arg 3)) to (block at (the location at ({_chunkx}-{_size}), 55, {_chunkz} in arg 3)):
  27. loop blocks from (loop-block-1) to (the block {_size} meters north of loop-block-1):
  28. loop blocks from (loop-block-2) to (the block 40 meters above loop-block-2):
  29. if loop-block-3 is leaves:
  30. set {_randomchance} to a random integer between 0.3 and 199.8
  31. if {_randomchance} is 1:
  32. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to diamond ore
  33. else if {_randomchance} is 2 or 3:
  34. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to gold ore
  35. else if {_randomchance} is between 4 and 52:
  36. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to coal ore
  37.  
  38. else if {_randomchance} is between 53 and 100:
  39. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to iron ore
  40.  
  41. else if {_randomchance} is between 101 and 200:
  42. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to stone
  43. else if loop-block-3 is oak wood or spruce wood or birch wood or acacia wood or dark oak wood or jungle wood:
  44. set {_randomchance} to a random integer between 0.3 and 100.2
  45. if {_randomchance} is between 0 and 10:
  46. chance of 50%:
  47. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to glowstone
  48. else:
  49. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to redstone ore
  50. else:
  51. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to gravel
  52.  
  53. else:
  54. if loop-block-3 is air:
  55. if block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 is not wood plank or fence or rail or cobweb:
  56. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to block at loop-block-3
  57. else:
  58. set block at location (loop-block-3's x coordinate), ((loop-block-3's y coordinate) - 54), (loop-block-3's z coordinate) in arg-3 to block at loop-block-3
  59.  
  60. wait 5 tick
  61. subtract arg 2 from {_chunkx}
  62. set {_chunkx} to arg 1
  63. subtract {_size} from {_chunkz}
  64. send "{@P} Underground Parallel Process Finished!" to all ops
  65.  
  66. command /upcancel:
  67. permission: skript.op
  68. trigger:
  69. set {undergroundparallel.cancel} to true
  70. send "{@P} Underground Parallel Process Cancelled!" to all ops
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement