Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- #DO NOT CHANGE THIS OR IT WILL FUCK UP STUFF!
- version: 1.1
- on load:
- if folder "plugins/CustomEnchants" doesn't exists:
- create folder "plugins/CustomEnchants"
- if file "plugins/CustomEnchants/config.yml" doesn't exists:
- create file "plugins/CustomEnchants/config.yml"
- wf "## Thank you for downloading CustomEnchants.sk by HYPExMon5ter!" to "plugins/CustomEnchants/config.yml"
- wf "## Use '&' or 'ยง' for color codes!" to "plugins/CustomEnchants/config.yml"
- wf "## Use {book-amount} for the amount of books you bought" to "plugins/CustomEnchants/config.yml"
- 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"
- set "messages.prefix" to "&8&l[&c&lCE&8&l] &7&l>>" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.no-perm" to "&aYou do not have permission to use this command!" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.not-enough-currency" to "&aYou cannot afford &7{book-amount} &abook(s)!" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.config-reload-success" to "&aSuccessfully reloaded the config!" in yaml file "plugins/CustomEnchants/config.yml"
- 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"
- set "settings.currency" to "1" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.update-notifier" to "true" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-enlighted-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-enlighted-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-deathbringer-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-deathbringer-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-I" to "10" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-I" to "10 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-II" to "20" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-II" to "15 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-III" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-III" to "20 seconds" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.TierI.cost-for-tier-I" to "15" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierI.tier-I-success-message" to "&aSuccessfully bought a &2Tier I &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
- 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"
- set "settings.TierII.cost-for-tier-II" to "30" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierII.tier-II-success-message" to "&aSuccessfully bought a &5Tier II &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
- 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"
- set "settings.TierIII.cost-for-tier-III" to "50" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierIII.tier-III-success-message" to "&aSuccessfully bought a &6Tier III &7Enchantment Book&a!" in yaml file "plugins/CustomEnchants/config.yml"
- 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"
- set "do-not-touch-this-or-your-config-will-reset.config-version" to "1.1" in yaml file "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ConfigVersion} to single value "do-not-touch-this-or-your-config-will-reset.config-version" get of "plugins/CustomEnchants/config.yml"
- set {Currency} to {CustomEnchants.Currency} parsed as an integer
- set {CostForTierI} to {CustomEnchants.CostForTierI} parsed as a number
- set {CostForTierII} to {CustomEnchants.CostForTierII} parsed as a number
- set {CostForTierIII} to {CustomEnchants.CostForTierIII} parsed as a number
- set {ChanceOfLightningI} to {CustomEnchants.ChanceOfLightningI} parsed as a number
- set {ChanceOfLightningII} to {CustomEnchants.ChanceOfLightningII} parsed as a number
- set {ChanceOfLightningIII} to {CustomEnchants.ChanceOfLightningIII} parsed as a number
- set {ChanceOfBlindI} to {CustomEnchants.ChanceOfBlindI} parsed as a number
- set {TimeOfBlindI} to {CustomEnchants.TimeOfBlindI} parsed as a timespan
- set {ChanceOfBlindII} to {CustomEnchants.ChanceOfBlindII} parsed as a number
- set {TimeOfBlindII} to {CustomEnchants.TimeOfBlindII} parsed as a timespan
- set {ChanceOfBlindIII} to {CustomEnchants.ChanceOfBlindIII} parsed as a number
- set {TimeOfBlindIII} to {CustomEnchants.TimeOfBlindIII} parsed as a timespan
- set {ChanceOfPoisonI} to {CustomEnchants.ChanceOfPoisonI} parsed as a number
- set {TimeOfPoisonI} to {CustomEnchants.TimeOfPoisonI} parsed as a timespan
- set {ChanceOfPoisonII} to {CustomEnchants.ChanceOfPoisonII} parsed as a number
- set {TimeOfPoisonII} to {CustomEnchants.TimeOfPoisonII} parsed as a timespan
- set {ChanceOfPoisonIII} to {CustomEnchants.ChanceOfPoisonIII} parsed as a number
- set {TimeOfPoisonIII} to {CustomEnchants.TimeOfPoisonIII} parsed as a timespan
- set {ChanceOfDecapatationI} to {CustomEnchants.ChanceOfDecapatationI} parsed as a number
- set {ChanceOfDecapatationII} to {CustomEnchants.ChanceOfDecapatationII} parsed as a number
- set {ChanceOfDecapatationIII} to {CustomEnchants.ChanceOfDecapatationIII} parsed as a number
- set {ChanceOfMoltenI} to {CustomEnchants.ChanceOfMoltenI} parsed as a number
- set {ChanceOfMoltenII} to {CustomEnchants.ChanceOfMoltenII} parsed as a number
- set {ChanceOfMoltenIII} to {CustomEnchants.ChanceOfMoltenIII} parsed as a number
- set {ChanceOfEnlightedI} to {CustomEnchants.ChanceOfEnlightedI} parsed as a number
- set {ChanceOfEnlightedII} to {CustomEnchants.ChanceOfEnlightedII} parsed as a number
- set {ChanceOfHardenedI} to {CustomEnchants.ChanceOfHardenedI} parsed as a number
- set {TimeOfHardenedI} to {CustomEnchants.TimeOfHardenedI} parsed as a timespan
- set {ChanceOfHardenedII} to {CustomEnchants.ChanceOfHardenedII} parsed as a number
- set {TimeOfHardenedII} to {CustomEnchants.TimeOfHardenedII} parsed as a timespan
- set {ChanceOfHardenedIII} to {CustomEnchants.ChanceOfHardenedIII} parsed as a number
- set {TimeOfHardenedIII} to {CustomEnchants.TimeOfHardenedIII} parsed as a timespan
- set {ChanceOfDeathbringerI} to {CustomEnchants.ChanceOfDeathbringerI} parsed as a number
- set {ChanceOfDeathbringerII} to {CustomEnchants.ChanceOfDeathbringerII} parsed as a number
- set {ConfigVersion} to {CustomEnchants.ConfigVersion} parsed as a number
- on join:
- if {CustomEnchants.UpdateNotifier} is true:
- if player has permission "ce.updates":
- if text from "http://pastebin.com/raw/jRmFq1KU" is not "{@version}":
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.UpdateNotifierMessage}%"
- on load:
- if {CustomEnchants.UpdateNotifier} is true:
- if text from "http://pastebin.com/raw/jRmFq1KU" is not "{@version}":
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.UpdateNotifierMessage}%" to console
- command /customenchants [<text>]:
- aliases: /cenchants, /ce
- trigger:
- if arg 1 is not set:
- if player has permission "ce.gui" or "ce.*":
- if {Currency} is 1:
- open chest with 3 rows named "&8&lCustom Enchantments" to player
- wait 2 ticks
- add stained glass pane:1, stained glass pane:2, stained glass pane:5 and stained glass pane:4 to {_items::*}
- while inventory name of player's current inventory is "&8&lCustom Enchantments":
- loop {_items::*}:
- loop 27 times:
- if inventory name of player's current inventory is not "&8&lCustom Enchantments":
- stop trigger
- format slot (loop-number - 1) of player with loop-value-1 to be unstealable
- 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"]
- 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"]
- 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"]
- wait 10 ticks
- wait 1 tick
- else if {Currency} is 2:
- open chest with 3 rows named "&8&lCustom Enchantments" to player
- wait 2 ticks
- add stained glass pane:1, stained glass pane:2, stained glass pane:5 and stained glass pane:4 to {_items::*}
- while inventory name of player's current inventory is "&8&lCustom Enchantments":
- loop {_items::*}:
- loop 27 times:
- if inventory name of player's current inventory is not "&8&lCustom Enchantments":
- stop trigger
- format slot (loop-number - 1) of player with loop-value-1 to be unstealable
- 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"]
- 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"]
- 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"]
- wait 10 ticks
- wait 1 tick
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "help":
- if player has permission "ce.help" or "ce.*":
- send "&7&l&m----------&r &a&lCustomEnchants Help &7&l&m----------"
- 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>"
- send "&7&l&m---------------------------------------"
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "reload":
- if player has permission "ce.reload" or "ce.*":
- make player execute command "skript reload %script%"
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "enchants" or "enchants 1":
- if player has permission "ce.enchants" or "ce.*":
- send "&7&l&m----------&r &a&lCustomEnchants Enchants &7&l&m----------" to player
- send "&9&l- &2Lightning &7| Chance of striking your enemy with lightning" to player
- send "&9&l- &2Blind &7| Chance of giving an enemy blindness for a certain amount of time" to player
- send "&9&l- &2Poison &7| Chance of giving an enemy poison for a certain amount of time" to player
- send "&9&l- &2Decapatation &7| Chance of getting an enemy's head!" to player
- send "&9&l- &2Smelting &7| Smelt everything you mine (if it's smeltable of course)" to player
- send "&9&l- &5Lifesteal &7| Get some health back when you punch an enemy" to player
- send "&8Use &9/ue enchants 2 &8to view more enchants"
- message "&7&l&m------------------&r &a&lPage 1 &7&l&m------------------" to player
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "enchants 2":
- if player has permission "ce.enchants" or "ce.*":
- send "&7&l&m----------&r &a&lCustomEnchants Enchants &7&l&m----------" to player
- send "&9&l- &5Molten &7| Chance of lighting the attacker on fire" to player
- send "&9&l- &5Enlighted &7| Chance of getting healed when hit" to player
- send "&9&l- &5Hardened &7| Chance of giving an enemy weakness for a certain amount of time upon them hitting you" to player
- send "&9&l- &5Berserker &7| When low on health you gain extreme strength" to player
- send "&9&l- &6Deathbringer &7| Chance to do more damage" to player
- send "&9&l- &6Self Destruct &7| Spawn tnt on death" to player
- message "&7&l&m------------------&r &a&lPage 2 &7&l&m------------------" to player
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "config reload" or "config r":
- if player has permission "ce.reload.config" or "ce.*":
- set {CustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {CustomEnchants.ConfigVersion} to single value "do-not-touch-this-or-your-config-will-reset.config-version" get of "plugins/CustomEnchants/config.yml"
- set {Currency} to {CustomEnchants.Currency} parsed as an integer
- set {CostForTierI} to {CustomEnchants.CostForTierI} parsed as a number
- set {CostForTierII} to {CustomEnchants.CostForTierII} parsed as a number
- set {CostForTierIII} to {CustomEnchants.CostForTierIII} parsed as a number
- set {ChanceOfLightningI} to {CustomEnchants.ChanceOfLightningI} parsed as a number
- set {ChanceOfLightningII} to {CustomEnchants.ChanceOfLightningII} parsed as a number
- set {ChanceOfLightningIII} to {CustomEnchants.ChanceOfLightningIII} parsed as a number
- set {ChanceOfBlindI} to {CustomEnchants.ChanceOfBlindI} parsed as a number
- set {TimeOfBlindI} to {CustomEnchants.TimeOfBlindI} parsed as a timespan
- set {ChanceOfBlindII} to {CustomEnchants.ChanceOfBlindII} parsed as a number
- set {TimeOfBlindII} to {CustomEnchants.TimeOfBlindII} parsed as a timespan
- set {ChanceOfBlindIII} to {CustomEnchants.ChanceOfBlindIII} parsed as a number
- set {TimeOfBlindIII} to {CustomEnchants.TimeOfBlindIII} parsed as a timespan
- set {ChanceOfPoisonI} to {CustomEnchants.ChanceOfPoisonI} parsed as a number
- set {TimeOfPoisonI} to {CustomEnchants.TimeOfPoisonI} parsed as a timespan
- set {ChanceOfPoisonII} to {CustomEnchants.ChanceOfPoisonII} parsed as a number
- set {TimeOfPoisonII} to {CustomEnchants.TimeOfPoisonII} parsed as a timespan
- set {ChanceOfPoisonIII} to {CustomEnchants.ChanceOfPoisonIII} parsed as a number
- set {TimeOfPoisonIII} to {CustomEnchants.TimeOfPoisonIII} parsed as a timespan
- set {ChanceOfDecapatationI} to {CustomEnchants.ChanceOfDecapatationI} parsed as a number
- set {ChanceOfDecapatationII} to {CustomEnchants.ChanceOfDecapatationII} parsed as a number
- set {ChanceOfDecapatationIII} to {CustomEnchants.ChanceOfDecapatationIII} parsed as a number
- set {ChanceOfMoltenI} to {CustomEnchants.ChanceOfMoltenI} parsed as a number
- set {ChanceOfMoltenII} to {CustomEnchants.ChanceOfMoltenII} parsed as a number
- set {ChanceOfMoltenIII} to {CustomEnchants.ChanceOfMoltenIII} parsed as a number
- set {ChanceOfEnlightedI} to {CustomEnchants.ChanceOfEnlightedI} parsed as a number
- set {ChanceOfEnlightedII} to {CustomEnchants.ChanceOfEnlightedII} parsed as a number
- set {ChanceOfHardenedI} to {CustomEnchants.ChanceOfHardenedI} parsed as a number
- set {TimeOfHardenedI} to {CustomEnchants.TimeOfHardenedI} parsed as a timespan
- set {ChanceOfHardenedII} to {CustomEnchants.ChanceOfHardenedII} parsed as a number
- set {TimeOfHardenedII} to {CustomEnchants.TimeOfHardenedII} parsed as a timespan
- set {ChanceOfHardenedIII} to {CustomEnchants.ChanceOfHardenedIII} parsed as a number
- set {TimeOfHardenedIII} to {CustomEnchants.TimeOfHardenedIII} parsed as a timespan
- set {ChanceOfDeathbringerI} to {CustomEnchants.ChanceOfDeathbringerI} parsed as a number
- set {ChanceOfDeathbringerII} to {CustomEnchants.ChanceOfDeathbringerII} parsed as a number
- set {ConfigVersion} to {CustomEnchants.ConfigVersion} parsed as a number
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.ConfigReloadSuccess}%"
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- else if arg 1 is "update":
- if sender has permission "ce.update" or "ce.*":
- if "{@version}" is not "%{ConfigVersion}%":
- if file "plugins/CustomEnchants/config.yml" exists:
- send "%{CustomEnchants.Prefix}% &aUpdating..." to sender
- set {BackupCustomEnchants.Prefix} to coloured value "messages.prefix" get of "plugins/CustomEnchants/config.yml"
- set {BackupBackupCustomEnchants.NoPermission} to coloured value "messages.no-perm" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.NotEnoughToBuy} to coloured value "messages.not-enough-currency" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ConfigReloadSuccess} to coloured value "messages.config-reload-success" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.UpdateNotifierMessage} to coloured value "messages.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.Currency} to single value "settings.currency" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.UpdateNotifier} to coloured value "settings.update-notifier" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfLightningI} to coloured value "settings.chance-of-lightning-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfLightningII} to coloured value "settings.chance-of-lightning-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfLightningIII} to coloured value "settings.chance-of-lightning-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfBlindI} to coloured value "settings.chance-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfBlindI} to coloured value "settings.time-of-blind-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfBlindII} to coloured value "settings.chance-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfBlindII} to coloured value "settings.time-of-blind-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfBlindIII} to coloured value "settings.chance-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfBlindIII} to coloured value "settings.time-of-blind-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfPoisonI} to coloured value "settings.chance-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfPoisonI} to coloured value "settings.time-of-poison-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfPoisonII} to coloured value "settings.chance-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfPoisonII} to coloured value "settings.time-of-poison-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfPoisonIII} to coloured value "settings.chance-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfPoisonIII} to coloured value "settings.time-of-poison-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfDecapatationI} to coloured value "settings.chance-of-decapatation-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfDecapatationII} to coloured value "settings.chance-of-decapatation-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfDecapatationIII} to coloured value "settings.chance-of-decapatation-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfMoltenI} to coloured value "settings.chance-of-molten-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfMoltenII} to coloured value "settings.chance-of-molten-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfMoltenIII} to coloured value "settings.chance-of-molten-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfEnlightedI} to coloured value "settings.chance-of-enlighted-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfEnlightedII} to coloured value "settings.chance-of-enlighted-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfHardenedI} to coloured value "settings.chance-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfHardenedI} to coloured value "settings.time-of-hardened-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfHardenedII} to coloured value "settings.chance-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfHardenedII} to coloured value "settings.time-of-hardened-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfHardenedIII} to coloured value "settings.chance-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TimeOfHardenedIII} to coloured value "settings.time-of-hardened-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfDeathbringerI} to coloured value "settings.chance-of-deathbringer-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.ChanceOfDeathbringerII} to coloured value "settings.chance-of-deathbringer-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.CostForTierI} to coloured value "settings.TierI.cost-for-tier-I" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierISuccessMessage} to coloured value "messages.TierI.tier-I-success-message" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierIMoreThanOneSuccessMessage} to coloured value "messages.TierI.tier-I-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.CostForTierII} to coloured value "settings.TierII.cost-for-tier-II" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierIISuccessMessage} to coloured value "messages.TierII.tier-II-success-message" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierIIMoreThanOneSuccessMessage} to coloured value "messages.TierII.tier-II-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.CostForTierIII} to coloured value "settings.TierIII.cost-for-tier-III" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierIIISuccessMessage} to coloured value "messages.TierIII.tier-III-success-message" get of "plugins/CustomEnchants/config.yml"
- set {BackupCustomEnchants.TierIIIMoreThanOneSuccessMessage} to coloured value "messages.TierIII.tier-III-more-than-one-success-message" get of "plugins/CustomEnchants/config.yml"
- wait 1 second
- delete file "plugins/CustomEnchants/config.yml"
- delete file "plugins/Skript/scripts/%script%.sk"
- wait 2 seconds
- download from "http://pastebin.com/raw/FeW1VACq" to "plugins/Skript/scripts/CustomEnchants.sk"
- create file "plugins/CustomEnchants/config.yml"
- wait 1 second
- wf "## Thank you for downloading CustomEnchants.sk by HYPExMon5ter!" to "plugins/CustomEnchants/config.yml"
- wf "## Use '&' or 'ยง' for color codes!" to "plugins/CustomEnchants/config.yml"
- wf "## Use {book-amount} for the amount of books you bought" to "plugins/CustomEnchants/config.yml"
- 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"
- set "messages.prefix" to "%{BackupCustomEnchants.Prefix}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.no-perm" to "%{BackupBackupCustomEnchants.NoPermission}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.not-enough-currency" to "%{BackupCustomEnchants.NotEnoughToBuy}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.config-reload-success" to "%{BackupCustomEnchants.ConfigReloadSuccess}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.update-notifier" to "%{BackupCustomEnchants.UpdateNotifierMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.currency" to "%{BackupCustomEnchants.Currency}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.update-notifier" to "%{BackupCustomEnchants.UpdateNotifier}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-I" to "%{BackupCustomEnchants.ChanceOfLightningI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-II" to "%{BackupCustomEnchants.ChanceOfLightningII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-lightning-III" to "%{BackupCustomEnchants.ChanceOfLightningIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-I" to "%{BackupCustomEnchants.ChanceOfBlindI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-I" to "%{BackupCustomEnchants.TimeOfBlindI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-II" to "%{BackupCustomEnchants.ChanceOfBlindII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-II" to "%{BackupCustomEnchants.TimeOfBlindII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-blind-III" to "%{BackupCustomEnchants.ChanceOfBlindIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-blind-III" to "%{BackupCustomEnchants.TimeOfBlindIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-I" to "%{BackupCustomEnchants.ChanceOfPoisonI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-I" to "%{BackupCustomEnchants.TimeOfPoisonI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-II" to "%{BackupCustomEnchants.ChanceOfPoisonII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-II" to "%{BackupCustomEnchants.TimeOfPoisonII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-poison-III" to "%{BackupCustomEnchants.ChanceOfPoisonIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-poison-III" to "%{BackupCustomEnchants.TimeOfPoisonIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-I" to "%{BackupCustomEnchants.ChanceOfDecapatationI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-II" to "%{BackupCustomEnchants.ChanceOfDecapatationII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-decapatation-III" to "%{BackupCustomEnchants.ChanceOfDecapatationIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-I" to "%{BackupCustomEnchants.ChanceOfMoltenI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-II" to "%{BackupCustomEnchants.ChanceOfMoltenII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-molten-III" to "%{BackupCustomEnchants.ChanceOfMoltenIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-enlighted-I" to "%{BackupCustomEnchants.ChanceOfEnlightedI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-enlighted-II" to "%{BackupCustomEnchants.ChanceOfEnlightedII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-deathbringer-I" to "%{BackupCustomEnchants.ChanceOfDeathbringerI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-deathbringer-II" to "%{BackupCustomEnchants.ChanceOfDeathbringerII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-I" to "%{BackupCustomEnchants.ChanceOfHardenedI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-I" to "%{BackupCustomEnchants.TimeOfHardenedI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-II" to "%{BackupCustomEnchants.ChanceOfHardenedII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-II" to "%{BackupCustomEnchants.TimeOfHardenedII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.chance-of-hardened-III" to "%{BackupCustomEnchants.ChanceOfHardenedIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.time-of-hardened-III" to "%{BackupCustomEnchants.TimeOfHardenedIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.TierI.cost-for-tier-I" to "%{BackupCustomEnchants.CostForTierI}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierI.tier-I-success-message" to "%{BackupCustomEnchants.TierISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierI.tier-I-more-than-one-success-message" to "%{BackupCustomEnchants.TierIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.TierII.cost-for-tier-II" to "%{BackupCustomEnchants.CostForTierII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierII.tier-II-success-message" to "%{BackupCustomEnchants.TierIISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierII.tier-II-more-than-one-success-message" to "%{BackupCustomEnchants.TierIIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "settings.TierIII.cost-for-tier-III" to "%{BackupCustomEnchants.CostForTierIII}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierIII.tier-III-success-message" to "%{BackupCustomEnchants.TierIIISuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "messages.TierIII.tier-III-more-than-one-success-message" to "%{BackupCustomEnchants.TierIIIMoreThanOneSuccessMessage}%" in yaml file "plugins/CustomEnchants/config.yml"
- set "do-not-touch-this-or-your-config-will-reset.config-version" to "1.1" in yaml file "plugins/CustomEnchants/config.yml"
- wait 2 seconds
- send "%{CustomEnchants.Prefix}% &aSuccessfully updated!"
- make player execute command "/skript reload %script%"
- else:
- send "&4ERROR" to sender
- send "" to sender
- send "%{CustomEnchants.Prefix}% &c&lSumting dun fukd up with the config m8" to sender
- send "" to sender
- send "&4ERROR" to sender
- else:
- send "%{CustomEnchants.Prefix}% &aCustomEnchants is already up-to-date." to sender
- 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":
- if player has permission "ce.help" or "ce.*":
- send "&7&l&m----------&r &a&lCustomEnchants Help &7&l&m----------"
- 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>"
- send "&7&l&m---------------------------------------"
- else:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NoPermission}%"
- # Tier I
- command /tierI:
- trigger:
- if {Currency} is 1:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&2&lTier I amount picker" to player
- invoke "Tier I EXP" from 0 and player
- else if {Currency} is 2:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&2&lTier I amount picker" to player
- invoke "Tier I $" from 0 and player
- sub "Tier I EXP":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- 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}]
- 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}]
- 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}]
- 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"]
- 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}]
- 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}]
- 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}]
- sub "Tier I $":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier I $" from 1 and {_p}]
- format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier I $" from 5 and {_p}]
- format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier I $" from 10 and {_p}]
- 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"]
- format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier I $" from -1 and {_p}]
- format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier I $" from -5 and {_p}]
- format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier I $" from -10 and {_p}]
- command /acceptTierI:
- trigger:
- if {Currency} is 1:
- if player's level is greater than or equal to {CostForTierI} * {numberOfBooks.%player%}:
- reduce the player's level by {CostForTierI} * {numberOfBooks.%player%}
- give player {numberOfBooks.%player%} of book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- else if {Currency} is 2:
- set {_moneyForTierI} to "%{CostForTierI}%"
- set {_moneyForTierI} to {_moneyForTierI} parsed as a number
- if player's balance is greater than or equal to {_moneyForTierI} * {numberOfBooks.%player%}:
- remove {_moneyForTierI} * {numberOfBooks.%player%} from the player's balance
- give player {numberOfBooks.%player%} of book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- # Tier II
- command /tierII:
- trigger:
- if {Currency} is 1:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&5&lTier II amount picker" to player
- invoke "Tier II EXP" from 0 and player
- else if {Currency} is 2:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&5&lTier II amount picker" to player
- invoke "Tier II $" from 0 and player
- sub "Tier II EXP":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- 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}]
- 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}]
- 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}]
- 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"]
- 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}]
- 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}]
- 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}]
- sub "Tier II $":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier II $" from 1 and {_p}]
- format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier II $" from 5 and {_p}]
- format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier II $" from 10 and {_p}]
- 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"]
- format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier II $" from -1 and {_p}]
- format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier II $" from -5 and {_p}]
- format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier II $" from -10 and {_p}]
- command /acceptTierII:
- trigger:
- if {Currency} is 1:
- if player's level is greater than or equal to {CostForTierII} * {numberOfBooks.%player%}:
- reduce the player's level by {CostForTierII} * {numberOfBooks.%player%}
- give player {numberOfBooks.%player%} of book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- else if {Currency} is 2:
- set {_moneyForTierII} to "%{CostForTierII}%"
- set {_moneyForTierII} to {_moneyForTierII} parsed as a number
- if player's balance is greater than or equal to {_moneyForTierII} * {numberOfBooks.%player%}:
- remove {_moneyForTierII} * {numberOfBooks.%player%} from the player's balance
- give player {numberOfBooks.%player%} of book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- # Tier III
- command /tierIII:
- trigger:
- if {Currency} is 1:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&6&lTier III amount picker" to player
- invoke "Tier III EXP" from 0 and player
- else if {Currency} is 2:
- set {numberOfBooks.%player%} to 1
- wait 3 ticks
- open chest with 3 rows named "&6&lTier III amount picker" to player
- invoke "Tier III $" from 0 and player
- sub "Tier III EXP":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- 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}]
- 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}]
- 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}]
- 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"]
- 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}]
- 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}]
- 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}]
- sub "Tier III $":
- set {_n} to parameter 1
- set {_p} to parameter 2
- add {_n} to {numberOfBooks.%{_p}%}
- if {numberOfBooks.%{_p}%} < 1:
- set {numberOfBooks.%{_p}%} to 1
- if {numberOfBooks.%{_p}%} > 100:
- set {numberOfBooks.%{_p}%} to 100
- format slot 3 of {_p} with 1 of stained glass pane:5 named "&a+1" to run [invoke "Tier III $" from 1 and {_p}]
- format slot 4 of {_p} with 5 of stained glass pane:5 named "&a+5" to run [invoke "Tier III $" from 5 and {_p}]
- format slot 5 of {_p} with 10 of stained glass pane:5 named "&a+10" to run [invoke "Tier III $" from 10 and {_p}]
- 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"]
- format slot 21 of {_p} with 1 of stained glass pane:14 named "&c-1" to run [invoke "Tier III $" from -1 and {_p}]
- format slot 22 of {_p} with 5 of stained glass pane:14 named "&c-5" to run [invoke "Tier III $" from -5 and {_p}]
- format slot 23 of {_p} with 10 of stained glass pane:14 named "&c-10" to run [invoke "Tier III $" from -10 and {_p}]
- command /acceptTierIII:
- trigger:
- if {Currency} is 1:
- if player's level is greater than or equal to {CostForTierIII} * {numberOfBooks.%player%}:
- reduce the player's level by {CostForTierIII} * {numberOfBooks.%player%}
- give player {numberOfBooks.%player%} of book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- else if {Currency} is 2:
- set {_moneyForTierIII} to "%{CostForTierIII}%"
- set {_moneyForTierIII} to {_moneyForTierIII} parsed as a number
- if player's balance is greater than or equal to {_moneyForTierIII} * {numberOfBooks.%player%}:
- remove {_moneyForTierIII} * {numberOfBooks.%player%} from the player's balance
- give player {numberOfBooks.%player%} of book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book."
- if {numberOfBooks.%player%} is 1:
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIISuccessMessage}%"
- else if {numberOfBooks.%player%} is greater than 1:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.TierIIIMoreThanOneSuccessMessage}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.TierIIIMoreThanOneSuccessMessage}%"
- else:
- replace all "{book-amount}" with "%{numberOfBooks.%player%}%" in {CustomEnchants.NotEnoughToBuy}
- send "%{CustomEnchants.Prefix}% %{CustomEnchants.NotEnoughToBuy}%"
- stop
- # Tier I Enchantments
- on right click:
- if player is holding book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book.":
- remove 1 book named "&2&lTier I Enchantment Book" with lore "&7Right-Click to recieve a random||&2Tier I &7Enchantment Book." from player
- set {_randomTierI} to a random integer between 1 and 11
- if {_randomTierI} is 1:
- 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."
- if {_randomTierI} is 2:
- 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."
- if {_randomTierI} is 3:
- 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."
- if {_randomTierI} is 4:
- 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."
- if {_randomTierI} is 5:
- 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."
- if {_randomTierI} is 6:
- 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."
- if {_randomTierI} is 7:
- 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."
- if {_randomTierI} is 8:
- 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."
- if {_randomTierI} is 9:
- 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."
- if {_randomTierI} is 10:
- 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."
- if {_randomTierI} is 11:
- 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."
- # Lightning I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lLightning I &f- &7Click a sword" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lLightning I &f- &7Click a sword":
- if clicked item is a sword:
- if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
- close player's inventory
- else:
- send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
- cancel event
- close player's inventory
- on damage:
- if victim is a player:
- if attacker's tool is a sword:
- if lore of attacker's tool contains "&2&lLightning I":
- chance of {ChanceOfLightningI}%:
- strike lightning effect at the victim
- damage the victim by 1 heart
- ignite victim
- # Lightning II
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lLightning II &f- &7Click a sword" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lLightning II &f- &7Click a sword":
- if clicked item is a sword:
- if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
- close player's inventory
- else:
- send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
- cancel event
- close player's inventory
- on damage:
- if victim is a player:
- if attacker's tool is a sword:
- if lore of attacker's tool contains "&2&lLightning II":
- chance of {ChanceOfLightningII}%:
- strike lightning effect at the victim
- damage the victim by 1 heart
- ignite victim
- # Lightning III
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lLightning III &f- &7Click a sword" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lLightning III &f- &7Click a sword":
- if clicked item is a sword:
- if lore of clicked item doesn't contain "Lightning I" or "Lightning II" or "Lightning III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lLightning III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your sword!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your sword as it already has '&2&lLightning&a' on it!"
- close player's inventory
- else:
- send "%{CustomEnchants.Prefix}% &aThis enchantment is only for sword's, sorry!"
- cancel event
- close player's inventory
- on damage:
- if victim is a player:
- if attacker's tool is a sword:
- if lore of attacker's tool contains "&2&lLightning III":
- chance of {ChanceOfLightningIII}%:
- strike lightning effect at the victim
- damage the victim by 1 heart
- ignite victim
- # Blind I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lBlind I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lBlind I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Blind I":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lBlind I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lBlind&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&2&lBlind I":
- chance of {ChanceOfBlindI}%:
- apply blindness 1 to victim for {TimeOfBlindI}
- # Poison I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lPoison I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lPoison I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&2&lPoison I":
- chance of {ChanceOfPoisonI}%:
- apply poison 1 to victim for {TimeOfPoisonI}
- # Poison II
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lPoison II &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lPoison II &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&2&lPoison II":
- chance of {ChanceOfPoisonII}%:
- apply poison 1 to victim for {TimeOfPoisonII}
- # Poison III
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lPoison III &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lPoison III &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Poison I" or "Poison II" or "Poison III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lPoison III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lPoison&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&2&lPoison III":
- chance of {ChanceOfPoisonIII}%:
- apply poison 2 to victim for {TimeOfPoisonIII}
- # Decapatation I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lDecapatation I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lDecapatation I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
- close player's inventory
- on death:
- if victim is a player:
- if lore of attacker's tool contains "&2&lDecapatation I":
- chance of {ChanceOfDecapatationI}%:
- drop skull of "%victim%" parsed as offline player at victim's location
- # Decapatation II
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lDecapatation II &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lDecapatation II &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
- close player's inventory
- on death:
- if victim is a player:
- if lore of attacker's tool contains "&2&lDecapatation II":
- chance of {ChanceOfDecapatationII}%:
- drop skull of "%victim%" parsed as offline player at victim's location
- # Decapatation III
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lDecapatation III &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lDecapatation III &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Decapatation I" or "Decapatation II" or "Decapatation III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lDecapatation III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&2&lDecapatation&a' on it!"
- close player's inventory
- on death:
- if victim is a player:
- if lore of attacker's tool contains "&2&lDecapatation III":
- chance of {ChanceOfDecapatationIII}%:
- drop skull of "%victim%" parsed as offline player at victim's location
- # Smelting I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&2&lSmelting I &f- &7Click a pickaxe" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&2&lSmelting I &f- &7Click a pickaxe":
- if clicked item is a pickaxe:
- if lore of clicked item doesn't contain "Smelting I":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&2&lSmelting I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your pickaxe!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your pickaxe as it already has '&2&lSmelting&a' on it!"
- close player's inventory
- else:
- send "%{CustomEnchants.Prefix}% &aThis enchantment is only for pickaxe's, sorry!"
- cancel event
- close player's inventory
- on mine:
- if player's tool is a pickaxe:
- if lore of player's tool contains "&2&lSmelting I":
- if event-block is iron ore:
- if player's gamemode is survival:
- cancel event
- set event-block to air
- give player 1 iron ingot
- damage player's tool by 1
- # Tier II Enchantments
- on right click:
- if player is holding book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book.":
- remove 1 book named "&5&lTier II Enchantment Book" with lore "&7Right-Click to recieve a random||&5Tier II &7Enchantment Book." from player
- set {_randomTierII} to a random integer between 1 and 8
- if {_randomTierII} is 1:
- 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."
- if {_randomTierII} is 2:
- 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."
- if {_randomTierII} is 3:
- 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."
- if {_randomTierII} is 4:
- 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."
- if {_randomTierII} is 5:
- 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."
- if {_randomTierII} is 6:
- 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."
- if {_randomTierII} is 7:
- 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."
- if {_randomTierII} is 8:
- 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."
- # Lifesteal I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lLifesteal I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lLifesteal I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Lifesteal I":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lLifesteal I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lLifesteal&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&5&lLifesteal I":
- if attacker's health is less than 9.6:
- set attacker's health to attacker's health+0.5
- else:
- stop
- # Blind I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lBlind I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lBlind I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&5&lBlind I":
- chance of {ChanceOfBlindI}%:
- apply blindness 1 to victim for {TimeOfBlindI}
- # Blind II
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lBlind II &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lBlind II &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&5&lBlind II":
- chance of {ChanceOfBlindII}%:
- apply blindness 1 to victim for {TimeOfBlindII}
- # Blind III
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lBlind III &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lBlind III &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Blind I" or "Blind II" or "Blind III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBlind III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&5&lBlind&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if lore of attacker's tool contains "&5&lBlind III":
- chance of {ChanceOfBlindIII}%:
- apply blindness 1 to victim for {TimeOfBlindIII}
- # Molten I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lMolten I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lMolten I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lMolten I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lMolten&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&5&lMolten I":
- chance of {ChanceOfMoltenI}%:
- ignite attacker
- # Enlighted I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lEnlighted I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lEnlighted I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lEnlighted I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lEnlighted&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&5&lEnlighted I":
- chance of {ChanceOfEnlightedI}%:
- heal victim
- send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
- # Hardened I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lHardened I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lHardened I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lHardened I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lHardened&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&5&lHardened I":
- chance of {ChanceOfHardenedI}%:
- apply weakness 1 to attacker for {TimeOfHardenedI}
- # Berserker I
- on right click:
- 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.":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&5&lBerserker I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&5&lBerserker I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&5&lBerserker I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&5&lBerserker&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&5&lBerserker I":
- if victim's health is less than 2.0:
- apply strength 2 to victim for 15 seconds
- else:
- remove strength from victim
- # Tier III Enchantments
- on right click:
- if player is holding book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book.":
- remove 1 book named "&6&lTier III Enchantment Book" with lore "&7Right-Click to recieve a random||&6Tier III &7Enchantment Book." from player
- set {_randomTierIII} to a random integer between 1 and 17
- if {_randomTierIII} is 1:
- 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"
- if {_randomTierIII} is 2:
- 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"
- if {_randomTierIII} is 3:
- 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"
- if {_randomTierIII} is 4:
- 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"
- if {_randomTierIII} is 5:
- 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"
- if {_randomTierIII} is 6:
- 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"
- if {_randomTierIII} is 7:
- 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"
- if {_randomTierIII} is 8:
- 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"
- if {_randomTierIII} is 9:
- 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"
- if {_randomTierIII} is 10:
- 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"
- if {_randomTierIII} is 11:
- 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"
- if {_randomTierIII} is 12:
- 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"
- if {_randomTierIII} is 13:
- 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"
- if {_randomTierIII} is 14:
- 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"
- if {_randomTierIII} is 15:
- 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"
- if {_randomTierIII} is 16:
- 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"
- if {_randomTierIII} is 17:
- 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"
- # Lifesteal I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lLifesteal I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lLifesteal I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&6&lLifesteal I":
- if attacker's health is less than 9.6:
- set attacker's health to attacker's health+0.5
- else:
- stop
- # Lifesteal II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lLifesteal II &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lLifesteal II &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&6&lLifesteal II":
- if attacker's health is less than 9.1:
- set attacker's health to attacker's health+1.0
- else:
- stop
- # Lifesteal III
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lLifesteal III &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lLifesteal III &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Lifesteal I" or "Lifesteal II" or "Lifesteal III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lLifesteal III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lLifesteal&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&6&lLifesteal III":
- if attacker's health is less than 8.6:
- set attacker's health to attacker's health+1.5
- else:
- stop
- # Deathbringer I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lDeathbringer I &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lDeathbringer I &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Deathbringer I" or "Deathbringer II":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lDeathbringer I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lDeathbringer&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&6&lDeathbringer I":
- chance of {ChanceOfDeathbringerI}%:
- set damage to damage*2
- # Deathbringer II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lDeathbringer II &f- &7Click anything" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lDeathbringer II &f- &7Click anything":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Deathbringer I" or "Deathbringer II":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lDeathbringer II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your item of choice!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your item of choice as it already has '&6&lDeathbringer&a' on it!"
- close player's inventory
- on damage:
- if victim is a player:
- if attacker is a player:
- if lore of attacker's tool contains "&6&lDeathbringer II":
- chance of {ChanceOfDeathbringerII}%:
- set damage to damage*3
- # Molten I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lMolten I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lMolten I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lMolten I":
- chance of {ChanceOfMoltenI}%:
- ignite attacker
- # Molten II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lMolten II &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lMolten II &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lMolten II":
- chance of {ChanceOfMoltenII}%:
- ignite attacker
- # Molten III
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lMolten III &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lMolten III &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Molten I" or "Molten II" or "Molten III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%|&6&lMolten III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lMolten&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lMolten III":
- chance of {ChanceOfMoltenIII}%:
- ignite attacker
- # Enlighted I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lEnlighted I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lEnlighted I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lEnlighted I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lEnlighted&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lEnlighted I":
- chance of {ChanceOfEnlightedI}%:
- heal victim
- send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
- # Enlighted II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lEnlighted II &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lEnlighted II &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Enlighted I" or "Enlighted II":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lEnlighted II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lEnlighted&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lEnlighted II":
- chance of {ChanceOfEnlightedII}%:
- heal victim
- send "%{CustomEnchants.Prefix}% &aYou have been healed by your Enlighted enchantment!" to victim
- # Hardened I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lHardened I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lHardened I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lHardened I":
- chance of {ChanceOfHardenedI}%:
- apply weakness 1 to attacker for {TimeOfHardenedI}
- # Hardened II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lHardened II &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lHardened II &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lHardened II":
- chance of {ChanceOfHardenedII}%:
- apply weakness 1 to attacker for {TimeOfHardenedII}
- # Hardened III
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lHardened III &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lHardened III &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Hardened I" or "Hardened II" or "Hardened III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lHardened III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lHardened&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lHardened III":
- chance of {ChanceOfHardenedIII}%:
- apply weakness 1 to attacker for {TimeOfHardenedIII}
- # Self Destruct I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lSelf Destruct I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lSelf Destruct I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Self Destruct I":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lSelf Destruct I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lSelf Destruct&a' on it!"
- close player's inventory
- on death of a player:
- if attacker is a player:
- if victim is wearing any chestplate:
- if lore of victim's chestplate contains "&6&lSelf Destruct I":
- create a safe explosion of power 3 at victim's location
- wait 10 seconds
- send "%{CustomEnchants.Prefix}% &aYou had self destruct on when you died so it created an explosion possibly killing someone" to victim
- # Berserker I
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lBerserker I &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lBerserker I &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker I"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lBerserker I":
- if victim's health is less than 2.0:
- apply strength 2 to victim for 15 seconds
- else:
- remove strength from victim
- # Berserker II
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lBerserker II &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lBerserker II &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker II"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lBerserker II":
- if victim's health is less than 2.0:
- apply strength 2 to victim for 30 seconds
- else:
- remove strength from victim
- # Berserker III
- on right click:
- 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":
- loop all items in player's inventory:
- add loop-item to {ce.PlayersInventory.%player%::*}
- open chest with 4 rows named "&6&lBerserker III &f- &7Click any chestplate" to player
- set {_count} to 0
- loop {ce.PlayersInventory.%player%::*}:
- if {_x} = 36:
- add 1 to {_count}
- format slot {_count} of player with loop-value-2 to be unstealable
- add 1 to {_count}
- delete {ce.PlayersInventory.%player%::*}
- on inventory click:
- if inventory name of player's current inventory is "&6&lBerserker III &f- &7Click any chestplate":
- if clicked item is anything:
- if lore of clicked item doesn't contain "Berserker I" or "Berserker II" or "Berserker III":
- 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
- set {_clickItem.%player%} to clicked item
- close player's inventory
- remove {_clickItem.%player%} from player's inventory
- set lore of {_clickItem.%player%} to "%lore of clicked item%||&6&lBerserker III"
- give {_clickItem.%player%} to player
- send "%{CustomEnchants.Prefix}% &aSuccessfully enchanted your chestplate!"
- else:
- send "%{CustomEnchants.Prefix}% &aI could not enchant your chestplate as it already has '&6&lBerserker&a' on it!"
- close player's inventory
- on damage:
- if attacker is a player:
- if victim is a player:
- if victim is wearing a chestplate:
- if lore of victim's chestplate contains "&6&lBerserker III":
- if victim's health is less than 2.0:
- apply strength 2 to victim for 45 seconds
- else:
- remove strength from victim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement