Triggers: Difference between revisions
From Iron Realms Nexus Client Documentation
No edit summary |
|||
Line 30: | Line 30: | ||
[[File:Trigger-create.png]] | [[File:Trigger-create.png]] | ||
=== Step 3: Triggers Options === | |||
== Triggers Options | |||
There are two main sections of a trigger setting; '''Matching''' and '''Actions'''. | There are two main sections of a trigger setting; '''Matching''' and '''Actions'''. | ||
Line 42: | Line 41: | ||
== Matching Options Explained == | |||
Matching is used to find text sent from the game to create an action for. You can match entire lines of text, single words, partial lines, and lines of text with variable words. | Matching is used to find text sent from the game to create an action for. You can match entire lines of text, single words, partial lines, and lines of text with variable words. | ||
Line 50: | Line 49: | ||
There are five options for matching text. | There are five options for matching text. | ||
=== Trigger Text === | |||
This field is required and contains the text to match. | This field is required and contains the text to match. | ||
Line 64: | Line 63: | ||
You can match text that may not always be the same using regular expressions. For example, you may want to match 'Jeremy enters from the north.'. However, maybe the name or the direction is not always going to be the same. This is more complicated and you can review the examples at the bottom of the page for more information. | You can match text that may not always be the same using regular expressions. For example, you may want to match 'Jeremy enters from the north.'. However, maybe the name or the direction is not always going to be the same. This is more complicated and you can review the examples at the bottom of the page for more information. | ||
=== Whole Words Only === | |||
If checked, the trigger will only match whole words. | If checked, the trigger will only match whole words. | ||
Line 78: | Line 77: | ||
In almost all cases you will just want to keep 'Whole words only' turned on and be sure to include the full trigger text. Remember that whole words are separated by spaces and punctuation is considered part of a word. | In almost all cases you will just want to keep 'Whole words only' turned on and be sure to include the full trigger text. Remember that whole words are separated by spaces and punctuation is considered part of a word. | ||
=== Case Sensitive === | |||
If checked, capitalization must match. | If checked, capitalization must match. | ||
Line 86: | Line 85: | ||
If unchecked, the example above will work. | If unchecked, the example above will work. | ||
=== 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. | (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 for matching text. | There are four options for matching text. | ||
Line 102: | Line 101: | ||
== Action Options Explained == | |||
Once you have matched text from the game, you will want to send an action back. | Once you have matched text from the game, you will want to send an action back. | ||
Line 108: | Line 107: | ||
[[File:trigger-actions.png]] | [[File:trigger-actions.png]] | ||
=== Simplified Scripting === | |||
blah blah blah | blah blah blah | ||
=== Advanced Scripting === | |||
There are two main AdvancedScripting options. You can call a function or you can execute a script. Both options allow for the use of javascript. You can learn more and [[Functions]] here. | |||
== Examples == | == Examples == | ||
* [[Balance Recovery Attack]]: This is an example of a trigger to automatically attack a target when you recover balance. | |||
[[Balance Recovery Attack]]: This is an example of a trigger to automatically attack a target when you recover balance. | |||
== Regular Expression Help == | == Regular Expression Help == | ||
* http://www.regular-expressions.info/ | * http://www.regular-expressions.info/ |
Revision as of 23:43, 7 February 2016
Triggers are a very powerful and versatile type of reflexes. Triggers allow you to automatically react when text (and other events) is sent to your character from the game.
A few brief examples of things triggers can do:
- Automatically send commands to the game when certain text is received.
- Hide unimportant lines you don't want to see.
- Highlight lines of text you do not want to accidentally miss.
- Modify portions of the lines received from the game.
- Save data in a variable for later use. Such as how much gold you picked up or the name of a player that hit you.
The basic usage of triggers is similar to that of aliases or keybinds. One thing to be careful of is that by default, triggers can match anywhere in the received text, not only at the beginning (you can change the Matching Type accordingly, if desired).
How to Create a New Trigger
This page we will demonstrate how to create a new trigger and explains 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.
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.
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 you want to stand out, create complicated functions, and other things.
Matching Options Explained
Matching is used to find text sent from the game to create an action for. You can match entire lines of text, single words, partial lines, and lines of text with variable words.
There are five options for matching text.
Trigger Text
This field is required and contains the text 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. See below.
You can match text that may not always be the same using regular expressions. For example, you may want to match 'Jeremy enters from the north.'. However, maybe the name or the direction is not always going to be the same. This is more complicated and you can review the examples at the bottom of the page for more information.
Whole Words Only
If checked, the trigger will only match whole words.
For example:
You create a trigger with matching 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 and be sure to include the full trigger text. Remember that whole words are separated by spaces and punctuation is considered part of a word.
Case Sensitive
If checked, capitalization must match.
For example, if checked, 'You have recovered balance' is not the same as 'You HAVE reCOvered balance'.
If unchecked, the example above will work.
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 for matching text.
- 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.
In most cases you will want to use 'Contains' unless you have more complicated situations.
Action Options Explained
Once you have matched text from the game, you will want to send an action back.
Simplified Scripting
blah blah blah
Advanced Scripting
There are two main AdvancedScripting options. You can call a function or you can execute a script. Both options allow for the use of javascript. You can learn more and Functions here.
Examples
- Balance Recovery Attack: This is an example of a trigger to automatically attack a target when you recover balance.