> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edcrates/features/actions.md).

# Reward Actions

Every reward action, how amounts scale in bulk opens, and per-plugin actions.

An action is `'type:value'`. When a reward comes up N times in one open, its actions run **once** with N attached: currencies multiply, commands get `{amount}` = per-roll amount × N. That is what keeps a 100,000-key open cheap.

```yaml
actions:
  - 'currency:tokens 5000'                     # 5000 per roll, one economy call in total
  - 'keys:rusty 2'                             # 2 Rusty keys per roll
  - 'command:crate give {player} {amount}'     # {amount} already multiplied
  - type: command                              # long form when the command needs a per-roll amount
    amount: 150
    value: 'edperks tickets give {player} {amount}'
    chance: 50                                 # optional: percent chance the action runs at all
```

Placeholders in values: `{player}`, `{uuid}`, `{count}`, `{count_formatted}`, `{amount}`, `{amount_formatted}`, `{amount_compact}`, `{crate}`, `{crate_name}`, `{reward}`, `{reward_name}`, `{rarity}`.

## Built-in actions

| Action                                                 | Effect                                                                                                       |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `command:<cmd>` / `console:<cmd>`                      | Console command, once, with `{amount}` totalled.                                                             |
| `player-command:<cmd>`                                 | Same, run by the player.                                                                                     |
| `command-each:<cmd>`                                   | Once **per roll**, capped by `limits.max-command-repeats`. Last resort.                                      |
| `currency:<id> <amount>`                               | Pays into whichever hooked economy knows `<id>` (PinnaPrison, EdPrison, EdTools, EdDungeons, Vault `money`). |
| `currency-boosted:<id> <amount>`                       | Same, through the plugin's boosters/multipliers where supported.                                             |
| `keys:<crate> <amount>`                                | Virtual keys of another (or the same) crate.                                                                 |
| `item:<amount>`                                        | Hands out the reward's own display item. Capped by `max-items-per-reward`.                                   |
| `give-item:<MATERIAL> <amount>`                        | Plain Minecraft items.                                                                                       |
| `xp:<amount>` / `xp:levels <amount>`                   | Vanilla experience.                                                                                          |
| `message:` / `broadcast:` / `actionbar:` / \`title:Top | Sub\`                                                                                                        |
| `sound:<NAME> <volume> <pitch>`                        | Sound to the opener.                                                                                         |
| `permission:<node>`                                    | LuckPerms permission via console.                                                                            |

## PinnaPrison

| Action                                                                         | Effect                                      |
| ------------------------------------------------------------------------------ | ------------------------------------------- |
| `booster-item:<id> <n>`                                                        | Booster items.                              |
| \`booster: \<currency                                                          | enchants> \`                                |
| `drill:<id> <n>`, `bomb:<id> <n>`, `crystal:<id> <n>`, `ability-item:<id> <n>` | Items.                                      |
| `crystal-random:<min%> <max%> <n>`                                             | Random crystals.                            |
| `enchant:<id> <levels>`                                                        | Pickaxe enchant levels (pickaxe refreshed). |
| `level:<track> <levels>`                                                       | Leveling track levels.                      |
| `crystal-slots:<n>`, `pickaxe-skin:<id>`, `backpack-attachment:<id> <n>`       | Misc.                                       |

## EdPrison 2.0

`currency:<id> <amount>` covers currencies **and** level tracks (`currency:rankup 1`). `edprison-enchant:<id> <levels>` adds pickaxe enchant levels; `edprison-level:<track> <levels>`.

## EdTools (EdGens)

`currency:` pays raw; `currency-boosted:` applies boosters. `edtools-enchant`, `edtools-level`, `edtools-luckyblock:<id> <n>`, `edtools-tool:<id>`, `edtools-backpack-item:<item> <amount>`, `edtools-booster:<id> <currency|enchants> <multiplier> <seconds>`.

## EdDungeons

`currency:souls 100`, `eddungeons-enchant`, `eddungeons-level`, `eddungeons-booster`. Crystals, lucky blocks and abilities have no API there; use `command:` with its console commands.

When several economy plugins are installed, use the explicit prefix to disambiguate: `pinnaprison-currency:`, `edprison-currency:`, `edtools-currency:`, `eddungeons-currency:`.

Unknown action types are skipped and logged once, so a crate file written for PinnaPrison loads fine on an EdPrison server; the reward just does nothing until re-wired.
