> 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/event/mossmerchant.md).

# MossMerchant

<mark style="color:green;">Configuration for the Moss Merchant NPC, which appears at scheduled times selling weapons with random options. The file contains 3 blocks, each starting with the block number (</mark><mark style="color:green;">`0`</mark> <mark style="color:green;"></mark><mark style="color:green;">to</mark> <mark style="color:green;"></mark><mark style="color:green;">`2`</mark><mark style="color:green;">) on its own line and ending with</mark> <mark style="color:green;"></mark><mark style="color:green;">`end`</mark><mark style="color:green;">.</mark>

### <mark style="color:yellow;">Section 0 — appearance schedule and location</mark>

| Column                                            | Accepted Values                           | Description                                                                            |
| ------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------- |
| Year / Month / Day / DoW / Hour / Minute / Second | Number or `*`                             | Scheduled time for the Moss Merchant to appear. `*` = any value (cron-style schedule). |
| Location                                          | Number matching a `Location` from Block 2 | Which predefined location from Block 2 the NPC appears at for this schedule entry.     |

### <mark style="color:yellow;">Section 1 — weapons sold and option chances</mark>

<table data-search="false"><thead><tr><th>Column</th><th>Accepted Values</th><th>Description</th></tr></thead><tbody><tr><td>Index</td><td>Item number</td><td>The weapon sold by this entry.</td></tr><tr><td>Group</td><td>Number, groups weapons of the same category</td><td>Items within the same <code>Group</code> compete against each other during the random selection (see <code>GambleRate</code>). In the default file, each group contains one weapon category (swords/axes, staffs, bows, scepters, and sticks).</td></tr><tr><td>Option0</td><td>Number (table ID)</td><td>Controls the item's randomly selected enhancement level (+0 to +15) through a probability table defined in another file.</td></tr><tr><td>Option1 / Option2 / Option3</td><td>Number (table ID)</td><td>Control the item's three classic additional options (Luck, Skill, and the additional damage/defense percentage), each through the same probability table.</td></tr><tr><td>Option4</td><td>Number (table ID)</td><td>Controls the chance for the item to have Excellent options.</td></tr><tr><td>Option5</td><td>Number (table ID)</td><td>Controls the chance for the item to have Ancient/Set options.</td></tr><tr><td>Option6</td><td>Number (table ID)</td><td>Controls the chance for the item to have Socket options.</td></tr><tr><td>GambleRate</td><td>Number (weight)</td><td>Selection weight of this item within its <code>Group</code>. The higher its value relative to the other items in the same group, the more likely it is to be selected.</td></tr></tbody></table>

### <mark style="color:yellow;">Section 2 — possible Moss Merchant locations</mark>

| Column      | Accepted Values                 | Description                                     |
| ----------- | ------------------------------- | ----------------------------------------------- |
| Location    | Number identifying the location | Referenced by the `Location` column in Block 0. |
| Map         | Map number                      | Map where the NPC appears.                      |
| MapX / MapY | Coordinates                     | Position where the NPC appears.                 |
| Direction   | Number from 0 to 7              | Direction the NPC faces.                        |

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

* The `Option0` through `Option6` columns do **not** define the item's final options. Instead, they are **IDs that reference probability tables** defined in another file (`ItemOptionRate`). Editing these values without knowing what each table ID represents may produce unexpected item option probabilities.
* `GambleRate` is a relative weight and is compared **only against other items within the same `Group`**. The values do not need to add up to 100, nor do they need to use the same scale across different groups.
