Actions

Difference between revisions of "Events"

From Iron Realms Nexus Client Documentation

(Created page with "== Events == Events are actions that allows you to react on certain events happening in the game. The currently defined options include: * '''Block of text received''' - tri...")
 
(Examples)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
== Events ==
+
Events are actions that allows you to react on certain events happening in the game. These same events can be handled with triggers, usually using GMCP. Events just offer a simpler way to create reflexes off of the following events.
  
Events are actions that allows you to react on certain events happening in the game. The currently defined options include:
+
The currently defined options include:
  
* '''Block of text received''' - triggered whenever you receive a block of text from the game
+
* '''Block of text received''' - triggered whenever you receive a block of text from the game.
* '''Affliction received''' - triggered when your character receives an affliction. @match contains its name
+
* '''Affliction received''' - triggered when your character receives an affliction. @match contains its name.
* '''Affliction cured''' - triggered when your character cures an affliction. @match contains its name
+
* '''Affliction cured''' - triggered when your character cures an affliction. @match contains its name.
* '''Defence activated''' - triggered when your character activates a defence. @match contains its name
+
* '''Defence activated''' - triggered when your character activates a defence. @match contains its name.
* '''Defence lost''' - triggered when your character loses a defence. @match contains its name
+
* '''Defence lost''' - triggered when your character loses a defence. @match contains its name.
* '''Player arrived''' - triggered when another player enters your room. Again, @match has the name
+
* '''Player arrived''' - triggered when another player enters your room. Again, @match has the name.
* '''Player left''' - triggered when another player leaves your room. @match has the name
+
* '''Player left''' - triggered when another player leaves your room. @match has the name.
* '''Room changed''' - triggered when you move, @match has the new room ID
+
* '''Room changed''' - triggered when you move, @match has the new room ID.
* '''Target changed'''- - triggered when you change your current target
+
* '''Target changed'''- triggered when you change your current target.
 +
 
 +
== Examples ==
 +
 
 +
Here are a couple of very simple examples of how you can use events.
 +
 
 +
In this first example we are just displaying a simple message if another character enters the room with the name Bob.
 +
 
 +
[[File:event-arrived.png]]
 +
 
 +
 
 +
In this second example, we are creating a simple trigger to sip health should our heath variable ever be be lower than our max health.
 +
 
 +
[[File:event-text.png]]

Latest revision as of 21:31, 19 October 2016

Events are actions that allows you to react on certain events happening in the game. These same events can be handled with triggers, usually using GMCP. Events just offer a simpler way to create reflexes off of the following events.

The currently defined options include:

  • Block of text received - triggered whenever you receive a block of text from the game.
  • Affliction received - triggered when your character receives an affliction. @match contains its name.
  • Affliction cured - triggered when your character cures an affliction. @match contains its name.
  • Defence activated - triggered when your character activates a defence. @match contains its name.
  • Defence lost - triggered when your character loses a defence. @match contains its name.
  • Player arrived - triggered when another player enters your room. Again, @match has the name.
  • Player left - triggered when another player leaves your room. @match has the name.
  • Room changed - triggered when you move, @match has the new room ID.
  • Target changed- triggered when you change your current target.

Examples

Here are a couple of very simple examples of how you can use events.

In this first example we are just displaying a simple message if another character enters the room with the name Bob.

Event-arrived.png


In this second example, we are creating a simple trigger to sip health should our heath variable ever be be lower than our max health.

Event-text.png