Timing actions
Pause, pause unpredictably, wait for a condition, wait for a chat line.
Four ways to make a flow wait. Which one you want depends on what you are waiting for: a duration, a state, or a message.
wait
Pauses for a fixed time.
| Field | Type | Required | Notes |
|---|---|---|---|
ms | integer, 1–600000 | yes | Milliseconds, up to 10 minutes. The editor takes a number plus a unit. |
For a pause that varies each time, use
random_wait.
random_wait
Pauses for a random duration in a range.
| Field | Type | Required | Notes |
|---|---|---|---|
minMs | integer, 1–600000 | yes | Lower bound. |
maxMs | integer, 1–600000 | yes | Upper bound. |
wait_until
Waits for a condition to become true, instead of for a duration.
| Field | Type | Required | Notes |
|---|---|---|---|
cond | condition | yes | Any condition, combinators included. |
timeoutMs | integer, 100–600000 | no | Default 10000. |
pollMs | integer, 50–10000 | no | Default 250. How often to re-test. |
failOnTimeout | boolean | no | Fail the step when the timeout expires instead of continuing. |
With failOnTimeout, a timeout is visible to
try and to
last_action_failed. Without it,
the flow simply carries on, which is right when the wait was opportunistic.
wait_chat
Waits for a chat or whisper line to arrive.
| Field | Type | Required | Notes |
|---|---|---|---|
pattern | string, ≤200 chars | no | Regular expression. Blank matches any line. |
from | array of player names, max 64 | no | Only accept lines from these players. |
timeoutMs | integer, 100–300000 | no | Default 10000. |
failOnTimeout | boolean | no | Off by default, since a timeout is often the expected outcome. |
The speaker lands in {{var:player}} when the server's format provides one, the message in
{{var:message}}, and the pattern's capture groups in {{var:m1}} … {{var:m9}}. As on the
chat trigger, a line with a sender is matched and
stored without the name in front: for <Alice> !home base the pattern sees !home base. A
line with no sender is matched whole.
This is the action that makes "send a command, then read the answer" work. A
chat trigger cannot do it: a trigger has no way
to know which firing belongs to which command.