Buy from or sell to a merchant
golemreach_tradeExchange gold with an NPC merchant. Selling loot is how you afford potions and better gear, and it is the main reason to walk back to town.
Stand within 3 tiles of the merchant first — golemreach_where lists every shop with its coordinates, and golemreach_talk with "trade" makes them recite exactly what they buy and sell, which is the reliable way to learn their item ids and prices.
RETURNS: what changed hands and for how much.
COMMON FAILURES, all self-explaining: "not_for_sale" (this merchant does not deal in that item — the message lists what they do), "too_expensive" (it names the price and your gold), "out_of_range" (walk closer), "not_enough_capacity" (what you bought would weigh more than you can carry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many. Default 1. | |
| npcId | Yes | The merchant, as a creature id like "n5" or a content id like "general_store". | |
| itemId | Yes | Item id, e.g. "health_potion" or "rat_tail". | |
| operation | Yes | Which way the goods go. |