pouch() -> list<pouchitem>
Every stack in the pouch, in pouch order. Empty while the pouch is closed, which is not the same as an empty pouch - the client clears its own list on close.
for stack in pouch() { print(stack.name) }
13 pouch commands, generated from the engine's own registry — signatures, parameters and a worked example each. A does something command acts on the game; a needs x() one answers a confident wrong answer when its client hooks are missing.
pouch() -> list<pouchitem>
Every stack in the pouch, in pouch order. Empty while the pouch is closed, which is not the same as an empty pouch - the client clears its own list on close.
for stack in pouch() { print(stack.name) }
pouchAmount(id: int) -> intpouchAmount(name: string) -> int
How many of an item are in the pouch, 0 if none.
How many of an item are in the pouch by name, 0 if none.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
| namerequired | string | the item name |
if pouchAmount(151) < 26 { stop }
if pouchAmount("Coal") < 26 { stop }
pouchAvailable() -> bool
Whether the pouch hooks are published. pouchIsOpen() answers a confident false when they are not, which looks exactly like a closed pouch.
if not pouchAvailable() { stop }
pouchContains(id: int) -> boolpouchContains(name: string) -> bool
True when the pouch holds any of this item.
True when the pouch holds any item with this name.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
| namerequired | string | the item name |
if pouchContains(151) { stop }
if pouchContains("Coal") { stop }
pouchCount() -> int
How many distinct stacks are in the pouch. 0 while it is closed.
if pouchCount() == 0 { return 600 }
pouchDeposit(id: int, amount: int) -> boolpouchDeposit(name: string, amount: int) -> bool
Puts carried items into the pouch and waits for the bag to lose them. The item has to be in the bag: the client's deposit reads it out of the inventory slot it is in.
Puts carried items into the pouch by name and waits for the bag to lose them.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
| amountrequired | int | how many to put in |
| namerequired | string | the item name |
if not pouchDeposit(151, 28) { return 1000 }
if not pouchDeposit("Coal", 28) { return 1000 }
pouchDepositAll(id: int) -> bool
Puts every carried one of this item into the pouch and waits.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
pouchDepositAll(151)
pouchExists() -> bool
Whether this client has a pouch at all. False on every server except DragonFire. Ask this once before a script leans on the rest.
if not pouchExists() { stop }
pouchIsOpen() -> bool
True while the pouch window is up. Nothing else here does anything while it is false, and it is a confident false on a server with no pouch.
if not pouchIsOpen() { return 600 }
pouchItem(id: int) -> pouchitem?pouchItem(name: string) -> pouchitem?
The pouched stack of this item, or none.
The pouched stack with this name, or none.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
| namerequired | string | the item name |
let ore = pouchItem(151)
let coal = pouchItem("Coal")
pouchMissing() -> string
Which pouch hooks are unbound, as one line, or an empty string when they all are. Worth printing once rather than guessing why nothing works.
let absent = pouchMissing()
pouchWithdraw(id: int, amount: int) -> boolpouchWithdraw(name: string, amount: int) -> bool
Takes items out of the pouch and waits for them to appear in the bag. The amount is clamped to what the pouch holds, as the client's own withdraw clamps it.
Takes items out of the pouch by name and waits for them to appear in the bag.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
| amountrequired | int | how many to take |
| namerequired | string | the item name |
if not pouchWithdraw(151, 10) { return 1000 }
if not pouchWithdraw("Coal", 10) { return 1000 }
pouchWithdrawAll(id: int) -> bool
Takes every one of this item out of the pouch and waits for them to arrive.
| Parameter | Type | What it does |
|---|---|---|
| idrequired | int | the item id |
pouchWithdrawAll(151)