Advertisement
fleft17

Untitled

Jul 27th, 2014
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.38 KB | None | 0 0
  1. options:
  2.  
  3. P: &8[&5Voidscape&8]&r
  4.  
  5.  
  6.  
  7.  
  8. on physics:
  9. {vs.running} is true
  10. cancel event
  11.  
  12. command /voidscape <integer> <world>:
  13. permission: skript.op
  14. usage: "/voidscape <radius> <world>"
  15. trigger:
  16. if {vs.running} is true:
  17. message "{@P} Already running: %{vs.radius}% radius in ""%{vs.world}%""!"
  18. message "{@P} Finish that one with /vs-resume if it's paused, or cancel it with /vs-cancel!"
  19. set {vs.world} to arg 2
  20. if arg 1 is greater than 0:
  21. set {vs.radius} to arg 1
  22. else:
  23. message "{@P} That radius is not valid!"
  24. stop trigger
  25. set {vs.running} to true
  26. set {vs.paused} to false
  27. set {vs.slice} to 0
  28. set {vs.totalslice} to 0
  29. if {vs.radius} is less than 250:
  30. set {vs.buffer} to 8
  31. else if {vs.radius} is less than 500:
  32. set {vs.buffer} to 4
  33. else if {vs.radius} is less than 1000:
  34. set {vs.buffer} to 2
  35. else:
  36. set {vs.buffer} to 1
  37. broadcast "{@P} Starting setup in &b%{vs.world}%&r with radius &b%{vs.radius}%!"
  38. broadcast "{@P} Prepare for a LOT of lag!"
  39. loop blocks from the block at (the location at {vs.radius}, 0, {vs.radius} of the world {vs.world}) to the block at (the location at {vs.radius}, 0, (-1*{vs.radius}) of the world {vs.world}):
  40. loop blocks from (loop-block-1) to (the block (2*{vs.radius}+1) meters west of loop-block-1):
  41. while {vs.paused} is true:
  42. if {vs.stop} is set:
  43. delete {vs.stop}
  44. delete {vs.running}
  45. delete {vs.radius}
  46. delete {vs.paused}
  47. delete {vs.slice}
  48. delete {vs.totalslice}
  49. delete {vs.world}
  50. delete {vs.buffer}
  51. broadcast "{@P} Canceled!"
  52. stop trigger
  53. wait 1 tick
  54. loop blocks from (loop-block-2) to (the block 255 meters above loop-block-2):
  55. if loop-block-3 is stone:
  56. set loop-block-3 to air
  57. else if loop-block-3 is bedrock:
  58. set loop-block-3 to air
  59. else if loop-block-3 is gravel:
  60. if the block below loop-block-3 is air:
  61. set loop-block-3 to air
  62. add 1 to {vs.slice}
  63. if {vs.slice} is equal to {vs.buffer}:
  64. add {vs.slice} to {vs.totalslice}
  65. set {vs.slice} to 0
  66. broadcast "{@P} Progress: &b%({vs.totalslice}*100)/({vs.radius}*2+1)%%%"
  67. wait 1 second
  68. broadcast "{@P} Finished Voidscape in world"
  69. broadcast "{@P} &b%{vs.world}% with radius &b%{vs.radius}%!"
  70. delete {vs.running}
  71. delete {vs.radius}
  72. delete {vs.paused}
  73. delete {vs.slice}
  74. delete {vs.totalslice}
  75. delete {vs.world}
  76. delete {vs.buffer}
  77.  
  78. command /vs-pause:
  79. permission: skript.op
  80. trigger:
  81. if {vs.running} is not set:
  82. message "{@P} None in progress!"
  83. else if {vs.paused} is true:
  84. message "{@P} Already paused!"
  85. else:
  86. broadcast "{@P} Paused! Use &b/vs-resume&r to resume!"
  87. set {vs.paused} to true
  88.  
  89. command /vs-cancel:
  90. permission: skript.op
  91. trigger:
  92. if {vs.running} is not set:
  93. message "{@P} None to cancel!"
  94. else if {vs.paused} is true:
  95. set {vs.stop} to true
  96. broadcast "{@P} Canceled in world"
  97. broadcast "{@P} &b%{vs.world}%&r with radius &b%{vs.radius}%!"
  98. else:
  99. message "{@P} Pause first with &b/vs-pause!"
  100.  
  101. command /vs-resume:
  102. permission: skript.op
  103. trigger:
  104. if {vs.running} is not set:
  105. message "{@P} None paused!"
  106. else if {vs.paused} is false:
  107. message "{@P} Already in progress!"
  108. else:
  109. broadcast "{@P} Progress resumed! &b/vs-pause&r to pause again!"
  110. set {vs.paused} to false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement