> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/server/muserver/data/custom/botsystem/botbuffer.md).

# BotBuffer

<mark style="color:green;">Configuration file for "buffer" bots (NPC characters that apply buffs and provide item previews through the trade interface). The file contains four fixed blocks, each identified by its block number on a line by itself and terminated with</mark> <mark style="color:green;"></mark><mark style="color:green;">`end`</mark><mark style="color:green;">.</mark>

### <mark style="color:yellow;">Block 1 — Bot Basic Data and Spawn Settings</mark>

<table data-search="false"><thead><tr><th>Column</th><th>Accepted Values</th><th>Description</th></tr></thead><tbody><tr><td>BotIndex</td><td>Number from <code>0</code> to <code>39</code></td><td>Identifies the bot (up to 40 total).</td></tr><tr><td>Class</td><td>Class/skin number (<code>0</code>-<code>2</code> DW, <code>16</code>-<code>18</code> DK, <code>32</code>-<code>34</code> Elf, <code>48</code>-<code>50</code> MG, <code>64</code>-<code>66</code> DL, <code>80</code>-<code>82</code> SU)</td><td>The bot's appearance/class.</td></tr><tr><td>Enabled</td><td><code>0</code> or <code>1</code></td><td><code>1</code> = this bot exists and spawns on the map. <code>0</code> = does not spawn.</td></tr><tr><td>ColorName</td><td>Number from <code>0</code> to <code>7</code></td><td>Color of the bot's name displayed above its head.</td></tr><tr><td>Zen</td><td>Number</td><td>Amount of Zen charged to the player when trading with the bot.</td></tr><tr><td>PCPoint</td><td>Number</td><td>Amount of Cash Points charged to the player when trading with the bot.</td></tr><tr><td>MaxLvl</td><td>Number</td><td>Maximum player level allowed to trade with this bot.</td></tr><tr><td>Name</td><td>Quoted text, up to 10 characters</td><td>Displayed name of the bot.</td></tr><tr><td>Map</td><td>Number</td><td>Map where the bot is located.</td></tr><tr><td>X / Y</td><td>Number</td><td>Bot position on the map.</td></tr><tr><td>Dir</td><td>Number</td><td>Direction the bot is facing.</td></tr></tbody></table>

### <mark style="color:yellow;">Block 2 — Gens Requirements</mark>

| Column           | Accepted Values                    | Description                                                                                 |
| ---------------- | ---------------------------------- | ------------------------------------------------------------------------------------------- |
| BotIndex         | Number of a bot defined in Block 1 | Specifies which bot this row applies to.                                                    |
| OnlyVip          | `0` or `1`                         | `1` = only VIP players (accounts with `AccountLevel > 0`) may trade with this bot.          |
| ActiveGensFamily | `0` or `1`                         | `1` = enables the Gens faction checks below. `0` = ignores `GensFamily` and `Contribution`. |
| Contribution     | Number                             | Minimum Gens contribution required (only applies when `ActiveGensFamily = 1`).              |
| GensFamily       | `1` (Vanert) or `2` (Duprian)      | Required Gens faction (only applies when `ActiveGensFamily = 1`).                           |

### <mark style="color:yellow;">Block 3 — Bot Equipment (Visual Only)</mark>

| Column       | Accepted Values                                                                                               | Description                                                                    |
| ------------ | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| BotIndex     | Number of a bot defined in Block 1                                                                            | Specifies which bot this row applies to.                                       |
| Slot         | `0` to `8` (`0` Sword, `1` Shield, `2` Helm, `3` Armor, `4` Pants, `5` Gloves, `6` Boots, `7` Wings, `8` Pet) | Equipment slot where the item is displayed on the bot (preview only).          |
| Type / Index | Number / Number                                                                                               | Together they form the item code (same logic as `Sect`/`Type` in other files). |
| Level        | Number                                                                                                        | Enhancement level (`+X`) of the displayed item.                                |
| Opt          | Number                                                                                                        | Additional option value of the displayed item.                                 |

### <mark style="color:yellow;">Block 4 — Buffs Applied When Trading with the Bot</mark>

| Column    | Accepted Values                                                                                                                                                                                                                                 | Description                                                                  |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| BotIndex  | Number of a bot defined in Block 1                                                                                                                                                                                                              | Specifies which bot this row applies to (maximum of 5 buff entries per bot). |
| Skill     | Number corresponding to a fixed effect/skill (`16` Greater Mana Shield, `27` Greater Defense, `28` Greater Damage, `48` Greater Life, `64` Critical Damage, `82` Magic Circle, `129` Greater Ignore Defense Rate, `130` Fitness, `217` Reflect) | The buff applied by this bot.                                                |
| MinusTime | Number (minutes)                                                                                                                                                                                                                                | Duration of the buff.                                                        |
| Power     | Number (%)                                                                                                                                                                                                                                      | Strength/percentage of the buff.                                             |

### <mark style="color:yellow;">Notes</mark>

* Block 4 must always exist in the file (even if empty, containing only `4` followed by `end`) — its mere presence enables the entire bot system. Whether a specific bot actually appears is determined by its `Enabled` value in Block 1, not by a global enable/disable setting.
* The item configured in Block 3 is purely cosmetic (the bot only displays it); it is not actually granted to the player. The player receives only the buff(s) configured in Block 4 in exchange for the Zen/Cash Points specified in Block 1.
* A bot with no entries in Block 2 has no VIP or Gens requirements (any player within the `MaxLvl` limit may trade with it).
