Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #====================================================#
- # BalefulEnchants #
- # By Midnighters A.K.A MedievalGaming #
- # Custom Enchantments, Custom Gear, Custom Shops #
- #====================================================#
- # Basic Enchants #
- #======================#
- # Wrath of Zeus
- # Cripling Blow
- # Roaring Flames
- #
- # Good Enchants #
- #=======================#
- # Venomous Strike
- # Decimation
- # Rejuvination
- #
- # Superior Enchants #
- #===========================#
- # Relentless
- # Hells Embrace
- # Endurance
- # This Skript requires the Following.
- # SharpSK
- # SkQuery
- # SkRayFall
- # Umbaska
- # Skript
- on death:
- attacker is a player
- set {_dying} to "%victim%"
- set {_mobs::*} to yaml nodes "mobs" from "BalefulEnchantsConfigs/sofrates.yml"
- set {_bal} to yaml value "%attacker%.balance" from "BalefulEnchantsConfigs/playerdata/%attacker%.yml"
- set {_enabled} to yaml value "mobs.%{_dying}%.enabled" from "BalefulEnchantsConfigs/sofrates.yml"
- set {_bal} to "%{_bal}%" parsed as integer
- set {_drop} to yaml value "mobs.%{_dying}%.drop" from "BalefulEnchantsConfigs/sofrates.yml"
- set {_drop} to "%{_drop}%" parsed as integer
- if {_dying} is {_mobs::*}:
- if {_enabled} is "true":
- add {_drop} to {_bal}
- set yaml value "%attacker%.balance" from "BalefulEnchantsConfigs/playerdata/%attacker%.yml" to {_bal}
- command /essence:
- trigger:
- set {_bal} to yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml"
- message "Total Life Essence Collected: %{_bal}%!"
- command /book [<text>]:
- trigger:
- set {_bal} to yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml"
- player has permission "be.book"
- set {_item} to yaml value "books.itemtype" from "BalefulEnchantsConfigs/enchants.yml"
- set {_item} to "%{_item}%" parsed as item type
- set {_name} to yaml value "books.%arg-1%.name" from "BalefulEnchantsConfigs/enchants.yml"
- set {_lore} to yaml value "books.%arg-1%.lore" from "BalefulEnchantsConfigs/enchants.yml"
- if arg-1 is not set:
- send "Error! Please Choose a book type!"
- if arg-1 is "basic":
- if {_bal} is above 50:
- add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
- subtract 50 from {_bal}
- set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
- else:
- send "You do not have enough Life Essence!"
- if arg-1 is "good":
- if {_bal} is above 75:
- add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
- subtract 75 from {_bal}
- set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
- else:
- send "You do not have enough Life Essence!"
- if arg-1 is "superior":
- if {_bal} is above 100:
- add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
- subtract 100 from {_bal}
- set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
- else:
- send "You do not have enough Life Essence!"
- command /enchanter:
- trigger:
- open chest with 3 row named "&f&lEnchanter" to player
- format slot 0 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 1 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 2 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 3 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 4 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 5 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 6 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 7 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 8 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 9 of player with book named "&c&lSoul Enchantment Book" with lore "&7Currently Disabled||" to close
- format slot 10 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 11 of player with book named "&f&lBasic Enchantment Book" with lore "&7Examine to recieve a random||&f&l&nBasic&r &7Enchantment Book.||||&b&lBuy for &f50 Souls" to close then run [make player execute command "/book basic"]
- format slot 12 of player with book named "&b&lGood Enchantment Book" with lore "&7Examine to recieve a random||&b&l&nGood&r &7Enchantment Book.||||&b&lBuy for &f75 Souls" to close then run [make player execute command "/book good"]
- format slot 13 of player with book named "&d&lSuperior Enchantment Book" with lore "&7Examine to recieve a random||&d&l&nSuperior&r &7Enchantment Book.||||&b&lBuy for &f100 Levels" to close then run [make player execute command "/book superior"]
- format slot 14 of player with book named "&2&lMaster Enchantment Book" with lore "&7Currently Disabled" to close
- format slot 15 of player with book named "&6&lLegendary Enchantment Book" with lore "&7Currently Disabled" to close
- format slot 16 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 17 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 18 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 19 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 20 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 21 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 22 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 23 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 24 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 25 of player with black stained Glass Pane named "&0" to be unstealable
- format slot 26 of player with black stained Glass Pane named "&0" to be unstealable
- # The "on rightclick" event below is used to randomly
- # Randomly select an enchantment based on the unviewed
- # Book type in your hand when right clicking
- on rightclick:
- # Setting and checking the unviewed enchant item
- set {_item} to yaml value "books.itemtype" from "BalefulEnchantsConfigs/enchants.yml"
- set {_item} to "%{_item}%" parsed as item type
- if held item is {_item}:
- set {_name::*} to name of held item split at " "
- set {_rarity} to {_name::1}
- # Replacing all color codes and capital letters
- # To use with yaml get events
- set {_rarity} to uncolored {_rarity}
- set {_rarity} to convert {_rarity} to all lowercase
- # Testing that {_rarity} properly pulls yaml nodes
- set {_enchants::*} to yaml nodes "%{_rarity}%enchants" from "BalefulEnchantsConfigs/enchants.yml"
- set {_temp} to random integer from 0.9 to 3
- set {_enchant} to {_enchants::%{_temp}%}
- # Set the name and lore based on the enchantment from the YML
- set {_lore} to yaml value "%{_rarity}%enchants.%{_enchant}%.lore" from "BalefulEnchantsConfigs/enchants.yml"
- set {_name} to yaml value "%{_rarity}%enchants.%{_enchant}%.name" from "BalefulEnchantsConfigs/enchants.yml"
- # Set the max level based on the enchantment from the YML
- set {_maxlevel} to yaml value "%{_rarity}%enchants.%{_enchant}%.maxlevel" from "BalefulEnchantsConfigs/enchants.yml"
- set {_maxlevel} to "%{_maxlevel}%" parsed as integer
- # Randomly select a level for the enchantment
- set {_level} to random integer between 0.9 and {_maxlevel}
- # Convert that random number to a roman numeral
- set {_level} to roman numeral of {_level}
- # Set the percentage chances for success and destroy
- set {_success} to a random integer between 1 and 100
- set {_destroy} to a random integer between 0 and 100
- # Test Broadcasts
- # Testing Selection of Random Enchant
- # As well as corresponding max level and lore
- set {_success} to a random integer between 1 and 100
- set {_destroy} to a random integer between 0 and 100
- remove 1 of player's tool from player's tool
- add enchanted book named "%{_name}% %{_level}%" with lore "%{_lore}%||&aSuccess Chance %{_success}% %%||&cDestroy Chance %{_destroy}% %%" to player's inventory
- # The "on inventory click" event below checks the
- # Random enchant given from the book, and then if the
- # Item is correct, and does not contain any level of
- # The enchant, it applies the enchant to the item
- on inventory click:
- # Set the name and lore variables
- set {_name} to name of cursor item
- set {_lore::*} to lore of cursor item split at "||"
- # Check the books rarity to pull from YML file
- set {_temp::*} to {_lore::3} split at " "
- set {_rarity} to uncolored {_temp::1}
- set {_rarity} to convert {_rarity} to all lowercase
- # Set enchant name variable list and remove roman numerals
- # Used to check if item already contains the enchant
- set {_namepart::*} to name of cursor item split at " "
- set {_namepart::*} to uncolored {_namepart::*}
- remove "I" and "II" and "III" and "IV" and "V" from {_namepart::*}
- # Set the item type allowed
- set {_temp::*} to {_lore::2} split at " "
- set {_allowed} to {_temp::1}
- set {_allowed} to uncolored {_allowed}
- set {_allowed} to convert {_allowed} to all lowercase
- set {_allowed} to {_allowed} parsed as item type
- if name of cursor item is {_name}:
- if clicked item is {_allowed}:
- if lore of clicked item contains {_namepart::*}:
- set action bar of player to "Your Item Already Contains This Enchant!"
- else:
- set {_tempsuc::*} to {_lore::5} split at " "
- set {_tempdes::*} to {_lore::6} split at " "
- set {_success} to {_tempsuc::3} parsed as integer
- set {_destroy} to {_tempdes::3} parsed as integer
- chance of {_success}%:
- set lore of clicked item to "%lore of clicked item%||%{_name}%"
- set cursor item to air
- set clicked item to shiny clicked item
- cancel event
- else:
- set cursor item to air
- set clicked item to air
- set action bar of player to "The Enchant Failed! Gear Destroyed!"
- cancel event
- else if clicked item is not {_allowed}:
- if clicked item is not air:
- set action bar of player to "Not the Correct item to enchant!"
- on damage of player:
- attacker is a player
- # Wrath of Zeus Setup #
- if lore of attacker's held item contains "Wrath of Zeus I":
- chance of 6%:
- strike lightning effect at the victim
- damage the victim by 1 heart
- if lore of attacker's held item contains "Wrath of Zeus II":
- chance of 4.5%:
- strike lightning effect at the victim
- damage the victim by 1.5 heart
- if lore of attacker's held item contains "Wrath of Zeus III":
- chance of 3.5%:
- strike lightning effect at the victim
- damage the victim by 2 heart
- if lore of attacker's held item contains "Wrath of Zeus IV":
- chance of 2.5%:
- strike lightning effect at the victim
- damage the victim by 2.5 heart
- if lore of attacker's held item contains "Wrath of Zeus V":
- chance of 1.5%:
- strike lightning effect at the victim
- damage the victim by 3 heart
- # Cripling Blow Setup #
- if lore of attacker's held item contains "Cripling Blow I":
- chance of 6%:
- apply slowness to victim for 3 seconds
- if lore of attacker's held item contains "Cripling Blow II":
- chance of 4.5%:
- apply slowness to victim for 4 seconds
- if lore of attacker's held item contains "Cripling Blow III":
- chance of 3.5%:
- apply slowness to victim for 5 seconds
- if lore of attacker's held item contains "Cripling Blow IV":
- chance of 2.5%:
- apply slowness to victim for 6 seconds
- if lore of attacker's held item contains "Cripling Blow V":
- chance of 1.5%:
- apply slowness to victim for 7 seconds
- # Roaring Flames Setup #
- if lore of victim's chestplate contains "Roaring Flames I":
- chance of 3%:
- ignite the attacker
- if lore of victim's chestplate contains "Roaring Flames II":
- chance of 5%:
- ignite the attacker
- if lore of victim's chestplate contains "Roaring Flames III":
- chance of 7%:
- ignite the attacker
- if lore of victim's chestplate contains "Roaring Flames IV":
- chance of 9%:
- ignite the attacker
- if lore of victim's chestplate contains "Roaring Flames V":
- chance of 11%:
- ignite the attacker
- # Venomous Strike Setup #
- if lore of attacker's held item contains "Venomous Strike I":
- chance of 4%:
- remove poison from victim
- apply poison 1 to victim for 3 seconds
- if lore of attacker's held item contains "Venomous Strike II":
- chance of 6.5%:
- remove poison from victim
- apply poison 1 to victim for 3 seconds
- if lore of attacker's held item contains "Venomous Strike III":
- chance of 8%:
- remove poison from victim
- apply poison 1 to victim for 3 seconds
- if lore of attacker's held item contains "Venomous Strike IV":
- chance of 10.5%:
- remove poison from victim
- apply poison 1 to victim for 3 seconds
- if lore of attacker's held item contains "Venomous Strike V":
- chance of 12%:
- remove poison from victim
- apply poison 1 to victim for 3 seconds
- # Decimation Setup #
- if lore of attacker's held item contains "Decimation I":
- chance of 4%:
- damage the victim by 2 hearts
- if lore of attacker's held item contains "Decimation II":
- chance of 6.5%:
- damage the victim by 2 hearts
- if lore of attacker's held item contains "Decimation III":
- chance of 8%:
- damage the victim by 2 hearts
- if lore of attacker's held item contains "Decimation IV":
- chance of 10.5%:
- damage the victim by 2 hearts
- if lore of attacker's held item contains "Decimation V":
- chance of 12%:
- damage the victim by 2 hearts
- sharpsk on armor equip:
- # Hells Embrace Setup
- if item is helmet:
- if lore of event-item contains "Hells Embrace I":
- apply fire resistance to the player for 999 days
- # Rejuvenation Setup
- if item is chestplate:
- if lore of event-item contains "Rejuvenation I":
- apply regeneration 1 to the player for 999 days
- apply saturation 1 to the player for 999 days
- if lore of event-item contains "Rejuvenation II":
- apply regeneration 2 to the player for 999 days
- apply saturation 1 to the player for 999 days
- if lore of event-item contains "Rejuvenation III":
- apply regeneration 3 to the player for 999 days
- apply saturation 1 to the player for 999 days
- if lore of event-item contains "Rejuvenation IV":
- apply regeneration 4 to the player for 999 days
- apply saturation 1 to the player for 999 days
- if lore of event-item contains "Rejuvenation V":
- apply regeneration 5 to the player for 999 days
- apply saturation 1 to the player for 999 days
- sharpsk on armor unequip:
- if item is chestplate:
- if lore of event-item contains "Rejuvenation I":
- remove regeneration from the player
- remove saturation from the player
- if lore of event-item contains "Rejuvenation II":
- remove regeneration from the player
- remove saturation from the player
- if lore of event-item contains "Rejuvenation III":
- remove regeneration from the player
- remove saturation from the player
- if lore of event-item contains "Rejuvenation IV":
- remove regeneration from the player
- remove saturation from the player
- if lore of event-item contains "Rejuvenation V":
- remove regeneration from the player
- remove saturation from the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement