abspec.htm

abspec.htm · 8.6 KB

From the archive ab.zip

Download the archive   « Back to the archive contents

<html>
 <head>
  <title>Dizzy Mud Area Coding Guide - #SPECIALS Section</title>
 </head>
 <body BGCOLOR="#FFFFFF">
  <h3 ALIGN="center">#SPCIALS Section</h3>
  <small>
   This page describes how to code special mob capabilities within an area file.
  </small>
  <!-- BEGIN Navigator -->
  <HR NOSHADE>
  <table WIDTH="100%">
   <tr>
    <td ALIGN="left">
     <small>
      &lt;&lt; Back to 
      <a HREF="abshop.htm">
       #SHOPS Section
      </a>
     </small>
    </td>
    <td ALIGN="right">
     <small>Forward to <a HREF="abmp.htm">MobProg Programming</a> &gt;&gt;</small>
    </td>
   </tr>
  </table>
  <HR NOSHADE>
  <!-- END Navigator -->
  The <b>#SPECIALS</b> section of an area file associates certain mobs with
  special capability procedures coded into the MUD program.
  <p>
  The <b>#SPECIALS</b> section consists of the #SPECIALS header, one or more
  specials definition lines and the #SPECIALS ender line <b>S</b> as shown here:
  <table BORDER=2 WIDTH="100%" CELLPADDING=20>
   <tr>
    <td>
     #SPECIALS<br>
     <a HREF="#specialline">special line</a><br>
     S<br>
    </td>
   </tr>
  </table>
  <p>
  Many area builders want their mobs to have abilities or actions which 
  can not be set up using ACT or OFFBIT flag bits, nor by using 
  <a HREF="abmp.htm">MobProgs</a>. Some examples of mobs for which
  special procedures have been written are the mayor who runs around
  town and locks and unlocks gates, the fido who devours corpses and
  the janitor who picks up objects with a characteristic message.
  <p>
  It may come as a surprise that mobs have no skills or spells, and 
  cannot directly be given any skills other than those which can be 
  set up using ACT and OFFBIT flags. Those mobs which do cast spells 
  in a fight get them by virtue of having a #SPECIAL procedure attached 
  to them.
  <p>
  Special capabilities like this need to be written in the C programming
  language as actual extensions to the Dizzy MUD program. A separate 
  routine has to be written for each and built into the <code>specials.c</code>
  module. This is no trivial task, so to date Dizzy lives with a
  fairly large set of "standard" special procedures written for 
  ROM MUDs.
  <p>
  Alas, the current code does not allow attaching more than <b>one</b>
  special procedure to a mob, so choose your specials wisely!
  <p>
  <h4><a NAME="specialline">The Specials Line</a></h4>
  <p>
  <table BORDER=2 CELLPADDING=10>
   <tr><td><b>M</b></td><td>Mob vnum</td><td>spec function name</td><td>* Comment: which mob</td></tr>
  </table>
  <p>
  The <b>Mob vnum</b> is the vnum of the mob which is to receive the special function.
  All mobs of this vnum will have the special function.
  <p>
  The <b>spec function name</b> is the name of the special function you want the mob
  to receive. It must be one of the function names from the function below, and must
  be spelled exactly as shown!
  <p>
  <h4>Special Function Table</h4>
  <p>
  <table BORDER=1>
   <tr><th>Function name</th><th>Abilities</th></tr>  
   <tr><td>spec_blacksmith      </td><td>Responds to REPAIR command when in room, fights using spec_cast_mage</td></tr> 
   <tr><td>spec_breath_acid     </td><td>Randomly during a fight, casts ACID BREATH</td></tr> 
   <tr><td>spec_breath_any      </td><td>Randomly during a fight, casts one of FIRE/LIGHTNING/GAS/ACID/FROST BREATH</td></tr> 
   <tr><td>spec_breath_fire     </td><td>Randomly during a fight, casts FIRE BREATH</td></tr> 
   <tr><td>spec_breath_frost    </td><td>Randomly during a fight, casts FROST BREATH</td></tr> 
   <tr><td>spec_breath_gas      </td><td>Randomly during a fight, casts GAS BREATH</td></tr> 
   <tr><td>spec_breath_lightning</td><td>Randomly during a fight, casts LIGHTNING BREATH</td></tr> 
   <tr><td>spec_cast_adept      </td><td>Randomly casts one of ARMOR,BLESS,CURE BLINDNESS,CURE LIGHT,CURE POISON,REFRESH,CURE DISEASE<br>on visible players of level 10 or less</td></tr> 
   <tr><td>spec_cast_cleric     </td><td>Randomly during a fight, casts one of BLINDNESS,CAUSE SERIOUS,EARTHQUAKE,CAUSE CRITICAL,DISPEL EVIL,CURSE,CHANGE SEX,FLAMESTRIKE,HARM,PLAGUE,DISPEL MAGIC</td></tr> 
   <tr><td>spec_cast_judge      </td><td>Randomly during a fight, casts HIGH EXPLOSIVE.<br>Written for judges in Megacity One.</td></tr> 
   <tr><td>spec_cast_mage       </td><td>Randomly during a fight, casts BLINDNESS,CHILL TOUCH,WEAKEN,TELEPORT,COLOUR SPRAY,CHANGE SEX,ENERGY DRAIN,FIREBALL,PLAGUE,ACID BLAST</td></tr> 
   <tr><td>spec_cast_undead     </td><td>Randomly during a fight, casts CURSE,WEAKEN,CHILL TOUCH,BLINDNESS,POISON,ENERGY DRAIN,HARM,TELEPORT</td></tr> 
   <tr><td>spec_charm           </td><td>If not fighting, orders all followers (if any) to "BTH SELF","PHILO I JUST LOVE DIZZYMUD'S MOBILES","BONK SELF";<br>If fighting, "begins playing a new, beautiful song" and casts CHARM at opponent.<br>Specially fiddled for Helga.</td></tr> 
   <tr><td>spec_executioner     </td><td>If not fighting, finds a player with KILLER or THIEF flags in the room, shouts a denouncement of the player, and attacks him.</td></tr> 
   <tr><td>spec_fido            </td><td>Finds a corpse in the room and devours it.</td></tr> 
   <tr><td>spec_guard           </td><td>If not fighting, finds a fighting character (mob or player) of alignment less than 300 in the room, denounces and attacks him.</td></tr> 
   <tr><td>spec_janitor         </td><td>Picks up non-player corpses and other lootable or trash or drink container objects or others of value less than 10.</td></tr> 
   <tr><td>spec_mayor           </td><td>Starting at 6 am and 8 pm, runs through town to open/close gates and issue senseless messages.<br>Don't use this, there are hardwired paths through town which don't work anyway.</td></tr> 
   <tr><td>spec_nasty           </td><td>If not fighting, finds a player in the room higher than own level but lower than level+10 and starts a fight with backstab.<br>If fighting, randomly steals or flees.</td></tr> 
   <tr><td>spec_ogre_member     </td><td>If not fighting and no patrolman is in the room, finds a troll of no more than 2 levels above self, issues taunts and attacks it.</td></tr> 
   <tr><td>spec_patrolman       </td><td>If not fighting and there is a fight in the room not involving another patrolman, blows his whistle, shouts and attacks the higher-level fighter.</td></tr> 
   <tr><td>spec_poison          </td><td>Randomly during a fight, bites and poisons opponent.</td></tr> 
   <tr><td>spec_questmaster     </td><td>Does the questmaster thing, and fights with spec_cast_mage if attacked</td></tr> 
   <tr><td>spec_sage            </td><td>Does the sage thing (LOREing items for a fee), and fights with spec_cast_mage if attacked</td></tr> 
   <tr><td>spec_thief           </td><td>Randomly either steals up to 20% of a player's money or issues a message about hand in pocket.</td></tr> 
   <tr><td>spec_troll_member    </td><td>If not fighting and no patrolman is in the room, finds an ogre of no more than 2 levels above self, issues taunts and attacks it.</td></tr>
  </table>
  <p>
  Don't forget to code the <b>S</b> to terminate the list of specials!
  <p>
  <hr NOSHADE WIDTH="75%">
  If you don't have a #MOBPROGS section in your area file, your area file is
  finished at this point. If so, <b>do not forget the #$</b> at the end of
  your file to terminate your area file. The <b>#$</b> must come on a line by itself
  and be followed by at least one or more empty lines. Leaving off this file 
  termination or getting it wrong cause the MUD to crash at load time without even
  issuing an error message!
  <hr NOSHADE WIDTH="75%">
  <p>
  <table BORDER=2 WIDTH="100%" CELLPADDING=20>
   <tr>
    <td>
     <a NAME="example">SPECIALS example</a><br>
     (excerpted from the actual area file of midgaard)
     <pre>
      <b>
       #SPECIALS
       M 3120 spec_cast_cleric    * the sexton
       M 3143 spec_mayor          * the mayor
       M 3163 spec_nasty          * the thief
       S
      </b>
     </pre>
    </td>
   </tr>
  </table>
  <!-- BEGIN Navigator -->
  <HR NOSHADE>
  <table WIDTH="100%">
   <tr>
    <td ALIGN="left">
     <small>
      &lt;&lt; Back to 
      <a HREF="abshop.htm">
       #SHOPS Section
      </a>
     </small>
    </td>
    <td ALIGN="right">
     <small>Forward to <a HREF="abmp.htm">#MOBPROGS Section<!/a > &gt;&gt;</small>
    </td>
   </tr>
  </table>
  <HR NOSHADE>
  <!-- END Navigator -->
  <table WIDTH="100%">
   <tr>
    <td>
     &nbsp;
    </td>
    <td ALIGN=right>
     <small>This page was last updated <font COLOR="#FF0000">February 1, 1998</font>.</small>
    </td>
   </tr>
  </table>
 </body>
</html>

Site Stats

Snippets: 1791
Codebases: 571