Docs · batch

batch

8 batch 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.

batchActive needs batchAvailable() returns bool
batchActive() -> bool

True while the client is working through a batch. There is no is-batching flag in the client - the bar being drawn is the state.

Example
wait until not batchActive() timeout 20000 else { stop }
batchAvailable returns bool
batchAvailable() -> bool

Whether the batch hooks are published. batchActive() answers a confident false when they are not, so a wait for a batch to start never ends.

Example
if not batchAvailable() { stop }
batchCancel does something returns bool
batchCancel() -> bool

Presses Cancel Action and waits for the bar to go. Not a passthrough: the API sends the packet and returns at once. False when no batch was running, or when the bar never came down.

Example
batchCancel()
batchDone returns int
batchDone() -> int

How many the batch has finished so far.

Example
let finished = batchDone()
batchLeft returns int
batchLeft() -> int

How many are left. The number the bar itself draws.

Example
if batchLeft() == 0 { return 300 }
batchPercent returns int
batchPercent() -> int

How far through, 0 to 100. 0 when nothing is running.

Example
if batchPercent() > 90 { return 600 }
batchStalledFor returns int
batchStalledFor() -> int

Milliseconds since the batch last made progress. Climbs while batchActive() is still true, which is what a batch that has run out of materials looks like - waiting on batchActive() alone would sit there for the whole timeout.

Example
if batchActive() and batchStalledFor() > 4000 { batchCancel() }
batchTotal returns int
batchTotal() -> int

How many the batch is doing in total, or 0 when none is running.

Example
let asked = batchTotal()