MOBFLAGS
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 MOBILE 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 same zone as the mob.
Random
Description: This script is checked periodically (currently every 13
seconds). The script is not checked if there is no PC in the same
zone as the mob, unless the Global flag is set (see above).
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 real command, in the same room as the
mob 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.
Speech
Description: This script is checked whenever someone says something
around a mob with this script. 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.
Act - &r**This currently does not work***&n
Description: This script is runs when Argument is a substring of a
string of text that a mob sees. The text can come only come from certain
output (those generated by the act() function of the game). This
includes most messages, such as socials, damage messages, and skill
messages. Text from players, such as echo, emote, say, and tell, are
not checked. If you have a specific question whether a message is
checked, ask an implementor. The variables will be set to the right
character or object, even if 'someone' or 'something' is used instead of
the name.
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: Not all the variables will be set. Which ones are set and
to what depends on the message. If you have trouble, ask an implementor.
%actor% is set to the primary character in the text.
%victim% is set to the secondary character in the text.
%object% is set to the primary object of the text.
%target% is set to the secondary object of the text.
%arg% is set to the variable string portion of the text, such as a door
name.
Death
Description: This script is checked when a mobile dies.
NArg: This is the percent chance that the script will be run when
checked.
Return value: If the return value is 0, the mob's death cry (such as
'Your blood freezes as you hear the beastly fido's death cry.') will not
be heard. For any other value, the normal death cry will be heard.
Variables:
%actor% will be set to the killer, if there is one.
Greet
Description: This script is checked when someone enters the room, and
the mob with the script can see the person entering.
NArg: This is the percent chance that the script will be run when
checked.
Variables:
%actor% is set to be the character entering the room.
GreetAll
Description: This script is the same as the Greet script, except that
it is checked even if the mob can not see the actor.
NArg: This is the percent chance that the script will be run when
checked.
Variables:
%actor% is set to be the character entering the room.
Entry
Description: This script is checked every time the mobile enters a room.
NArg: This is the percent chance that the script will be run when
checked.
Receive
Description: This script is checked when an object is given to the mob.
NArg: This is the percent chance that the script will be run when
checked.
Return value: If 0 is returned, the object will not be transfered to the
mob. For any other number, the normal result will occur.
Variables:
%actor% is set to the character giving the mob the object.
%object% is set to the object being given.
Fight
Description: This script is checked every round the mob is fighting,
after all mob has had its attacks.
NArg: This is the percent chance that the script will be run when
checked.
Variables:
%actor% is the character the mob is fighting.
Hitprcnt
Description: This script is checked during combat when the mob's hit
points drop below the percentage specified by NArg.
NArg: This is the percentage of hit points a mob must drop below for the
script to be checked.
Variables:
%actor% is set the the character fighting the mob.
Bribe
Description: This script is checked when coins are given to a mob.
NArg: This is the minimum number of coins that must be given to the mob
for the script to be run.
Variables:
%actor% is set to be the character giving the mob the coins.
%amount% is the number of coins given to the mob.
Oncast
Description: This type of script is checked when someone casts a spell
in the room.
Narg: percent changes the script is to be run.
Return: 1 allows spell to be cast.
0 prevents cast from finishing.
Variables:
%caster% - Person casting spell
%actor% - "" "" ""
%victim% - Victim of spell (if any)
%object% - Object spell is being cast at (if any)
%spellname% - Name of spell being cast
%spellnum% - Idnum of spell being cast
%violent% - 0 or 1, wether or not spell is "violent"
%learned% - Percent the caster has learned the spell
SEE ALSO: VARIABLES