ArtzifyHD

TreeAssist

Jul 20th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. aliases:
  2. wood1 = 17:0
  3. wood2 = 17:1
  4. wood3 = 17:2
  5. wood4 = 17:3
  6. wood5 = 162:0
  7. wood6 = 162:1
  8. wood7 = 100:10
  9. leaves1 = 18:0
  10. leaves2 = 18:1
  11. leaves3 = 18:2
  12. leaves4 = 18:3
  13. leaves5 = 161:0
  14. leaves6 = 161:1
  15. leaves7 = 100
  16.  
  17. on join:
  18. if player has permission "tree.destroy":
  19. set {treetoggle::%player%} to 1
  20. else:
  21. set {treetoggle::%player%} to 0
  22.  
  23. on quit:
  24. delete {treetoggle::%player%}
  25.  
  26. on break of wood1:
  27. {treetoggle::%player%} is 1:
  28. if player has permission "tree.destroy":
  29. if player is holding axe:
  30. loop blocks upwards:
  31. loop-block is wood1:
  32. block under is dirt
  33. drop the loop-block-1 at event-block
  34. set the loop-block-1 to air
  35. add 1 to {tool.%player%}
  36. loop blocks in radius 1 around loop-block:
  37. if loop-block-1 is leaves1:
  38. set {tree::%player%} to true
  39. set the loop-block-1 to air
  40. else:
  41. stop
  42.  
  43. on break of wood2:
  44. {treetoggle::%player%} is 1:
  45. if player has permission "tree.destroy":
  46. if player is holding axe:
  47. loop blocks upwards:
  48. loop-block is wood2:
  49. block under is dirt
  50. drop the loop-block-1 at event-block
  51. set the loop-block-1 to air
  52. add 1 to {tool.%player%}
  53. loop blocks in radius 1 around loop-block:
  54. if loop-block-1 is leaves2:
  55. set {tree::%player%} to true
  56. set the loop-block-1 to air
  57. else:
  58. stop
  59.  
  60. on break of wood3:
  61. {treetoggle::%player%} is 1:
  62. if player has permission "tree.destroy":
  63. if player is holding axe:
  64. loop blocks upwards:
  65. loop-block is wood3:
  66. block under is dirt
  67. drop the loop-block-1 at event-block
  68. set the loop-block-1 to air
  69. add 1 to {tool.%player%}
  70. loop blocks in radius 1 around loop-block:
  71. if loop-block-1 is leaves3:
  72. set {tree::%player%} to true
  73. set the loop-block-1 to air
  74. else:
  75. stop
  76.  
  77. on break of wood4:
  78. {treetoggle::%player%} is 1:
  79. if player has permission "tree.destroy":
  80. if player is holding axe:
  81. loop blocks upwards:
  82. loop-block is wood4:
  83. block under is dirt
  84. drop the loop-block-1 at event-block
  85. set the loop-block-1 to air
  86. add 1 to {tool.%player%}
  87. loop blocks in radius 1 around loop-block:
  88. if loop-block-1 is leaves4:
  89. set {tree::%player%} to true
  90. set the loop-block-1 to air
  91. else:
  92. stop
  93.  
  94. on break of wood5:
  95. {treetoggle::%player%} is 1:
  96. if player has permission "tree.destroy":
  97. if player is holding axe:
  98. loop blocks upwards:
  99. loop-block is wood5:
  100. block under is dirt
  101. drop the loop-block-1 at event-block
  102. set the loop-block-1 to air
  103. add 1 to {tool.%player%}
  104. loop blocks in radius 1 around loop-block:
  105. if loop-block-1 is leaves5:
  106. set {tree::%player%} to true
  107. set the loop-block-1 to air
  108. else:
  109. stop
  110.  
  111. on break of wood6:
  112. {treetoggle::%player%} is 1:
  113. if player has permission "tree.destroy":
  114. if player is holding axe:
  115. loop blocks upwards:
  116. loop-block is wood6:
  117. block under is dirt
  118. drop the loop-block-1 at event-block
  119. set the loop-block-1 to air
  120. add 1 to {tool.%player%}
  121. loop blocks in radius 1 around loop-block:
  122. if loop-block-1 is leaves6:
  123. set {tree::%player%} to true
  124. set the loop-block-1 to air
  125. else:
  126. stop
  127.  
  128. on break of wood7:
  129. {treetoggle::%player%} is 1:
  130. if player has permission "tree.destroy":
  131. if player is holding axe:
  132. loop blocks upwards:
  133. loop-block is wood7:
  134. block under is dirt
  135. drop the loop-block-1 at event-block
  136. set the loop-block-1 to air
  137. add 1 to {tool.%player%}
  138. loop blocks in radius 1 around loop-block:
  139. if loop-block-1 is leaves7:
  140. set {tree::%player%} to true
  141. set the loop-block-1 to air
  142. else:
  143. stop
  144.  
  145.  
  146. command /tree [<text>]:
  147. trigger:
  148. if player has permission "tree.toggle":
  149. if arg 1 is "off":
  150. set {treetoggle::%player%} to 0
  151. send "&8[&6Tree Assist&8] &7TreeAssist is &cOFF"
  152. stop
  153. if arg 1 is "on":
  154. set {treetoggle::%player%} to 1
  155. send "&8[&6Tree Assist&8] &7TreeAssist is &aON"
  156. stop
  157. else:
  158. send "&8[&6Tree Assist&8] &c/tree &7(&con&7/&coff&7)"
  159. stop
  160. else:
  161. send "&8[&6Tree Assist&8] &4You don't have permission to use this command!"
  162. stop
Advertisement
Add Comment
Please, Sign In to add comment