MUDBRINGER
Menu

Trigger Fundamentals (Patterns, Actions, and Groups)

Automation in MudBringer starts with one simple idea: when you see predictable text, you can run predictable actions.

This guide is designed as a practical starting point. You will learn how to:

  1. Detect game text with triggers.
  2. Send commands automatically.
  3. Create aliases for faster typing.
  4. Add button macros for one-click actions.

Core Concepts

Actions

A trigger watches incoming game text. When a pattern matches, MudBringer runs the action(s) you define.

MudBringer intentionally does not allow user-defined regular expressions in this workflow. Uncompiled regex input can become expensive at runtime, especially in busy combat logs.

Instead, MudBringer uses wildcard captures, which are faster to evaluate and easier to read for most players.

  • Match placeholders: %0 to %9
  • Captured values in commands: $0 to $9

Example:

Pattern: You are knocked to the ground.
Action: stand

Wildcard Captures (Regex-Like, Simpler)

Think of %0 as “capture whatever text appears here.” Later in your command list, $0 reuses that captured value.

This keeps the script style familiar for players coming from MudMaster, zMUD, and similar legacy clients.

Command-line example:

/action {%0 stabs you in the back with a dagger!} {cast heal;cast harm $0} {CombatReaction}

What each block means:

  1. {%0 stabs you in the back with a dagger!} : Match incoming text where %0 captures the attacker name.
  2. {cast heal;cast harm $0} : Run commands in order. First cast heal, then cast harm on the captured target.
  3. {CombatReaction} : Group name for organization, filtering, and bulk script management.

Example match result:

Incoming line: Jeremy stabs you in the back with a dagger!
%0 captures: Jeremy
Commands sent: cast heal; cast harm Jeremy

You can build these with command-line syntax, but most users should use the Action Wizard, which provides form fields for pattern, response, and group without typing /action {...} {...} {...} directly.

Action Wizard

Use the Action Wizard when you want the same power without memorizing command syntax.

Typical wizard flow:

  1. Open the Triggers or Actions panel.
  2. Click New Trigger.
  3. Enter match pattern text (with optional %0-%9).
  4. Enter response commands (using $0-$9 where needed).
  5. Set a group name.
  6. Save and enable.

Alias

An alias is a shortcut command you type that expands into a full command or script.

Macro Button

A macro button is a clickable dashboard action that runs one or more commands.

Your First Trigger

Start with an exact-text trigger so you can verify your setup quickly.

  1. Open the Triggers panel.
  2. Click New Trigger.
  3. Name it Auto Stand.
  4. Pattern: enter the exact line from game output.
  5. Action: send stand.
  6. Save and enable the trigger.

If this message appears often in combat, your character should now stand automatically.

Moving from Exact Text to Wildcards

Once exact-text triggers work, replace fixed names with %0 style captures.

Pattern: %0 attacks you!
Action: mark_target $0

Use wildcards when:

  1. The line includes changing names or numbers.
  2. You want one trigger to match many similar messages.

Building a Useful Alias

Create an alias for repetitive commands.

Alias: cf %1
Action: cast 'fireball' $1

Now typing cf goblin becomes cast 'fireball' goblin.

Turning an Alias into a Button Macro

Button macros are perfect for common combat actions.

  1. Open Dashboard edit mode.
  2. Add a new button and label it Burst.
  3. Set action to run one command or a short sequence.

Example sequence:

stand
target $t
cast 'fireball' $t

Keep button macros short and predictable. If one step can fail, add checks or split it into separate buttons.

Troubleshooting Triggers Quickly

If a trigger does not fire, check these first:

  1. Exact spacing and punctuation in the source line.
  2. Whether the trigger is enabled.
  3. Whether another higher-priority trigger consumed the same line.
  4. Whether your %0-%9 placeholders are positioned where variable text actually appears.

Tip: copy one real output line from the terminal and test against that exact text.

Suggested Starter Automation Set

For a solid baseline, create:

  1. Auto Stand trigger.
  2. Low HP warning trigger.
  3. cf %1 damage alias.
  4. One Burst button macro.

This keeps automation useful without becoming difficult to debug.

Next Steps

After this guide, continue with:

  1. /docs/guides/multi-session for cross-session workflows.
  2. /docs/reference/trigger-management for syntax and options.
  3. /docs/reference/scripts-commands--flow for advanced logic.