From a11cb29c737be4ba9f65125506c9e38d4ab11652 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 17 Jul 2024 18:07:27 +0100 Subject: [PATCH] EcoScrolls --- docs/ecoscrolls/_category_.json | 4 + docs/ecoscrolls/api.md | 24 ++++ docs/ecoscrolls/commands-and-permissions.md | 20 +++ .../ecoscrolls-effects/_category_.json | 4 + .../conditions/_category_.json | 4 + .../conditions/has_scroll.md | 12 ++ .../effects/_category_.json | 4 + .../effects/inscribe_item.md | 16 +++ .../filters/_category_.json | 4 + .../ecoscrolls-effects/filters/scroll.md | 13 ++ .../triggers/_category_.json | 4 + .../ecoscrolls-effects/triggers/triggers.md | 6 + docs/ecoscrolls/how-to-make-a-scroll.md | 115 ++++++++++++++++++ docs/ecoscrolls/index.md | 14 +++ docs/effects/all-conditions/has_scroll.md | 12 ++ docs/effects/all-effects/inscribe_item.md | 16 +++ docs/effects/all-filters/scroll.md | 13 ++ docs/effects/all-triggers.md | 2 + 18 files changed, 287 insertions(+) create mode 100644 docs/ecoscrolls/_category_.json create mode 100644 docs/ecoscrolls/api.md create mode 100644 docs/ecoscrolls/commands-and-permissions.md create mode 100644 docs/ecoscrolls/ecoscrolls-effects/_category_.json create mode 100644 docs/ecoscrolls/ecoscrolls-effects/conditions/_category_.json create mode 100644 docs/ecoscrolls/ecoscrolls-effects/conditions/has_scroll.md create mode 100644 docs/ecoscrolls/ecoscrolls-effects/effects/_category_.json create mode 100644 docs/ecoscrolls/ecoscrolls-effects/effects/inscribe_item.md create mode 100644 docs/ecoscrolls/ecoscrolls-effects/filters/_category_.json create mode 100644 docs/ecoscrolls/ecoscrolls-effects/filters/scroll.md create mode 100644 docs/ecoscrolls/ecoscrolls-effects/triggers/_category_.json create mode 100644 docs/ecoscrolls/ecoscrolls-effects/triggers/triggers.md create mode 100644 docs/ecoscrolls/how-to-make-a-scroll.md create mode 100644 docs/ecoscrolls/index.md create mode 100644 docs/effects/all-conditions/has_scroll.md create mode 100644 docs/effects/all-effects/inscribe_item.md create mode 100644 docs/effects/all-filters/scroll.md diff --git a/docs/ecoscrolls/_category_.json b/docs/ecoscrolls/_category_.json new file mode 100644 index 0000000000..b7f9c7dcb5 --- /dev/null +++ b/docs/ecoscrolls/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "EcoScrolls", + "position": 20 +} diff --git a/docs/ecoscrolls/api.md b/docs/ecoscrolls/api.md new file mode 100644 index 0000000000..ad6defa649 --- /dev/null +++ b/docs/ecoscrolls/api.md @@ -0,0 +1,24 @@ +--- +title: "API" +sidebar_position: 6 +--- + +## Source Code + +The source code can be found [here](https://github.com/Auxilor/EcoScrolls): + +## API + +Add this to your build.gradle.kts: + +```kts +repositories { + maven("https://repo.auxilor.io/repository/maven-public/") +} + +dependencies { + compileOnly("com.willfp:EcoScrolls:") +} +``` + +The latest version available on the repo can be found [here](https://github.com/Auxilor/EcoScrolls/tags) diff --git a/docs/ecoscrolls/commands-and-permissions.md b/docs/ecoscrolls/commands-and-permissions.md new file mode 100644 index 0000000000..581ed3c74a --- /dev/null +++ b/docs/ecoscrolls/commands-and-permissions.md @@ -0,0 +1,20 @@ +--- +title: "Commands and Permissions" +sidebar_position: 5 +--- + +## `/inscribe` (Open the inscription table) + +Permission: `ecoscrolls.command.inscribe` + +## `/ecoscrolls inscribe (Inscribes held item)` + +Permission: `ecoscrolls.command.inscribedirect` + +General Usage: `/ecoscrolls inscribe [level]` or `/ecoquests inscribe [level]` + +## `/ecoquests give (Gives a scroll)` + +Permission: `ecoscrolls.command.give` + +General Usage: `/ecoscrolls give ` diff --git a/docs/ecoscrolls/ecoscrolls-effects/_category_.json b/docs/ecoscrolls/ecoscrolls-effects/_category_.json new file mode 100644 index 0000000000..86d5fb97cc --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Effects System", + "position": 3 +} \ No newline at end of file diff --git a/docs/ecoscrolls/ecoscrolls-effects/conditions/_category_.json b/docs/ecoscrolls/ecoscrolls-effects/conditions/_category_.json new file mode 100644 index 0000000000..e78d534dce --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/conditions/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Conditions", + "position": 2 +} \ No newline at end of file diff --git a/docs/ecoscrolls/ecoscrolls-effects/conditions/has_scroll.md b/docs/ecoscrolls/ecoscrolls-effects/conditions/has_scroll.md new file mode 100644 index 0000000000..0b3d883ece --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/conditions/has_scroll.md @@ -0,0 +1,12 @@ +# `has_scroll` + +Requires a player to have a certain scroll active + +**Requires EcoScrolls** + +# Example Config +```yaml +- id: has_scroll + args: + scroll: lava_scroll # The scroll +``` diff --git a/docs/ecoscrolls/ecoscrolls-effects/effects/_category_.json b/docs/ecoscrolls/ecoscrolls-effects/effects/_category_.json new file mode 100644 index 0000000000..c732f0daaf --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/effects/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Effects", + "position": 1 +} \ No newline at end of file diff --git a/docs/ecoscrolls/ecoscrolls-effects/effects/inscribe_item.md b/docs/ecoscrolls/ecoscrolls-effects/effects/inscribe_item.md new file mode 100644 index 0000000000..afd51a86cb --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/effects/inscribe_item.md @@ -0,0 +1,16 @@ +# `inscribe_item` + +#### Triggered Effect + +Inscribes an item with a scroll + +**Requires EcoScrolls** + +# Example Config + +```yaml +- id: inscribe_item + args: + scroll: hot_potato_book # The scroll ID + ...other config (eg triggers, filters, mutators, etc) +``` diff --git a/docs/ecoscrolls/ecoscrolls-effects/filters/_category_.json b/docs/ecoscrolls/ecoscrolls-effects/filters/_category_.json new file mode 100644 index 0000000000..76003a8554 --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/filters/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Filters", + "position": 3 +} \ No newline at end of file diff --git a/docs/ecoscrolls/ecoscrolls-effects/filters/scroll.md b/docs/ecoscrolls/ecoscrolls-effects/filters/scroll.md new file mode 100644 index 0000000000..d50fddee55 --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/filters/scroll.md @@ -0,0 +1,13 @@ +# `scroll` + +Require a certain scroll + +**Requires EcoScrolls** + +# Example Config +```yaml +filters: + scroll: + - lava + - ultimate +``` diff --git a/docs/ecoscrolls/ecoscrolls-effects/triggers/_category_.json b/docs/ecoscrolls/ecoscrolls-effects/triggers/_category_.json new file mode 100644 index 0000000000..fd2b027b42 --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/triggers/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Triggers", + "position": 4 +} \ No newline at end of file diff --git a/docs/ecoscrolls/ecoscrolls-effects/triggers/triggers.md b/docs/ecoscrolls/ecoscrolls-effects/triggers/triggers.md new file mode 100644 index 0000000000..0dbc03f648 --- /dev/null +++ b/docs/ecoscrolls/ecoscrolls-effects/triggers/triggers.md @@ -0,0 +1,6 @@ +# EcoQuests Triggers + +| ID | Description | Value Provided | +| -------------- | ---------------------------------------------------------------------- | -------------- | +| `inscribe` | Triggered when inscribing a scroll **Requires EcoScrolls** | 1 | +| `try_inscribe` | Triggered when attempting to inscribe a scroll **Requires EcoScrolls** | 1 | diff --git a/docs/ecoscrolls/how-to-make-a-scroll.md b/docs/ecoscrolls/how-to-make-a-scroll.md new file mode 100644 index 0000000000..60e6a33bf3 --- /dev/null +++ b/docs/ecoscrolls/how-to-make-a-scroll.md @@ -0,0 +1,115 @@ +--- +title: How to make a Scroll +sidebar_position: 1 +--- + +## Default configs +The default configs can be found [here](https://github.com/Auxilor/EcoScrolls/tree/master/eco-core/core-plugin/src/main/resources/scrolls). +You can find additional user-created configs on [lrcdb](https://lrcdb.auxilor.io/). + +## How to add scrolls +Each scroll is its own config file, placed in the `/scrolls/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out! + +The ID of the Scroll is the file name. This is what you use in commands and placeholders. +ID's must be lowercase letters, numbers, and underscores only. + +## Example Scroll Config + +```yaml +# 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: "&6Example Scroll" + +# The max level of the scroll +max-level: 1 + +# The amount of times the scroll can be used +max-uses: 1 + +# Options for the physical scroll item +item: + item: paper glint + + # Name and lore can use %uses%, %max_uses%, and %uses_left% placeholders + name: "&6&lExample Scroll" + 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: [ ] + +# 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 + +# 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: + - scroll: my_requirement_scroll # The scroll to require + level: 2 # The level required (optional) + +# If inscribing this scroll should remove the required scrolls +remove-requirements: false + +# The lore added to items when inscribed with the scroll +lore: + - "" + - "&7This item has been inscribed with" + - "&6Example Scroll" + +# Item placeholders for dynamic lore in plugins like EcoItems +# The placeholder is %ecoscrolls_scroll__%, e.g. +# %ecoscrolls_scoll_example_bonus% +placeholders: + bonus: "%level% * 2" + +# Read https://plugins.auxilor.io/effects/configuring-an-effect +# The effects for the scroll to give +effects: + - id: send_message + args: + message: "&6You have used the Example Scroll!" + triggers: + - alt_click + +# Read https://plugins.auxilor.io/effects/configuring-a-condition +# The conditions for the scroll to work +conditions: [ ] +``` diff --git a/docs/ecoscrolls/index.md b/docs/ecoscrolls/index.md new file mode 100644 index 0000000000..3367fbd96b --- /dev/null +++ b/docs/ecoscrolls/index.md @@ -0,0 +1,14 @@ +--- +title: "EcoScrolls" +--- + +## What is EcoScrolls? + +EcoScrolls is a plugin that adds item modifiers to your server. You can make custom item buffs, repeatable modifiers +(e.g. Hot Potato Books), drag-and-drop upgrades, and more. There's also a new GUI called the Inscription Table that you +can use to add these scrolls if you so desire. + +## Check out our partners! (Click to visit) + +[![GamerSupps](https://i.imgur.com/7mFhlQO.png)](http://gamersupps.gg/discount/Auxilor?afmc=Auxilor) +[![DedicatedMC](https://i.imgur.com/x9aeH38.png)](https://dedimc.promo/Auxilor) \ No newline at end of file diff --git a/docs/effects/all-conditions/has_scroll.md b/docs/effects/all-conditions/has_scroll.md new file mode 100644 index 0000000000..0b3d883ece --- /dev/null +++ b/docs/effects/all-conditions/has_scroll.md @@ -0,0 +1,12 @@ +# `has_scroll` + +Requires a player to have a certain scroll active + +**Requires EcoScrolls** + +# Example Config +```yaml +- id: has_scroll + args: + scroll: lava_scroll # The scroll +``` diff --git a/docs/effects/all-effects/inscribe_item.md b/docs/effects/all-effects/inscribe_item.md new file mode 100644 index 0000000000..afd51a86cb --- /dev/null +++ b/docs/effects/all-effects/inscribe_item.md @@ -0,0 +1,16 @@ +# `inscribe_item` + +#### Triggered Effect + +Inscribes an item with a scroll + +**Requires EcoScrolls** + +# Example Config + +```yaml +- id: inscribe_item + args: + scroll: hot_potato_book # The scroll ID + ...other config (eg triggers, filters, mutators, etc) +``` diff --git a/docs/effects/all-filters/scroll.md b/docs/effects/all-filters/scroll.md new file mode 100644 index 0000000000..d50fddee55 --- /dev/null +++ b/docs/effects/all-filters/scroll.md @@ -0,0 +1,13 @@ +# `scroll` + +Require a certain scroll + +**Requires EcoScrolls** + +# Example Config +```yaml +filters: + scroll: + - lava + - ultimate +``` diff --git a/docs/effects/all-triggers.md b/docs/effects/all-triggers.md index bb16c03ce9..ff3063569f 100644 --- a/docs/effects/all-triggers.md +++ b/docs/effects/all-triggers.md @@ -122,3 +122,5 @@ and are used in plugins like EcoSkills, EcoPets, EcoJobs (etc) for levelling. | `trident_attack` | Triggered on injuring an entity with a thrown trident **Requires Paper** | The damage dealt | | `villager_trade` | Triggered when trading with a villager **Requires Paper** | The experience the villager gains | | `win_raid` | Triggered when a player wins a raid | The level of bad omen | +| `inscribe` | Triggered when inscribing a scroll **Requires EcoScrolls** | 1 | +| `try_inscribe` | Triggered when attempting to inscribe a scroll **Requires EcoScrolls** | 1 |