Advertisement
fleft17

Untitled

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