Advertisement
fleft17

Untitled

Oct 8th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. options:
  2.  
  3. P: &8[&dChunkApoc&8] #= Prefix =#
  4. CC: &r #= Main Chat Color =#
  5. HC: &b #= Highlight Color =#
  6. Correct.Usage: /ChunkApoc &b<radius> <world> #= How to not be dumb =#
  7.  
  8. ChunkApoc.TP.Delay: 5 tick #= Don't change this =#
  9. Broadcast.Messages: true #= Broadcast Progress =#
  10. Coords.Spam.Chat: true #= Spams chat with every coordinate =#
  11.  
  12.  
  13. command /ChunkApoc [<integer>] [<world>] <integer>:
  14. permission: skript.op
  15. trigger:
  16.  
  17.  
  18. #= Arguments =#
  19.  
  20. if {ChunkApoc::Running} is true:
  21. if arg-1 is not set:
  22. delete {ChunkApoc::Running}
  23. stop trigger
  24. else if arg-1 is set:
  25. message "{@P}{@HC} To cancel, use /ChunkApoc"
  26. stop trigger
  27. if arg-2 is not set:
  28. message "{@P}{@CC} {@Correct.Usage}"
  29. stop trigger
  30. loop 3 times:
  31. command "/ChunkApoc-sound note.harp"
  32. wait 3 ticks
  33.  
  34. #= TP to 0,0 =#
  35.  
  36. set {ChunkApoc::Location} to (location at (0, 255, 0) of the world (arg-2))
  37. while (block at {ChunkApoc::Location}) is air:
  38. set {ChunkApoc::Location} to location 1 below {ChunkApoc::Location}
  39. if y-coordinate of {ChunkApoc::Location} is less than 3:
  40. message "{@P}{@CC} Error: Could not teleport {@HC}%command sender%{@CC} to 0,0."
  41. teleport command sender to (location 1 above {ChunkApoc::Location})
  42.  
  43. #= Variables + Gamemode Creative =#
  44.  
  45. set command sender's gamemode to creative
  46. set {ChunkApoc::Running} to true
  47. set {ChunkApoc::Radius} to arg-1
  48. set {ChunkApoc::World} to arg-2
  49. set {ChunkApoc::Percent} to arg-3
  50. set {ChunkApoc::Loop.1} to 0.5
  51. set {ChunkApoc::Loop.2} to 0.5
  52. set {ChunkApoc::Count} to 0
  53. set {ChunkApoc::Time} to 0
  54. set {ChunkApoc::Notify} to now
  55.  
  56. #= Broadcast =#
  57.  
  58. loop 6 times:
  59. message "{@P}{@CC} Remove your world border!"
  60. wait 2 ticks
  61. broadcast "&a&k--------------{@P}&a&k--------------"
  62. broadcast "&a&k--{@CC} %command sender%: {@HC}%arg-1%{@CC} in {@HC}%arg-2%!"
  63. broadcast "&a&k--{@CC} Beginning ChunkApoc! Do not log out!"
  64. if command sender is "Fleft":
  65. broadcast "&a&k--{@CC} ChunkApoc Skript by {@HC}You"
  66. else:
  67. broadcast "&a&k--{@CC} ChunkApoc Skript by {@HC}Fleft"
  68. broadcast "&a&k--{@CC} Use /skChunkApoc to cancel at any time!"
  69. broadcast "&a&k--------------{@P}&a&k--------------"
  70. wait 1 second
  71. set {_count} to 3
  72. loop 3 times:
  73. broadcast "{@P}{@CC} Starting:{@HC} %{_count}%..."
  74. command "/ChunkApoc-sound note.harp"
  75. subtract 1 from {_count}
  76. wait 1 second
  77. command sender command "/wb %arg-2% clear"
  78.  
  79.  
  80. #= Literally the ChunkApoc =#
  81.  
  82. loop ({ChunkApoc::Radius}*2) times:
  83. add 1 to {ChunkApoc::Loop.1}
  84. if {ChunkApoc::Loop.1} is equal to 16.5:
  85. set {ChunkApoc::Time} to rounded down ((((loop-number-1)/{ChunkApoc::Radius})*50)-1)
  86. if {ChunkApoc::Notify} was more than 5 seconds ago:
  87. set {ChunkApoc::Notfy} to now
  88. if {@Broadcast.Messages} is true:
  89. broadcast "{@P}{@CC} Progress: {@HC}%{ChunkApoc::Time}%%%"
  90. else:
  91. message "{@P}{@CC} Progress: {@HC}%{ChunkApoc::Time}%%%"
  92. set {ChunkApoc::Loop.1} to 0.5
  93. loop ({ChunkApoc::Radius}*2) times:
  94. {ChunkApoc::Running} is not set:
  95. delete {ChunkApoc::*}
  96. broadcast "{@P}{@HC} Cancelled!"
  97. command "/ChunkApoc-sound random.break"
  98. wait 5 ticks
  99. set {ChunkApoc::Location} to (location at (0, 255, 0) of the world (world of command sender))
  100. while (block at {ChunkApoc::Location}) is air:
  101. set {ChunkApoc::Location} to location 1 below {ChunkApoc::Location}
  102. if y-coordinate of {ChunkApoc::Location} is less than 3:
  103. message "{@P}{@CC} Error: Could not teleport {@HC}%command sender%{@CC} to 0,0."
  104. wait 1 tick
  105. teleport command sender to (location 1 above {ChunkApoc::Location})
  106. message "{@P}{@CC} You were TPed to {@HC}0,%y-coordinate of command sender%,0!"
  107. delete {ChunkApoc::Location}
  108. stop trigger
  109. add 1 to {ChunkApoc::Loop.2}
  110. if {ChunkApoc::Loop.2} is equal to 16.5:
  111. set {ChunkApoc::Loop.2} to 0.5
  112. set {ChunkApoc::x.coord} to ((loop-number-1)-{ChunkApoc::Radius}+0.5)
  113. set {ChunkApoc::z.coord} to ((loop-number-2)-{ChunkApoc::Radius}+0.5)
  114. set {ChunkApoc::Location} to (location at ({ChunkApoc::x.coord}, 255, {ChunkApoc::z.coord}) of the world ({ChunkApoc::World}))
  115. while (block at {ChunkApoc::Location}) is air:
  116. set {ChunkApoc::Location} to location 1 below {ChunkApoc::Location}
  117. if y-coordinate of {ChunkApoc::Location} is less than 3:
  118. message "{@P}{@CC} Error: Void: Skipping location"
  119. delete {ChunkApoc::Location}
  120. if command sender is not online:
  121. broadcast "{@P}{@CC} ChunkApoc interrupted. {@HC}%command sender%{@CC} logged out."
  122. delete {ChunkApoc::Running}
  123. teleport command sender to (location 1 above {ChunkApoc::Location})
  124. if {@Coords.Spam.Chat} is true:
  125. message "{@P}{@CC} %{ChunkApoc::Location}%"
  126. chance of {ChunkApoc::Percent}%:
  127. loop 256 times:
  128. loop blocks from (block at (the location at {ChunkApoc::x.coord}, (256-(loop-number-3)), {ChunkApoc::z.coord} of the world {ChunkApoc::World})) to (block at (the location at {ChunkApoc::x.coord}, (256-(loop-number-3)), ({ChunkApoc::z.coord}-16.5) of the world {ChunkApoc::World})):
  129. loop blocks from loop-block-1 to (block 16.5 west of loop-block-1):
  130. set loop-block-2 to air
  131. add 1 to {ChunkApoc::Time}
  132. wait {@ChunkApoc.TP.Delay}
  133.  
  134. #= Deletion of Variable =#
  135.  
  136. delete {ChunkApoc::*}
  137.  
  138. #= Final TP to 0,0 =#
  139. set {_FinalLoc} to (location at (0, 256, 0) of the world (world of command sender))
  140. while (block at {_FinalLoc}) is air:
  141. set {_FinalLoc} to location 1 below {_FinalLoc}
  142. if y-coordinate of {_FinalLoc} is less than 3:
  143. message "{@P}{@CC} Error: Could not teleport {@HC}%command sender%{@CC} to 0,0."
  144. stop trigger
  145. wait 1 tick
  146. teleport command sender to (location 1 above {_FinalLoc})
  147.  
  148. #= Final Broadcast =#
  149.  
  150. message "{@P}{@CC} You were TPed to {@HC}0,%y-coordinate of command sender%,0!"
  151. broadcast "&a&k--------------{@P}&a&k--------------"
  152. broadcast "&a&k--{@HC} ChunkApocning has been completed!"
  153. broadcast "&a&k--{@CC} Reapply your {@HC}Worldborder!"
  154. broadcast "&a&k--------------{@P}&a&k--------------"
  155. loop 7 times:
  156. command "/ChunkApoc-sound fireworks.launch"
  157. command "/ChunkApoc-sound fireworks.twinkle"
  158. wait 4 ticks
  159.  
  160. #= Sound Command =#
  161.  
  162. command /ChunkApoc-sound <text>:
  163. permission: skript.ChunkApoc
  164. trigger:
  165. loop all players:
  166. execute console command "/playsound %arg% %loop-player% ~ ~ ~ 1 1 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement