Open new window
Last update:

OasisOLC and Deaths Gate script reference

Mobile Trigger Types

Global

 - not a trigger type by itself; used in conjunction with Random, Load. While Random triggers only trigger if players are in the zone, Global+Random triggers can trigger regardless.

Argument     : not used.
NArg         : not used.
Return value : none.
Variables    : none.

Trigger example

Random

 - no specific event needs to occur for this trigger to be activated. Every 13 seconds , this trigger has a chance to run. If global is not specified, it will only run if a player is in the room.

Argument     : not used.
NArg         : 0 - 100: the percentage change this trigger
                        will run when its time comes due.
Return value : none.
Variables    : none.

Trigger example

Command

This trigger activates when commands are performed in the same room as the mobile.

Argument     : text which must be part of the command typed 
               to filter out uninteresting commands.
NArg         : not used.
Return value : If 0 is returned by the trigger, character will
               receive the same message as if the trigger did not
               exist, and any other command triggers will be checked.
Variables    : %actor% the character issuing the command
               %cmd%   the exact command (without arguments) issued
               %arg%   the arguments, if any, following the command

Trigger example

Speech

 - activates when matching text is spoken by a character in the same room as the mobile.

Argument     : a phrase or wordlist to be matched.
NArg         : 0: argument is a substring that must be found
                  in the speech to cause a match. 
               1: argument is a list of words, any of which found
                  in the speech will activate the trigger.
Return value : none.
Variables    : %actor%  the character whose speech activated the trigger
               %speech% the entire phrase spoken

Trigger example

Action

 - activated when a matching action is performed by a character in the room. Actions are any text output via the act() function, and include most output from the mud. (Notable exclusions are character say's, and immortal echo's.)

Argument     : a phrase or wordlist to be matched.
NArg         : 0: argument is a substring that must be found
                  in the output to cause a match. 
               1: argument is a list of words, any of which found
                  in the output will activate the trigger.
Return value : none.
Variables : %actor%  the character causing the trigger to activate
            %victim% the character, if any, on the receiving end of the action
            %object% the object, if any, used in the action
            %target% the target of the action, if any
            %arg%    the variable string portion of text

Trigger example

Death 

- may be activated when this mobile dies.

Argument     : not used.
NArg         : percent chance this trigger will be 
               activated upon the mobile's death.
Return value : 0: no death cry will be heard from the mobile.
Variables    : %actor% the character killing this mob, if any

Trigger example

Greet

 - may be activated when a player attempts to enter the room and the character is visible to the mobile with this trigger.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : none.
Variables    : %actor%     the character entering the room
               %direction% the direction the character came from

Trigger example

Greet-all

Identical to greet except the mobile does not have to see the entering character for this trigger to activate.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : none.
Variables    : %actor%     the character entering the room
               %direction% the direction the character came from

Trigger example

Entry

This trigger may activate each time the mobile it is attached to enters a room.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : none.
Variables    : none.

Trigger example

Receive

The trigger may be activated any time an object is given to the mobile.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 0: the object is not transferred to the mobile.
Variables    : %actor%  the character handing the object to the mobile
               %object% the object being handed over

Trigger example

Fight 

The trigger may be activated after each battle round.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : none.
Variables    : %actor% the character this mobile is fighting

Trigger example

Hitprcnt

 - activated during combat when the mobiles hit point percentage drops below a specified percentage.

Argument     : not used.
NArg         : percentage of hitpoints at the threshhold of 
               which this trigger will activate.
Return value : none.
Variables    : %actor% the character this mobile is fighting

Trigger example

Bribe

 - activated when a character gives a specified amount of gold to the mobile.

Argument     : The money type needed to activate the trigger:
               copper, silver, gold or platinum - if no argument
               is given, the Narg is assumed to be gold pieces. 
NArg         : minimum number of coins required  
               to activate this trigger. 
Return value : none. 
Variables    : %actor%  the character providing money to the mobile 
               %moneytype% the type of money given.
               %amount% number of coins given
               %argument% a string containing both amount and moneytype in the
                          following format: "amount type" (ie. "40 platinum")

Trigger example

Load

 - may be activated when this mobile is created. Can be used with the global trigger.

Argument     : not used. 
NArg         : percent chance this trigger will be activated. 
Return value : none. 
Variables    : none.

Trigger example

Memory

 - may be activated when the mobile encounters a character in its memory list and there is no over-riding command. 
NOTE: Any mobile making use of mremember MUST have a memory trigger, even if it will never be called.

Argument     : not used. 
NArg         : percent chance this trigger will be activated.. 
Return value : none. 
Variables    : %actor% the character being remembered.

Trigger example

Cast

 May be triggered if the mob is targetted by a spell.

Argument     : not used. 
NArg         : percent chance this trigger will be activated. 
Return value : 1: Spell will be cast as usual. 
               0: The spell will not be cast. 
Variables    : %actor%     the caster of the spell 
               %spell%     the number of the spell 
               %spellname% the name of the spell

Trigger example

Leave

Much like the Greet trigger, this trigger may fire if someone is leaving the room, the mob is in. The trigger may only fire, if the mob can see the person in question.

Argument     : not used. 
NArg         : percent chance this trigger will be activated. 
Return value : 0 : The move will not take place. 
               1 : The move will happen as ordinary. 
Variables    : %actor%     the character leavering the room. 
               %direction% the direction the character is leaving to.

Trigger example

Door

 - may be activated when the mobile is in the same room as someone using the door specific commands 'close, open, pick, lock, unlock' on a door. 

Argument     : not used. 
NArg         : percent chance this trigger will be activated. 
Return value : 0 : The command will not execute. 
               1 : The command will execute as normal. 
Variables    : %actor%     the character using the command. 
               %direction% the direction the command is used on. 
               %cmd%       the specific command activating the trigger .

Trigger example

Time

 Is run when the mud time equals the numeric Argument. 

Argument     : not used. 
NArg         : 0-23    (24 mud hours) 
Return value : Not used. 
Variables    : %time%      the current mud hour.

Trigger example

© 2005 Thomas Arp (Welcor). All rights reserved.