Guest User

Chunk Apocalypse fixed

a guest
May 20th, 2014
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. #- Chunk Apocalypse Skript
  2. #- By Mortimier
  3.  
  4. options:
  5. Pre: &b[&2ChunkApoc&b]&3
  6. PreMess: &b[&2ChunkApoc&b]&c
  7. PreImpo: &b[&2ChunkApoc&b]&6
  8. OpPerm: skript.chunkapoc
  9. PermMess: &cYou don't have permission to do that!
  10.  
  11. command /chunkapoc <integer> <integer> <integer> <world>:
  12. permission: {@OpPerm}
  13. permission message: {@PermMess}
  14. usage: "/chunkapoc <map radius> <chunk size> <% of deleted chunks> <world name>"
  15. trigger:
  16. set {_chunknum} to 2*arg 1/arg 2
  17. set {_chunkx} to arg 1
  18. set {_chunkz} to arg 1
  19. set {_size} to arg 2
  20. broadcast "{@PreImpo} Creating a Chunk Apocalypse in world %arg 4%. Expect a lot of lag! Operation should take about %{_chunknum}*{_chunknum}*3/arg 3% seconds."
  21. loop {_chunknum} times:
  22. loop {_chunknum} times:
  23. chance of arg 3%:
  24. {chunkapoc.cancel} is true:
  25. set {chunkapoc.cancel} to false
  26. stop trigger
  27. broadcast "{@Pre} Deleting Chunk at x: %{_chunkx}%, z: %{_chunkz}%"
  28. loop blocks from (block at (the location at {_chunkx}, 255, {_chunkz} in arg 4)) to (block at (the location at ({_chunkx}-{_size}+1), 255, {_chunkz} in arg 4)):
  29. loop blocks from (loop-block-1) to (the block ({_size}-1) meters north of loop-block-1):
  30. loop blocks from (loop-block-2) to (the block 255 meters below loop-block-2):
  31. set loop-block-3 to air
  32. wait 3 seconds
  33. subtract arg 2 from {_chunkx}
  34. set {_chunkx} to arg 1
  35. subtract {_size} from {_chunkz}
  36. broadcast "{@Pre} Chunk Apocalypse Complete!"
  37. message "{@PreMess} You should recreate your border now."
  38.  
  39. command /chunkcancel:
  40. permission: {@OpPerm}
  41. permission message: {@PermMess}
  42. trigger:
  43. set {chunkapoc.cancel} to true
  44. broadcast "{@PreImpo} Chunk Apocalypse Cancelled!"
Advertisement
Add Comment
Please, Sign In to add comment