Actions

Simplified Scripting: Difference between revisions

From Iron Realms Nexus Client Documentation

(Created page with " ===== 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. File:action-wait.png...")
 
No edit summary
Line 1: Line 1:
There are several 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.
[[File: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.
[[File:action-notice.png]]


===== Wait =====
===== Wait =====

Revision as of 23:30, 7 February 2016

There are several 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.


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.


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.


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.


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.


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.


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.


Label

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


Goto

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).


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.