OBJFLAGS
Flags determine how/when the script is called/triggered. NOTE: All scripts have a %self% variable, that represent that OBJECT that the script is assigned to.
Global
Description: This is not a script by itself, but is to be used with
the random script. A script which is global is checked even if there
are no PCs in the same zone as the object.
Random
Description: This script is checked periodically (currently every 13
seconds)
NArg: The chance this script will be 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, around the object with this
script. If the command typed is a substring of the argument, the
script is called.
Argument: The command name.
NArg: This determines where the item must be for the script to be run.
A 1 means the item must be in the character's equipment for it to be
used. A 2 means the item must be in the character's inventory. A 4
means the item must be in the same room as the character. These can
be added together so the item can be in more than one place. For
example, if NArg was 3, the script would work if the item was in the
character's inventory or equipment. A 7 would mean the script would
work in the character's inventory, equipment, or in the room.
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.
Get
Description: This script is checked whenever the item is picked up.
NArg: This is the percent chance that the script will be run when
checked.
Return value: If 0 is returned, the object is not picked up. For any
other value, the object will go to the character's inventory as normal.
Variables:
%actor% is set to the mob that picks up the object.
Drop
Description: This script is checked when a character attemps to drop
an object with a Drop script.
NArg: This is the percent chance that the script will be run when
checked.
Return value: If 0 is returned, the object is not dropped. For any
other value, the object will go to the room as normal.
Variables:
%actor% is set to the character attempting to drop the item.
Give
Description: This script is checked whenever someone attemps to give
away the object.
NArg: This is the percent chance that the script will be run when
checked.
Return value: If the return value is 0, the object will not be given
to the victim. For any other return value, the give will occur
normally.
Variables:
%actor% is the character giving the object.
%victim% is the character receiving the object.
Wear
Description: This script is checked whenever a mob attemps to wear the
item.
Return value: If 0 is returned, the item is not worn.
Variables:
%actor% is set to the mob that is attempting to wear the object.
SEE ALSO: VARIABLES