Added hot potato book example
This commit is contained in:
@@ -63,7 +63,7 @@ class EcoScrollsPlugin : LibreforgePlugin() {
|
||||
}
|
||||
|
||||
PlaceholderManager.registerPlaceholder(
|
||||
object : DynamicPlaceholder(plugin, Pattern.compile("scroll_([a-z]+)_([a-zA-Z0-9_]+)")) {
|
||||
object : DynamicPlaceholder(plugin, Pattern.compile("scroll_([a-z0-9_]+)_([a-zA-Z0-9_]+)")) {
|
||||
override fun getValue(args: String, context: PlaceholderContext): String? {
|
||||
val matcher = pattern.matcher(args)
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ item:
|
||||
lore:
|
||||
- "&7This is an example scroll."
|
||||
- "&7It does nothing."
|
||||
|
||||
# Options for crafting, read here: https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes
|
||||
craftable: false
|
||||
recipe: [ ]
|
||||
|
||||
@@ -32,6 +34,8 @@ inscription:
|
||||
conditions: [ ]
|
||||
|
||||
# The effects that will be run when the item is inscribed
|
||||
# If your scroll works by modifying the item (e.g. adding enchantments, changing durability),
|
||||
# then put those effects here.
|
||||
effects: [ ]
|
||||
|
||||
# Read https://plugins.auxilor.io/all-plugins/prices
|
||||
@@ -74,7 +78,7 @@ lore:
|
||||
|
||||
# Item placeholders for dynamic lore in plugins like EcoItems
|
||||
# The placeholder is %ecoscrolls_scroll_<scroll>_<placeholder>%, e.g.
|
||||
# %ecoscrolls_scoll_example_bonus%
|
||||
# %ecoscrolls_scroll_example_bonus%
|
||||
placeholders:
|
||||
bonus: "%level% * 2"
|
||||
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
# The ID of the scroll is the name of the .yml file,
|
||||
# for example coins_on_kill.yml has the ID of coins_on_kill
|
||||
# You can place scrolls anywhere in this folder,
|
||||
# including in subfolders if you want to organize your scroll configs
|
||||
# _example.yml is not loaded.
|
||||
|
||||
# The name of the scroll
|
||||
name: "&cHot Potato Book"
|
||||
|
||||
# The max level of the scroll
|
||||
max-level: 10
|
||||
|
||||
# The amount of times the scroll can be used
|
||||
max-uses: 1
|
||||
|
||||
# Options for the physical scroll item
|
||||
item:
|
||||
item: book unbreaking:1 hide_enchants
|
||||
|
||||
# Name and lore can use %uses%, %max_uses%, and %uses_left% placeholders
|
||||
name: "&cHot Potato Book"
|
||||
lore:
|
||||
- "&7When inscribed on armor, grants"
|
||||
- "&f+2 %ecoskills_defense_name% &7and &f+1 %ecoskills_health_name%&7."
|
||||
- ""
|
||||
- "&7When inscribed to weapons, grants"
|
||||
- "&f+2 %ecoskills_strength_name% &7and &f+4 %ecoskills_crit_damage_name%&7."
|
||||
- ""
|
||||
- "&7This can be inscribed up to &a10 &7times"
|
||||
- "&7on an item!"
|
||||
|
||||
# Options for crafting, read here: https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes
|
||||
craftable: false
|
||||
recipe: [ ]
|
||||
|
||||
# Options for inscribing items with the scroll
|
||||
inscription:
|
||||
# The conditions required to inscribe the item
|
||||
# not-met-effects will run if someone tries to inscribe the item without meeting the conditions
|
||||
conditions: [ ]
|
||||
|
||||
# The effects that will be run when the item is inscribed
|
||||
# If your scroll works by modifying the item (e.g. adding enchantments, changing durability),
|
||||
# then put those effects here.
|
||||
effects: [ ]
|
||||
|
||||
# Read https://plugins.auxilor.io/all-plugins/prices
|
||||
# The price to inscribe the item
|
||||
price:
|
||||
value: 100
|
||||
type: coins
|
||||
display: "&e%value% coins"
|
||||
|
||||
# The formula to multiply the price depending on the level.
|
||||
# The %level% placeholder is the *current* level of the scroll
|
||||
price-level-multiplier: "1 + %level% * 0.5"
|
||||
|
||||
# If the scroll can be applied to items via drag-and-drop
|
||||
drag-and-drop: true
|
||||
|
||||
# If the scroll can be applied to items via the inscription table
|
||||
inscription-table: true
|
||||
|
||||
# The items that the scroll can be applied to, see targets.yml
|
||||
targets:
|
||||
- sword
|
||||
- axe
|
||||
- armor
|
||||
|
||||
# The conflicts that the scroll has with other scrolls
|
||||
conflicts: [ ]
|
||||
|
||||
# The scroll(s) that must be applied to the item before this scroll can be applied
|
||||
requirements: [ ]
|
||||
|
||||
# If inscribing this scroll should remove the required scrolls
|
||||
remove-requirements: false
|
||||
|
||||
# The lore added to items when inscribed with the scroll
|
||||
lore: [ ]
|
||||
|
||||
# Item placeholders for dynamic lore in plugins like EcoItems
|
||||
# The placeholder is %ecoscrolls_scroll_<scroll>_<placeholder>%, e.g.
|
||||
# %ecoscrolls_scroll_example_bonus%
|
||||
placeholders:
|
||||
# For EcoItems items, use %ecoscrolls_scroll_hot_potato_book_defense% in lore
|
||||
defense: " &8(&e{^{%level% * 2}}&8)"
|
||||
# Same as above, but for health / strength / crit_damage
|
||||
health: " &8(&e{^{%level%}}&8)"
|
||||
strength: " &8(&e{^{%level% * 2}}&8)"
|
||||
crit_damage: " &8(&e{^{%level% * 4}}&8)"
|
||||
|
||||
# Read https://plugins.auxilor.io/effects/configuring-an-effect
|
||||
# The effects for the scroll to give
|
||||
effects:
|
||||
# Armor effects
|
||||
- id: add_stat
|
||||
args:
|
||||
stat: defense
|
||||
amount: "%level% * 2"
|
||||
conditions:
|
||||
- id: in_slot
|
||||
args:
|
||||
slot: armor
|
||||
- id: add_stat
|
||||
args:
|
||||
stat: health
|
||||
amount: "%level%"
|
||||
conditions:
|
||||
- id: in_slot
|
||||
args:
|
||||
slot: armor
|
||||
|
||||
# Weapon effects
|
||||
- id: add_stat
|
||||
args:
|
||||
stat: strength
|
||||
amount: "%level% * 2"
|
||||
conditions:
|
||||
- id: in_slot
|
||||
args:
|
||||
slot: mainhand
|
||||
- id: add_stat
|
||||
args:
|
||||
stat: crit_damage
|
||||
amount: "%level% * 4"
|
||||
conditions:
|
||||
- id: in_slot
|
||||
args:
|
||||
slot: mainhand
|
||||
|
||||
# Read https://plugins.auxilor.io/effects/configuring-a-condition
|
||||
# The conditions for the scroll to work
|
||||
conditions: [ ]
|
||||
Reference in New Issue
Block a user