Advertisement
Phe0X

Reset de map

Feb 12th, 2017
3,107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. on break:
  2. if {Nomodif.%player%} is set:
  3. stop
  4. if {InReset} is set:
  5. send "&cImpossible : Map en reset !"
  6. cancel event
  7. stop
  8. if {blockis.%location of event-block%} is set:
  9. stop
  10. else:
  11. set {blocklocation.%{count}%} to event-location
  12. set {block.%{count}%} to type of event-block
  13. set {blockis.%location of event-block%} to true
  14. add 1 to {Count}
  15.  
  16. on place:
  17. if {Nomodif.%player%} is set:
  18. stop
  19. if {InReset} is set:
  20. send "&cImpossible : Map en reset !"
  21. cancel event
  22. stop
  23. if {blockis.%location of event-block%} is set:
  24. stop
  25. else:
  26. set {blockis.%location of event-block%} to true
  27. set {blocklocation.%{count}%} to event-location
  28. set {block.%{count}%} to air
  29. add 1 to {Count}
  30. on enderman pickup:
  31. if {InReset} is set:
  32. cancel event
  33. stop
  34. if {blockis.%location of event-block%} is set:
  35. stop
  36. else:
  37. set {blocklocation.%{count}%} to event-location
  38. set {block.%{count}%} to type of event-block
  39. set {blockis.%location of event-block%} to true
  40. add 1 to {Count}
  41. on enderman place:
  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. loop exploded blocks:
  54. if {InReset} is set:
  55. cancel event
  56. stop
  57. if {blockis.%location of loop-block%} is set:
  58. stop
  59. else:
  60. set {blocklocation.%{count}%} to loop-block's location
  61. set {block.%{count}%} to type of loop-block
  62. set {blockis.%location of loop-block%} to true
  63. add 1 to {Count}
  64. command /reset:
  65. permission: reset.reset
  66. trigger:
  67. if {InReset} is set:
  68. send "&5[Reset] &cReset en cours !"
  69. stop
  70. set {InReset} to true
  71. send "&5[Reset] &aIl y a &c%{Count}% blocks &aà modifier !"
  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 "Reset de map : %{_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 fini &c(%{_count}%)"
  84.  
  85. command /nomodif:
  86. permission: nomodif.reset
  87. trigger:
  88. if {Nomodif.%player%} is not set:
  89. set {Nomodif.%player%} to true
  90. send "&5[Reset] &aTu as activé le mode NoModif !"
  91. stop
  92. else:
  93. clear {NoModif.%player%}
  94. send "&5[Reset] &aTu as désactivé le mode NoModif !"
  95. stop
  96. on join:
  97. if player has permission "nomodif.reset":
  98. if {Nomodif.%player%} is set:
  99. wait 5 ticks
  100. send "&5[Reset] &aTu es en mode NoModif"
  101. stop
  102. else:
  103. wait 5 ticks
  104. send "&5[Reset] &aTu n'es pas en mode NoModif"
  105. stop
  106. else:
  107. clear {NoModif.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement