/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
MIF

-=mobproc command=-

mif <boolean conditional (see following list of these)>
{
  block of executable mobproc commands
}

This command is used in SPC_MOBPROC mobs.  It is used to test conditional
statements in a mobproc and is the %6%Bmost powerful command available%0
to mobprocs.  The command %6mif%0 is a block structured mobproc command,
meaning a block structure MUST ALWAYS follow an %6mif%0.

The boolean conditionals available %6so far%0 are as follows:

	tarcharset		<- is character target set?
	tarobjset		<- is object target set?
	tarcharroom		<- is character target visible and in this room?
	tarobjroom		<- is object target visible and in this room?
	inroom <vnum> 		<- is THIS mob in a particular room?
	npcinroom <vnum>	<- is mob vnum in this room?
	objinroom <vnum>	<- is obj vnum in this room?
	objinv <vnum>		<- does THIS mob have obj vnum in inventory?
	objeq <vnum>		<- does THIS mob have obj vnum in eq list?
	mfighting		<- is THIS mob fighting?
	tarcharzone		<- is char target visible and in zone?
	tarobjzone		<- is obj target visible and in zone?
	transpresent <vnum>	<- is this TRANSPORT present in this room?
  %B%6NEW%0:
	tarcharlevel (<, >, =) <num>	<- is tarchar's level <, >, or = to #
        tarcharcompquest <qnum> <- has tarchar completed quest #

Examples:

mif tarcharroom
{
  say Hello, +C.
}
...

If mob's %6character target%0 is visible and in this room, say hello to
him/her.

...
mif inroom 1204
{
  say Wow, I'm in the Immortal board room or sumfthing.
}
...

If mob is in room 1204, then say ....

Note: It's usually more appropriate to use %6tarcharroom%0 or %6tarobjroom%0 
      in tests than to use %6tarcharset%0 or %tarobjset%0.  The two tests
      %6tarcharset%0 and %6tarobjset%0 merely return TRUE if the character
      and object targets are %6set%0 respectively.  Using %6tarcharroom%0
      assures you that the %6character target%0 exists AND is visible AND
      is in the current room the mobproc mob is in.

mif tarcharlevel > 60
{
  grovel +C
}

If mob sees a character who is higher than 60th level...

Similar commands: MRANDOM