Open new window
Last update:

OasisOLC and Deaths Gate script reference

Object Trigger Types

Global

 - not a trigger type by itself; used in conjunction with Random. 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 object.

Argument     : text which must be part of the command typed 
               to filter out uninteresting commands.
NArg         : a bitfield to indicate where the object must be
               in order to cause the trigger to activate. 
               Bits: 1: in character's worn equipment
                     2: in character's carried inventory
                     4: in same room with the character.
               any of these bits can be set at once by adding the values
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

Timer

This trigger activates when the timer for this object has expired. The otimer command may be used in a script to set the object's timer.

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

Trigger example

Get

 The trigger may be activated if the object is being picked up.

Argument     : Not used.
NArg         : 0 - 100: percentage chance this trigger will activate.
Return value : 0: The character will not pick up the item.
Variables    : %actor%  the character causing the trigger to activate          

Trigger example

Drop 

This trigger may be activated when the object is dropped.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 0: The item will not be dropped.
Variables    : %actor% the character causing the trigger to activate

Trigger example

Give

 - may be activated when a player attempts to give the object away.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 0: The item will not be handed over.
Variables    : %actor%   the character causing the trigger activate
               %victim%  the receiving character

Trigger example

Wear

The trigger may activate when a character tries to wear the object.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 0: the object will not be worn.
Variables    : %actor% the character trying to wear the object.

Trigger example

Remove

The opposite of the wear trigger, this trigger may activate when a character tries to remove the object.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 0: the object will not be removed.
Variables    : %actor% the character trying to remove the object.

Trigger example

Load

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

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

Trigger example

Cast

 May be triggered if the object 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

 If the object is in a room, this trigger may fire when someone tries to leave.

Argument     : not used.
NArg         : percent chance this trigger will be activated.
Return value : 1: The person will be able to leave.
               0: The person will be prevented from leaving.
Variables    : %actor%     the person trying to leave.
               %direction% the direction the person is trying to leave in.

                           This may be "none".

Trigger example

Consume

Is triggered if the object is consumed. This works with either eat, drink or quaff.

Argument     : not used.
NArg         : not used.
Return value : 1: The item will be consumed as usual.
               0: The item will not be consumed.
Variables    : %actor%     the consumer of the item
               %command%   the command used. "eat", "drink" or "quaff"

Trigger example

Time

 Is triggered when the hour of day is the same as the numerical argument.

Argument     : not used
NArg         : Mud hour to activate (0-23).
Return value : not used.
Variables    : %time%      current mud hour

Trigger example

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