Actions

Triggers

From Iron Realms Nexus Client Documentation

Triggers are used to automatically send commands to the game when certain lines of text are received from the game.


How to Create a New Trigger

Triggers are settings that automatically send commands when your character receives specific text from the game. For example, you may want to automatically attack a rat whenever you see one enter the room you are in.

On this page we will demonstrate how to create a new trigger and explain the various settings.

Examples of triggers are linked at the bottom of the page. These examples will help you better understand triggers.

Step 1. Open the settings page and click the 'Reflexes' tab.

Reflexes is a term for all of the settings used to automate the game experience. In order to create a new trigger you must first click on the 'Reflexes' tab as shown in the image below.

Tab-reflexes.png


Step 2. Click the 'Add' Button and select 'Add a Trigger'.

There are several different reflexes you can create. We want to create a trigger. In order to do this, click the 'Add' button located in the left pane and then click on 'Add a Trigger'. This will create a new, undefined trigger.

Trigger-create.png

Step 3. Triggers Options

There are two main sections of a trigger setting; Matching and Actions.

Matching is used to find the text you would like to use for this trigger. When the game sends text to your character that matches, it will automatically send the action defined below it.

Actions what will happen when the trigger matches text from the game. Actions can be used to automatically send text to the game. Highlight text.

Trigger-blank.png

Matching Options

The matching part of a trigger is used to tell them game what text you want to react to.

Trigger-matching.png

There are five options for matching text.

Trigger Text

In this field you put the text you want to match.

Examples:

  • You have recovered balance.
  • You have recovered
  • recovered balance.
  • You have recovered balance.

This works hand in hand with the 'Matching Type' option.

You can match much more complicated text then just text. You can set up triggers to look for text that may not always be the same using regular expressions. This is more complicated and you can check the examples at the bottom of the page for how to do this.

Trigger Name

(Optional) The name of the trigger. The name is an identifier that will show up in your list of triggers. It is not required for your trigger and has nothing to do with the actual operation of the trigger.

Matching Type

There are four options.

  • Contains: This will match any line that has your trigger text in it.
  • Begins with: Will only match a line that starts with your trigger text in it.
  • Exact match: Will only match a line that matches exactly like your trigger text.
  • Regular expression: This will match any regular expression patterns. This is advanced, but good to learn.
Whole Words Only

If this box is checked, the trigger will only check whole words. For example:

With 'Whole words only' checked and Trigger Text set to 'You have recovered bal'.

In this case, if the game sends the text - You have recovered balance. - it will not match, because 'balance.' is a different whole word than 'bal'.

If I uncheck 'Whole words only', then the trigger would work.

In almost all cases you will just want to keep 'Whole words only' turned on.

Case Sensitive

If checked, the capitalization from the game must match what is in the trigger.

For example, if this box is checked then 'You have recovered balance' is not the same as 'You HAVE reCOvered balance'.

However, if you uncheck the this option, the example above will work.

Action Options

Once you have matched text from the game, you will want to send an action back.

Trigger-actions.png


There are eight different action options.

Send a command

This is the most basic and commonly used action. The trigger will automatically send text back to the game.

Action-send.png


Show a notice

The action will just display a notice using whatever colors you choose. Typically players use these to get something to pop out at them so they know it has happened, but they may not want to automatically respond.

Action-notice.png


Wait

The wait action is usually used in conjunction with other actions. In the example below, we wait 3 seconds and then attack the rat.

Action-wait.png


Hide the line

You can also opt to just hide any line that matches you trigger. Sometimes this is good for text that you see over and over again and are tired of reading.

This is also refereed to as a gag or gagging.

Action-hide.png


Highlight

This will highlight the text you have matched. There are more options here to highlight the text around the trigger as well.

Action-highlight.png


Rewrite

A rewrite will change the trigger text into whatever your would like. Players will typically use this to shorten long messages in combat.

Action-rewrite.png


Call function

Functions are used when you may be doing something more complicated and would like to use some javascript to make it happen. You can read more about functions here: Functions.

Action-function.png


Execute Script

Scripts are just like functions, but you write them in the box provided. You can read more about writing scripts and functions here: Functions.

Action-script.png

Examples

Balance Recovery Attack: This is an example of a trigger to automatically attack a target when you recover balance.


Regular Expression Help