id
id: (ItemHandle) -> numberThe item's id.
bank:item(…)
player:equipment():itemIn(…)
bank:search():first()| Method | Returns | Description |
|---|---|---|
id() | number | The item's id. |
quantity() | number | The stack size in this slot. |
slot() | number | Which slot the item occupies. |
name() | string? | The item's name. |
isNoted() | boolean | Whether this is the noted form. Noted items cannot be eaten, drunk or used, which is why food and dose counts exclude them. |
source() | ItemSource | Which container the item came out of. |
hasOption(string) | boolean | Whether interact would find an option: on a carried item its own options and their sub-menus, on a worn item its worn options ("Remove"… |
interact(string | { string }) | boolean | Interact with this exact item. |
| Method | Returns | Description |
|---|---|---|
Bank.item | ItemHandle? | The first bank slot holding an item. |
BoardedBoat.cargo | { ItemHandle }? | The cargo hold's items; nil while the game names no hold. The items are read-only. |
ContainerQuery.collect | { ItemHandle } | Every surviving item, in slot order. |
ContainerQuery.first | ItemHandle? | The first surviving item in slot order. |
Equipment.itemIn | ItemHandle? | What is worn in one slot. |
OwnedBoat.cargo | { ItemHandle } | The cargo hold's items, read-only. Its size is stats().cargoSize. |
idid: (ItemHandle) -> numberThe item's id.
quantityquantity: (ItemHandle) -> numberThe stack size in this slot.
slotslot: (ItemHandle) -> numberWhich slot the item occupies.
namename: (ItemHandle) -> string?The item's name.
nil when the id has no definition.isNotedisNoted: (ItemHandle) -> booleanWhether this is the noted form. Noted items cannot be eaten, drunk or used, which is why food and dose counts exclude them.
sourcesource: (ItemHandle) -> ItemSourceWhich container the item came out of.
hasOptionhasOption: (ItemHandle, string) -> booleanWhether interact would find an option: on a carried item its own options and their sub-menus, on a worn item its worn options ("Remove", "Examine", a jewellery destination). A bank or read-only row answers for the item once carried.
option"Drink".interactinteract: (ItemHandle, string | { string }) -> booleanInteract with this exact item.
options"Eat"), or options to try in order; the first the item exposes wins, counting sub-menu options.false when no listed option resolves. Raises on a row another domain handed out (bank:item, bank:search(), bank:cached(), ...): act through that domain, with bank:withdraw or bank:click.