isCarried
isCarried: (RunePouch) -> booleanWhether the pouch is in the inventory.
player:magic():runePouch()| Method | Returns | Description |
|---|---|---|
isCarried() | boolean | Whether the pouch is in the inventory. |
contents() | { { rune: Rune, quantity: number } } | What a spell can draw on from the pouch now: empty while no pouch is carried. |
storedContents() | { { rune: Rune, quantity: number } } | The pouch's contents as the game's vars hold them, which stay set while the pouch is banked. To ask what a spell can use, read contents. |
missing({ { rune: Rune, amount: number } }) | { Rune } | Which of runes the pouch does not hold enough of, read as storedContents is. |
fillFromBank({ { rune: Rune, amount: number } }) | (RunStatus, string?) | One step towards a pouch holding runes, with the bank open: open the pouch, empty it when it holds a rune the list does not want or has n… |
| Method | Returns | Description |
|---|---|---|
Magic.runePouch | RunePouch | The rune pouch. |
isCarriedisCarried: (RunePouch) -> booleanWhether the pouch is in the inventory.
contentscontents: (RunePouch) -> { { rune: Rune, quantity: number } }What a spell can draw on from the pouch now: empty while no pouch is carried.
storedContentsstoredContents: (RunePouch) -> { { rune: Rune, quantity: number } }The pouch's contents as the game's vars hold them, which stay set while the pouch is banked. To ask what a spell can use, read contents.
missingmissing: (RunePouch, { { rune: Rune, amount: number } }) -> { Rune }Which of runes the pouch does not hold enough of, read as storedContents is.
runes{ rune, amount }, at least amount of rune.fillFromBankfillFromBank: (RunePouch, { { rune: Rune, amount: number } }) -> (RunStatus, string?)One step towards a pouch holding runes, with the bank open: open the pouch, empty it when it holds a rune the list does not want or has no room for one that it does, withdraw all of each missing rune into it, close it. It leaves the bank open.
local status, reason = player:magic():runePouch():fillFromBank({
{ rune = Rune.LAW, amount = 500 },
{ rune = Rune.WATER, amount = 1000 },
})
if status == "blocked" then log:warn(reason) end
-- "running": a click was queued, call again next tick. "done": it holds them, shut.runes{ rune, amount }, at least amount of rune."done" when the pouch holds them and its bank-side interface is shut, "running" when a click was queued, and "blocked" with the reason when the bank is not open, no pouch is carried, or the bank lacks a rune.