Advertisement
HYPExMon5ter

CustomEnchants Code

Aug 2nd, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 136.15 KB | None | 0 0
  1. options:
  2.  
  3. #DO NOT CHANGE THIS OR IT WILL FUCK UP STUFF!
  4. version: 1.1
  5.  
  6. on load:
  7. if folder "plugins/CustomEnchants" doesn't exists:
  8. create folder "plugins/CustomEnchants"
  9. if file "plugins/CustomEnchants/config.yml" doesn't exists:
  10. create file "plugins/CustomEnchants/config.yml"
  11.  
  12. wf "## Thank you for downloading CustomEnchants.sk by HYPExMon5ter!" to "plugins/CustomEnchants/config.yml"
  13. wf "## Use '&' or 'ยง' for color codes!" to "plugins/CustomEnchants/config.yml"
  14. wf "## Use {book-amount} for the amount of books you bought" to "plugins/CustomEnchants/config.yml"
  15. wf "## For currency 1 = exp, and 2 = money (money requires vault and an economy plugin such as Essentials, iConomy, etc.)" to "plugins/CustomEnchants/config.yml"
  16.  
  17. set "messages.prefix" to "&8&l[&c&lCE&8&l] &7&l>>" in yaml file "plugins/CustomEnchants/config.yml"
  18.  
  19. set "messages.no-perm" to "&aYou do not have permission to use this command!" in yaml file "plugins/CustomEnchants/config.yml"
  20.  
  21. set "messages.not-enough-currency" to "&aYou cannot afford &7{book-amount} &abook(s)!" in yaml file "plugins/CustomEnchants/config.yml"
  22.  
  23. set "messages.config-reload-success" to "&aSuccessfully reloaded the config!" in yaml file "plugins/CustomEnchants/config.yml"
  24.  
  25. set "messages.update-notifier" to "&c&lYou are running an outdated version of CE! Use '/ce update' to update." in yaml file "plugins/CustomEnchants/config.yml"
  26.  
  27. set "settings.currency" to "1" in yaml file "plugins/CustomEnchants/config.yml"
  28.  
  29. set "settings.update-notifier" to "true" in yaml file "plugins/CustomEnchants/config.yml"
  30.  
  31. set "settings.chance-of-lightning-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  32. set "settings.chance-of-lightning-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  33. set "settings.chance-of-lightning-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  34.  
  35. set "settings.chance-of-blind-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  36. set "settings.time-of-blind-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  37.  
  38. set "settings.chance-of-blind-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  39. set "settings.time-of-blind-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  40.  
  41. set "settings.chance-of-blind-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  42. set "settings.time-of-blind-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  43.  
  44. set "settings.chance-of-poison-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  45. set "settings.time-of-poison-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  46.  
  47. set "settings.chance-of-poison-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  48. set "settings.time-of-poison-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  49.  
  50. set "settings.chance-of-poison-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  51. set "settings.time-of-poison-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  52.  
  53. set "settings.chance-of-decapatation-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  54. set "settings.chance-of-decapatation-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  55. set "settings.chance-of-decapatation-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  56.  
  57. set "settings.chance-of-molten-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  58. set "settings.chance-of-molten-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  59. set "settings.chance-of-molten-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  60.  
  61. set "settings.chance-of-enlighted-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  62. set "settings.chance-of-enlighted-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  63.  
  64. set "settings.chance-of-deathbringer-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  65. set "settings.chance-of-deathbringer-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  66.  
  67. set "settings.chance-of-hardened-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
  68. set "settings.time-of-hardened-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  69.  
  70. set "settings.chance-of-hardened-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
  71. set "settings.time-of-hardened-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  72.  
  73. set "settings.chance-of-hardened-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  74. set "settings.time-of-hardened-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
  75.  
  76. set "settings.TierI.cost-for-tier-I" to "15" in yaml file "plugins/CustomEnchants/config.yml"
  77. set "messages.TierI.tier-I-success-message" to "&aSuccessfully bought a &2Tier I &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
  78. set "messages.TierI.tier-I-more-than-one-success-message" to "&aSuccessfully bought &7{book-amount} &2Tier I &7Enchantment Books&a!" in yaml file "plugins/CustomEnchants/config.yml"
  79.  
  80. set "settings.TierII.cost-for-tier-II" to "30" in yaml file "plugins/CustomEnchants/config.yml"
  81. set "messages.TierII.tier-II-success-message" to "&aSuccessfully bought a &5Tier II &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
  82. set "messages.TierII.tier-II-more-than-one-success-message" to "&aSuccessfully bought &7{book-amount} &5Tier II &7Enchantment Books&a!" in yaml file "plugins/CustomEnchants/config.yml"
  83.  
  84. set "settings.TierIII.cost-for-tier-III" to "50" in yaml file "plugins/CustomEnchants/config.yml"
  85. set "messages.TierIII.tier-III-success-message" to "&aSuccessfully bought a &6Tier III &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
  86. set "messages.TierIII.tier-III-more-than-one-success-message" to "&aSuccessfully bought &7{book-amount} &6Tier III &7Enchantment Books&a!" in yaml file "plugins/CustomEnchants/config.yml"
  87.  
  88. set "do-not-touch-this-or-your-config-will-reset.config-version" to "1.1" in yaml file "plugins/CustomEnchants/config.yml"
  89.  
  90. set {CustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
  91.  
  92. set {CustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
  93.  
  94. set {CustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
  95.  
  96. set {CustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
  97.  
  98. set {CustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
  99.  
  100. set {CustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
  101.  
  102. set {CustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
  103.  
  104. set {CustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
  105. set {CustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
  106. set {CustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
  107.  
  108. set {CustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  109. set {CustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  110.  
  111. set {CustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  112. set {CustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  113.  
  114. set {CustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  115. set {CustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  116.  
  117. set {CustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  118. set {CustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  119.  
  120. set {CustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  121. set {CustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  122.  
  123. set {CustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  124. set {CustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  125.  
  126. set {CustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
  127. set {CustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
  128. set {CustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
  129.  
  130. set {CustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
  131. set {CustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
  132. set {CustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
  133.  
  134. set {CustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
  135. set {CustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
  136.  
  137. set {CustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  138. set {CustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  139.  
  140. set {CustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  141. set {CustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  142.  
  143. set {CustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  144. set {CustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  145.  
  146. set {CustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
  147. set {CustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
  148.  
  149. set {CustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
  150. set {CustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
  151. set {CustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  152.  
  153. set {CustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
  154. set {CustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
  155. set {CustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  156.  
  157. set {CustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
  158. set {CustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
  159. set {CustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  160.  
  161. set {CustomEnchants.ConfigVersion} to single value "do-not-touch-this-or-your-config-will-reset.config-version" get of "plugins/CustomEnchants/config.yml"
  162.  
  163. set {Currency} to {CustomEnchants.Currency} parsed as an integer
  164.  
  165. set {CostForTierI} to {CustomEnchants.CostForTierI} parsed as a number
  166. set {CostForTierII} to {CustomEnchants.CostForTierII} parsed as a number
  167. set {CostForTierIII} to {CustomEnchants.CostForTierIII} parsed as a number
  168.  
  169. set {ChanceOfLightningI} to {CustomEnchants.ChanceOfLightningI} parsed as a number
  170. set {ChanceOfLightningII} to {CustomEnchants.ChanceOfLightningII} parsed as a number
  171. set {ChanceOfLightningIII} to {CustomEnchants.ChanceOfLightningIII} parsed as a number
  172.  
  173. set {ChanceOfBlindI} to {CustomEnchants.ChanceOfBlindI} parsed as a number
  174. set {TimeOfBlindI} to {CustomEnchants.TimeOfBlindI} parsed as a timespan
  175.  
  176. set {ChanceOfBlindII} to {CustomEnchants.ChanceOfBlindII} parsed as a number
  177. set {TimeOfBlindII} to {CustomEnchants.TimeOfBlindII} parsed as a timespan
  178.  
  179. set {ChanceOfBlindIII} to {CustomEnchants.ChanceOfBlindIII} parsed as a number
  180. set {TimeOfBlindIII} to {CustomEnchants.TimeOfBlindIII} parsed as a timespan
  181.  
  182. set {ChanceOfPoisonI} to {CustomEnchants.ChanceOfPoisonI} parsed as a number
  183. set {TimeOfPoisonI} to {CustomEnchants.TimeOfPoisonI} parsed as a timespan
  184.  
  185. set {ChanceOfPoisonII} to {CustomEnchants.ChanceOfPoisonII} parsed as a number
  186. set {TimeOfPoisonII} to {CustomEnchants.TimeOfPoisonII} parsed as a timespan
  187.  
  188. set {ChanceOfPoisonIII} to {CustomEnchants.ChanceOfPoisonIII} parsed as a number
  189. set {TimeOfPoisonIII} to {CustomEnchants.TimeOfPoisonIII} parsed as a timespan
  190.  
  191. set {ChanceOfDecapatationI} to {CustomEnchants.ChanceOfDecapatationI} parsed as a number
  192. set {ChanceOfDecapatationII} to {CustomEnchants.ChanceOfDecapatationII} parsed as a number
  193. set {ChanceOfDecapatationIII} to {CustomEnchants.ChanceOfDecapatationIII} parsed as a number
  194.  
  195. set {ChanceOfMoltenI} to {CustomEnchants.ChanceOfMoltenI} parsed as a number
  196. set {ChanceOfMoltenII} to {CustomEnchants.ChanceOfMoltenII} parsed as a number
  197. set {ChanceOfMoltenIII} to {CustomEnchants.ChanceOfMoltenIII} parsed as a number
  198.  
  199. set {ChanceOfEnlightedI} to {CustomEnchants.ChanceOfEnlightedI} parsed as a number
  200. set {ChanceOfEnlightedII} to {CustomEnchants.ChanceOfEnlightedII} parsed as a number
  201.  
  202. set {ChanceOfHardenedI} to {CustomEnchants.ChanceOfHardenedI} parsed as a number
  203. set {TimeOfHardenedI} to {CustomEnchants.TimeOfHardenedI} parsed as a timespan
  204.  
  205. set {ChanceOfHardenedII} to {CustomEnchants.ChanceOfHardenedII} parsed as a number
  206. set {TimeOfHardenedII} to {CustomEnchants.TimeOfHardenedII} parsed as a timespan
  207.  
  208. set {ChanceOfHardenedIII} to {CustomEnchants.ChanceOfHardenedIII} parsed as a number
  209. set {TimeOfHardenedIII} to {CustomEnchants.TimeOfHardenedIII} parsed as a timespan
  210.  
  211. set {ChanceOfDeathbringerI} to {CustomEnchants.ChanceOfDeathbringerI} parsed as a number
  212. set {ChanceOfDeathbringerII} to {CustomEnchants.ChanceOfDeathbringerII} parsed as a number
  213.  
  214. set {ConfigVersion} to {CustomEnchants.ConfigVersion} parsed as a number
  215.  
  216. on join:
  217. if {CustomEnchants.UpdateNotifier} is true:
  218. if player has permission "ce.updates":
  219. if text from "http://pastebin.com/raw/jRmFq1KU" is not "{@version}":
  220. send "%{CustomEnchants.Prefix}% %{CustomEnchants.UpdateNotifierMessage}%"
  221.  
  222. on load:
  223. if {CustomEnchants.UpdateNotifier} is true:
  224. if text from "http://pastebin.com/raw/jRmFq1KU" is not "{@version}":
  225. send "%{CustomEnchants.Prefix}% %{CustomEnchants.UpdateNotifierMessage}%" to console
  226.  
  227. command /customenchants [<text>]:
  228. aliases: /cenchants, /ce
  229. trigger:
  230. if arg 1 is not set:
  231. if player has permission "ce.gui" or "ce.*":
  232. if {Currency} is 1:
  233. open chest with 3 rows named "&8&lCustom Enchantments" to player
  234. wait 2 ticks
  235. add stained glass pane:1, stained glass pane:2, stained glass pane:5 and stained glass pane:4 to {_items::*}
  236. while inventory name of player's current inventory is "&8&lCustom Enchantments":
  237. loop {_items::*}:
  238. loop 27 times:
  239. if inventory name of player's current inventory is not "&8&lCustom Enchantments":
  240. stop trigger
  241. format slot (loop-number - 1) of player with loop-value-1 to be unstealable
  242. format slot 12 of player with book named "&2&lTier I Enchantment Book" with lore "&7Click to purchase a||&2Tier I &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierI}% &8&lEXP" to close then run [make player execute command "/TierI"]
  243. format slot 13 of player with book named "&5&lTier II Enchantment Book" with lore "&7Click to purchase a||&5Tier II &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierII}% &8&lEXP" to close then run [make player execute command "/TierII"]
  244. format slot 14 of player with book named "&6&lTier III Enchantment Book" with lore "&7Click to purchase a||&6Tier III &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierIII}% &8&lEXP" to close then run [make player execute command "/TierIII"]
  245. wait 10 ticks
  246. wait 1 tick
  247. else if {Currency} is 2:
  248. open chest with 3 rows named "&8&lCustom Enchantments" to player
  249. wait 2 ticks
  250. add stained glass pane:1, stained glass pane:2, stained glass pane:5 and stained glass pane:4 to {_items::*}
  251. while inventory name of player's current inventory is "&8&lCustom Enchantments":
  252. loop {_items::*}:
  253. loop 27 times:
  254. if inventory name of player's current inventory is not "&8&lCustom Enchantments":
  255. stop trigger
  256. format slot (loop-number - 1) of player with loop-value-1 to be unstealable
  257. format slot 12 of player with book named "&2&lTier I Enchantment Book" with lore "&7Click to purchase a||&2Tier I &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierI}% &8&lDOLLARS" to close then run [make player execute command "/TierI"]
  258. format slot 13 of player with book named "&5&lTier II Enchantment Book" with lore "&7Click to purchase a||&5Tier II &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierII}% &8&lDOLLARS" to close then run [make player execute command "/TierII"]
  259. format slot 14 of player with book named "&6&lTier III Enchantment Book" with lore "&7Click to purchase a||&6Tier III &7Enchantment Book!||||&8&lCOST &c&l%{CostForTierIII}% &8&lDOLLARS" to close then run [make player execute command "/TierIII"]
  260. wait 10 ticks
  261. wait 1 tick
  262. else:
  263. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  264. else if arg 1 is "help":
  265. if player has permission "ce.help" or "ce.*":
  266. send "&7&l&m----------&r &a&lCustomEnchants Help &7&l&m----------"
  267. send "&9/CE &8<&7reload&8>&9/&8<&7config reload&8>&9/&8<&7help&8>&9/&8<&7enchants 1-2&8>&9/&8<&7update&8>"
  268. send "&7&l&m---------------------------------------"
  269. else:
  270. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  271. else if arg 1 is "reload":
  272. if player has permission "ce.reload" or "ce.*":
  273. make player execute command "skript reload %script%"
  274. else:
  275. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  276. else if arg 1 is "enchants" or "enchants 1":
  277. if player has permission "ce.enchants" or "ce.*":
  278. send "&7&l&m----------&r &a&lCustomEnchants Enchants &7&l&m----------" to player
  279. send "&9&l- &2Lightning &7| Chance of striking your enemy with lightning" to player
  280. send "&9&l- &2Blind &7| Chance of giving an enemy blindness for a certain amount of time" to player
  281. send "&9&l- &2Poison &7| Chance of giving an enemy poison for a certain amount of time" to player
  282. send "&9&l- &2Decapatation &7| Chance of getting an enemy's head!" to player
  283. send "&9&l- &2Smelting &7| Smelt everything you mine (if it's smeltable of course)" to player
  284. send "&9&l- &5Lifesteal &7| Get some health back when you punch an enemy" to player
  285. send "&8Use &9/ue enchants 2 &8to view more enchants"
  286. message "&7&l&m------------------&r &a&lPage 1 &7&l&m------------------" to player
  287. else:
  288. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  289. else if arg 1 is "enchants 2":
  290. if player has permission "ce.enchants" or "ce.*":
  291. send "&7&l&m----------&r &a&lCustomEnchants Enchants &7&l&m----------" to player
  292. send "&9&l- &5Molten &7| Chance of lighting the attacker on fire" to player
  293. send "&9&l- &5Enlighted &7| Chance of getting healed when hit" to player
  294. send "&9&l- &5Hardened &7| Chance of giving an enemy weakness for a certain amount of time upon them hitting you" to player
  295. send "&9&l- &5Berserker &7| When low on health you gain extreme strength" to player
  296. send "&9&l- &6Deathbringer &7| Chance to do more damage" to player
  297. send "&9&l- &6Self Destruct &7| Spawn tnt on death" to player
  298. message "&7&l&m------------------&r &a&lPage 2 &7&l&m------------------" to player
  299. else:
  300. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  301. else if arg 1 is "config reload" or "config r":
  302. if player has permission "ce.reload.config" or "ce.*":
  303. set {CustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
  304.  
  305. set {CustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
  306.  
  307. set {CustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
  308.  
  309. set {CustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
  310.  
  311. set {CustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
  312.  
  313. set {CustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
  314.  
  315. set {CustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
  316.  
  317. set {CustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
  318. set {CustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
  319. set {CustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
  320.  
  321. set {CustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  322. set {CustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  323.  
  324. set {CustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  325. set {CustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  326.  
  327. set {CustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  328. set {CustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  329.  
  330. set {CustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  331. set {CustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  332.  
  333. set {CustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  334. set {CustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  335.  
  336. set {CustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  337. set {CustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  338.  
  339. set {CustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
  340. set {CustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
  341. set {CustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
  342.  
  343. set {CustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
  344. set {CustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
  345. set {CustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
  346.  
  347. set {CustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
  348. set {CustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
  349.  
  350. set {CustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  351. set {CustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  352.  
  353. set {CustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  354. set {CustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  355.  
  356. set {CustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  357. set {CustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  358.  
  359. set {CustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
  360. set {CustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
  361.  
  362. set {CustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
  363. set {CustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
  364. set {CustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  365.  
  366. set {CustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
  367. set {CustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
  368. set {CustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  369.  
  370. set {CustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
  371. set {CustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
  372. set {CustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  373.  
  374. set {CustomEnchants.ConfigVersion} to single value "do-not-touch-this-or-your-config-will-reset.config-version" get of "plugins/CustomEnchants/config.yml"
  375.  
  376. set {Currency} to {CustomEnchants.Currency} parsed as an integer
  377.  
  378. set {CostForTierI} to {CustomEnchants.CostForTierI} parsed as a number
  379. set {CostForTierII} to {CustomEnchants.CostForTierII} parsed as a number
  380. set {CostForTierIII} to {CustomEnchants.CostForTierIII} parsed as a number
  381.  
  382. set {ChanceOfLightningI} to {CustomEnchants.ChanceOfLightningI} parsed as a number
  383. set {ChanceOfLightningII} to {CustomEnchants.ChanceOfLightningII} parsed as a number
  384. set {ChanceOfLightningIII} to {CustomEnchants.ChanceOfLightningIII} parsed as a number
  385.  
  386. set {ChanceOfBlindI} to {CustomEnchants.ChanceOfBlindI} parsed as a number
  387. set {TimeOfBlindI} to {CustomEnchants.TimeOfBlindI} parsed as a timespan
  388.  
  389. set {ChanceOfBlindII} to {CustomEnchants.ChanceOfBlindII} parsed as a number
  390. set {TimeOfBlindII} to {CustomEnchants.TimeOfBlindII} parsed as a timespan
  391.  
  392. set {ChanceOfBlindIII} to {CustomEnchants.ChanceOfBlindIII} parsed as a number
  393. set {TimeOfBlindIII} to {CustomEnchants.TimeOfBlindIII} parsed as a timespan
  394.  
  395. set {ChanceOfPoisonI} to {CustomEnchants.ChanceOfPoisonI} parsed as a number
  396. set {TimeOfPoisonI} to {CustomEnchants.TimeOfPoisonI} parsed as a timespan
  397.  
  398. set {ChanceOfPoisonII} to {CustomEnchants.ChanceOfPoisonII} parsed as a number
  399. set {TimeOfPoisonII} to {CustomEnchants.TimeOfPoisonII} parsed as a timespan
  400.  
  401. set {ChanceOfPoisonIII} to {CustomEnchants.ChanceOfPoisonIII} parsed as a number
  402. set {TimeOfPoisonIII} to {CustomEnchants.TimeOfPoisonIII} parsed as a timespan
  403.  
  404. set {ChanceOfDecapatationI} to {CustomEnchants.ChanceOfDecapatationI} parsed as a number
  405. set {ChanceOfDecapatationII} to {CustomEnchants.ChanceOfDecapatationII} parsed as a number
  406. set {ChanceOfDecapatationIII} to {CustomEnchants.ChanceOfDecapatationIII} parsed as a number
  407.  
  408. set {ChanceOfMoltenI} to {CustomEnchants.ChanceOfMoltenI} parsed as a number
  409. set {ChanceOfMoltenII} to {CustomEnchants.ChanceOfMoltenII} parsed as a number
  410. set {ChanceOfMoltenIII} to {CustomEnchants.ChanceOfMoltenIII} parsed as a number
  411.  
  412. set {ChanceOfEnlightedI} to {CustomEnchants.ChanceOfEnlightedI} parsed as a number
  413. set {ChanceOfEnlightedII} to {CustomEnchants.ChanceOfEnlightedII} parsed as a number
  414.  
  415. set {ChanceOfHardenedI} to {CustomEnchants.ChanceOfHardenedI} parsed as a number
  416. set {TimeOfHardenedI} to {CustomEnchants.TimeOfHardenedI} parsed as a timespan
  417.  
  418. set {ChanceOfHardenedII} to {CustomEnchants.ChanceOfHardenedII} parsed as a number
  419. set {TimeOfHardenedII} to {CustomEnchants.TimeOfHardenedII} parsed as a timespan
  420.  
  421. set {ChanceOfHardenedIII} to {CustomEnchants.ChanceOfHardenedIII} parsed as a number
  422. set {TimeOfHardenedIII} to {CustomEnchants.TimeOfHardenedIII} parsed as a timespan
  423.  
  424. set {ChanceOfDeathbringerI} to {CustomEnchants.ChanceOfDeathbringerI} parsed as a number
  425. set {ChanceOfDeathbringerII} to {CustomEnchants.ChanceOfDeathbringerII} parsed as a number
  426.  
  427. set {ConfigVersion} to {CustomEnchants.ConfigVersion} parsed as a number
  428. send "%{CustomEnchants.Prefix}% %{CustomEnchants.ConfigReloadSuccess}%"
  429. else:
  430. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  431. else if arg 1 is "update":
  432. if sender has permission "ce.update" or "ce.*":
  433. if "{@version}" is not "%{ConfigVersion}%":
  434. if file "plugins/CustomEnchants/config.yml" exists:
  435. send "%{CustomEnchants.Prefix}% &aUpdating..." to sender
  436. set {BackupCustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
  437.  
  438. set {BackupBackupCustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
  439.  
  440. set {BackupCustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
  441.  
  442. set {BackupCustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
  443.  
  444. set {BackupCustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
  445.  
  446. set {BackupCustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
  447.  
  448. set {BackupCustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
  449.  
  450. set {BackupCustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
  451. set {BackupCustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
  452. set {BackupCustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
  453.  
  454. set {BackupCustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  455. set {BackupCustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
  456.  
  457. set {BackupCustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  458. set {BackupCustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
  459.  
  460. set {BackupCustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  461. set {BackupCustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
  462.  
  463. set {BackupCustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  464. set {BackupCustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
  465.  
  466. set {BackupCustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  467. set {BackupCustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
  468.  
  469. set {BackupCustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  470. set {BackupCustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
  471.  
  472. set {BackupCustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
  473. set {BackupCustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
  474. set {BackupCustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
  475.  
  476. set {BackupCustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
  477. set {BackupCustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
  478. set {BackupCustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
  479.  
  480. set {BackupCustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
  481. set {BackupCustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
  482.  
  483. set {BackupCustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  484. set {BackupCustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
  485.  
  486. set {BackupCustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  487. set {BackupCustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
  488.  
  489. set {BackupCustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  490. set {BackupCustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
  491.  
  492. set {BackupCustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
  493. set {BackupCustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
  494.  
  495. set {BackupCustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
  496. set {BackupCustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
  497. set {BackupCustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  498.  
  499. set {BackupCustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
  500. set {BackupCustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
  501. set {BackupCustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  502.  
  503. set {BackupCustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
  504. set {BackupCustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
  505. set {BackupCustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
  506. wait 1 second
  507. delete file "plugins/CustomEnchants/config.yml"
  508. delete file "plugins/Skript/scripts/%script%.sk"
  509. wait 2 seconds
  510. download from "http://pastebin.com/raw/FeW1VACq" to "plugins/Skript/scripts/CustomEnchants.sk"
  511. create file "plugins/CustomEnchants/config.yml"
  512. wait 1 second
  513. wf "## Thank you for downloading CustomEnchants.sk by HYPExMon5ter!" to "plugins/CustomEnchants/config.yml"
  514. wf "## Use '&' or 'ยง' for color codes!" to "plugins/CustomEnchants/config.yml"
  515. wf "## Use {book-amount} for the amount of books you bought" to "plugins/CustomEnchants/config.yml"
  516. wf "## For currency 1 = exp, and 2 = money (money requires vault and an economy plugin such as Essentials, iConomy, etc.)" to "plugins/CustomEnchants/config.yml"
  517.  
  518. set "messages.prefix" to "%{BackupCustomEnchants.Prefix}%" in yaml file "plugins/CustomEnchants/config.yml"
  519.  
  520. set "messages.no-perm" to "%{BackupBackupCustomEnchants.NoPermission}%" in yaml file "plugins/CustomEnchants/config.yml"
  521.  
  522. set "messages.not-enough-currency" to "%{BackupCustomEnchants.NotEnoughToBuy}%" in yaml file "plugins/CustomEnchants/config.yml"
  523.  
  524. set "messages.config-reload-success" to "%{BackupCustomEnchants.ConfigReloadSuccess}%" in yaml file "plugins/CustomEnchants/config.yml"
  525.  
  526. set "messages.update-notifier" to "%{BackupCustomEnchants.UpdateNotifierMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  527.  
  528. set "settings.currency" to "%{BackupCustomEnchants.Currency}%" in yaml file "plugins/CustomEnchants/config.yml"
  529.  
  530. set "settings.update-notifier" to "%{BackupCustomEnchants.UpdateNotifier}%" in yaml file "plugins/CustomEnchants/config.yml"
  531.  
  532. set "settings.chance-of-lightning-I" to "%{BackupCustomEnchants.ChanceOfLightningI}%" in yaml file "plugins/CustomEnchants/config.yml"
  533. set "settings.chance-of-lightning-II" to "%{BackupCustomEnchants.ChanceOfLightningII}%" in yaml file "plugins/CustomEnchants/config.yml"
  534. set "settings.chance-of-lightning-III" to "%{BackupCustomEnchants.ChanceOfLightningIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  535.  
  536. set "settings.chance-of-blind-I" to "%{BackupCustomEnchants.ChanceOfBlindI}%" in yaml file "plugins/CustomEnchants/config.yml"
  537. set "settings.time-of-blind-I" to "%{BackupCustomEnchants.TimeOfBlindI}%" in yaml file "plugins/CustomEnchants/config.yml"
  538.  
  539. set "settings.chance-of-blind-II" to "%{BackupCustomEnchants.ChanceOfBlindII}%" in yaml file "plugins/CustomEnchants/config.yml"
  540. set "settings.time-of-blind-II" to "%{BackupCustomEnchants.TimeOfBlindII}%" in yaml file "plugins/CustomEnchants/config.yml"
  541.  
  542. set "settings.chance-of-blind-III" to "%{BackupCustomEnchants.ChanceOfBlindIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  543. set "settings.time-of-blind-III" to "%{BackupCustomEnchants.TimeOfBlindIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  544.  
  545. set "settings.chance-of-poison-I" to "%{BackupCustomEnchants.ChanceOfPoisonI}%" in yaml file "plugins/CustomEnchants/config.yml"
  546. set "settings.time-of-poison-I" to "%{BackupCustomEnchants.TimeOfPoisonI}%" in yaml file "plugins/CustomEnchants/config.yml"
  547.  
  548. set "settings.chance-of-poison-II" to "%{BackupCustomEnchants.ChanceOfPoisonII}%" in yaml file "plugins/CustomEnchants/config.yml"
  549. set "settings.time-of-poison-II" to "%{BackupCustomEnchants.TimeOfPoisonII}%" in yaml file "plugins/CustomEnchants/config.yml"
  550.  
  551. set "settings.chance-of-poison-III" to "%{BackupCustomEnchants.ChanceOfPoisonIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  552. set "settings.time-of-poison-III" to "%{BackupCustomEnchants.TimeOfPoisonIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  553.  
  554. set "settings.chance-of-decapatation-I" to "%{BackupCustomEnchants.ChanceOfDecapatationI}%" in yaml file "plugins/CustomEnchants/config.yml"
  555. set "settings.chance-of-decapatation-II" to "%{BackupCustomEnchants.ChanceOfDecapatationII}%" in yaml file "plugins/CustomEnchants/config.yml"
  556. set "settings.chance-of-decapatation-III" to "%{BackupCustomEnchants.ChanceOfDecapatationIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  557.  
  558. set "settings.chance-of-molten-I" to "%{BackupCustomEnchants.ChanceOfMoltenI}%" in yaml file "plugins/CustomEnchants/config.yml"
  559. set "settings.chance-of-molten-II" to "%{BackupCustomEnchants.ChanceOfMoltenII}%" in yaml file "plugins/CustomEnchants/config.yml"
  560. set "settings.chance-of-molten-III" to "%{BackupCustomEnchants.ChanceOfMoltenIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  561.  
  562. set "settings.chance-of-enlighted-I" to "%{BackupCustomEnchants.ChanceOfEnlightedI}%" in yaml file "plugins/CustomEnchants/config.yml"
  563. set "settings.chance-of-enlighted-II" to "%{BackupCustomEnchants.ChanceOfEnlightedII}%" in yaml file "plugins/CustomEnchants/config.yml"
  564.  
  565. set "settings.chance-of-deathbringer-I" to "%{BackupCustomEnchants.ChanceOfDeathbringerI}%" in yaml file "plugins/CustomEnchants/config.yml"
  566. set "settings.chance-of-deathbringer-II" to "%{BackupCustomEnchants.ChanceOfDeathbringerII}%" in yaml file "plugins/CustomEnchants/config.yml"
  567.  
  568. set "settings.chance-of-hardened-I" to "%{BackupCustomEnchants.ChanceOfHardenedI}%" in yaml file "plugins/CustomEnchants/config.yml"
  569. set "settings.time-of-hardened-I" to "%{BackupCustomEnchants.TimeOfHardenedI}%" in yaml file "plugins/CustomEnchants/config.yml"
  570.  
  571. set "settings.chance-of-hardened-II" to "%{BackupCustomEnchants.ChanceOfHardenedII}%" in yaml file "plugins/CustomEnchants/config.yml"
  572. set "settings.time-of-hardened-II" to "%{BackupCustomEnchants.TimeOfHardenedII}%" in yaml file "plugins/CustomEnchants/config.yml"
  573.  
  574. set "settings.chance-of-hardened-III" to "%{BackupCustomEnchants.ChanceOfHardenedIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  575. set "settings.time-of-hardened-III" to "%{BackupCustomEnchants.TimeOfHardenedIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  576.  
  577. set "settings.TierI.cost-for-tier-I" to "%{BackupCustomEnchants.CostForTierI}%" in yaml file "plugins/CustomEnchants/config.yml"
  578. set "messages.TierI.tier-I-success-message" to "%{BackupCustomEnchants.TierISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  579. set "messages.TierI.tier-I-more-than-one-success-message" to "%{BackupCustomEnchants.TierIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  580.  
  581. set "settings.TierII.cost-for-tier-II" to "%{BackupCustomEnchants.CostForTierII}%" in yaml file "plugins/CustomEnchants/config.yml"
  582. set "messages.TierII.tier-II-success-message" to "%{BackupCustomEnchants.TierIISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  583. set "messages.TierII.tier-II-more-than-one-success-message" to "%{BackupCustomEnchants.TierIIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  584.  
  585. set "settings.TierIII.cost-for-tier-III" to "%{BackupCustomEnchants.CostForTierIII}%" in yaml file "plugins/CustomEnchants/config.yml"
  586. set "messages.TierIII.tier-III-success-message" to "%{BackupCustomEnchants.TierIIISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  587. set "messages.TierIII.tier-III-more-than-one-success-message" to "%{BackupCustomEnchants.TierIIIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
  588.  
  589. set "do-not-touch-this-or-your-config-will-reset.config-version" to "1.1" in yaml file "plugins/CustomEnchants/config.yml"
  590. wait 2 seconds
  591. send "%{CustomEnchants.Prefix}% &aSuccessfully updated!"
  592. make player execute command "/skript reload %script%"
  593. else:
  594. send "&4ERROR" to sender
  595. send "" to sender
  596. send "%{CustomEnchants.Prefix}% &c&lSumting dun fukd up with the config m8" to sender
  597. send "" to sender
  598. send "&4ERROR" to sender
  599. else:
  600. send "%{CustomEnchants.Prefix}% &aCustomEnchants is already up-to-date." to sender
  601. else if arg 1 is not "help" or "reload" or "enchants" or "enchants 1" or "enchants 2" or "config reload" or "config r" or "update":
  602. if player has permission "ce.help" or "ce.*":
  603. send "&7&l&m----------&r &a&lCustomEnchants Help &7&l&m----------"
  604. send "&9/CE &8<&7reload&8>&9/&8<&7config reload&8>&9/&8<&7help&8>&9/&8<&7enchants 1-2&8>&9/&8<&7update&8>"
  605. send "&7&l&m---------------------------------------"
  606. else:
  607. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
  608.  
  609. # Tier I
  610.  
  611. command /tierI:
  612. trigger:
  613. if {Currency} is 1:
  614. set {numberOfBooks.%player%} to 1
  615. wait 3 ticks
  616. open chest with 3 rows named "&2&lTier I amount picker" to player
  617. invoke "Tier I EXP" from 0 and player
  618. else if {Currency} is 2:
  619. set {numberOfBooks.%player%} to 1
  620. wait 3 ticks
  621. open chest with 3 rows named "&2&lTier I amount picker" to player
  622. invoke "Tier I $" from 0 and player
  623.  
  624. sub "Tier I EXP":
  625. set {_n} to parameter 1
  626. set {_p} to parameter 2
  627. add {_n} to {numberOfBooks.%{_p}%}
  628. if {numberOfBooks.%{_p}%} < 1:
  629. set {numberOfBooks.%{_p}%} to 1
  630. if {numberOfBooks.%{_p}%} > 100:
  631. set {numberOfBooks.%{_p}%} to 100
  632. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier I EXP" from 1 and {_p}]
  633. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier I EXP" from 5 and {_p}]
  634. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier I EXP" from 10 and {_p}]
  635.  
  636. format slot 13 of {_p} with 1 of stained glass pane:4 named "&2Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&2&lCost &a%{numberOfBooks.%{_p}%} * {CostForTierI}% &2&lEXP||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierI"]
  637.  
  638. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier I EXP" from -1 and {_p}]
  639. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier I EXP" from -5 and {_p}]
  640. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier I EXP" from -10 and {_p}]
  641.  
  642. sub "Tier I $":
  643. set {_n} to parameter 1
  644. set {_p} to parameter 2
  645. add {_n} to {numberOfBooks.%{_p}%}
  646. if {numberOfBooks.%{_p}%} < 1:
  647. set {numberOfBooks.%{_p}%} to 1
  648. if {numberOfBooks.%{_p}%} > 100:
  649. set {numberOfBooks.%{_p}%} to 100
  650. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier I $" from 1 and {_p}]
  651. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier I $" from 5 and {_p}]
  652. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier I $" from 10 and {_p}]
  653.  
  654. format slot 13 of {_p} with 1 of stained glass pane:4 named "&2Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&2&lCost &a$%{numberOfBooks.%{_p}%} * {CostForTierI}%||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierI"]
  655.  
  656. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier I $" from -1 and {_p}]
  657. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier I $" from -5 and {_p}]
  658. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier I $" from -10 and {_p}]
  659.  
  660. command /acceptTierI:
  661. trigger:
  662. if {Currency} is 1:
  663. if player's level is greater than or equal to {CostForTierI} * {numberOfBooks.%player%}:
  664. reduce the player's level by {CostForTierI} * {numberOfBooks.%player%}
  665. give player {numberOfBooks.%player%} of book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book."
  666. if {numberOfBooks.%player%} is 1:
  667. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierISuccessMessage}%"
  668. else if {numberOfBooks.%player%} is greater than 1:
  669. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIMoreThanOneSuccessMessage}
  670. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIMoreThanOneSuccessMessage}%"
  671. else:
  672. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  673. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  674. stop
  675. else if {Currency} is 2:
  676. set {_moneyForTierI} to "%{CostForTierI}%"
  677. set {_moneyForTierI} to {_moneyForTierI} parsed as a number
  678. if player's balance is greater than or equal to {_moneyForTierI} * {numberOfBooks.%player%}:
  679. remove {_moneyForTierI} * {numberOfBooks.%player%} from the player's balance
  680. give player {numberOfBooks.%player%} of book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book."
  681. if {numberOfBooks.%player%} is 1:
  682. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierISuccessMessage}%"
  683. else if {numberOfBooks.%player%} is greater than 1:
  684. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIMoreThanOneSuccessMessage}
  685. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIMoreThanOneSuccessMessage}%"
  686. else:
  687. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  688. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  689. stop
  690.  
  691. # Tier II
  692.  
  693. command /tierII:
  694. trigger:
  695. if {Currency} is 1:
  696. set {numberOfBooks.%player%} to 1
  697. wait 3 ticks
  698. open chest with 3 rows named "&5&lTier II amount picker" to player
  699. invoke "Tier II EXP" from 0 and player
  700. else if {Currency} is 2:
  701. set {numberOfBooks.%player%} to 1
  702. wait 3 ticks
  703. open chest with 3 rows named "&5&lTier II amount picker" to player
  704. invoke "Tier II $" from 0 and player
  705.  
  706. sub "Tier II EXP":
  707. set {_n} to parameter 1
  708. set {_p} to parameter 2
  709. add {_n} to {numberOfBooks.%{_p}%}
  710. if {numberOfBooks.%{_p}%} < 1:
  711. set {numberOfBooks.%{_p}%} to 1
  712. if {numberOfBooks.%{_p}%} > 100:
  713. set {numberOfBooks.%{_p}%} to 100
  714. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier II EXP" from 1 and {_p}]
  715. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier II EXP" from 5 and {_p}]
  716. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier II EXP" from 10 and {_p}]
  717.  
  718. format slot 13 of {_p} with 1 of stained glass pane:4 named "&5Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&5&lCost &a%{numberOfBooks.%{_p}%} * {CostForTierII}% &5&lEXP||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierII"]
  719.  
  720. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier II EXP" from -1 and {_p}]
  721. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier II EXP" from -5 and {_p}]
  722. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier II EXP" from -10 and {_p}]
  723.  
  724. sub "Tier II $":
  725. set {_n} to parameter 1
  726. set {_p} to parameter 2
  727. add {_n} to {numberOfBooks.%{_p}%}
  728. if {numberOfBooks.%{_p}%} < 1:
  729. set {numberOfBooks.%{_p}%} to 1
  730. if {numberOfBooks.%{_p}%} > 100:
  731. set {numberOfBooks.%{_p}%} to 100
  732. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier II $" from 1 and {_p}]
  733. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier II $" from 5 and {_p}]
  734. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier II $" from 10 and {_p}]
  735.  
  736. format slot 13 of {_p} with 1 of stained glass pane:4 named "&5Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&5&lCost &a$%{numberOfBooks.%{_p}%} * {CostForTierII}%||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierII"]
  737.  
  738. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier II $" from -1 and {_p}]
  739. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier II $" from -5 and {_p}]
  740. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier II $" from -10 and {_p}]
  741.  
  742. command /acceptTierII:
  743. trigger:
  744. if {Currency} is 1:
  745. if player's level is greater than or equal to {CostForTierII} * {numberOfBooks.%player%}:
  746. reduce the player's level by {CostForTierII} * {numberOfBooks.%player%}
  747. give player {numberOfBooks.%player%} of book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book."
  748. if {numberOfBooks.%player%} is 1:
  749. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIISuccessMessage}%"
  750. else if {numberOfBooks.%player%} is greater than 1:
  751. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIMoreThanOneSuccessMessage}
  752. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIMoreThanOneSuccessMessage}%"
  753. else:
  754. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  755. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  756. stop
  757. else if {Currency} is 2:
  758. set {_moneyForTierII} to "%{CostForTierII}%"
  759. set {_moneyForTierII} to {_moneyForTierII} parsed as a number
  760. if player's balance is greater than or equal to {_moneyForTierII} * {numberOfBooks.%player%}:
  761. remove {_moneyForTierII} * {numberOfBooks.%player%} from the player's balance
  762. give player {numberOfBooks.%player%} of book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book."
  763. if {numberOfBooks.%player%} is 1:
  764. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIISuccessMessage}%"
  765. else if {numberOfBooks.%player%} is greater than 1:
  766. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIMoreThanOneSuccessMessage}
  767. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIMoreThanOneSuccessMessage}%"
  768. else:
  769. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  770. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  771. stop
  772.  
  773. # Tier III
  774.  
  775. command /tierIII:
  776. trigger:
  777. if {Currency} is 1:
  778. set {numberOfBooks.%player%} to 1
  779. wait 3 ticks
  780. open chest with 3 rows named "&6&lTier III amount picker" to player
  781. invoke "Tier III EXP" from 0 and player
  782. else if {Currency} is 2:
  783. set {numberOfBooks.%player%} to 1
  784. wait 3 ticks
  785. open chest with 3 rows named "&6&lTier III amount picker" to player
  786. invoke "Tier III $" from 0 and player
  787.  
  788. sub "Tier III EXP":
  789. set {_n} to parameter 1
  790. set {_p} to parameter 2
  791. add {_n} to {numberOfBooks.%{_p}%}
  792. if {numberOfBooks.%{_p}%} < 1:
  793. set {numberOfBooks.%{_p}%} to 1
  794. if {numberOfBooks.%{_p}%} > 100:
  795. set {numberOfBooks.%{_p}%} to 100
  796. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier III EXP" from 1 and {_p}]
  797. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier III EXP" from 5 and {_p}]
  798. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier III EXP" from 10 and {_p}]
  799.  
  800. format slot 13 of {_p} with 1 of stained glass pane:4 named "&6Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&6&lCost &a%{numberOfBooks.%{_p}%} * {CostForTierIII}% &6&lEXP||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierIII"]
  801.  
  802. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier III EXP" from -1 and {_p}]
  803. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier III EXP" from -5 and {_p}]
  804. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier III EXP" from -10 and {_p}]
  805.  
  806. sub "Tier III $":
  807. set {_n} to parameter 1
  808. set {_p} to parameter 2
  809. add {_n} to {numberOfBooks.%{_p}%}
  810. if {numberOfBooks.%{_p}%} < 1:
  811. set {numberOfBooks.%{_p}%} to 1
  812. if {numberOfBooks.%{_p}%} > 100:
  813. set {numberOfBooks.%{_p}%} to 100
  814. format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier III $" from 1 and {_p}]
  815. format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier III $" from 5 and {_p}]
  816. format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier III $" from 10 and {_p}]
  817.  
  818. format slot 13 of {_p} with 1 of stained glass pane:4 named "&6Amount of Books &7%{numberOfBooks.%{_p}%}%" with lore "||&6&lCost &a$%{numberOfBooks.%{_p}%} * {CostForTierIII}%||||&cClick to accept!" to close then run [make {_p} execute command "/acceptTierIII"]
  819.  
  820. format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier III $" from -1 and {_p}]
  821. format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier III $" from -5 and {_p}]
  822. format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier III $" from -10 and {_p}]
  823.  
  824. command /acceptTierIII:
  825. trigger:
  826. if {Currency} is 1:
  827. if player's level is greater than or equal to {CostForTierIII} * {numberOfBooks.%player%}:
  828. reduce the player's level by {CostForTierIII} * {numberOfBooks.%player%}
  829. give player {numberOfBooks.%player%} of book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book."
  830. if {numberOfBooks.%player%} is 1:
  831. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIISuccessMessage}%"
  832. else if {numberOfBooks.%player%} is greater than 1:
  833. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIIMoreThanOneSuccessMessage}
  834. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIIMoreThanOneSuccessMessage}%"
  835. else:
  836. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  837. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  838. stop
  839. else if {Currency} is 2:
  840. set {_moneyForTierIII} to "%{CostForTierIII}%"
  841. set {_moneyForTierIII} to {_moneyForTierIII} parsed as a number
  842. if player's balance is greater than or equal to {_moneyForTierIII} * {numberOfBooks.%player%}:
  843. remove {_moneyForTierIII} * {numberOfBooks.%player%} from the player's balance
  844. give player {numberOfBooks.%player%} of book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book."
  845. if {numberOfBooks.%player%} is 1:
  846. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIISuccessMessage}%"
  847. else if {numberOfBooks.%player%} is greater than 1:
  848. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIIMoreThanOneSuccessMessage}
  849. send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIIMoreThanOneSuccessMessage}%"
  850. else:
  851. replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
  852. send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
  853. stop
  854.  
  855. # Tier I Enchantments
  856.  
  857. on right click:
  858. if player is holding book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book.":
  859. remove 1 book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book." from player
  860. set {_randomTierI} to a random integer between 1 and 11
  861. if {_randomTierI} is 1:
  862. give player 1 book named "&2&lLightning I" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningI}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book."
  863. if {_randomTierI} is 2:
  864. give player 1 book named "&2&lLightning II" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book."
  865. if {_randomTierI} is 3:
  866. give player 1 book named "&2&lLightning III" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningIII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book."
  867. if {_randomTierI} is 4:
  868. give player 1 book named "&2&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&2Tier I &7Enchantment Book."
  869. if {_randomTierI} is 5:
  870. give player 1 book named "&2&lPoison I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonI}%%% chance of giving an enemy poison for %{TimeOfPoisonI}%!||||&2Tier I &7Enchantment Book."
  871. if {_randomTierI} is 6:
  872. give player 1 book named "&2&lPoison II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonII}%%% chance of giving an enemy poison for %{TimeOfPoisonII}%!||||&2Tier I &7Enchantment Book."
  873. if {_randomTierI} is 7:
  874. give player 1 book named "&2&lPoison III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonIII}%%% chance of giving an enemy poison for %{TimeOfPoisonIII}%!||||&2Tier I &7Enchantment Book."
  875. if {_randomTierI} is 8:
  876. give player 1 book named "&2&lDecapatation I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationI}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book."
  877. if {_randomTierI} is 9:
  878. give player 1 book named "&2&lDecapatation II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book."
  879. if {_randomTierI} is 10:
  880. give player 1 book named "&2&lDecapatation III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationIII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book."
  881. if {_randomTierI} is 11:
  882. give player 1 book named "&2&lSmelting I" with lore "&7Right-Click to apply to a pickaxe||&bSmelt everything you mine (if it's smeltable of course)||||&2Tier I &7Enchantment Book."
  883.  
  884. # Lightning I
  885.  
  886. on right click:
  887. if player is holding book named "&2&lLightning I" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningI}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book.":
  888. loop all items in player's inventory:
  889. add loop-item to {ce.PlayersInventory.%player%::*}
  890. open chest with 4 rows named "&2&lLightning I &f- &7Click a sword" to player
  891. set {_count} to 0
  892. loop {ce.PlayersInventory.%player%::*}:
  893. if {_x} = 36:
  894. add 1 to {_count}
  895. format slot {_count} of player with loop-value-2 to be unstealable
  896. add 1 to {_count}
  897. delete {ce.PlayersInventory.%player%::*}
  898.  
  899. on inventory click:
  900. if inventory name of player's current inventory is "&2&lLightning I &f- &7Click a sword":
  901. if clicked item is a sword:
  902. if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
  903. remove 1 book named "&2&lLightning I" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningI}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book." from player
  904. set {_clickItem.%player%} to clicked item
  905. close player's inventory
  906. remove {_clickItem.%player%} from player's inventory
  907. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning I"
  908. give {_clickItem.%player%} to player
  909. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
  910. else:
  911. send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
  912. close player's inventory
  913. else:
  914. send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
  915. cancel event
  916. close player's inventory
  917.  
  918. on damage:
  919. if victim is a player:
  920. if attacker's tool is a sword:
  921. if lore of attacker's tool contains "&2&lLightning I":
  922. chance of {ChanceOfLightningI}%:
  923. strike lightning effect at the victim
  924. damage the victim by 1 heart
  925. ignite victim
  926.  
  927. # Lightning II
  928.  
  929. on right click:
  930. if player is holding book named "&2&lLightning II" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book.":
  931. loop all items in player's inventory:
  932. add loop-item to {ce.PlayersInventory.%player%::*}
  933. open chest with 4 rows named "&2&lLightning II &f- &7Click a sword" to player
  934. set {_count} to 0
  935. loop {ce.PlayersInventory.%player%::*}:
  936. if {_x} = 36:
  937. add 1 to {_count}
  938. format slot {_count} of player with loop-value-2 to be unstealable
  939. add 1 to {_count}
  940. delete {ce.PlayersInventory.%player%::*}
  941.  
  942. on inventory click:
  943. if inventory name of player's current inventory is "&2&lLightning II &f- &7Click a sword":
  944. if clicked item is a sword:
  945. if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
  946. remove 1 book named "&2&lLightning II" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book." from player
  947. set {_clickItem.%player%} to clicked item
  948. close player's inventory
  949. remove {_clickItem.%player%} from player's inventory
  950. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning II"
  951. give {_clickItem.%player%} to player
  952. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
  953. else:
  954. send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
  955. close player's inventory
  956. else:
  957. send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
  958. cancel event
  959. close player's inventory
  960.  
  961. on damage:
  962. if victim is a player:
  963. if attacker's tool is a sword:
  964. if lore of attacker's tool contains "&2&lLightning II":
  965. chance of {ChanceOfLightningII}%:
  966. strike lightning effect at the victim
  967. damage the victim by 1 heart
  968. ignite victim
  969.  
  970. # Lightning III
  971.  
  972. on right click:
  973. if player is holding book named "&2&lLightning III" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningIII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book.":
  974. loop all items in player's inventory:
  975. add loop-item to {ce.PlayersInventory.%player%::*}
  976. open chest with 4 rows named "&2&lLightning III &f- &7Click a sword" to player
  977. set {_count} to 0
  978. loop {ce.PlayersInventory.%player%::*}:
  979. if {_x} = 36:
  980. add 1 to {_count}
  981. format slot {_count} of player with loop-value-2 to be unstealable
  982. add 1 to {_count}
  983. delete {ce.PlayersInventory.%player%::*}
  984.  
  985. on inventory click:
  986. if inventory name of player's current inventory is "&2&lLightning III &f- &7Click a sword":
  987. if clicked item is a sword:
  988. if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
  989. remove 1 book named "&2&lLightning III" with lore "&7Right-Click to apply to a sword||&b%{ChanceOfLightningIII}%%% chance of striking an enemy with lightning!||||&2Tier I &7Enchantment Book." from player
  990. set {_clickItem.%player%} to clicked item
  991. close player's inventory
  992. remove {_clickItem.%player%} from player's inventory
  993. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning III"
  994. give {_clickItem.%player%} to player
  995. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
  996. else:
  997. send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
  998. close player's inventory
  999. else:
  1000. send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
  1001. cancel event
  1002. close player's inventory
  1003.  
  1004. on damage:
  1005. if victim is a player:
  1006. if attacker's tool is a sword:
  1007. if lore of attacker's tool contains "&2&lLightning III":
  1008. chance of {ChanceOfLightningIII}%:
  1009. strike lightning effect at the victim
  1010. damage the victim by 1 heart
  1011. ignite victim
  1012.  
  1013. # Blind I
  1014.  
  1015. on right click:
  1016. if player is holding book named "&2&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&2Tier I &7Enchantment Book.":
  1017. loop all items in player's inventory:
  1018. add loop-item to {ce.PlayersInventory.%player%::*}
  1019. open chest with 4 rows named "&2&lBlind I &f- &7Click anything" to player
  1020. set {_count} to 0
  1021. loop {ce.PlayersInventory.%player%::*}:
  1022. if {_x} = 36:
  1023. add 1 to {_count}
  1024. format slot {_count} of player with loop-value-2 to be unstealable
  1025. add 1 to {_count}
  1026. delete {ce.PlayersInventory.%player%::*}
  1027.  
  1028. on inventory click:
  1029. if inventory name of player's current inventory is "&2&lBlind I &f- &7Click anything":
  1030. if clicked item is anything:
  1031. if lore of clicked item doesn't contain "Blind I":
  1032. remove 1 book named "&2&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&2Tier I &7Enchantment Book." from player
  1033. set {_clickItem.%player%} to clicked item
  1034. close player's inventory
  1035. remove {_clickItem.%player%} from player's inventory
  1036. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lBlind I"
  1037. give {_clickItem.%player%} to player
  1038. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1039. else:
  1040. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lBlind&a' on it!"
  1041. close player's inventory
  1042.  
  1043. on damage:
  1044. if victim is a player:
  1045. if lore of attacker's tool contains "&2&lBlind I":
  1046. chance of {ChanceOfBlindI}%:
  1047. apply blindness 1 to victim for {TimeOfBlindI}
  1048.  
  1049. # Poison I
  1050.  
  1051. on right click:
  1052. if player is holding book named "&2&lPoison I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonI}%%% chance of giving an enemy poison for %{TimeOfPoisonI}%!||||&2Tier I &7Enchantment Book.":
  1053. loop all items in player's inventory:
  1054. add loop-item to {ce.PlayersInventory.%player%::*}
  1055. open chest with 4 rows named "&2&lPoison I &f- &7Click anything" to player
  1056. set {_count} to 0
  1057. loop {ce.PlayersInventory.%player%::*}:
  1058. if {_x} = 36:
  1059. add 1 to {_count}
  1060. format slot {_count} of player with loop-value-2 to be unstealable
  1061. add 1 to {_count}
  1062. delete {ce.PlayersInventory.%player%::*}
  1063.  
  1064. on inventory click:
  1065. if inventory name of player's current inventory is "&2&lPoison I &f- &7Click anything":
  1066. if clicked item is anything:
  1067. if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
  1068. remove 1 book named "&2&lPoison I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonI}%%% chance of giving an enemy poison for %{TimeOfPoisonI}%!||||&2Tier I &7Enchantment Book." from player
  1069. set {_clickItem.%player%} to clicked item
  1070. close player's inventory
  1071. remove {_clickItem.%player%} from player's inventory
  1072. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison I"
  1073. give {_clickItem.%player%} to player
  1074. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1075. else:
  1076. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
  1077. close player's inventory
  1078.  
  1079. on damage:
  1080. if victim is a player:
  1081. if lore of attacker's tool contains "&2&lPoison I":
  1082. chance of {ChanceOfPoisonI}%:
  1083. apply poison 1 to victim for {TimeOfPoisonI}
  1084.  
  1085. # Poison II
  1086.  
  1087. on right click:
  1088. if player is holding book named "&2&lPoison II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonII}%%% chance of giving an enemy poison for %{TimeOfPoisonII}%!||||&2Tier I &7Enchantment Book.":
  1089. loop all items in player's inventory:
  1090. add loop-item to {ce.PlayersInventory.%player%::*}
  1091. open chest with 4 rows named "&2&lPoison II &f- &7Click anything" to player
  1092. set {_count} to 0
  1093. loop {ce.PlayersInventory.%player%::*}:
  1094. if {_x} = 36:
  1095. add 1 to {_count}
  1096. format slot {_count} of player with loop-value-2 to be unstealable
  1097. add 1 to {_count}
  1098. delete {ce.PlayersInventory.%player%::*}
  1099.  
  1100. on inventory click:
  1101. if inventory name of player's current inventory is "&2&lPoison II &f- &7Click anything":
  1102. if clicked item is anything:
  1103. if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
  1104. remove 1 book named "&2&lPoison II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonII}%%% chance of giving an enemy poison for %{TimeOfPoisonII}%!||||&2Tier I &7Enchantment Book." from player
  1105. set {_clickItem.%player%} to clicked item
  1106. close player's inventory
  1107. remove {_clickItem.%player%} from player's inventory
  1108. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison II"
  1109. give {_clickItem.%player%} to player
  1110. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1111. else:
  1112. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
  1113. close player's inventory
  1114.  
  1115. on damage:
  1116. if victim is a player:
  1117. if lore of attacker's tool contains "&2&lPoison II":
  1118. chance of {ChanceOfPoisonII}%:
  1119. apply poison 1 to victim for {TimeOfPoisonII}
  1120.  
  1121. # Poison III
  1122.  
  1123. on right click:
  1124. if player is holding book named "&2&lPoison III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonIII}%%% chance of giving an enemy poison for %{TimeOfPoisonIII}%!||||&2Tier I &7Enchantment Book.":
  1125. loop all items in player's inventory:
  1126. add loop-item to {ce.PlayersInventory.%player%::*}
  1127. open chest with 4 rows named "&2&lPoison III &f- &7Click anything" to player
  1128. set {_count} to 0
  1129. loop {ce.PlayersInventory.%player%::*}:
  1130. if {_x} = 36:
  1131. add 1 to {_count}
  1132. format slot {_count} of player with loop-value-2 to be unstealable
  1133. add 1 to {_count}
  1134. delete {ce.PlayersInventory.%player%::*}
  1135.  
  1136. on inventory click:
  1137. if inventory name of player's current inventory is "&2&lPoison III &f- &7Click anything":
  1138. if clicked item is anything:
  1139. if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
  1140. remove 1 book named "&2&lPoison III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfPoisonIII}%%% chance of giving an enemy poison for %{TimeOfPoisonIII}%!||||&2Tier I &7Enchantment Book." from player
  1141. set {_clickItem.%player%} to clicked item
  1142. close player's inventory
  1143. remove {_clickItem.%player%} from player's inventory
  1144. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison III"
  1145. give {_clickItem.%player%} to player
  1146. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1147. else:
  1148. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
  1149. close player's inventory
  1150.  
  1151. on damage:
  1152. if victim is a player:
  1153. if lore of attacker's tool contains "&2&lPoison III":
  1154. chance of {ChanceOfPoisonIII}%:
  1155. apply poison 2 to victim for {TimeOfPoisonIII}
  1156.  
  1157. # Decapatation I
  1158.  
  1159. on right click:
  1160. if player is holding book named "&2&lDecapatation I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationI}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book.":
  1161. loop all items in player's inventory:
  1162. add loop-item to {ce.PlayersInventory.%player%::*}
  1163. open chest with 4 rows named "&2&lDecapatation I &f- &7Click anything" to player
  1164. set {_count} to 0
  1165. loop {ce.PlayersInventory.%player%::*}:
  1166. if {_x} = 36:
  1167. add 1 to {_count}
  1168. format slot {_count} of player with loop-value-2 to be unstealable
  1169. add 1 to {_count}
  1170. delete {ce.PlayersInventory.%player%::*}
  1171.  
  1172. on inventory click:
  1173. if inventory name of player's current inventory is "&2&lDecapatation I &f- &7Click anything":
  1174. if clicked item is anything:
  1175. if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
  1176. remove 1 book named "&2&lDecapatation I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationI}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book." from player
  1177. set {_clickItem.%player%} to clicked item
  1178. close player's inventory
  1179. remove {_clickItem.%player%} from player's inventory
  1180. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation I"
  1181. give {_clickItem.%player%} to player
  1182. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1183. else:
  1184. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
  1185. close player's inventory
  1186.  
  1187. on death:
  1188. if victim is a player:
  1189. if lore of attacker's tool contains "&2&lDecapatation I":
  1190. chance of {ChanceOfDecapatationI}%:
  1191. drop skull of "%victim%" parsed as offline player at victim's location
  1192.  
  1193. # Decapatation II
  1194.  
  1195. on right click:
  1196. if player is holding book named "&2&lDecapatation II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book.":
  1197. loop all items in player's inventory:
  1198. add loop-item to {ce.PlayersInventory.%player%::*}
  1199. open chest with 4 rows named "&2&lDecapatation II &f- &7Click anything" to player
  1200. set {_count} to 0
  1201. loop {ce.PlayersInventory.%player%::*}:
  1202. if {_x} = 36:
  1203. add 1 to {_count}
  1204. format slot {_count} of player with loop-value-2 to be unstealable
  1205. add 1 to {_count}
  1206. delete {ce.PlayersInventory.%player%::*}
  1207.  
  1208. on inventory click:
  1209. if inventory name of player's current inventory is "&2&lDecapatation II &f- &7Click anything":
  1210. if clicked item is anything:
  1211. if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
  1212. remove 1 book named "&2&lDecapatation II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book." from player
  1213. set {_clickItem.%player%} to clicked item
  1214. close player's inventory
  1215. remove {_clickItem.%player%} from player's inventory
  1216. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation II"
  1217. give {_clickItem.%player%} to player
  1218. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1219. else:
  1220. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
  1221. close player's inventory
  1222.  
  1223. on death:
  1224. if victim is a player:
  1225. if lore of attacker's tool contains "&2&lDecapatation II":
  1226. chance of {ChanceOfDecapatationII}%:
  1227. drop skull of "%victim%" parsed as offline player at victim's location
  1228.  
  1229. # Decapatation III
  1230.  
  1231. on right click:
  1232. if player is holding book named "&2&lDecapatation III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationIII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book.":
  1233. loop all items in player's inventory:
  1234. add loop-item to {ce.PlayersInventory.%player%::*}
  1235. open chest with 4 rows named "&2&lDecapatation III &f- &7Click anything" to player
  1236. set {_count} to 0
  1237. loop {ce.PlayersInventory.%player%::*}:
  1238. if {_x} = 36:
  1239. add 1 to {_count}
  1240. format slot {_count} of player with loop-value-2 to be unstealable
  1241. add 1 to {_count}
  1242. delete {ce.PlayersInventory.%player%::*}
  1243.  
  1244. on inventory click:
  1245. if inventory name of player's current inventory is "&2&lDecapatation III &f- &7Click anything":
  1246. if clicked item is anything:
  1247. if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
  1248. remove 1 book named "&2&lDecapatation III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDecapatationIII}%%% chance of getting an enemy's head!||||&2Tier I &7Enchantment Book." from player
  1249. set {_clickItem.%player%} to clicked item
  1250. close player's inventory
  1251. remove {_clickItem.%player%} from player's inventory
  1252. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation III"
  1253. give {_clickItem.%player%} to player
  1254. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1255. else:
  1256. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
  1257. close player's inventory
  1258.  
  1259. on death:
  1260. if victim is a player:
  1261. if lore of attacker's tool contains "&2&lDecapatation III":
  1262. chance of {ChanceOfDecapatationIII}%:
  1263. drop skull of "%victim%" parsed as offline player at victim's location
  1264.  
  1265. # Smelting I
  1266.  
  1267. on right click:
  1268. if player is holding book named "&2&lSmelting I" with lore "&7Right-Click to apply to a pickaxe||&bSmelt everything you mine (if it's smeltable of course)||||&2Tier I &7Enchantment Book.":
  1269. loop all items in player's inventory:
  1270. add loop-item to {ce.PlayersInventory.%player%::*}
  1271. open chest with 4 rows named "&2&lSmelting I &f- &7Click a pickaxe" to player
  1272. set {_count} to 0
  1273. loop {ce.PlayersInventory.%player%::*}:
  1274. if {_x} = 36:
  1275. add 1 to {_count}
  1276. format slot {_count} of player with loop-value-2 to be unstealable
  1277. add 1 to {_count}
  1278. delete {ce.PlayersInventory.%player%::*}
  1279.  
  1280. on inventory click:
  1281. if inventory name of player's current inventory is "&2&lSmelting I &f- &7Click a pickaxe":
  1282. if clicked item is a pickaxe:
  1283. if lore of clicked item doesn't contain "Smelting I":
  1284. remove 1 book named "&2&lSmelting I" with lore "&7Right-Click to apply to a pickaxe||&bSmelt everything you mine (if it's smeltable of course)||||&2Tier I &7Enchantment Book." from player
  1285. set {_clickItem.%player%} to clicked item
  1286. close player's inventory
  1287. remove {_clickItem.%player%} from player's inventory
  1288. set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lSmelting I"
  1289. give {_clickItem.%player%} to player
  1290. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your pickaxe!"
  1291. else:
  1292. send "%{CustomEnchants.Prefix}% &aI could not enchant your pickaxe as it already has '&2&lSmelting&a' on it!"
  1293. close player's inventory
  1294. else:
  1295. send "%{CustomEnchants.Prefix}% &aThis enchantment is only for pickaxe's, sorry!"
  1296. cancel event
  1297. close player's inventory
  1298.  
  1299. on mine:
  1300. if player's tool is a pickaxe:
  1301. if lore of player's tool contains "&2&lSmelting I":
  1302. if event-block is iron ore:
  1303. if player's gamemode is survival:
  1304. cancel event
  1305. set event-block to air
  1306. give player 1 iron ingot
  1307. damage player's tool by 1
  1308.  
  1309. # Tier II Enchantments
  1310.  
  1311. on right click:
  1312. if player is holding book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book.":
  1313. remove 1 book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book." from player
  1314. set {_randomTierII} to a random integer between 1 and 8
  1315. if {_randomTierII} is 1:
  1316. give player 1 book named "&5&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&5Tier II &7Enchantment Book."
  1317. if {_randomTierII} is 2:
  1318. give player 1 book named "&5&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&5Tier II &7Enchantment Book."
  1319. if {_randomTierII} is 3:
  1320. give player 1 book named "&5&lBlind II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindII}%%% chance of giving an enemy blindness for %{TimeOfBlindII}%!||||&5Tier II &7Enchantment Book."
  1321. if {_randomTierII} is 4:
  1322. give player 1 book named "&5&lBlind III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindIII}%%% chance of giving an enemy blindness for %{TimeOfBlindIII}%!||||&5Tier II &7Enchantment Book."
  1323. if {_randomTierII} is 5:
  1324. give player 1 book named "&5&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&5Tier II &7Enchantment Book."
  1325. if {_randomTierII} is 6:
  1326. give player 1 book named "&5&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&5Tier II &7Enchantment Book."
  1327. if {_randomTierII} is 7:
  1328. give player 1 book named "&5&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&5Tier II &7Enchantment Book."
  1329. if {_randomTierII} is 8:
  1330. give player 1 book named "&5&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&5Tier II &7Enchantment Book."
  1331.  
  1332. # Lifesteal I
  1333.  
  1334. on right click:
  1335. if player is holding book named "&5&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&5Tier II &7Enchantment Book.":
  1336. loop all items in player's inventory:
  1337. add loop-item to {ce.PlayersInventory.%player%::*}
  1338. open chest with 4 rows named "&5&lLifesteal I &f- &7Click anything" to player
  1339. set {_count} to 0
  1340. loop {ce.PlayersInventory.%player%::*}:
  1341. if {_x} = 36:
  1342. add 1 to {_count}
  1343. format slot {_count} of player with loop-value-2 to be unstealable
  1344. add 1 to {_count}
  1345. delete {ce.PlayersInventory.%player%::*}
  1346.  
  1347. on inventory click:
  1348. if inventory name of player's current inventory is "&5&lLifesteal I &f- &7Click anything":
  1349. if clicked item is anything:
  1350. if lore of clicked item doesn't contain "Lifesteal I":
  1351. remove 1 book named "&5&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&5Tier II &7Enchantment Book." from player
  1352. set {_clickItem.%player%} to clicked item
  1353. close player's inventory
  1354. remove {_clickItem.%player%} from player's inventory
  1355. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lLifesteal I"
  1356. give {_clickItem.%player%} to player
  1357. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1358. else:
  1359. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lLifesteal&a' on it!"
  1360. close player's inventory
  1361.  
  1362. on damage:
  1363. if victim is a player:
  1364. if attacker is a player:
  1365. if lore of attacker's tool contains "&5&lLifesteal I":
  1366. if attacker's health is less than 9.6:
  1367. set attacker's health to attacker's health+0.5
  1368. else:
  1369. stop
  1370.  
  1371. # Blind I
  1372.  
  1373. on right click:
  1374. if player is holding book named "&5&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&5Tier II &7Enchantment Book.":
  1375. loop all items in player's inventory:
  1376. add loop-item to {ce.PlayersInventory.%player%::*}
  1377. open chest with 4 rows named "&5&lBlind I &f- &7Click anything" to player
  1378. set {_count} to 0
  1379. loop {ce.PlayersInventory.%player%::*}:
  1380. if {_x} = 36:
  1381. add 1 to {_count}
  1382. format slot {_count} of player with loop-value-2 to be unstealable
  1383. add 1 to {_count}
  1384. delete {ce.PlayersInventory.%player%::*}
  1385.  
  1386. on inventory click:
  1387. if inventory name of player's current inventory is "&5&lBlind I &f- &7Click anything":
  1388. if clicked item is anything:
  1389. if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
  1390. remove 1 book named "&5&lBlind I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindI}%%% chance of giving an enemy blindness for %{TimeOfBlindI}%!||||&5Tier II &7Enchantment Book." from player
  1391. set {_clickItem.%player%} to clicked item
  1392. close player's inventory
  1393. remove {_clickItem.%player%} from player's inventory
  1394. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind I"
  1395. give {_clickItem.%player%} to player
  1396. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1397. else:
  1398. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
  1399. close player's inventory
  1400.  
  1401. on damage:
  1402. if victim is a player:
  1403. if lore of attacker's tool contains "&5&lBlind I":
  1404. chance of {ChanceOfBlindI}%:
  1405. apply blindness 1 to victim for {TimeOfBlindI}
  1406.  
  1407. # Blind II
  1408.  
  1409. on right click:
  1410. if player is holding book named "&5&lBlind II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindII}%%% chance of giving an enemy blindness for %{TimeOfBlindII}%!||||&5Tier II &7Enchantment Book.":
  1411. loop all items in player's inventory:
  1412. add loop-item to {ce.PlayersInventory.%player%::*}
  1413. open chest with 4 rows named "&5&lBlind II &f- &7Click anything" to player
  1414. set {_count} to 0
  1415. loop {ce.PlayersInventory.%player%::*}:
  1416. if {_x} = 36:
  1417. add 1 to {_count}
  1418. format slot {_count} of player with loop-value-2 to be unstealable
  1419. add 1 to {_count}
  1420. delete {ce.PlayersInventory.%player%::*}
  1421.  
  1422. on inventory click:
  1423. if inventory name of player's current inventory is "&5&lBlind II &f- &7Click anything":
  1424. if clicked item is anything:
  1425. if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
  1426. remove 1 book named "&5&lBlind II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindII}%%% chance of giving an enemy blindness for %{TimeOfBlindII}%!||||&5Tier II &7Enchantment Book." from player
  1427. set {_clickItem.%player%} to clicked item
  1428. close player's inventory
  1429. remove {_clickItem.%player%} from player's inventory
  1430. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind II"
  1431. give {_clickItem.%player%} to player
  1432. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1433. else:
  1434. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
  1435. close player's inventory
  1436.  
  1437. on damage:
  1438. if victim is a player:
  1439. if lore of attacker's tool contains "&5&lBlind II":
  1440. chance of {ChanceOfBlindII}%:
  1441. apply blindness 1 to victim for {TimeOfBlindII}
  1442.  
  1443. # Blind III
  1444.  
  1445. on right click:
  1446. if player is holding book named "&5&lBlind III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindIII}%%% chance of giving an enemy blindness for %{TimeOfBlindIII}%!||||&5Tier II &7Enchantment Book.":
  1447. loop all items in player's inventory:
  1448. add loop-item to {ce.PlayersInventory.%player%::*}
  1449. open chest with 4 rows named "&5&lBlind III &f- &7Click anything" to player
  1450. set {_count} to 0
  1451. loop {ce.PlayersInventory.%player%::*}:
  1452. if {_x} = 36:
  1453. add 1 to {_count}
  1454. format slot {_count} of player with loop-value-2 to be unstealable
  1455. add 1 to {_count}
  1456. delete {ce.PlayersInventory.%player%::*}
  1457.  
  1458. on inventory click:
  1459. if inventory name of player's current inventory is "&5&lBlind III &f- &7Click anything":
  1460. if clicked item is anything:
  1461. if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
  1462. remove 1 book named "&5&lBlind III" with lore "&7Right-Click to apply to anything||&b%{ChanceOfBlindIII}%%% chance of giving an enemy blindness for %{TimeOfBlindIII}%!||||&5Tier II &7Enchantment Book." from player
  1463. set {_clickItem.%player%} to clicked item
  1464. close player's inventory
  1465. remove {_clickItem.%player%} from player's inventory
  1466. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind III"
  1467. give {_clickItem.%player%} to player
  1468. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1469. else:
  1470. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
  1471. close player's inventory
  1472.  
  1473. on damage:
  1474. if victim is a player:
  1475. if lore of attacker's tool contains "&5&lBlind III":
  1476. chance of {ChanceOfBlindIII}%:
  1477. apply blindness 1 to victim for {TimeOfBlindIII}
  1478.  
  1479. # Molten I
  1480.  
  1481. on right click:
  1482. if player is holding book named "&5&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&5Tier II &7Enchantment Book.":
  1483. loop all items in player's inventory:
  1484. add loop-item to {ce.PlayersInventory.%player%::*}
  1485. open chest with 4 rows named "&5&lMolten I &f- &7Click any chestplate" to player
  1486. set {_count} to 0
  1487. loop {ce.PlayersInventory.%player%::*}:
  1488. if {_x} = 36:
  1489. add 1 to {_count}
  1490. format slot {_count} of player with loop-value-2 to be unstealable
  1491. add 1 to {_count}
  1492. delete {ce.PlayersInventory.%player%::*}
  1493.  
  1494. on inventory click:
  1495. if inventory name of player's current inventory is "&5&lMolten I &f- &7Click any chestplate":
  1496. if clicked item is anything:
  1497. if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
  1498. remove 1 book named "&5&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&5Tier II &7Enchantment Book." from player
  1499. set {_clickItem.%player%} to clicked item
  1500. close player's inventory
  1501. remove {_clickItem.%player%} from player's inventory
  1502. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lMolten I"
  1503. give {_clickItem.%player%} to player
  1504. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1505. else:
  1506. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lMolten&a' on it!"
  1507. close player's inventory
  1508.  
  1509. on damage:
  1510. if attacker is a player:
  1511. if victim is a player:
  1512. if victim is wearing a chestplate:
  1513. if lore of victim's chestplate contains "&5&lMolten I":
  1514. chance of {ChanceOfMoltenI}%:
  1515. ignite attacker
  1516.  
  1517. # Enlighted I
  1518.  
  1519. on right click:
  1520. if player is holding book named "&5&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&5Tier II &7Enchantment Book.":
  1521. loop all items in player's inventory:
  1522. add loop-item to {ce.PlayersInventory.%player%::*}
  1523. open chest with 4 rows named "&5&lEnlighted I &f- &7Click any chestplate" to player
  1524. set {_count} to 0
  1525. loop {ce.PlayersInventory.%player%::*}:
  1526. if {_x} = 36:
  1527. add 1 to {_count}
  1528. format slot {_count} of player with loop-value-2 to be unstealable
  1529. add 1 to {_count}
  1530. delete {ce.PlayersInventory.%player%::*}
  1531.  
  1532. on inventory click:
  1533. if inventory name of player's current inventory is "&5&lEnlighted I &f- &7Click any chestplate":
  1534. if clicked item is anything:
  1535. if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
  1536. remove 1 book named "&5&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&5Tier II &7Enchantment Book." from player
  1537. set {_clickItem.%player%} to clicked item
  1538. close player's inventory
  1539. remove {_clickItem.%player%} from player's inventory
  1540. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lEnlighted I"
  1541. give {_clickItem.%player%} to player
  1542. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1543. else:
  1544. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lEnlighted&a' on it!"
  1545. close player's inventory
  1546.  
  1547. on damage:
  1548. if attacker is a player:
  1549. if victim is a player:
  1550. if victim is wearing a chestplate:
  1551. if lore of victim's chestplate contains "&5&lEnlighted I":
  1552. chance of {ChanceOfEnlightedI}%:
  1553. heal victim
  1554. send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
  1555.  
  1556. # Hardened I
  1557.  
  1558. on right click:
  1559. if player is holding book named "&5&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&5Tier II &7Enchantment Book.":
  1560. loop all items in player's inventory:
  1561. add loop-item to {ce.PlayersInventory.%player%::*}
  1562. open chest with 4 rows named "&5&lHardened I &f- &7Click any chestplate" to player
  1563. set {_count} to 0
  1564. loop {ce.PlayersInventory.%player%::*}:
  1565. if {_x} = 36:
  1566. add 1 to {_count}
  1567. format slot {_count} of player with loop-value-2 to be unstealable
  1568. add 1 to {_count}
  1569. delete {ce.PlayersInventory.%player%::*}
  1570.  
  1571. on inventory click:
  1572. if inventory name of player's current inventory is "&5&lHardened I &f- &7Click any chestplate":
  1573. if clicked item is anything:
  1574. if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
  1575. remove 1 book named "&5&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&5Tier II &7Enchantment Book." from player
  1576. set {_clickItem.%player%} to clicked item
  1577. close player's inventory
  1578. remove {_clickItem.%player%} from player's inventory
  1579. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lHardened I"
  1580. give {_clickItem.%player%} to player
  1581. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1582. else:
  1583. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lHardened&a' on it!"
  1584. close player's inventory
  1585.  
  1586. on damage:
  1587. if attacker is a player:
  1588. if victim is a player:
  1589. if victim is wearing a chestplate:
  1590. if lore of victim's chestplate contains "&5&lHardened I":
  1591. chance of {ChanceOfHardenedI}%:
  1592. apply weakness 1 to attacker for {TimeOfHardenedI}
  1593.  
  1594. # Berserker I
  1595.  
  1596. on right click:
  1597. if player is holding book named "&5&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&5Tier II &7Enchantment Book.":
  1598. loop all items in player's inventory:
  1599. add loop-item to {ce.PlayersInventory.%player%::*}
  1600. open chest with 4 rows named "&5&lBerserker I &f- &7Click any chestplate" to player
  1601. set {_count} to 0
  1602. loop {ce.PlayersInventory.%player%::*}:
  1603. if {_x} = 36:
  1604. add 1 to {_count}
  1605. format slot {_count} of player with loop-value-2 to be unstealable
  1606. add 1 to {_count}
  1607. delete {ce.PlayersInventory.%player%::*}
  1608.  
  1609. on inventory click:
  1610. if inventory name of player's current inventory is "&5&lBerserker I &f- &7Click any chestplate":
  1611. if clicked item is anything:
  1612. if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
  1613. remove 1 book named "&5&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&5Tier II &7Enchantment Book." from player
  1614. set {_clickItem.%player%} to clicked item
  1615. close player's inventory
  1616. remove {_clickItem.%player%} from player's inventory
  1617. set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBerserker I"
  1618. give {_clickItem.%player%} to player
  1619. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1620. else:
  1621. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lBerserker&a' on it!"
  1622. close player's inventory
  1623.  
  1624. on damage:
  1625. if attacker is a player:
  1626. if victim is a player:
  1627. if victim is wearing a chestplate:
  1628. if lore of victim's chestplate contains "&5&lBerserker I":
  1629. if victim's health is less than 2.0:
  1630. apply strength 2 to victim for 15 seconds
  1631. else:
  1632. remove strength from victim
  1633.  
  1634. # Tier III Enchantments
  1635.  
  1636. on right click:
  1637. if player is holding book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book.":
  1638. remove 1 book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book." from player
  1639. set {_randomTierIII} to a random integer between 1 and 17
  1640. if {_randomTierIII} is 1:
  1641. give player 1 book named "&6&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book"
  1642. if {_randomTierIII} is 2:
  1643. give player 1 book named "&6&lLifesteal II" with lore "&7Right-Click to apply to anything||&bGet a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book"
  1644. if {_randomTierIII} is 3:
  1645. give player 1 book named "&6&lLifesteal III" with lore "&7Right-Click to apply to anything||&bGet a heart and a half back when you punch an enemy||||&6&lTier III &7Enchantment Book"
  1646. if {_randomTierIII} is 4:
  1647. give player 1 book named "&6&lDeathbringer I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerI}%%% chance to double your Damage.||||&6&lTier III &7Enchantment Book"
  1648. if {_randomTierIII} is 5:
  1649. give player 1 book named "&6&lDeathbringer II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerII}%%% chance to triple your Damage.||||&6&lTier III &7Enchantment Book"
  1650. if {_randomTierIII} is 6:
  1651. give player 1 book named "&6&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book"
  1652. if {_randomTierIII} is 7:
  1653. give player 1 book named "&6&lMolten II" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book"
  1654. if {_randomTierIII} is 8:
  1655. give player 1 book named "&6&lMolten III" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenIII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book"
  1656. if {_randomTierIII} is 9:
  1657. give player 1 book named "&6&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book"
  1658. if {_randomTierIII} is 10:
  1659. give player 1 book named "&6&lEnlighted II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedII}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book"
  1660. if {_randomTierIII} is 11:
  1661. give player 1 book named "&6&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&6&lTier III &7Enchantment Book"
  1662. if {_randomTierIII} is 12:
  1663. give player 1 book named "&6&lHardened II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedII}%%% chance of giving an enemy weakness for %{TimeOfHardenedII}% upon them hitting you!||||&6&lTier III &7Enchantment Book"
  1664. if {_randomTierIII} is 13:
  1665. give player 1 book named "&6&lHardened III" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedIII}%%% chance of giving an enemy weakness for %{TimeOfHardenedIII}% upon them hitting you!||||&6&lTier III &7Enchantment Book"
  1666. if {_randomTierIII} is 14:
  1667. give player 1 book named "&6&lSelf Destruct I" with lore "&7Right-Click to apply any chestplate||&bSpawn tnt on death!||||&6&lTier III &7Enchantment Book"
  1668. if {_randomTierIII} is 15:
  1669. give player 1 book named "&6&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book"
  1670. if {_randomTierIII} is 16:
  1671. give player 1 book named "&6&lBerserker II" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book"
  1672. if {_randomTierIII} is 17:
  1673. give player 1 book named "&6&lBerserker III" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book"
  1674.  
  1675. # Lifesteal I
  1676.  
  1677. on right click:
  1678. if player is holding book named "&6&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book":
  1679. loop all items in player's inventory:
  1680. add loop-item to {ce.PlayersInventory.%player%::*}
  1681. open chest with 4 rows named "&6&lLifesteal I &f- &7Click anything" to player
  1682. set {_count} to 0
  1683. loop {ce.PlayersInventory.%player%::*}:
  1684. if {_x} = 36:
  1685. add 1 to {_count}
  1686. format slot {_count} of player with loop-value-2 to be unstealable
  1687. add 1 to {_count}
  1688. delete {ce.PlayersInventory.%player%::*}
  1689.  
  1690. on inventory click:
  1691. if inventory name of player's current inventory is "&6&lLifesteal I &f- &7Click anything":
  1692. if clicked item is anything:
  1693. if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
  1694. remove 1 book named "&6&lLifesteal I" with lore "&7Right-Click to apply to anything||&bGet half a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book" from player
  1695. set {_clickItem.%player%} to clicked item
  1696. close player's inventory
  1697. remove {_clickItem.%player%} from player's inventory
  1698. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal I"
  1699. give {_clickItem.%player%} to player
  1700. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1701. else:
  1702. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
  1703. close player's inventory
  1704.  
  1705. on damage:
  1706. if victim is a player:
  1707. if attacker is a player:
  1708. if lore of attacker's tool contains "&6&lLifesteal I":
  1709. if attacker's health is less than 9.6:
  1710. set attacker's health to attacker's health+0.5
  1711. else:
  1712. stop
  1713.  
  1714. # Lifesteal II
  1715.  
  1716. on right click:
  1717. if player is holding book named "&6&lLifesteal II" with lore "&7Right-Click to apply to anything||&bGet a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book":
  1718. loop all items in player's inventory:
  1719. add loop-item to {ce.PlayersInventory.%player%::*}
  1720. open chest with 4 rows named "&6&lLifesteal II &f- &7Click anything" to player
  1721. set {_count} to 0
  1722. loop {ce.PlayersInventory.%player%::*}:
  1723. if {_x} = 36:
  1724. add 1 to {_count}
  1725. format slot {_count} of player with loop-value-2 to be unstealable
  1726. add 1 to {_count}
  1727. delete {ce.PlayersInventory.%player%::*}
  1728.  
  1729. on inventory click:
  1730. if inventory name of player's current inventory is "&6&lLifesteal II &f- &7Click anything":
  1731. if clicked item is anything:
  1732. if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
  1733. remove 1 book named "&6&lLifesteal II" with lore "&7Right-Click to apply to anything||&bGet a heart back when you punch an enemy||||&6&lTier III &7Enchantment Book" from player
  1734. set {_clickItem.%player%} to clicked item
  1735. close player's inventory
  1736. remove {_clickItem.%player%} from player's inventory
  1737. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal II"
  1738. give {_clickItem.%player%} to player
  1739. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1740. else:
  1741. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
  1742. close player's inventory
  1743.  
  1744. on damage:
  1745. if victim is a player:
  1746. if attacker is a player:
  1747. if lore of attacker's tool contains "&6&lLifesteal II":
  1748. if attacker's health is less than 9.1:
  1749. set attacker's health to attacker's health+1.0
  1750. else:
  1751. stop
  1752.  
  1753. # Lifesteal III
  1754.  
  1755. on right click:
  1756. if player is holding book named "&6&lLifesteal III" with lore "&7Right-Click to apply to anything||&bGet a heart and a half back when you punch an enemy||||&6&lTier III &7Enchantment Book":
  1757. loop all items in player's inventory:
  1758. add loop-item to {ce.PlayersInventory.%player%::*}
  1759. open chest with 4 rows named "&6&lLifesteal III &f- &7Click anything" to player
  1760. set {_count} to 0
  1761. loop {ce.PlayersInventory.%player%::*}:
  1762. if {_x} = 36:
  1763. add 1 to {_count}
  1764. format slot {_count} of player with loop-value-2 to be unstealable
  1765. add 1 to {_count}
  1766. delete {ce.PlayersInventory.%player%::*}
  1767.  
  1768. on inventory click:
  1769. if inventory name of player's current inventory is "&6&lLifesteal III &f- &7Click anything":
  1770. if clicked item is anything:
  1771. if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
  1772. remove 1 book named "&6&lLifesteal III" with lore "&7Right-Click to apply to anything||&bGet a heart and a half back when you punch an enemy||||&6&lTier III &7Enchantment Book" from player
  1773. set {_clickItem.%player%} to clicked item
  1774. close player's inventory
  1775. remove {_clickItem.%player%} from player's inventory
  1776. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal III"
  1777. give {_clickItem.%player%} to player
  1778. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1779. else:
  1780. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
  1781. close player's inventory
  1782.  
  1783. on damage:
  1784. if victim is a player:
  1785. if attacker is a player:
  1786. if lore of attacker's tool contains "&6&lLifesteal III":
  1787. if attacker's health is less than 8.6:
  1788. set attacker's health to attacker's health+1.5
  1789. else:
  1790. stop
  1791.  
  1792. # Deathbringer I
  1793.  
  1794. on right click:
  1795. if player is holding book named "&6&lDeathbringer I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerI}%%% chance to double your Damage.||||&6&lTier III &7Enchantment Book":
  1796. loop all items in player's inventory:
  1797. add loop-item to {ce.PlayersInventory.%player%::*}
  1798. open chest with 4 rows named "&6&lDeathbringer I &f- &7Click anything" to player
  1799. set {_count} to 0
  1800. loop {ce.PlayersInventory.%player%::*}:
  1801. if {_x} = 36:
  1802. add 1 to {_count}
  1803. format slot {_count} of player with loop-value-2 to be unstealable
  1804. add 1 to {_count}
  1805. delete {ce.PlayersInventory.%player%::*}
  1806.  
  1807. on inventory click:
  1808. if inventory name of player's current inventory is "&6&lDeathbringer I &f- &7Click anything":
  1809. if clicked item is anything:
  1810. if lore of clicked item doesn't contain "Deathbringer I" or "Deathbringer II":
  1811. remove 1 book named "&6&lDeathbringer I" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerI}%%% chance to double your Damage.||||&6&lTier III &7Enchantment Book" from player
  1812. set {_clickItem.%player%} to clicked item
  1813. close player's inventory
  1814. remove {_clickItem.%player%} from player's inventory
  1815. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lDeathbringer I"
  1816. give {_clickItem.%player%} to player
  1817. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1818. else:
  1819. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lDeathbringer&a' on it!"
  1820. close player's inventory
  1821.  
  1822. on damage:
  1823. if victim is a player:
  1824. if attacker is a player:
  1825. if lore of attacker's tool contains "&6&lDeathbringer I":
  1826. chance of {ChanceOfDeathbringerI}%:
  1827. set damage to damage*2
  1828.  
  1829. # Deathbringer II
  1830.  
  1831. on right click:
  1832. if player is holding book named "&6&lDeathbringer II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerII}%%% chance to triple your Damage.||||&6&lTier III &7Enchantment Book":
  1833. loop all items in player's inventory:
  1834. add loop-item to {ce.PlayersInventory.%player%::*}
  1835. open chest with 4 rows named "&6&lDeathbringer II &f- &7Click anything" to player
  1836. set {_count} to 0
  1837. loop {ce.PlayersInventory.%player%::*}:
  1838. if {_x} = 36:
  1839. add 1 to {_count}
  1840. format slot {_count} of player with loop-value-2 to be unstealable
  1841. add 1 to {_count}
  1842. delete {ce.PlayersInventory.%player%::*}
  1843.  
  1844. on inventory click:
  1845. if inventory name of player's current inventory is "&6&lDeathbringer II &f- &7Click anything":
  1846. if clicked item is anything:
  1847. if lore of clicked item doesn't contain "Deathbringer I" or "Deathbringer II":
  1848. remove 1 book named "&6&lDeathbringer II" with lore "&7Right-Click to apply to anything||&b%{ChanceOfDeathbringerII}%%% chance to triple your Damage.||||&6&lTier III &7Enchantment Book" from player
  1849. set {_clickItem.%player%} to clicked item
  1850. close player's inventory
  1851. remove {_clickItem.%player%} from player's inventory
  1852. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lDeathbringer II"
  1853. give {_clickItem.%player%} to player
  1854. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
  1855. else:
  1856. send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lDeathbringer&a' on it!"
  1857. close player's inventory
  1858.  
  1859. on damage:
  1860. if victim is a player:
  1861. if attacker is a player:
  1862. if lore of attacker's tool contains "&6&lDeathbringer II":
  1863. chance of {ChanceOfDeathbringerII}%:
  1864. set damage to damage*3
  1865.  
  1866. # Molten I
  1867.  
  1868. on right click:
  1869. if player is holding book named "&6&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book":
  1870. loop all items in player's inventory:
  1871. add loop-item to {ce.PlayersInventory.%player%::*}
  1872. open chest with 4 rows named "&6&lMolten I &f- &7Click any chestplate" to player
  1873. set {_count} to 0
  1874. loop {ce.PlayersInventory.%player%::*}:
  1875. if {_x} = 36:
  1876. add 1 to {_count}
  1877. format slot {_count} of player with loop-value-2 to be unstealable
  1878. add 1 to {_count}
  1879. delete {ce.PlayersInventory.%player%::*}
  1880.  
  1881. on inventory click:
  1882. if inventory name of player's current inventory is "&6&lMolten I &f- &7Click any chestplate":
  1883. if clicked item is anything:
  1884. if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
  1885. remove 1 book named "&6&lMolten I" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenI}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book" from player
  1886. set {_clickItem.%player%} to clicked item
  1887. close player's inventory
  1888. remove {_clickItem.%player%} from player's inventory
  1889. set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten I"
  1890. give {_clickItem.%player%} to player
  1891. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1892. else:
  1893. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
  1894. close player's inventory
  1895.  
  1896. on damage:
  1897. if attacker is a player:
  1898. if victim is a player:
  1899. if victim is wearing a chestplate:
  1900. if lore of victim's chestplate contains "&6&lMolten I":
  1901. chance of {ChanceOfMoltenI}%:
  1902. ignite attacker
  1903.  
  1904. # Molten II
  1905.  
  1906. on right click:
  1907. if player is holding book named "&6&lMolten II" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book":
  1908. loop all items in player's inventory:
  1909. add loop-item to {ce.PlayersInventory.%player%::*}
  1910. open chest with 4 rows named "&6&lMolten II &f- &7Click any chestplate" to player
  1911. set {_count} to 0
  1912. loop {ce.PlayersInventory.%player%::*}:
  1913. if {_x} = 36:
  1914. add 1 to {_count}
  1915. format slot {_count} of player with loop-value-2 to be unstealable
  1916. add 1 to {_count}
  1917. delete {ce.PlayersInventory.%player%::*}
  1918.  
  1919. on inventory click:
  1920. if inventory name of player's current inventory is "&6&lMolten II &f- &7Click any chestplate":
  1921. if clicked item is anything:
  1922. if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
  1923. remove 1 book named "&6&lMolten II" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book" from player
  1924. set {_clickItem.%player%} to clicked item
  1925. close player's inventory
  1926. remove {_clickItem.%player%} from player's inventory
  1927. set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten II"
  1928. give {_clickItem.%player%} to player
  1929. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1930. else:
  1931. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
  1932. close player's inventory
  1933.  
  1934. on damage:
  1935. if attacker is a player:
  1936. if victim is a player:
  1937. if victim is wearing a chestplate:
  1938. if lore of victim's chestplate contains "&6&lMolten II":
  1939. chance of {ChanceOfMoltenII}%:
  1940. ignite attacker
  1941.  
  1942. # Molten III
  1943.  
  1944. on right click:
  1945. if player is holding book named "&6&lMolten III" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenIII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book":
  1946. loop all items in player's inventory:
  1947. add loop-item to {ce.PlayersInventory.%player%::*}
  1948. open chest with 4 rows named "&6&lMolten III &f- &7Click any chestplate" to player
  1949. set {_count} to 0
  1950. loop {ce.PlayersInventory.%player%::*}:
  1951. if {_x} = 36:
  1952. add 1 to {_count}
  1953. format slot {_count} of player with loop-value-2 to be unstealable
  1954. add 1 to {_count}
  1955. delete {ce.PlayersInventory.%player%::*}
  1956.  
  1957. on inventory click:
  1958. if inventory name of player's current inventory is "&6&lMolten III &f- &7Click any chestplate":
  1959. if clicked item is anything:
  1960. if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
  1961. remove 1 book named "&6&lMolten III" with lore "&7Right-Click to apply to any chestplate||&b%{ChanceOfMoltenIII}%%% chance of lighting the attacker on fire||||&6&lTier III &7Enchantment Book" from player
  1962. set {_clickItem.%player%} to clicked item
  1963. close player's inventory
  1964. remove {_clickItem.%player%} from player's inventory
  1965. set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten III"
  1966. give {_clickItem.%player%} to player
  1967. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  1968. else:
  1969. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
  1970. close player's inventory
  1971.  
  1972. on damage:
  1973. if attacker is a player:
  1974. if victim is a player:
  1975. if victim is wearing a chestplate:
  1976. if lore of victim's chestplate contains "&6&lMolten III":
  1977. chance of {ChanceOfMoltenIII}%:
  1978. ignite attacker
  1979.  
  1980. # Enlighted I
  1981.  
  1982. on right click:
  1983. if player is holding book named "&6&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book":
  1984. loop all items in player's inventory:
  1985. add loop-item to {ce.PlayersInventory.%player%::*}
  1986. open chest with 4 rows named "&6&lEnlighted I &f- &7Click any chestplate" to player
  1987. set {_count} to 0
  1988. loop {ce.PlayersInventory.%player%::*}:
  1989. if {_x} = 36:
  1990. add 1 to {_count}
  1991. format slot {_count} of player with loop-value-2 to be unstealable
  1992. add 1 to {_count}
  1993. delete {ce.PlayersInventory.%player%::*}
  1994.  
  1995. on inventory click:
  1996. if inventory name of player's current inventory is "&6&lEnlighted I &f- &7Click any chestplate":
  1997. if clicked item is anything:
  1998. if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
  1999. remove 1 book named "&6&lEnlighted I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedI}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book" from player
  2000. set {_clickItem.%player%} to clicked item
  2001. close player's inventory
  2002. remove {_clickItem.%player%} from player's inventory
  2003. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lEnlighted I"
  2004. give {_clickItem.%player%} to player
  2005. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2006. else:
  2007. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lEnlighted&a' on it!"
  2008. close player's inventory
  2009.  
  2010. on damage:
  2011. if attacker is a player:
  2012. if victim is a player:
  2013. if victim is wearing a chestplate:
  2014. if lore of victim's chestplate contains "&6&lEnlighted I":
  2015. chance of {ChanceOfEnlightedI}%:
  2016. heal victim
  2017. send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
  2018.  
  2019. # Enlighted II
  2020.  
  2021. on right click:
  2022. if player is holding book named "&6&lEnlighted II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedII}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book":
  2023. loop all items in player's inventory:
  2024. add loop-item to {ce.PlayersInventory.%player%::*}
  2025. open chest with 4 rows named "&6&lEnlighted II &f- &7Click any chestplate" to player
  2026. set {_count} to 0
  2027. loop {ce.PlayersInventory.%player%::*}:
  2028. if {_x} = 36:
  2029. add 1 to {_count}
  2030. format slot {_count} of player with loop-value-2 to be unstealable
  2031. add 1 to {_count}
  2032. delete {ce.PlayersInventory.%player%::*}
  2033.  
  2034. on inventory click:
  2035. if inventory name of player's current inventory is "&6&lEnlighted II &f- &7Click any chestplate":
  2036. if clicked item is anything:
  2037. if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
  2038. remove 1 book named "&6&lEnlighted II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfEnlightedII}%%% chance of getting healed when hit!||||&6&lTier III &7Enchantment Book" from player
  2039. set {_clickItem.%player%} to clicked item
  2040. close player's inventory
  2041. remove {_clickItem.%player%} from player's inventory
  2042. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lEnlighted II"
  2043. give {_clickItem.%player%} to player
  2044. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2045. else:
  2046. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lEnlighted&a' on it!"
  2047. close player's inventory
  2048.  
  2049. on damage:
  2050. if attacker is a player:
  2051. if victim is a player:
  2052. if victim is wearing a chestplate:
  2053. if lore of victim's chestplate contains "&6&lEnlighted II":
  2054. chance of {ChanceOfEnlightedII}%:
  2055. heal victim
  2056. send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
  2057.  
  2058. # Hardened I
  2059.  
  2060. on right click:
  2061. if player is holding book named "&6&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&6&lTier III &7Enchantment Book":
  2062. loop all items in player's inventory:
  2063. add loop-item to {ce.PlayersInventory.%player%::*}
  2064. open chest with 4 rows named "&6&lHardened I &f- &7Click any chestplate" to player
  2065. set {_count} to 0
  2066. loop {ce.PlayersInventory.%player%::*}:
  2067. if {_x} = 36:
  2068. add 1 to {_count}
  2069. format slot {_count} of player with loop-value-2 to be unstealable
  2070. add 1 to {_count}
  2071. delete {ce.PlayersInventory.%player%::*}
  2072.  
  2073. on inventory click:
  2074. if inventory name of player's current inventory is "&6&lHardened I &f- &7Click any chestplate":
  2075. if clicked item is anything:
  2076. if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
  2077. remove 1 book named "&6&lHardened I" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedI}%%% chance of giving an enemy weakness for %{TimeOfHardenedI}% upon them hitting you!||||&6&lTier III &7Enchantment Book" from player
  2078. set {_clickItem.%player%} to clicked item
  2079. close player's inventory
  2080. remove {_clickItem.%player%} from player's inventory
  2081. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened I"
  2082. give {_clickItem.%player%} to player
  2083. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2084. else:
  2085. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
  2086. close player's inventory
  2087.  
  2088. on damage:
  2089. if attacker is a player:
  2090. if victim is a player:
  2091. if victim is wearing a chestplate:
  2092. if lore of victim's chestplate contains "&6&lHardened I":
  2093. chance of {ChanceOfHardenedI}%:
  2094. apply weakness 1 to attacker for {TimeOfHardenedI}
  2095.  
  2096. # Hardened II
  2097.  
  2098. on right click:
  2099. if player is holding book named "&6&lHardened II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedII}%%% chance of giving an enemy weakness for %{TimeOfHardenedII}% upon them hitting you!||||&6&lTier III &7Enchantment Book":
  2100. loop all items in player's inventory:
  2101. add loop-item to {ce.PlayersInventory.%player%::*}
  2102. open chest with 4 rows named "&6&lHardened II &f- &7Click any chestplate" to player
  2103. set {_count} to 0
  2104. loop {ce.PlayersInventory.%player%::*}:
  2105. if {_x} = 36:
  2106. add 1 to {_count}
  2107. format slot {_count} of player with loop-value-2 to be unstealable
  2108. add 1 to {_count}
  2109. delete {ce.PlayersInventory.%player%::*}
  2110.  
  2111. on inventory click:
  2112. if inventory name of player's current inventory is "&6&lHardened II &f- &7Click any chestplate":
  2113. if clicked item is anything:
  2114. if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
  2115. remove 1 book named "&6&lHardened II" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedII}%%% chance of giving an enemy weakness for %{TimeOfHardenedII}% upon them hitting you!||||&6&lTier III &7Enchantment Book" from player
  2116. set {_clickItem.%player%} to clicked item
  2117. close player's inventory
  2118. remove {_clickItem.%player%} from player's inventory
  2119. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened II"
  2120. give {_clickItem.%player%} to player
  2121. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2122. else:
  2123. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
  2124. close player's inventory
  2125.  
  2126. on damage:
  2127. if attacker is a player:
  2128. if victim is a player:
  2129. if victim is wearing a chestplate:
  2130. if lore of victim's chestplate contains "&6&lHardened II":
  2131. chance of {ChanceOfHardenedII}%:
  2132. apply weakness 1 to attacker for {TimeOfHardenedII}
  2133.  
  2134. # Hardened III
  2135.  
  2136. on right click:
  2137. if player is holding book named "&6&lHardened III" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedIII}%%% chance of giving an enemy weakness for %{TimeOfHardenedIII}% upon them hitting you!||||&6&lTier III &7Enchantment Book":
  2138. loop all items in player's inventory:
  2139. add loop-item to {ce.PlayersInventory.%player%::*}
  2140. open chest with 4 rows named "&6&lHardened III &f- &7Click any chestplate" to player
  2141. set {_count} to 0
  2142. loop {ce.PlayersInventory.%player%::*}:
  2143. if {_x} = 36:
  2144. add 1 to {_count}
  2145. format slot {_count} of player with loop-value-2 to be unstealable
  2146. add 1 to {_count}
  2147. delete {ce.PlayersInventory.%player%::*}
  2148.  
  2149. on inventory click:
  2150. if inventory name of player's current inventory is "&6&lHardened III &f- &7Click any chestplate":
  2151. if clicked item is anything:
  2152. if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
  2153. remove 1 book named "&6&lHardened III" with lore "&7Right-Click to apply any chestplate||&b%{ChanceOfHardenedIII}%%% chance of giving an enemy weakness for %{TimeOfHardenedIII}% upon them hitting you!||||&6&lTier III &7Enchantment Book" from player
  2154. set {_clickItem.%player%} to clicked item
  2155. close player's inventory
  2156. remove {_clickItem.%player%} from player's inventory
  2157. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened III"
  2158. give {_clickItem.%player%} to player
  2159. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2160. else:
  2161. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
  2162. close player's inventory
  2163.  
  2164. on damage:
  2165. if attacker is a player:
  2166. if victim is a player:
  2167. if victim is wearing a chestplate:
  2168. if lore of victim's chestplate contains "&6&lHardened III":
  2169. chance of {ChanceOfHardenedIII}%:
  2170. apply weakness 1 to attacker for {TimeOfHardenedIII}
  2171.  
  2172. # Self Destruct I
  2173.  
  2174. on right click:
  2175. if player is holding book named "&6&lSelf Destruct I" with lore "&7Right-Click to apply any chestplate||&bSpawn tnt on death!||||&6&lTier III &7Enchantment Book":
  2176. loop all items in player's inventory:
  2177. add loop-item to {ce.PlayersInventory.%player%::*}
  2178. open chest with 4 rows named "&6&lSelf Destruct I &f- &7Click any chestplate" to player
  2179. set {_count} to 0
  2180. loop {ce.PlayersInventory.%player%::*}:
  2181. if {_x} = 36:
  2182. add 1 to {_count}
  2183. format slot {_count} of player with loop-value-2 to be unstealable
  2184. add 1 to {_count}
  2185. delete {ce.PlayersInventory.%player%::*}
  2186.  
  2187. on inventory click:
  2188. if inventory name of player's current inventory is "&6&lSelf Destruct I &f- &7Click any chestplate":
  2189. if clicked item is anything:
  2190. if lore of clicked item doesn't contain "Self Destruct I":
  2191. remove 1 book named "&6&lSelf Destruct I" with lore "&7Right-Click to apply any chestplate||&bSpawn tnt on death!||||&6&lTier III &7Enchantment Book" from player
  2192. set {_clickItem.%player%} to clicked item
  2193. close player's inventory
  2194. remove {_clickItem.%player%} from player's inventory
  2195. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lSelf Destruct I"
  2196. give {_clickItem.%player%} to player
  2197. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2198. else:
  2199. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lSelf Destruct&a' on it!"
  2200. close player's inventory
  2201.  
  2202. on death of a player:
  2203. if attacker is a player:
  2204. if victim is wearing any chestplate:
  2205. if lore of victim's chestplate contains "&6&lSelf Destruct I":
  2206. create a safe explosion of power 3 at victim's location
  2207. wait 10 seconds
  2208. send "%{CustomEnchants.Prefix}% &aYou had self destruct on when you died so it created an explosion possibly killing someone" to victim
  2209.  
  2210. # Berserker I
  2211.  
  2212. on right click:
  2213. if player is holding book named "&6&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book":
  2214. loop all items in player's inventory:
  2215. add loop-item to {ce.PlayersInventory.%player%::*}
  2216. open chest with 4 rows named "&6&lBerserker I &f- &7Click any chestplate" to player
  2217. set {_count} to 0
  2218. loop {ce.PlayersInventory.%player%::*}:
  2219. if {_x} = 36:
  2220. add 1 to {_count}
  2221. format slot {_count} of player with loop-value-2 to be unstealable
  2222. add 1 to {_count}
  2223. delete {ce.PlayersInventory.%player%::*}
  2224.  
  2225. on inventory click:
  2226. if inventory name of player's current inventory is "&6&lBerserker I &f- &7Click any chestplate":
  2227. if clicked item is anything:
  2228. if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
  2229. remove 1 book named "&6&lBerserker I" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book" from player
  2230. set {_clickItem.%player%} to clicked item
  2231. close player's inventory
  2232. remove {_clickItem.%player%} from player's inventory
  2233. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker I"
  2234. give {_clickItem.%player%} to player
  2235. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2236. else:
  2237. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
  2238. close player's inventory
  2239.  
  2240. on damage:
  2241. if attacker is a player:
  2242. if victim is a player:
  2243. if victim is wearing a chestplate:
  2244. if lore of victim's chestplate contains "&6&lBerserker I":
  2245. if victim's health is less than 2.0:
  2246. apply strength 2 to victim for 15 seconds
  2247. else:
  2248. remove strength from victim
  2249.  
  2250. # Berserker II
  2251.  
  2252. on right click:
  2253. if player is holding book named "&6&lBerserker II" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book":
  2254. loop all items in player's inventory:
  2255. add loop-item to {ce.PlayersInventory.%player%::*}
  2256. open chest with 4 rows named "&6&lBerserker II &f- &7Click any chestplate" to player
  2257. set {_count} to 0
  2258. loop {ce.PlayersInventory.%player%::*}:
  2259. if {_x} = 36:
  2260. add 1 to {_count}
  2261. format slot {_count} of player with loop-value-2 to be unstealable
  2262. add 1 to {_count}
  2263. delete {ce.PlayersInventory.%player%::*}
  2264.  
  2265. on inventory click:
  2266. if inventory name of player's current inventory is "&6&lBerserker II &f- &7Click any chestplate":
  2267. if clicked item is anything:
  2268. if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
  2269. remove 1 book named "&6&lBerserker II" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book" from player
  2270. set {_clickItem.%player%} to clicked item
  2271. close player's inventory
  2272. remove {_clickItem.%player%} from player's inventory
  2273. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker II"
  2274. give {_clickItem.%player%} to player
  2275. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2276. else:
  2277. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
  2278. close player's inventory
  2279.  
  2280. on damage:
  2281. if attacker is a player:
  2282. if victim is a player:
  2283. if victim is wearing a chestplate:
  2284. if lore of victim's chestplate contains "&6&lBerserker II":
  2285. if victim's health is less than 2.0:
  2286. apply strength 2 to victim for 30 seconds
  2287. else:
  2288. remove strength from victim
  2289.  
  2290. # Berserker III
  2291.  
  2292. on right click:
  2293. if player is holding book named "&6&lBerserker III" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book":
  2294. loop all items in player's inventory:
  2295. add loop-item to {ce.PlayersInventory.%player%::*}
  2296. open chest with 4 rows named "&6&lBerserker III &f- &7Click any chestplate" to player
  2297. set {_count} to 0
  2298. loop {ce.PlayersInventory.%player%::*}:
  2299. if {_x} = 36:
  2300. add 1 to {_count}
  2301. format slot {_count} of player with loop-value-2 to be unstealable
  2302. add 1 to {_count}
  2303. delete {ce.PlayersInventory.%player%::*}
  2304.  
  2305. on inventory click:
  2306. if inventory name of player's current inventory is "&6&lBerserker III &f- &7Click any chestplate":
  2307. if clicked item is anything:
  2308. if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
  2309. remove 1 book named "&6&lBerserker III" with lore "&7Right-Click to apply any chestplate||&bWhen low on health you gain extreme strength.||||&6&lTier III &7Enchantment Book" from player
  2310. set {_clickItem.%player%} to clicked item
  2311. close player's inventory
  2312. remove {_clickItem.%player%} from player's inventory
  2313. set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker III"
  2314. give {_clickItem.%player%} to player
  2315. send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
  2316. else:
  2317. send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
  2318. close player's inventory
  2319.  
  2320. on damage:
  2321. if attacker is a player:
  2322. if victim is a player:
  2323. if victim is wearing a chestplate:
  2324. if lore of victim's chestplate contains "&6&lBerserker III":
  2325. if victim's health is less than 2.0:
  2326. apply strength 2 to victim for 45 seconds
  2327. else:
  2328. remove strength from victim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement