#SPCIALS Section

This page describes how to code special mob capabilities within an area file.
<< Back to #SHOPS Section Forward to MobProg Programming >>

The #SPECIALS section of an area file associates certain mobs with special capability procedures coded into the MUD program.

The #SPECIALS section consists of the #SPECIALS header, one or more specials definition lines and the #SPECIALS ender line S as shown here:
#SPECIALS
special line
S

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 MobProgs. 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.

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.

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 specials.c module. This is no trivial task, so to date Dizzy lives with a fairly large set of "standard" special procedures written for ROM MUDs.

Alas, the current code does not allow attaching more than one special procedure to a mob, so choose your specials wisely!

The Specials Line

MMob vnumspec function name* Comment: which mob

The Mob vnum is the vnum of the mob which is to receive the special function. All mobs of this vnum will have the special function.

The spec function name 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!

Special Function Table

Function nameAbilities
spec_blacksmith Responds to REPAIR command when in room, fights using spec_cast_mage
spec_breath_acid Randomly during a fight, casts ACID BREATH
spec_breath_any Randomly during a fight, casts one of FIRE/LIGHTNING/GAS/ACID/FROST BREATH
spec_breath_fire Randomly during a fight, casts FIRE BREATH
spec_breath_frost Randomly during a fight, casts FROST BREATH
spec_breath_gas Randomly during a fight, casts GAS BREATH
spec_breath_lightningRandomly during a fight, casts LIGHTNING BREATH
spec_cast_adept Randomly casts one of ARMOR,BLESS,CURE BLINDNESS,CURE LIGHT,CURE POISON,REFRESH,CURE DISEASE
on visible players of level 10 or less
spec_cast_cleric Randomly during a fight, casts one of BLINDNESS,CAUSE SERIOUS,EARTHQUAKE,CAUSE CRITICAL,DISPEL EVIL,CURSE,CHANGE SEX,FLAMESTRIKE,HARM,PLAGUE,DISPEL MAGIC
spec_cast_judge Randomly during a fight, casts HIGH EXPLOSIVE.
Written for judges in Megacity One.
spec_cast_mage Randomly during a fight, casts BLINDNESS,CHILL TOUCH,WEAKEN,TELEPORT,COLOUR SPRAY,CHANGE SEX,ENERGY DRAIN,FIREBALL,PLAGUE,ACID BLAST
spec_cast_undead Randomly during a fight, casts CURSE,WEAKEN,CHILL TOUCH,BLINDNESS,POISON,ENERGY DRAIN,HARM,TELEPORT
spec_charm If not fighting, orders all followers (if any) to "BTH SELF","PHILO I JUST LOVE DIZZYMUD'S MOBILES","BONK SELF";
If fighting, "begins playing a new, beautiful song" and casts CHARM at opponent.
Specially fiddled for Helga.
spec_executioner If not fighting, finds a player with KILLER or THIEF flags in the room, shouts a denouncement of the player, and attacks him.
spec_fido Finds a corpse in the room and devours it.
spec_guard If not fighting, finds a fighting character (mob or player) of alignment less than 300 in the room, denounces and attacks him.
spec_janitor Picks up non-player corpses and other lootable or trash or drink container objects or others of value less than 10.
spec_mayor Starting at 6 am and 8 pm, runs through town to open/close gates and issue senseless messages.
Don't use this, there are hardwired paths through town which don't work anyway.
spec_nasty If not fighting, finds a player in the room higher than own level but lower than level+10 and starts a fight with backstab.
If fighting, randomly steals or flees.
spec_ogre_member 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.
spec_patrolman 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.
spec_poison Randomly during a fight, bites and poisons opponent.
spec_questmaster Does the questmaster thing, and fights with spec_cast_mage if attacked
spec_sage Does the sage thing (LOREing items for a fee), and fights with spec_cast_mage if attacked
spec_thief Randomly either steals up to 20% of a player's money or issues a message about hand in pocket.
spec_troll_member 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.

Don't forget to code the S to terminate the list of specials!


If you don't have a #MOBPROGS section in your area file, your area file is finished at this point. If so, do not forget the #$ at the end of your file to terminate your area file. The #$ 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!

SPECIALS example
(excerpted from the actual area file of midgaard)

#SPECIALS
M 3120 spec_cast_cleric    * the sexton
M 3143 spec_mayor          * the mayor
M 3163 spec_nasty          * the thief
S


<< Back to #SHOPS Section Forward to #MOBPROGS Section >>


  This page was last updated May 15, 2001