From Iron Realms Nexus Client Documentation
Revision as of 20:43, 9 February 2016 by Avi
Aliases are shortcuts you can create for more complicated commands in the game. Aliases are commonly used for combat. For example I may create an alias that will send the command 'consecrate ground with holysymbol' by just typing in 'cg'.
Some examples of aliases.
- 1 How to Create a New Alias
- 2 Matching Options
- 3 Action Options Explained
- 4 Expansions
- 5 Examples
How to Create a New Alias
Step 1. Open the settings page and click the 'Reflexes' tab.
Step 2. Click the 'Add' Button and select 'Add an Alias'.
There are several different reflexes you can create. We want to create an alias. In order to do this, click the 'Add' button located in the left pane and then click on 'Add an Alias'. This will create a new, undefined alias.
Step 3. Aliases Options.
There are two main option sections for triggers; Matching and Actions.
Matching is what command you would like to assign to your alias. Usually this is a shorter version of a longer command. For example I may use 'arl' for 'apply restoration to legs'.
Actions are what happens when the command is entered into the game. In the example above, 'apply restoration to legs' would be sent to the game when you type in 'arl'.
Matching is used for creating the command for the alias you are creating. There are five settings.
This field is required and contains the alias text. Anything can be used to create your alias. Typically they are very short and easy to remember. for example I may use the text 'sh' and later create an action that will do 'say hello world!'.
This works hand in hand with the 'Matching Type' option. See below.
Whole Words Only
If checked, the alias will only match whole words.
For example, my alias text is 'sh'
In this case, if I type in 'sha' it will NOT match. However, 'sh a' WILL work.
If I uncheck 'Whole words only', then 'sha' will work.
In almost all cases you will just want to keep 'Whole words only' checked. Remember that whole words are separated by spaces and punctuation is considered part of a word.
If checked, capitalization must match.
For example, if checked, 'sh' is not the same as 'SH'.
(Optional) The name of the alias. The name is an identifier that will show up in your list of reflexes. It is not required for your alias and has nothing to do with the actual operation of the alias.
There are three options for matching text.
- Begins with: Will only match a command that starts with your alias text in it.
- Exact match: Will only match an alias that exactly matches your alias text.
- Regular expression: This will match any 'regular expression' patterns. This is somewhat advanced, but good to learn. See the examples below.
In most cases you will want to use 'Begins with'.
Action Options Explained
Once you have decided on the text for your alias, you can initiate a single action, or a series of multiple actions. Actions will fire in the order they are listed.
Above is a simple example of three separate actions that will happen when an alias is entered into the game.
The Nexus client allows for twelve different simplified scripting actions for use in aliases. In most cases instantly returning a command is the best option. However, the Nexus client will allow you to loop through commands, use if statements, wait commands, highlight text, and much more.
All of these options, with full explanations and examples can be found here: simplified scripting.
Below is an example of a simple alias which opens a door for you if one is in your way, while trying to move south.
The first action chosen is the basic "send a command", which sends the text "south" to the game. This is just like typing south into the command line. Next, we have the "wait for" action, which creates a temporary trigger, waiting for the words "There is a door in your way.". If we get that message, then we send the next action which is, again, "send a command". In this case we send two commands, one to open the door, and another to move south.
Aliases support expansions, which allow you to add on-the-spot modifications to the command you send to the game.
For example, let's say you want to make an alias that picks up an item and puts it into your pack, called pp. To do this, you can simply make an alias with pp as the alias text, and two actions (use Add Action to add the second one), get @suffix and put @suffix in pack. The 'suffix' in this case is anything that comes after the alias in your command.
For both actions, disable the include prefix and suffix option, and you are done. See Put Pack Alias.
The available expansions are:
- @match - the matched text
- @suffix - anything coming after the matched text
- @prefix - anything coming in front of the matched text; this only makes sense for regular expressions
Tip: You can use @line to send the original command along with the aliased commands - this is useful if you want to perform additional actions when sending a particular command, instead of replacing it.
Here is more information about expansions.
- Hello World Alias: A simple example of an alias.
- Basic Targeting Alias: These aliases use variables to target and attack mobiles.
- Put Pack Alias: This alias quickly gets and puts items in packs using the @suffix expansion.
- Disable Group Alias: This is an example alias that will disable an entire group or reflexes.