A place to plug in your variables and target specific mobs/players/objects is by using IF_checks. If_checks supply certain conditions in which the         MOBprogram will function. E.g.: The MOBprogram commands will only be executed if the target is of good alignment, or is a female.

NOTE: When using if_checks, you must put an 'endif' at the end of the program for each if_check.
It is also considered good practice to use the "if ispc" check unless you specifically need other mobiles to set off the program. There are many                         actions done by mobiles that are logged and this could consume a lot of space over time.


The following is a list of known if_checks, and a brief description:
 

rand(#)

if rand(75)

There is now a 75 percent chance that the MOBprog command(s) will be executed.

isnpc($*)

if isnpc($n)

Is $* an NPC? (mobile), if so the trigger will activate.

ispc($*)

if ispc($n)

Is $* a PC? (player), if so the trigger will activate

isgood($*) if isgood($n)

Does $* have a good alignment? If they are good, the trigger will go off.

isevil($*) if isevil($n)

Does $* have an evil alignment? If they are evil, the trigger will go off

*isneutral($*) if isneutral($n)

Does $* have a neutral alignment? If they are neutral, the trigger will go off.

isimmort($*) if isimmort($n)

Is $* an immortal? This one should be cleared with the Head Builder as it will trigger even if the immortal is wizinvis.

ischarmed($*) if ischarmed($n)

Is $* affected by charm? I'm not sure if this one works properly

isfollow($*) if isfollow($n)

Is $* a follower with their master in the room? I'm not sure if this one works properly.

isaffected($*)                      more

if isaffected($n) aff_sanctuary > 128

Is $* affected by "affect"?

name($*) == [name] if name($n) = Methlok

Does $* equal the [name] of the person who set off the trigger?

position($*) == [integer]     more if position($*) == 7

Is $*'s position equal the value given for the integer?

class($*) == [class #]           more if class($n) == 4

Is $*'s class equal to the number? 

objtype($*) == [integer]        more if objtype($o) == 3

Is $*'s item_type equal to the integer given?

objval#($*) == [integer] if objval0($o) == 3 

Is $*->value[#] equal to the integer? (# from 0-4)

level($*) == [integer] if level($n) == 65
if level($n) <= 65
if level($n) > 65 

Checks to see if the player's level is equal to, is equal to or less than, greater than or equal to 65.

sex($*) == [integer] if sex($*) = 2

 If the char is a female, the trigger will go off 
( 0= neut, 1 = male, 2 = fem )

isroom($*) == [integer] if isroom($n) == 3001

Is the Integer equal to the vnum $* is in?

hitprct($*) == [integer] if hitprct($n) == 50

Is $*'s hitpoint percentage equal to integer?

*psulev($*) == [integer] if psulev($n) == 120

Is $*'s psuedolevel equal to the integer?

isfight($*) if isfight($n)

Is the target in a fight?

*race($*) == [integer] if race($n) == 0

Checks race. Type "rlist" for race number values.  The above example would trigger if the character was human

*clan($*) == [integer] if clan($n) == 0

Uses numbers on "clist". This above example would trigger if the character was not in any clan.

*isvamp($*) == [integer] if isvamp($n) == 1

Is player vamp? (0 = No, 1 = Yes)

NOTE: ($*) can be replaced with any variable.