Actions

Simplified Scripting: Difference between revisions

From Iron Realms Nexus Client Documentation

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


In the case below we are rewriting the trigger test to ''Balance back''.
In the case below we are rewriting the text in the trigger to display a bright yellow, ''Balance back''.


[[File:action-rewrite.png]]
[[File:action-rewrite.png]]

Revision as of 01:06, 8 February 2016

Simplified Scripting in Nexus allows users to create complex triggers, aliases, and keybinds using a user interface. Previously this could only be accomplished with advanced scripting options.

There are 15 different actions you can use. Hide the line, Highlight and Rewrite cannot be used for aliases and keybinds.


Send a command

This is the most basic and commonly used action. The trigger will automatically send text back to the game. In this example, the action will send attack rat when called.

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. In the example below, the game will display a bright red HIT HIM AGAIN when called.

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.

Wait for

This action is essentially a temporary trigger. It allows you to specify a line or pattern to wait for. Once encountered, the script will continue executing normally. If not encountered within the specified timeout, the script is aborted.


Hide the line (or Gagging)

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

This is also referred to as a gag or gagging.

Highlight

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

Rewrite

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

In the case below we are rewriting the text in the trigger to display a bright yellow, Balance back.

Modify variable

The modify variable action is used to modify a certain variable - you can assign a fixed value to it, modify (increase / decrease / ...) it by some value, assign the value of another variable to it, or modify it by the value of another variable. You can also assign the matched text or a captured part of it.


If

This action allows you to branch the execution of your script based on what is going on - you can specify a condition to check, and actions to perform if the condition is, or is not, true. You can compare two variables, or a variable and a fixed value. You can also compare against the matched text or a captured part of it. When the check succeeds or fails, you can choose whether the script should continue running normally, stop, or continue running from a Label action.


Repeat

This action allows you to repeat a block of actions multiple times. All actions up to a label that you specify will be repeated.


Label

This action does nothing at all. It is used together with the If, Repeat, and Goto actions to do conditional execution and looping.


Jump to Label

This action causes a jump to the label of your choice. It is best used inside an If or Repeat block, so you don't create an endless loop (the client does offer protection against these).


Disable this reflex

This simple action disables the current reflex.


Disable reflex

This action disables a reflex of your choice. The reflex must have a name.


Enable reflex

This action enables a reflex of your choice. The reflex must have a name.