Areth spec_fun documentation By Hades, 05/16/03 Compared to aprogs, spec_funs are *very* tight and efficient ways to bring more life to an area's mobiles. Spec_funs come in two flavors: those which are used only in combat, and those which are used outside of it. IN-ROUND COMBAT FUNCTIONS: spec_breath_any, spec_breath_acid, spec_breath_fire, spec_breath_frost, spec_breath_gas, spec_breath_lightning * The breaths just get one writeup. Spec_breath_any chooses one of the other breath spells at random - the others all cast the specific breath spell which it's named after. Bear in mind that breath tends to destroy or damage equipment. spec_cast_cleric This is for clerics, so that they cast their 'clericly' attack spells. spec_cast_cold All the ice, frost, and other cold based attack spells. spec_cast_electric All the lightning and shocking attack spells. spec_cast_fire All the attack spells that were fire-related, with the exception of invoke fire. spec_cast_ghost A few spells from various slists that looked 'ghostly'. spec_cast_mage A number of spells from the mage slist. spec_medic If this mob is at less than full hit points, it will cast healing spells on itself. If it's at full hit points and fighting someone, it will cast healing spells on whatever mob the character it's fighting is fighting - in essence healing its tank. spec_cast_psionicist A number of spells from the psionicist slist. spec_cast_undead This causes mobiles to cast a variety of spells which are considered suitable for undead creatures. spec_plague During combat, a spec_plague mob will spew infectious bile on players and afflict them with the 'plague' spell. spec_poison During combat, a spec_poison mob will attempt to bite whoever it's fighting and afflict them with the 'poison' spell. COMBAT STARTING OR SPECIFIC-AGGRESSION FUNCTIONS: spec_assassin This spec_fun causes a mobile to randomly check for a non-rogue player in the room with it, then attack it with the backstab command. It is predominantly seen (and almost universally reviled) in Underdark. spec_guard This spec_fun is the reason why cityguards or whatnot often scream, "Protect the innocent! BANZAI!!!" and attack folks who're fighting in the room they're in. It chooses the lowest-aligned player in the room who's fighting something, then aggresses on it. spec_vampire_hunter This spec_fun causes a mobile to attack any undead players in the room with them. If the character it wielding a stake, it will attempt to backstab with it. NON-COMBAT FUNCTIONS: spec_animate_dead If a mob or player corpse is in the same room as the mob with this spec_fun, it will attempt to cast 'create undead' on it - and then make use of the 'cackle' social. spec_cast_adept This is why the healer near recall casts some minor cure spells on players when they're standing around. spec_fido This is what causes fidos to eat corpses they're in the room with. spec_janitor This is what causes janitors to "pick up some trash" when they see things lying around in the room they're in. spec_thief This is what causes the numerous pickpocket mobs to do the things players hate so much. spec_repairman Rarely used, spec_repairman causes mobiles to repair doors they see that've been bashed down. spec_stomp_em Provided solely for AvMZF compatibility, this causes mobiles to stomp on and destroy any objects that happen to be on the ground in the room they're in, during combat. SPEC_FUNS USABLE FOR EVOLVING MOBS: spec_mutate This spec_fun causes a mobile to die and be replaced by a new one (vnum is specified in parameter 1) when its timer wears out (the timer is at specdata2). Spec_mutate can be used to allow for things such as chestbursters, etc. The mobile whose spec_mutate has worn off dies as a result of this mutation, leaving behind the new one. Side note, you can mset this spec_fun onto players for fun. This is very similar to how buttroaches work. Mutation *does* stop combat, incidentally. spec_transform Spec_transform is like mutate, except that the mobile being loaded is considered to be a new form of the same creature, as opposed to a new creature which was using the first one as a host. As a result, the transform'ed creature is loaded at the same percent of its hit points as its predecessor. So if the alien juvenile you're fighting transforms to an adult drone using spec_transform, its injuries aren't magically healed as a result - it'll still be at 50% of its max hit points, even if the juvenile had a max of 600 and the adult has a max of 900 - thus it'll only have jumped from 300hp to 450hp, as opposed to starting out as a fully healed adult like spec_mutate would've created. Transformation *does* stop combat, incidentally. Both the parameters fed to spec_transform are identical to those fed to spec_mutate. WAYS TO GET HADES TO DISEMBOWEL YOU: USE THESE spec_alien_queen spec_bard spec_chestburster spec_facehugger #SPECIALS M 3000 spec_cast_mage m 3003 spec_bard 5 0 S Syntax: The vast majority of spec_funs do not accept any kind of parameters for control or whatnot. However, some of them do and others can be altered to accept them if the area staff can think of anything they'd like to see added for configurability. All spec_funs can take two parameters, both of them numeric. By default, any spec_fun assigned using 'M' will pass zero for both parameters. Should 'm' be used, the two parameters after the name are placed in parameters one and two, respectively. What the parameters actually do is dependent upon which spec_fun is using them. After the initial 'M' or 'm', comes the vnum of the mobile which is receiving the spec_fun. This spec_fun applies to all mobiles with that vnum.