Advertisement
fleft17

Untitled

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