> 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/anti-afk.md).

# Anti-AFK

The human check that stops AFK clicking: what triggers it, the captcha, strikes and bypass.

File: `plugins/ClickEmCore/modules/anti-afk.yml`. Module id: `anti-afk`. Commands: `/verify`, `/captcha`.

This module stops players from leaving an auto-clicker running on the same one or two mobs while away. It does **not** reduce rewards. It asks a person to prove they are there.

### How it detects

Every second it checks each player. A player becomes **suspicious** while they keep hitting mobs (manual, auto or ability hits) **and** all of these hold:

* they stay within `still-radius-blocks` of where they were,
* their aim barely moves (`look-degrees`),
* their kills come from at most `same-spawners` different spawn pads in the last `kill-window-seconds`.

When the suspicious time reaches a **random** limit between `suspicion-minutes-min` and `suspicion-minutes-max` (8 to 12 minutes), the check opens.

A second detector counts perfectly regular clicking: `uniform-click-window` manual clicks in a row with a gap spread of at most `uniform-click-jitter-ms`.

### The check

A 27-slot menu asks the player to click every item of a named type. They have `captcha-seconds` (60, with a boss bar) and `attempts` (3 mistakes). Closing the menu reopens it. Players can reopen it with `/verify`. While pending, **hits and ability casts are blocked**.

Passing gives a **grace period** of `grace-minutes` (15) with no detection.

### Strikes

| Strike     | Default action     |
| ---------- | ------------------ |
| 1          | Teleport to spawn  |
| 2          | Kick               |
| 3 and more | Ban for 60 minutes |

Failing or ignoring the check gives a strike. Strikes fade after `strike-decay-hours` (24).

```yaml
strike-actions:
  - teleport-spawn
  - kick
  - ban:60
```

Actions: `teleport-spawn`, `kick`, `ban:<minutes>`. The **last entry repeats** for further strikes.

### All settings

| Key                            | Default   | Meaning                                                           |
| ------------------------------ | --------- | ----------------------------------------------------------------- |
| `suspicion-minutes-min`, `max` | 8, 12     | Random time of suspicious hitting before a check.                 |
| `same-spawners`                | 2         | Kills from this many pads or fewer are suspicious.                |
| `kill-window-seconds`          | 120       | Window for counting pads.                                         |
| `still-radius-blocks`          | 3.0       | How far counts as standing still.                                 |
| `look-degrees`                 | 6.0       | How little aim change counts as still.                            |
| `engaged-seconds`              | 10        | A player counts as fighting if they hit within this many seconds. |
| `idle-reset-seconds`           | 30        | Not fighting for this long resets the suspicion timer.            |
| `uniform-click-window`         | 100       | Clicks examined for regular spacing. `0` turns this detector off. |
| `uniform-click-jitter-ms`      | 15        | Max gap spread to count as a macro.                               |
| `captcha-seconds`              | 60        | Time to answer.                                                   |
| `attempts`                     | 3         | Mistakes allowed.                                                 |
| `grace-minutes`                | 15        | Free time after passing.                                          |
| `strike-decay-hours`           | 24        | Strikes fade after this.                                          |
| `strike-actions`               | see above | Actions per strike.                                               |

{% hint style="warning" %}
Thresholds are starting values. Watch your first days of play and adjust. The regular-click detector is weak because server click times are tick-aligned, so the main protection is the standing-still detector.
{% endhint %}

### Bypass and staff tools

| Permission                | Effect                          |
| ------------------------- | ------------------------------- |
| `clickem.anti-afk.bypass` | Never receives the human check. |

| Command                                  | Use                              |
| ---------------------------------------- | -------------------------------- |
| `/ceadmin antiafk challenge <player>`    | Send the check now, for testing. |
| `/ceadmin antiafk strikes <player>`      | Show strikes.                    |
| `/ceadmin antiafk resetstrikes <player>` | Clear strikes.                   |

### Related limits

The [auto-attack target cap](/lethium-docs/gameplay/combat-and-rewards.md) and the [killstreak zone gate](/lethium-docs/gameplay/killstreaks.md) also discourage AFK farming. Intentional AFK earning is offered separately in the [AFK pool](/lethium-docs/gameplay/idle-earnings.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://lethium.gitbook.io/lethium-docs/gameplay/anti-afk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
