> For the complete documentation index, see [llms.txt](https://lethium.gitbook.io/lethium-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lethium.gitbook.io/lethium-docs/gameplay/idle-earnings.md).

# Idle earnings and the AFK pool

Offline earnings and the AFK pool, where players earn Coins and keys while standing still.

File: `plugins/ClickEmCore/modules/idle-earnings.yml`. Module id: `idle-earnings`. Teleport: `/afk`.

This module has two separate parts.

### 1. The AFK pool (`region-earnings`)

Players who stand in a designated region, such as the `afk` WorldGuard region, earn a steady trickle of Coins and crate keys **without killing anything**. There is **no interest on their balance**: it pays a fixed amount, nothing more.

```yaml
region-earnings:
  enabled: true
  interval-seconds: 30
  coins-per-minute: 20
  max-per-minute: 0
  grace-seconds: 3
  countdown-title: true
  regions:
    - afk
  blocks-to-be-in-to-count:
    - WATER
  timed-rewards:
    - every-minutes: 20
      commands:
        - "crates key give <player> afk 1"
```

| Key                        | Meaning                                                                                                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled`                  | Master switch.                                                                                                                        |
| `interval-seconds`         | How often a payout is given.                                                                                                          |
| `coins-per-minute`         | Units of Coins per minute, **scaled by the player's progress** (see [Reward scaling](/lethium-docs/configuration/reward-scaling.md)). |
| `max-per-minute`           | Cap, `0` = no cap.                                                                                                                    |
| `grace-seconds`            | How long a player may leave the region before their timer resets.                                                                     |
| `countdown-title`          | Show a title counting down to the next payout.                                                                                        |
| `regions`                  | WorldGuard region ids that count. The default is `afk`, so each world needs a region with that id around its AFK spot.                |
| `blocks-to-be-in-to-count` | The player must be standing in one of these block types (for example `WATER`), so it cannot be earned by just standing on the edge.   |
| `timed-rewards`            | `every-minutes` plus console `commands` (`<player>` replaced). The default gives an `afk` crate key every 20 minutes.                 |

VIP `gems-per-minute` is **paused while in the AFK pool**.

`/afk` teleports to the AFK spot of the player's current world (see [Navigation](/lethium-docs/gameplay/navigation.md)).

### 2. Offline earnings

Off by default (`offline-earnings-enabled: false`). When on, players earn a reduced rate while **logged out**, paid when they return.

| Key                        | Default        | Meaning                                                                                                                   |
| -------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `enabled`                  | true           | Master switch for the module.                                                                                             |
| `offline-earnings-enabled` | false          | Turn on offline income.                                                                                                   |
| `percent-of-active-rate`   | 25             | Percent of the active rate earned.                                                                                        |
| `base-currency-per-second` | 1.0            | Coins per second a fully active player earns. Keep it close to what mobs pay (average Coins per kill x kills per second). |
| `max-offline-hours`        | 16             | Earnings stop building after this many hours.                                                                             |
| `min-absence-seconds`      | 60             | Shorter absences pay nothing.                                                                                             |
| `rebirth-scaling.*`        | 1.0, 0.5, 0.02 | Bonuses per rebirth: +% active rate, +hours, and +0.02 to the final multiplier. All 0 turns it off.                       |

VIP ranks add `idle-percent-bonus`, `idle-max-hours-bonus` and `idle-multiplier-bonus` (see [VIP Perks](/lethium-docs/gameplay/vip-perks.md)).

### Staff commands

`/ceadmin idleearnings simulate <player> <hours>`, `reset <player>`.

### Placeholders

`%clickem_idle_active%`, `%clickem_idle_payout%`, `%clickem_idle_per_hour%`, `%clickem_idle_next_payout_seconds%`, `%clickem_idle_next_reward%` and their `_formatted` variants. See [Progress placeholders](/lethium-docs/placeholders/progress.md).
