OLC Quick Reference

From ProphWiki

Jump to: navigation, search

Contents

[edit] Triggers

Trigger Argument What needed to activate trigger
act string act of PC must match string
speech string dialogue (say, tell) to mobile must match string
rand percentage chance to check whenever a PC is in the area
bribe integer minimum amount of coins (counted in silver) given to mobile
give object name/object vnum/all object given to mobile matches argument
greet percentage chance to check if visible character enters mobile's room
grall percentage chance to check when any character enters mobile's room
entry percentage chance to check when mobile moves to a new room
exit exit number a visible character exiting in direction from mobile's room
exall exit number any character exiting in direction from mobile's room
kill percentage chance to check when mobile begins fighting
fight percentage chance to check at fight_pulse if mobile is fighting
hpcnt percentage lower than mobile's hit/max_hi if mobile is fighting
death percentage chance to check after mobile has been slain
surr percentage chance to activate when a character surrenders to mobile

[edit] Variables

Variable Mobile Actor Victim Random Target Object 2nd object
name $i $n $t $r $q $o $p
short desc/title $I $N $T $R $Q $O $P
he/she/it $j $e $E $J $X -- --
him/her/it $l $m $M $L $Y -- --
his/hers/its $k $s $S $K $Z -- --
a/an -- -- -- -- -- -- --

[edit] If checks

If check Argument(s) Meaning
rand number Is random percentage less than or equal to number
mobhere vnum Is a mobile with this vnum in the room
name Is a mobile with this name in the room
objhere vnum Is an object with this vnum in the room
name Is an object with this name in the room
mobexists name Does NPC 'name' exist somewhere in the world
objexists name Does object 'name' exist somewhere in the world
     
people == integer Is the number of people in room equal to integer
players == integer Is the number of PCs in the room equal to integer
mobs == integer Is the number of NPCs in the room equal to integer
clones == integer Is the number of NPCs in the room with the same vnum as the NPC who activated the program equal to integer
order == integer Is the order (of several similar NPCs) of the NPC who activated the trigger equal to integer
hour == integer Is the hour (game time) equal to integer
     
isnpc $* Is $* an NPC
ispc $* Is $* a PC
isgood $* Does $* have a good alignment
isneutral $* Does $* have a neutral alignment
isevil $* Does $* have an evil alignment
isimmort $* Is $* an immortal (level of $* > LEVEL_HERO)
ischarm $* Is $* affected by charm
isfollow $* Is $* a follower with their master in the room
isactive $* Is $*'s position > POS_SLEEPING
isdelay $* Does $* have a delayed MOBprogram pending
isvisible $* Is $* visible to NPC who activated the program
hastarget $* Does $* have a MOBprogram target in the room
istarget $* Is $* the target of NPC who activated the program
isquested $* Is $* quested
     
affected $* affect Is $* affected by affect
act $* act Is $*'s ACT set to act
off $* off Is $*'s OFF set to off
imm $* imm Is $*'s IMM set to imm
carries $* name Is $* carrying object name
wears $* name Is $* wearing object name
has $* type Does $* have object of item_type type
uses $* type Is $* wearing object of item_type type
name $* name Is $*'s name name
pos $* position Is $*'s position position (sleeping etc.)
clan $* name Does $* belong to clan name
race $* name Is $* of race name
class $* name Is $*'s class name
objtype $* type Is $*'s item_type type
     
vnum $* == integer Is $*'s virtual number equal to integer
hpcnt $* == integer Is $*'s hippoint percentage equal to integer
room $* == integer Is vnum of the room $* is in equal to integer
sex $* == integer Is $*'s sex equal to integer
level $* == integer Is $*'s level equal to integer
align $* == integer Is $*'s align equal to integer
money $* == integer Does $* have money (in silver) equal to integer
objval# $* == integer Is $*->value[#] equal to integer (# from 0-4)
grpsize $* == integer Is group size of $* equal to integer

[edit] MOBcommands

MOBcommand Argument(s)      MOBcommand Argument(s)
ASOUND [text_string]   ECHO [text_string]
GECHO [text_string]   ZECHO [text_string]
ECHOAT [victim] [text_string]   ECHOAROUND [victim] [text_string]
MLOAD [vnum]   OLOAD room}
KILL [victim]   FLEE  
REMOVE [victim] [vnum]   JUNK [object]
PURGE [argument]   AT [destination] [command]
GOTO [destination]   TRANSFER [victim] [destination]
GTRANSFER [victim] [destination]   OTRANSFER [object] [destination]
FORCE [victim] [command]   GFORCE [victim] [command]
VFORCE [victim] [command]   CAST [spell] [victim]
DAMAGE [victim] [min] [max] {lethal}   CALL [vnum] [victim] [target1] [target2]
DELAY     CANCEL  
REMEMBER [victim]   FORGET  
Personal tools
general