home » builders » builder's lessons » specials

Mobile specials

This section defines special functions (spec-fun's) for mobiles. A spec-fun is a hard coded function which gives additional behavior to all mobiles with a given vnum, such as the justice implementing guard or the beholder casting spells in combat. Special functions are a holdover from older mud versions (like Diku). In FKMud mob programs are often better to use than the spec_functions, as they give you much more flexibility and customisation.

However spec-funs are a simple shortcut if you want your mob for instance to cast certain spells in combat, or use a breath weapon.

The spec_guard function is used by the Justice system to have mobiles with this function to carry out the punishments etc of the justice system.

Setting a mobiles class to a specific guild or deity will have the mobile act in a way that is common to that guild or priest of that deity, when standing around and when in battle.

One of the common uses of these special functions is the healers in the training temples. They have the spec_cast_adept function. Types of functions that can be used are:

spec_fido Eats corpses
spec_cast_adept For constantly healing mobs
spec_breath_fire Uses fire breath weapon
spec_breath_frost Uses frost breath weapon
spec_breath_acid Uses acid breath weapon
spec_breath_gas Uses gas breath weapon
spec_breath_lightning Uses fire lightning weapon
spec_breath_any Uses a random breath weapon in battle
spec_poison Poisons foe with a bite
spec_guard For guards in the justice system
spec_cast_cleric General Cleric in battle
spec_janitor Cleans up trash and drinks
spec_cast_undead Casts curse, drain type spells in battle
spec_executioner Old justice for dealing with killers and thieves. Do not use.
spec_judge For judges in the justice system
spec_pet_gen Looks for master, rests when master does
spec_paladin_warhorse For a paladins warhorse, looks for master, aids, rescues, alerts to evil, doesn't tire
spec_pet_hawkWill work for all pet birds
spec_pet_dogDoes spec_pet_gen plus also rescues master, race echos, sniffs invis chars
spec_pet_pantherFor companion large cats, see dog
spec_pet_bearFor companion bears, see dog
spec_pet_wolverineFor companion wolves, see dog

The last 7 specials listed are made for PC pets. They will seek out their master, will land when their master does and often step in front of their master in battle if they feel their master is being threatened. The paladins warhorse is sensative to alignment of those PC's around it.

You would set up a mobile in the #SPECIALS section like follows.

#SPECIALS M QQ00 spec_thief
M QQ06 spec_cast_cleric