Skip to content

PurchaseEquipment

Buy equipment in town: each item_ids entry buys one purchase lot (zero time).

Full documentation: PurchaseEquipment. Wire type: purchase_equipment.

Legal session modes: town

JSON Schema

{
  "description": "Buy equipment in town: each `item_ids` entry buys one purchase lot (zero time).\n\nThe party must be in town. The whole basket prices first; if the member cannot\nafford the total, nothing is bought. The shop stocks the shipped equipment\nlists ([`load_equipment`][osrlib.data.load_equipment] \u2014 see [the equipment id\nindex][equipment-index]) and nothing else: an item the adventure bundles is\nnot for sale, however the party came by the id, and rejects as unstocked\nrather than as unknown.\n\nModes:\n    `town`\n\nRejections:\n    - `session.command.wrong_mode` \u2014 the party is not in town.\n    - `session.command.unknown_member` \u2014 `character_id` names no party member.\n    - `session.command.member_incapacitated` \u2014 the member cannot act.\n    - `session.command.unknown_item` \u2014 an entry names no equipment item at all.\n    - `items.purchase.not_stocked` \u2014 an entry names an item the adventure\n      bundles; the shop does not carry it.\n    - `items.purchase.insufficient_funds` \u2014 the purse cannot cover the total.\n\nEvents:\n    [`ItemAcquiredEvent`][osrlib.crawl.events.ItemAcquiredEvent] listing the\n    purchases.",
  "properties": {
    "command_type": {
      "const": "purchase_equipment",
      "default": "purchase_equipment",
      "title": "Command Type",
      "type": "string"
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source"
    },
    "character_id": {
      "title": "Character Id",
      "type": "string"
    },
    "item_ids": {
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "title": "Item Ids",
      "type": "array"
    }
  },
  "required": [
    "character_id",
    "item_ids"
  ],
  "title": "PurchaseEquipment",
  "type": "object"
}