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

# Combat System

The combat system provides flexible attack automation with multiple modes and intelligent targeting options.

***

## 🎮 Attack Modes

Choose the combat style that matches your character build:

| Mode       | Style                                | Best For               |
| ---------- | ------------------------------------ | ---------------------- |
| **Mode 1** | Normal attack only                   | Basic melee characters |
| **Mode 2** | Skills first, normal attack fallback | Hybrid builds          |
| **Mode 3** | Skills only                          | Full caster builds     |

{% hint style="info" %}
**Mode 2** is recommended for most players as it provides the best balance between skill usage and consistent damage output.
{% endhint %}

***

## 🎯 Target Selection

### Priority System

The bot intelligently selects targets based on:

1. **Configured Priority** — Your preferred order of operations
2. **Distance** — Targets within your configured range
3. **Monster Filter** — Your whitelist/blacklist settings

### Target Mobs

Focus on specific monsters by adding them to your target list.

{% hint style="success" %}
**Pro Tip:** Use the target list to farm specific monsters for cards or materials efficiently.
{% endhint %}

### Monster Database Search

Quickly find and add monsters using the built-in database search:

| Control           | Function                                   |
| ----------------- | ------------------------------------------ |
| **Search Box**    | Type monster ID or name to filter results  |
| **Database List** | Shows matching monsters (up to 50 results) |
| **Add Target**    | Add selected monster to target list        |
| **Add Danger**    | Add selected monster to danger list        |

{% hint style="info" %}
**How to use:**

1. Type a monster ID or name in the search box
2. Select the desired monster from the filtered list
3. Click the appropriate button to add it to targets or danger list
   {% endhint %}

### Danger Mobs

Protect yourself from dangerous monsters:

| Behavior          | Description                         |
| ----------------- | ----------------------------------- |
| **Auto Teleport** | Escape when dangerous mob detected  |
| **Skip Attack**   | Never engage these monsters         |
| **Alert**         | Optional notification when detected |

***

## ⚙️ Combat Settings

### Distance Settings

| Setting             | Description                     |
| ------------------- | ------------------------------- |
| **Attack Distance** | Maximum range to engage targets |
| **Loot Distance**   | Maximum range to pick up items  |

### Loot Configuration

When adding items to your loot filter, the system displays both **Item ID** and **Item Name** for easier identification.

{% hint style="info" %}
This makes it easy to quickly identify items when configuring your loot filters without needing to look up IDs separately.
{% endhint %}

### Timing Settings

| Setting          | Description              |
| ---------------- | ------------------------ |
| **Attack Delay** | Time between attacks     |
| **Skill Delay**  | Cooldown after skill use |

***

## 👥 Player Avoidance

Stay safe by avoiding other players:

| Option       | When to Use                                      |
| ------------ | ------------------------------------------------ |
| **Always**   | Maximum safety — teleport when any player nearby |
| **PK Only**  | Teleport only in PK-enabled situations           |
| **Disabled** | No player avoidance                              |

***

## 🏃 Escape Systems

### Aggro Escape

Automatically escape when overwhelmed by monsters:

| Setting              | Description                      |
| -------------------- | -------------------------------- |
| **Detection Radius** | How close mobs need to be        |
| **Mob Threshold**    | Number of mobs to trigger escape |

### No Mobs Teleport

Automatically move to a new location when your area is empty:

| Setting          | Description                        |
| ---------------- | ---------------------------------- |
| **Timeout**      | Seconds to wait before teleporting |
| **Teleport Key** | Your fly wing or teleport hotkey   |

{% hint style="warning" %}
Make sure you have fly wings or teleport skill available when using auto-teleport features.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xgine.gitbook.io/xgine-docs/core-features/combat.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
