Advertisement
miguelmarleau

Untitled

Mar 27th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.87 KB | None | 0 0
  1. on right click with any pickaxe:
  2. cancel event
  3. open chest inventory with 3 rows named "&3&lENCHANTER &8| &b%name of player's tool%" to player
  4. loop integers from 0 to 26:
  5. set slot loop-value of player's current inventory to light blue glass pane named "&7"
  6. set slot 4 of player's current inventory to player's tool named "&3&lCURRENTLY ENCHANTING:"
  7. add "&7Get haste I/II when you break a block." to {_lore::*}
  8. if lore of player's tool doesn't contain "Haste":
  9. add "&7Cost: &e35XP" to {_lore::*}
  10. if lore of player's tool contains "Haste I":
  11. if lore of player's tool doesn't contain "Haste II":
  12. add "&7Cost: &e40XP" to {_lore::*}
  13. else:
  14. add "&7Cost: &cAlready Maxed!" to {_lore::*}
  15. set slot 10 of player's current inventory to sugar named "&eHaste [I-II]" with lore {_lore::*}
  16. delete {_lore::*}
  17. add "&7Mined items will go directly into your inventory." to {_lore::*}
  18. set {_en::*} to enchants of player's tool
  19. if {_en::*} doesn't contain "Fortune":
  20. if lore of player's tool doesn't contain "Telekenisis":
  21. add "&7Cost: &e40XP" to {_lore::*}
  22. else:
  23. add "&7Cost: &cAlready Maxed!" to {_lore::*}
  24. else:
  25. add "&cError: This enchant doesn't work with fortune!" to {_lore::*}
  26. set slot 11 of player's current inventory to hopper named "&eTelekenisis [I]" with lore {_lore::*}
  27. delete {_lore::*}
  28. add "&7Keep this item on death." to {_lore::*}
  29. add "&cThis enchant will not work if you're killed by a guard." to {_lore::*}
  30. if lore of player's tool doesn't contain "Soulbound":
  31. add "&7Cost: &e45XP" to {_lore::*}
  32. else:
  33. add "&7Cost: &cAlready Maxed!" to {_lore::*}
  34. set slot 12 of player's current inventory to ender pearl named "&eSouldbound [I]" with lore {_lore::*}
  35. delete {_lore::*}
  36. add "&7Chance to get extra XP when you mine ores." to {_lore::*}
  37. if lore of player's tool doesn't contain "XP Finder":
  38. add "&7Cost: &e25XP" to {_lore::*}
  39. if lore of player's tool contains "XP Finder I":
  40. if lore of player's tool doesn't contain "XP Finder II":
  41. add "&7Cost: &e35XP" to {_lore::*}
  42. else:
  43. add "&7Cost: &cAlready Maxed!" to {_lore::*}
  44. set slot 13 of player's current inventory to xp bottle named "&eXP Finder [I-II]" with lore {_lore::*}
  45. set {inv.pickaxe.open.%player%} to true
  46. on inventory click:
  47. if {inv.pickaxe.open.%player%} is set:
  48. cancel event
  49. if index of event-slot is 10:
  50. if lore of player's tool doesn't contain "Haste":
  51. if level of player >= 35:
  52. remove 35 from player's level
  53. set lore of player's tool to "%lore of player's tool%||&aHaste I"
  54. close player's inventory
  55. else:
  56. close player's inventory
  57. send "&e[!] You don't have enough XP for this!"
  58. else:
  59. if lore of player's tool contains "Haste I":
  60. if lore of player's tool doesn't contain "Haste II":
  61. if level of player >= 40:
  62. remove 40 from player's level
  63. replace all "Haste I" in lore of player's tool with "Haste II"
  64. close player's inventory
  65. else:
  66. close player's inventory
  67. send "&e[!] You don't have enough XP for this!"
  68. if index of event-slot is 11:
  69. if lore of player's tool doesn't contain "Telekenisis":
  70. if "%enchants of player's tool%" doesn't contain "Fortune":
  71. if level of player >= 40:
  72. remove 40 from player's level
  73. set lore of player's tool to "%lore of player's tool%||&bTelekenisis I"
  74. close player's inventory
  75. else:
  76. close player's inventory
  77. send "&e[!] You don't have enough XP for this!"
  78. else:
  79. close player's inventory
  80. send "&e[!] This enchant doesn't work alongside fortune!"
  81. if index of event-slot is 12:
  82. if lore of player's tool doesn't contain "Soulbound":
  83. if level of player >= 45:
  84. remove 45 from player's level
  85. set lore of player's tool to "%lore of player's tool%||&cSoulbound I"
  86. close player's inventory
  87. else:
  88. close player's inventory
  89. send "&e[!] You don't have enough XP for this!"
  90. if index of event-slot is 13:
  91. if lore of player's tool doesn't contain "XP Finder":
  92. if level of player >= 25:
  93. remove 25 from player's level
  94. set lore of player's tool to "%lore of player's tool%||&dXP Finder I"
  95. close player's inventory
  96. else:
  97. close player's inventory
  98. send "&e[!] You don't have enough XP for this!"
  99. else:
  100. if lore of player's tool contains "XP Finder I":
  101. if lore of player's tool doesn't contain "XP Finder II":
  102. if level of player >= 35:
  103. remove 35 from player's level
  104. replace all "XP Finder I" in lore of player's tool with "XP Finder II"
  105. close player's inventory
  106. else:
  107. close player's inventory
  108. send "&e[!] You don't have enough XP for this!"
  109. on inventory close:
  110. if {inv.pickaxe.open.%player%} is set:
  111. delete {inv.pickaxe.open.%player%}
  112. on mine:
  113. if lore of player's tool contains "Haste I":
  114. if lore of player's tool doesn't contain "Haste II":
  115. remove haste from player
  116. apply haste 1 to player for 5 seconds
  117. else:
  118. remove haste from player
  119. apply haste 2 to player for 5 seconds
  120. if lore of player's tool contains "Telekenisis":
  121. cancel event
  122. if event-block is coal ore:
  123. give 1 coal to player
  124. set {_n} to a random integer from 10 to 20
  125. spawn {_n} of xp at event-block
  126. if event-block is diamond ore:
  127. give 1 diamond to player
  128. set {_n} to a random integer from 10 to 20
  129. spawn {_n} of xp at event-block
  130. if event-block is quartz ore:
  131. give 1 nether quartz to player
  132. set {_n} to a random integer from 10 to 20
  133. spawn {_n} of xp at event-block
  134. if event-block is red wool:
  135. give 1 apple to player
  136. if event-block is purple wool:
  137. give 1 tnt to player
  138. if event-block is green wool:
  139. give 1 arrow to player
  140. if event-block is lapis ore:
  141. give 1 lapis to player
  142. set {_n} to a random integer from 20 to 50
  143. spawn {_n} of xp at event-block
  144. if event-block is redstone ore:
  145. give 1 redstone to player
  146. set {_n} to a random integer from 20 to 50
  147. spawn {_n} of xp at event-block
  148. if event-block is emerald ore:
  149. give 1 emerald to player
  150. set {_n} to a random integer from 10 to 20
  151. spawn {_n} of xp at event-block
  152. else if event-block is not coal ore or diamond ore or quartz ore or red wool or purple wool or green wool or lapis ore or redstone ore or emerald ore:
  153. give 1 of event-block to player
  154. set event-block to air
  155. if lore of player's tool contains "XP Finder I":
  156. if lore of player's tool doesn't contain "XP Finder II":
  157. set {_n} to a random integer from 10 to 20
  158. spawn {_n} of xp at event-block
  159. else:
  160. set {_n} to a random integer from 10 to 30
  161. spawn {_n} of xp at event-block
  162. on death:
  163. loop victim's inventory:
  164. if lore of loop-value doesn't contain "Soulbound":
  165. drop loop-value at victim
  166. remove loop-value from victim's inventory
  167. else:
  168. if {guard.%attacker%} is set:
  169. drop loop-value at victim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement