Advertisement
Phe0X

BlockBreaker

Jun 12th, 2017
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. on explode:
  2. loop all blocks in radius 2 around event-location:
  3. set {_bup} to convert text "%loop-block%" to uppercase
  4. loop {listblocks::*}:
  5. if "%loop-value%" is "%{_bup}%":
  6. cancel event
  7. add 1 to {block.%type of loop-block%.%loop-block's location%}
  8. if {block.%type of loop-block%.%loop-block's location%} > {damage.%loop-value%} - 1:
  9. set {block.%type of loop-block%.%loop-block's location%} to 0
  10. set loop-block to air
  11.  
  12.  
  13. on break:
  14. clear {block.%event-block%.%event-location%}
  15.  
  16.  
  17. command /blockbreaker <material> <integer>:
  18. permission: blockbreacker.add
  19. permission message: &cNo permission
  20. usage: &c/blockbreaker <block> <nombre de coups de tnt avant que le block casse>
  21. trigger:
  22. if arg 2 is 0:
  23. remove arg 1 from {listblocks::*}
  24. clear {damage.%arg 1%}
  25. send "&a[BlockBreaker] &9Le block &6%arg 1% &9est désormais enlevé de la liste !"
  26. stop
  27. remove arg 1 from {listblocks::*}
  28. wait 1 tick
  29. add arg 1 to {listblocks::*}
  30. send "&a[BlockBreaker] &9Il faut désormais &6%arg 2% &ccoups de tnt &9pour que &6%arg 1% &9casse !"
  31. set {damage.%arg 1%} to arg 2
  32.  
  33.  
  34. command /blockbreakerlist:
  35. permission: blockbreaker.list
  36. permission message: &cNo permission
  37. trigger:
  38. if {listblocks::*} is not set:
  39. send "&a[BlockBreaker] &9Liste &cvide &9!"
  40. stop
  41. send "&a[BlockBreaker] &6Liste des blocks :"
  42. loop {listblocks::*}:
  43. send "&a[BlockBreaker] &9%loop-value% : &c%{damage.%loop-value%}% coups"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement