ROOMFLAGS

From AddictHelp
Jump to navigation Jump to search

Flags determine how/when the script is called/triggered. NOTE: All scripts have a %self% variable, that represent that ROOM that the script is assigned to.

 Global
   Description:  This is not a script by itself, but is used with another
     script type.  A script which is Global is checked even if there are 
     no PCs in the zone.
 Random
   Description:  This script is checked periodically (currrently every 13
     seconds, but may be changed).  The script is not checked if there is 
     no PC in the same zone as the room, unless the Global flag is set 
     (see above).
   NArg:  The chance this script will run when it is checked.
 Command
   Description:  This script is checked whenever a character types an
     invalid command, or a command which usually results in a 'Sorry, but 
     you cannot do that here!' message, in the room with this script.  If 
     the command typed is a substring of the argument, the script is 
     called. 
   Argument:  The command name.
   Return value:  If 0 is returned by the script, the character will
     receive the same message as if the script did not exist.
   Variables:
     %actor% is set to the character typing the command.
     %arg% is set to the argument of the command.
     %cmd% is the command that the actor typed.
 Speech
   Description:  This script is checked whenever someone says something in
     the room.  If NArg is 0, the script checks to see if Argument is a
     substring of what was said.  If NArg is 1, the script checks to see 
     if any word in Argument matches a word of what was said to see if the
     script should be called.
   Argument:  The phrase or word list to be matched
   NArg:  If this is 0, Argument is a phrase.  If it is 1, Argument is a 
     word list.
   
Variables:
     %actor% is set to the character speaking.
 Enter
   Description:  This script is checked whenever someone enters the room.
     This script is checked just before the character enters the room, so 
     if you want the action to occur in the room the character is 
     entering, you must use a wait, or teleport the character. (See 
     Script Commands for more information on wait and teleport.)
   NArg:  This is the percent chance that the script will be run when
     checked.
   Return value:  If the return value is 0, the character will not enter 
     the the room.  For any other return value, the character will enter 
     the room normally.
   Variables:
     %actor% is set to the character that entered the room.
 Drop
   Description:  This script is checked with a character attempts to drop
     something in the room.  This script is checked just before the 
     character actually drops the item.
   NArg:  This is the percent chance that the script will be run when it 
     is checked.
   Return value:  If 0 is returned, the item will not be dropped.  
     Otherwise, the item is dropped as normal.
   Variables:
     %actor% is set to the character dropping the item.
     %object% is set to the item being dropped.

See also: VARIABLES