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

# BotBuffer

Defines NPC bots that sit at fixed map positions and sell buff packages. Each bot has its own class/appearance, name, equipment, cost, and access gates (level, VIP, Gens faction).

## File Location

```
Data/Plugins/Characters/BotBuffer.xml
```

Loaded once at GameServer startup. Supports hot reload via plugin admin command.

## Schema

```xml
<BotBuffer>
    <Bot Index="..." Class="..." Enabled="..." Name="..."
         Map="..." X="..." Y="..." Dir="..."
         ChangeColorName="..."
         Zen="..." PCPoints="..."
         MaxLevel="..." OnlyVip="..."
         ActiveGensFamily="..." ContributionGens="..." GensFamily="...">
        <Equipment>
            <Slot Slot="..." Type="..." Index="..." Level="..." Opt="..." />
        </Equipment>
        <Skills>
            <Skill Skill="..." Time="..." Power="..." />
        </Skills>
    </Bot>
</BotBuffer>
```

## Bot Attributes

| Attribute          | Type                | Effect                                                                                                                                                                                                                                                                                                                                               |
| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Index`            | 0-29                | Slot ID. Max 30 bots per server                                                                                                                                                                                                                                                                                                                      |
| `Class`            | int                 | Character class ID used to render the bot's model and avatar. Accepts any valid class code: 1st class (`0` DW, `16` DK, `32` FE, `48` MG, `64` DL, `80` SU, `96` RF) or 2nd/3rd-class variants (`1` SM, `2` GM, `17` BK, `18` BM, `33` ME, `34` HE, `49` DM, `65` LE, `81` BS, `82` DS). The shipped XML uses `2` (Grand Master) and `34` (High Elf) |
| `Enabled`          | 0 or 1              | `1` spawns the bot on plugin load or reload                                                                                                                                                                                                                                                                                                          |
| `Name`             | string (<=10 chars) | Display name shown to players                                                                                                                                                                                                                                                                                                                        |
| `Map`              | int                 | Spawn map number                                                                                                                                                                                                                                                                                                                                     |
| `X`, `Y`           | int                 | Spawn coordinates                                                                                                                                                                                                                                                                                                                                    |
| `Dir`              | 0-7                 | Facing direction                                                                                                                                                                                                                                                                                                                                     |
| `ChangeColorName`  | int                 | Value written to the bot's PKLevel, used by the client to tint the name. `0` = normal                                                                                                                                                                                                                                                                |
| `Zen`              | int                 | Zen cost per buff session. `0` = free                                                                                                                                                                                                                                                                                                                |
| `PCPoints`         | int                 | PC Point cost per session. `0` = free                                                                                                                                                                                                                                                                                                                |
| `MaxLevel`         | int                 | Maximum player level allowed to use the bot. Defaults to `400` when omitted                                                                                                                                                                                                                                                                          |
| `OnlyVip`          | 0 or 1              | `1` restricts use to accounts with AccountLevel > 0                                                                                                                                                                                                                                                                                                  |
| `ActiveGensFamily` | 0 or 1              | `1` enforces the Gens family and contribution gates below                                                                                                                                                                                                                                                                                            |
| `ContributionGens` | int                 | Minimum Gens contribution points required                                                                                                                                                                                                                                                                                                            |
| `GensFamily`       | 0, 1, or 2          | `0` = accept either family, `1` = Vanert only, `2` = Duprian only                                                                                                                                                                                                                                                                                    |

## Equipment

Visible equipment slots for the bot's character model:

| Slot | Position |
| ---- | -------- |
| `0`  | Weapon   |
| `1`  | Shield   |
| `2`  | Helm     |
| `3`  | Armor    |
| `4`  | Pants    |
| `5`  | Gloves   |
| `6`  | Boots    |
| `7`  | Wings    |
| `8`  | Pet      |

Each `<Slot>` accepts the following attributes. Item identity is resolved from the standard item catalog.

| Attribute | Effect                                                      |
| --------- | ----------------------------------------------------------- |
| `Slot`    | Equipment slot number 0-8 (see table above)                 |
| `Type`    | Item category/type from [Item.xml](/docs/data/item/item.md) |
| `Index`   | Item index within that type                                 |
| `Level`   | Item level, 0-15                                            |
| `Opt`     | Excellent options bitmask. `0` = none                       |

Only these five attributes are read from each `<Slot>`. Luck, Ancient, socket, JOH and other per-item options are not configurable for bots.

## Skills

The buff package each bot applies to players that trade with it. Maximum 5 `<Skill>` entries per bot; extra entries are dropped with a warning.

| Attribute | Effect                                                                                                               |
| --------- | -------------------------------------------------------------------------------------------------------------------- |
| `Skill`   | Buff ID. Only the nine IDs listed below trigger a buff; any other value is ignored silently                          |
| `Time`    | Buff duration in minutes. Converted to ticks internally. `0` applies the buff for no time and it expires immediately |
| `Power`   | Effect power or bonus magnitude passed directly to the effect                                                        |

### Supported buff IDs

| ID    | Buff                        | Class the bot salutes on cast |
| ----- | --------------------------- | ----------------------------- |
| `16`  | Soul Barrier (Mana Shield)  | Dark Wizard                   |
| `27`  | Greater Defense             | Fairy Elf                     |
| `28`  | Greater Damage              | Fairy Elf                     |
| `48`  | Swell Life (Greater Life)   | Dark Knight                   |
| `64`  | Greater Critical Damage     | Dark Lord                     |
| `82`  | Magic Circle                | any                           |
| `129` | Greater Ignore Defense Rate | any                           |
| `130` | Fitness                     | any                           |
| `217` | Damage Reflection           | Summoner                      |

The "class the bot salutes" column only controls a minor cosmetic animation; players of any class receive every buff the bot is configured to cast.

## Cross-File Dependencies

| Attribute                                            | Related in                                                                                                    |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `Class`                                              | Character class code shared with [Character.dat](/docs/gameserver/character-dat.md) and the client avatar set |
| `Skill`                                              | Buff IDs listed above, not a lookup into [Skill.txt](/docs/data/skill.md)                                     |
| Equipment slot contents                              | [Item.xml](/docs/data/item/item.md)                                                                           |
| `ActiveGensFamily`, `ContributionGens`, `GensFamily` | [Common.dat Gens System](/docs/gameserver/common-dat.md#gens-system-settings)                                 |

## Common Issues

* **Bot never appears** - `Enabled="0"`, or the map/coordinates land on an unwalkable tile
* **Players cannot buy buffs** - `Zen` too high, `PCPoints` too high, or `OnlyVip="1"` blocks free accounts
* **Buff ends immediately** - `Time="0"` expires the effect on the next tick
* **Nothing happens on trade even though Skill is set** - `Skill` value is not one of the nine supported IDs
* **Gens gate rejects everyone** - `ActiveGensFamily="1"` but requesting characters have no Gens family or the wrong one
* **Bot over level cap** - `MaxLevel` default is 400; raise it if your server supports higher levels
