Skip to main content
Flow control turns a list of lines into a sequence and a set of decisions: pause between lines, branch on conditions, loop, and pick random outcomes. Every mechanic here is listed in Skills & Flow; this page shows how to use them.

delay

Pauses the rest of the current skill, then carries on. This is the backbone of telegraphed attacks.
delay and wait are the same mechanic. A bare number is ticks: delay 20. A delay inside a called skill pauses that skill only, not whatever called it. To delay just one line without pausing the ones after it, give that line the delay option instead: damage{a=5;delay=10}. wait{until=…} waits for a condition instead of a time:

skill

Runs another skill. Its lines inherit this line’s targets unless they set their own @.

if

Runs one body when a condition holds, optionally another when it doesn’t.
For a one-line gate, an inline condition is shorter: - skill{s=enrage} +onHurt ?health{h=<50%}. See Line Options.

loop

Runs a body a fixed number of times.

while

Checks a condition on an interval and runs the body while it holds. It checks first, then runs.

Bodies: named effects or inline blocks

A body (then, else, effect) is either a skill id, resolved on the mob first exactly like skill, or an inline block {stmt;stmt;…}:
  • Statements are full lines, a mechanic plus an optional @targeter, separated by ;.
  • Blocks nest: a statement can be another if, loop or while with its own block.
  • A block may span several lines, and continuation lines may start with - . They are joined before YAML reads the file.
Rules for blocks:
  • No triggers inside a block. The trigger belongs to the outer line.
  • No comments inside a multi-line block.
  • A malformed or empty block fails the whole line at load time, and /le debug says where.
  • Prefer a named skill when the body should be reusable. Blocks are for short one-off branches.
skill takes MythicMobs’ inline list instead: skill{s=[ - damage{a=4} - ignite ]}.

switch

Picks a skill by value:

randomskill and randommessage

Behaviour notes

  • A branch or loop body runs with the caller’s context: the same targets (unless its lines set their own) and the same skill. variables, so loop counters made with var{…} work across iterations.
  • A delay inside a looped body pauses that iteration only, not the loop’s schedule.
  • Spaced loop and while stop early if the mob dies or despawns. while’s max is a hard cap against infinite loops.
  • cancelskill stops the rest of the current skill.

The counter pattern