Getting Started


      First: Create the mob program.

      This is done exactly the way you would create a mob, object, room, etc. The mob program editor is MPEDIT. Each Mob Program needs a vnum, just like every mob, obj, etc. So, the syntax for creating a mob program (we'll say it's in your area vnums 15000-15099) would be:
      MPEDIT CREATE 15000

        For MUDs which do not have the mpedit shortcut, you would use the command : create mp 15000 - and use : edit mp 15000 - to enter the mob prog editor.

      Once you've done that, you are already in the mpeditor, editing this vnum. To write out the code for the mob program, simply type:
      CODE

      Now you're in a text editor just like the desc editor in REDIT/MEDIT/OEDIT. Each line of the mob program has to have its own line in the editor. (Note: this is EXACTLY like your other editors. So don't respond to tells, etc. unless you want it in your mob program.) When you're finished with the code, a @ will get you out of the editor.


      And now... on to the actual programs.
      There are different types of Mob Programs. The first thing you need to do, is figure out what you want your Mob to do, and decide what type of a program will be best suited to that.
      These are the individual Mob Program TYPES:

      GREET
      GREETALL
      SPEECH
      DEATH
      BRIBE
      ACT
      RANDOM
      GIVE
      HPCNT
      ENTRY
      EXIT


      Commands/Statements

      IF/ENDIF/ELSE These are not necessary, but when used it IS necessary to use them correctly. ELSE always goes on its own line, as well as ENDIF. Each IF statement must be on its own line. The syntax for IF varies slightly. The commands you can use with IF are: align, ispc, isfollow, isnpc, inroom. Variables for those are: <, >, =, !, good, neutral, (room vnum).
      The most important statements in ANY mob program are the IF, ELSE, ENDIF statements. Every different command needs an IF and an ENDIF! If you want to have two different options, then you need an ELSE. For example:
      Let's say you want your mob to say hello to all player characters (PCs) that enter the room. You would use this:
      IF $n ispc
      say hello
      ENDIF
      In that example, please note that there is an ENDIF for the IF statement, even though there is only ONE IF. If you wanted the mob to say hello to ONLY PC's under level 15 and laugh at everyone over 15, except for immortals - who they would of course bow to, you would use something like this:
      IF level $n < 15
      say hello
      ELSE
      laugh $n
      ELSE
      if isimmort $n
      bow $n
      ENDIF
      ENDIF
      ENDIF
      Again, please note that EVERY IF statement has an ENDIF at the end.


      Commands For Mobs


      MOB PURGE: This tells the mobile to purge an object either in its inventory, or in the room or another mob(NPC) in the room. The syntax would be: MOB PURGE [variable] This command CAN be used to make the mobile purge itself (MOB PURGE $i) so long as that is the LAST line in the code. Rather useful for level-based give/speech programs. (i.e. if the player is too high of a level, the mob will laugh at them and purge itself.)

      MOB JUNK: This command is something like the PURGE command, only it does not print any sort of message, and the item must be in its inventory. Very nice for janitor mobs. If the inventory is full, that could trigger the mob to: JUNK all.bread for instance.

      MOB ECHO(PECHO ZECHO GECHO): Just like you would think. It will allow a global/zone/personal or room echo. Which is very nice if the mob is transferring the character somewhere. Without an echo of some sort, both the player and anyone in the room with them will have no idea they've been transferred. Syntax is: MOB ECHO Woah! Where'd he go?

      MOB KILL: This is the command to make a usually peaceful mob attack a player. It can be used in syntax with just about any "if" statement as well as a random, speech, give, act and bribe. Syntax is: MOB KILL (variable)

      MOB GOTO/AT/TRANSFER: These give the mobile the obvious immortal commands. Transfer is one of the few which are worthwhile - except for to annoy. For example, on trigger: MOB AT Jarreth tease jarreth would be a nice one. *grins*

      MOB FORCE: This one is rather fun when used alongside a HPCNT program. When the mob is at 100%, it may force the player to do one social. When it reaches 50%, it could make the player gossip that he/she is a bully. Syntax is: MOB FORCE (variable) (variable) [If you wanted to force a player to say "I'm a bully" it would be: MOB FORCE $n say I'm a bully]


      Variables

      (Please note: You won't have a need to use most of these. They're only here for reference.)

      $i The mobs name (healer, smaug, etc. If the mob has 5 or 6 names listed in the MPEDIT - it will be the first of these)
      $I The short description of the mobile itself.
      $n The name of whomever caused the trigger to happen (pc or npc)
      $N The name and title of whomever caused the trigger to happen.
      $t The name of a secondary character target (i.e. A smiles at B)
      $T the short description, or name and title of target (will vary as to whether it's the name/desc/name&title based on whether $T is a PC or NPC)
      $r The name of a random char in the room with the mobile (never itself)
      $R The short description, or name and title of the random char
      $j He,she,it based on sex of the mob.
      $e He,she,it based on sex of the pc/npc targeted.
      $E He,she,it based on sex of $t.
      $J He,she,it based on sex of $r.
      $k Him,her,it based on sex of the mob.
      $m Him,her,it based on sex of the pc/npc targeted.
      $M Him,her,it based on sex of $t.
      $K Him,her,it based on sex of $r.
      $l His,hers,its based on sex of the mob.
      $s His,hers,its based on sex of the pc/npc targeted.
      $S His,hers,its based on sex of $t.
      $L His,hers,its based on sex of $r.
      $o The first of the names of the primary object (i.e. A drops B)
      $O The short description of the primary object
      $p The first of the names of the secondary object (i.e. A puts B in C)
      $P The short description of the secondary object
      $a A,an based on first character of $o
      $A A,an based on first character of $p


      Act Greet Bribe Death
      Entry Exit Give HPCNT
      Random Speech
      Player Information
      Home

      Armor Stats

      Weapon Stats

      Rooms

      Mob Stats

      Basic Information

      Mob Programs

      Object Stats