< REDEMPTION MUD
Home Play News FAQ Forums Links

For Players

For Builders

Community


Vote for Our Mud on TMC!
Reference Sheet for Mob Programming

MOBprogram quick reference to triggers/variables/ifchecks/mobcommands

-----------------------------------------------------------------------------

Area File Format:

-----------------------------------------------------------------------------

#MOBILES
M {trigger} {program vnum} {argument}~
#MOBPROGS
#{program vnum}
{program code}~

-----------------------------------------------------------------------------

trigger x argument xxxxx and what must happen to activate trigger

-----------------------------------------------------------------------------

act STRING to match from act() to mobile
speech xxx STRING to match in dialogue (say, tell) to mobile
rand PERCENT chance to check whenever a PC is in the mobiles zone
bribe INTEGER chance to check whenever a PC is in the mobiles zone
give OBJECT NAME OBJECT VNUM or ALL to match when obj given to mobile
greet PERCENT chance to check if visible char enters mobile's room
grall PERCENT chance to check when any char enters mobile's room
entry PERCENT chance to check when mobile moves to a new room
exit EXIT NUMBER a visible char tries to exit mobile's room
exall EXIT NUMBER any char tries to exit mobile's room
kill PERCENT chance to check when the mobile begins fighting
fight PERCENT chance to check at fight_pulse if mobile is fighting
hpcnt PERCENT lower than mobile's hit/max_hit if mobile is fighting
death PERCENT chance to check after mobile has been slain
surr PERCENT chance to activate when a char surrenders to mobile

----------------------------------------------------------------------------

variable xx mobile actor victim random target object 2nd_object

-----------------------------------------------------------------------------

name xxx xxx xxx xxxx xx xxx
shrt_desc
he/she/it -- --
him/her/it -- --
his/hers/its -- --
a/an -- -- -- -- -- -- --

----------------------------------------------------------------------------

ifcheck xxx argument(s) meaning

-----------------------------------------------------------------------------

rand num Is random percentage less than or equal to num
mobhere vnum xxxxx Is a NPC with this vnum in the room
mobhere name Is a NPC with this name in the room
objhere vnum Is an object with this vnum in the room
objhere name Is an object with this name inthe room
mobexists x 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 the room equal to integer
players == integer Is the number of PCs in the room equal to integer
mobs == integer Is the nubmers 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 teh 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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

affected $* 'affect' Is $* affected by 'affect'
act $* 'act' Is $*'s ACT bit 'act' set
off $* 'off' Is $*'s OFF bit 'off' set
imm $* 'imm' Is $*'s IMM bit 'imm' set
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 hitpoint 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 alignment equal to integer
money $* == integer Does $* have money (in silver) equal to integer
objval# $* == integer Is $*->value[#] equal to integer (# from 0-4)

-----------------------------------------------------------------------------

MOBcommand x argument_list xxxxxxxxxxx MOBcommand xxx argument_list

-----------------------------------------------------------------------------

ASOUND [text_string] ECHO [text_string]
GECHO [text_string] ZECHO [text_string]
MLOAD [vnum] ECHOAROUND [victim] [text_string]
KILL [victim] OLOAD [vnum] [level] (wear|room)
REMOVE [victim] [vnum] MOB JUNK [object]
PURGE [argument] AT [dest] [command]
GOTO [dest] TRANSFER [victim] [dest]
GTRANSFER [victim] [dest] OTRANSFER [object] [dest]
FORCE [victim] [command] GFORCE [victim] [command]
VFORCE [vnum] [command] CAST [spell] [victim]
DAMAGE [victim] [min] [max] (lethal) CANCEL
DELAY FORGET
REMEMBER [victim] FLEE
CALL [vnum] [victim] [target1] [target2]
ECHOAT [victim] [text_string]