Haon

MapReset for Meetup Simulator [SK]

Feb 7th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. on break:
  2. if world is "HaonTest":
  3. if {InReset} is set:
  4. send "&cImpossible"
  5. cancel event
  6. stop
  7. if {blockis.%location of event-block%} is set:
  8. stop
  9. else:
  10. set {blocklocation.%{count}%} to event-location
  11. set {block.%{count}%} to type of event-block
  12. set {blockis.%location of event-block%} to true
  13. add 1 to {Count}
  14.  
  15. on place:
  16. if world is "HaonTest":
  17. if {InReset} is set:
  18. send "&cImpossible"
  19. cancel event
  20. stop
  21. if {blockis.%location of event-block%} is set:
  22. stop
  23. else:
  24. set {blockis.%location of event-block%} to true
  25. set {blocklocation.%{count}%} to event-location
  26. set {block.%{count}%} to air
  27. add 1 to {Count}
  28. on enderman pickup:
  29. if world is "HaonTest":
  30. if {InReset} is set:
  31. cancel event
  32. stop
  33. if {blockis.%location of event-block%} is set:
  34. stop
  35. else:
  36. set {blocklocation.%{count}%} to event-location
  37. set {block.%{count}%} to type of event-block
  38. set {blockis.%location of event-block%} to true
  39. add 1 to {Count}
  40. on enderman place:
  41. if world is "HaonTest":
  42. if {InReset} is set:
  43. cancel event
  44. stop
  45. if {blockis.%location of event-block%} is set:
  46. stop
  47. else:
  48. set {blockis.%location of event-block%} to true
  49. set {blocklocation.%{count}%} to event-location
  50. set {block.%{count}%} to air
  51. add 1 to {Count}
  52. on explode:
  53. if world is "HaonTest":
  54. loop exploded blocks:
  55. if {InReset} is set:
  56. cancel event
  57. stop
  58. if {blockis.%location of loop-block%} is set:
  59. stop
  60. else:
  61. set {blocklocation.%{count}%} to loop-block's location
  62. set {block.%{count}%} to type of loop-block
  63. set {blockis.%location of loop-block%} to true
  64. add 1 to {Count}
  65. command /reset:
  66. permission: reset.reset
  67. trigger:
  68. if {InReset} is set:
  69. send "&5[Reset] &cReseting..."
  70. stop
  71. send "&5[Reset] §cReseted %{Count}% blocks."
  72. set {_count} to 0
  73. loop {Count} times:
  74. clear {blockis.%{blocklocation.%{_count}%}%}
  75. set block at {blocklocation.%{_count}%} to {block.%{_count}%}
  76. clear {blocklocation.%{_count}%}
  77. clear {block.%{_count}%}
  78. send "Map Reset : %{_count}% / %{Count}%" to console
  79. add 1 to {_count}
  80. wait 0.5 tick
  81. set {Count} to 0
  82. clear {InReset}
  83. send "&5[Reset] &aReset finish &c(%{_count}%)"
  84.  
  85. command /abc:
  86. trigger:
  87. delete {InReset}
Add Comment
Please, Sign In to add comment