Skip to content

Commit

Permalink
EcoScrolls
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jul 17, 2024
1 parent 0b06ff5 commit a11cb29
Show file tree
Hide file tree
Showing 18 changed files with 287 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/ecoscrolls/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "EcoScrolls",
"position": 20
}
24 changes: 24 additions & 0 deletions docs/ecoscrolls/api.md
Original file line number Diff line number Diff line change
@@ -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:<version>")
}
```

The latest version available on the repo can be found [here](https://github.com/Auxilor/EcoScrolls/tags)
20 changes: 20 additions & 0 deletions docs/ecoscrolls/commands-and-permissions.md
Original file line number Diff line number Diff line change
@@ -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 <player> <scroll> [level]` or `/ecoquests inscribe <scroll> [level]`

## `/ecoquests give (Gives a scroll)`

Permission: `ecoscrolls.command.give`

General Usage: `/ecoscrolls give <player> <scroll>`
4 changes: 4 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Effects System",
"position": 3
}
4 changes: 4 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/conditions/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Conditions",
"position": 2
}
12 changes: 12 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/conditions/has_scroll.md
Original file line number Diff line number Diff line change
@@ -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
```
4 changes: 4 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/effects/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Effects",
"position": 1
}
16 changes: 16 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/effects/inscribe_item.md
Original file line number Diff line number Diff line change
@@ -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)
```
4 changes: 4 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/filters/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Filters",
"position": 3
}
13 changes: 13 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/filters/scroll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `scroll`

Require a certain scroll

**Requires EcoScrolls**

# Example Config
```yaml
filters:
scroll:
- lava
- ultimate
```
4 changes: 4 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/triggers/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Triggers",
"position": 4
}
6 changes: 6 additions & 0 deletions docs/ecoscrolls/ecoscrolls-effects/triggers/triggers.md
Original file line number Diff line number Diff line change
@@ -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 |
115 changes: 115 additions & 0 deletions docs/ecoscrolls/how-to-make-a-scroll.md
Original file line number Diff line number Diff line change
@@ -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_<scroll>_<placeholder>%, 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: [ ]
```
14 changes: 14 additions & 0 deletions docs/ecoscrolls/index.md
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 12 additions & 0 deletions docs/effects/all-conditions/has_scroll.md
Original file line number Diff line number Diff line change
@@ -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
```
16 changes: 16 additions & 0 deletions docs/effects/all-effects/inscribe_item.md
Original file line number Diff line number Diff line change
@@ -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)
```
13 changes: 13 additions & 0 deletions docs/effects/all-filters/scroll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `scroll`

Require a certain scroll

**Requires EcoScrolls**

# Example Config
```yaml
filters:
scroll:
- lava
- ultimate
```
2 changes: 2 additions & 0 deletions docs/effects/all-triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

0 comments on commit a11cb29

Please sign in to comment.