> ## Documentation Index
> Fetch the complete documentation index at: https://mania.bot/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Routines

> How MANIA trains for you

Routines are sequences of points with commands that MANIA follows to automate gameplay.

<Tip>
  Routines sync to the cloud automatically. Access from any device.
</Tip>

## Points

Points tell MANIA where to go. Your character needs to show as a **green circle** on the minimap before you can add points. If it doesn't, see [Capture](/docs/capture). Move to a spot in-game and press the **Start/Stop** keybind to place a point.

<Note>
  **Hotkeys not working?** Right-click MANIA → **Run as administrator**.
</Note>

| Setting     | Description                                                                 |
| ----------- | --------------------------------------------------------------------------- |
| Position    | X,Y coordinates on the minimap                                              |
| Radius      | Detection radius in pixels. Larger values allow more positioning tolerance. |
| Probability | Chance this point is executed (0-100%)                                      |

Each point has settings you can customize. Right-click to adjust position, radius, or probability, or drag points directly on the minimap. Most maps work well with **5-8 points** per routine.

## Commands

Commands execute when the bot reaches a point. Each command has parameters that control its behavior. Hover over any command or parameter in MANIA to see what it does.

<Tabs>
  <Tab title="EnterPortal">
    Set this command in the middle of the portal for highest reliability.

    | Parameter | What it controls                                                                         |
    | --------- | ---------------------------------------------------------------------------------------- |
    | Duration  | Timeout for entering the portal in ms. Increase if entry is unreliable. Default 2000 ms. |
  </Tab>

  <Tab title="Skill">
    Casts a specific skill when the bot reaches a point.

    | Parameter     | What it controls                                                                                    |
    | ------------- | --------------------------------------------------------------------------------------------------- |
    | Direction     | Face left, right, up, or down before casting.                                                       |
    | Hold          | Hold duration in ms. Set to 0 to tap.                                                               |
    | Repetitions   | Number of casts. Tap mode only.                                                                     |
    | Jumps         | Jump this many times before casting.                                                                |
    | Place         | Use the `PLACE` keybind after pressing the skill.                                                   |
    | Aim           | Direction to hold while casting (place mode).                                                       |
    | Aim Hold      | How long to hold the aim direction in ms (place mode).                                              |
    | Wait Cooldown | When off, skips the cast if on cooldown. When on, pauses until the cooldown expires before casting. |
    | Wait Grounded | Wait until the character lands before casting.                                                      |

    <Note>
      Hold, Repetitions, Jumps, and Place are mutually exclusive modes. Only one can be active at a time.
    </Note>
  </Tab>

  <Tab title="Combo Key">
    Presses two skills near-simultaneously. For skills that need a modifier key input, like Mercedes combos.

    | Parameter    | What it controls                                                                                         |
    | ------------ | -------------------------------------------------------------------------------------------------------- |
    | Direction    | Face a direction before casting.                                                                         |
    | First Skill  | The first skill to press.                                                                                |
    | Second Skill | The second skill, pressed 100 ms after the first.                                                        |
    | Hold         | Hold duration for both skills. Set to 0 to use each skill's Cast Time from [Keybinds](/docs/keybinds#skills). |
  </Tab>

  <Tab title="RandomAttack">
    Spreads a set number of attacks across a duration at a single point.

    | Parameter        | What it controls                                                                                         |
    | ---------------- | -------------------------------------------------------------------------------------------------------- |
    | Direction        | Initial facing direction (left or right).                                                                |
    | Switch After     | Switches direction after approximately this many attacks.                                                |
    | Min/Max Attacks  | Number of skill presses spread across the duration.                                                      |
    | Min/Max Hold     | Hold time per individual press. Set to 0 to use the skill's Cast Time from [Keybinds](/docs/keybinds#skills). |
    | Min/Max Duration | Total time spent attacking at the point.                                                                 |
  </Tab>
</Tabs>

## Move Attack vs Skill Commands vs RandomAttack

MANIA gives you three ways to attack while running a routine:

| Method                               | What it does                                                                                         |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| [Move Attack](/docs/keybinds#move-attack) | Fires a random skill after each jump between points. Weights set per-skill in Keybinds.              |
| Skill commands                       | Added to a specific point in the Routine Editor. Casts that skill when the bot arrives.              |
| RandomAttack                         | Stands in place at a point and attacks for a set duration, cycling through multiple skills randomly. |

Use **Move Attack** for general attack-while-moving coverage. Use **skill commands** for pinpoint casts like summons or portal entry. Use **RandomAttack** for stationary attack phases.

## Loops

Loops keep MANIA on a section of points for a set duration. Click **Set Loop** to pick which points to repeat. Your routine already loops as a whole, so only loop specific sections when you need them.

Duration is measured in **time**, not iterations — set it to the amount of time you want and MANIA handles the rest. Make your routine loop slightly longer than your longest cooldown so skills are naturally ready each time the bot returns.

## Putting It Together

<Steps>
  <Step title="Place your summons">
    Create a point for each summon and add the summon as a command.
  </Step>

  <Step title="Attack until summons expire">
    **Lazy farm:** Hold a skill at a spot with **Add Command → Skill → Hold**, or cycle between different skills with **Add Command → RandomAttack**.

    **Active farm:** Set two points in a **Loop** and let MANIA [move attack](/docs/keybinds#move-attack) between them.
  </Step>

  <Step title="Add variance">
    Add points with probability (**Empty**, **Skill**, or **RandomAttack**) to mix things up.
  </Step>
</Steps>

## Routine Mode

**Settings → General → Routine Mode** controls which routine runs when you have multiple routines on the same map.

| Mode   | Behavior                                                |
| ------ | ------------------------------------------------------- |
| Fixed  | Runs one selected routine on repeat.                    |
| Cycle  | Runs all routines top to bottom in order, then repeats. |
| Random | Picks a random routine each loop.                       |

Right-click a routine → **Duplicate** to copy it. Create two or three variations of the same route and use **Cycle** or **Random** to vary your movement patterns. See [Adding Variance](/docs/best-practices#adding-variance) for more.

## Tips and Tricks

* Prevent falling between platforms by setting a point just in front of the gap. MANIA won't use **Flash Jump** or **Teleport** if it's close to its destination.
