Action

Description
The action command can be used to set variables or jump to a label when either a regex pattern is matched by comparing it to all incoming text, or if the pattern is an evaluated condition that changes or returns true.

Syntax
action [instant] when action [instant] when eval action remove

Parameters

 * instant
 * defines whether or not to wait for roundtime to finish before executing the command.
 * command
 * statement(s) to be executed. Multiple statements can be combined via semicolon delimiter (default delimiter configured in Genie).
 * pattern
 * regex pattern to evaluate against incoming text. When found, the action's command is executed
 * condition
 * script that is evaluated, either returning true, or when a variable changes state

Examples
action put cast when ^You feel fully prepared action goto castspell when ^You feel fully prepared action put smile $1 when ^(\w+) waves to you. action instant var lastenemy $1 when (\w+) moves to melee weapon range with you.$ action instant put quit when eval $health < 25