=== The #MOBILE block

Last modified by Samson, Dec. 25, 2006

Mobiles add life to an otherwise boring place. Afterall, you need people to talk to!
A well constructed area should have several mobiles populating it. Whether they are there
for people to kill, talk to, or get quests from, is entirely up to you.

You may have as many mobiles as you like, within the assigned vnum range of the area. They can be placed
in any order you wish in the file, but each section must obey the syntax.

The syntax of a #MOBILE block is:

#MOBILE
-------
String literal. This is required to mark the beginning of a mobile block.

Vnum     <int>
--------------
An integer value > 0. This value must fall within the range assigned to the builder who owns this area, or in the event
that this area is installed, it must fall within the vnum range specified in the #AREAHEADER section of the file.

Keywords     <string>~
----------------------
A set of words which will be used to interact with this mobile. They can be practically anything you want, but they
should also make sense. The use of color codes in keywords is inadvisable since it will not be obvious to players.

Race         <string>~
----------------------
The name of the race this mobile belongs to. Needs to match one of the defined races within your game.
Choose one from the following:

"human", "high-elf", "dwarf", "halfling", "pixie", "half-ogre", "half-orc",
"half-troll", "half-elf", "gith", "minotaur", "duergar", "centaur",
"lizardman", "gnome", "drow", "wild-elf",
"halfbreed", "reptile", "Mysterion", "lycanthrope", "dragon", "undead",
"orc", "insect", "spider", "dinosaur", "fish", "avis", "Giant",
"Carnivorous", "Parasitic", "slime", "Demonic", "snake", "Herbivorous", "Tree",
"Vegan", "Elemental", "Planar", "Diabolic", "ghost", "goblin", "troll",
"Vegman", "Mindflayer", "Primate", "Enfan", "golem", "Aarakocra", "troglodyte",
"Patryn", "Labrynthian", "Sartan", "Titan", "Smurf", "Kangaroo", "horse",
"Ratperson", "Astralion", "god", "Hill Giant", "Frost Giant", "Fire Giant",
"Cloud Giant", "Storm Giant", "Stone Giant", "Red Dragon", "Black Dragon",
"Green Dragon", "White Dragon", "Blue Dragon", "Silver Dragon", "Gold Dragon",
"Bronze Dragon", "Copper Dragon", "Brass Dragon", "Vampire", "Lich", "wight",
"Ghast", "Spectre", "zombie", "skeleton", "ghoul", "Half Giant", "Deep Gnome",
"gnoll", "Sylvan Elf", "Sea Elf", "Tiefling", "Aasimar", "Solar", "Planitar", 
"shadow", "Giant Skeleton", "Nilbog", "Houser", "Baku", "Beast Lord", "Deva", 
"Polaris", "Demodand", "Tarasque", "Diety", "Daemon", "Vagabond",
"gargoyle", "bear", "bat", "cat", "dog", "ant", "ape", "baboon",
"bee", "beetle", "boar", "bugbear", "ferret", "fly", "gelatin", "gorgon",
"harpy", "hobgoblin", "kobold", "locust", "mold", "mule",
"neanderthal", "ooze", "rat", "rustmonster", "shapeshifter", "shrew",
"shrieker", "stirge", "thoul", "wolf", "worm", "bovine", "canine",
"feline", "porcine", "mammal", "rodent", "amphibian", "crustacean",
"spirit", "magical", "animal", "humanoid", "monster"

Class        <string>~
----------------------
The name of the class this mobile belongs to. Needs to match one of the defined classes within your game.
Choose one from the following:

"mage", "cleric", "rogue", "warrior", "necromancer", "druid", "ranger",
"monk", "antipaladin", "paladin", "bard", "baker", "butcher", "blacksmith",
"mayor", "king", "queen"

Gender       <string>~
----------------------
The gender of this mobile. Accepted values are:

Male, Female, Neutral, Hermaphrodyte

Position     <string>~
----------------------
The current position this mobile is in.

DefPos       <string>~
----------------------
The default position this mobile starts in.

The following table is used for both position settings:

"dead", "mortal", "incapacitated", "stunned", "sleeping", "berserk",
"resting", "aggressive", "sitting", "fighting", "defensive", 
"evasive", "standing", "mounted", "shove", "drag"

Specfun      <string>~
----------------------
Special code function this mobile has assigned. These give mobiles some extra AI-like behaviours.
Choose one from the following table:

spec_janitor, spec_snake, spec_poison, spec_fido, spec_cast_adept, spec_RustMonster,
spec_GenericCityguard, spec_guard, spec_GenericCitizen, spec_warrior, spec_thief,
spec_cast_mage, spec_cast_cleric, spec_cast_undead, spec_ranger, spec_paladin,
spec_druid, spec_antipaladin, spec_bard, spec_breath_any, spec_breath_acid, spec_breath_fire,
spec_breath_frost, spec_breath_gas, spec_breath_lightning

Short        <string>~
----------------------
The one or two word "name" this mobile goes by.

Long         <string>~
----------------------
The one line description of this mob when seeing it in a room. Usually paired up with the Short description name.

Desc         <string>~
----------------------
The detailed description of this mobile when it is looked at by a player. Can extend on to multiple lines.

Nattacks     <float>
--------------------
The number of attacks this mobile gets per combat round. Can contain fractional values in #.# decimal format.

Stats1 <#1> <#2> <#3> <#4> <#5> <#6>
------------------------------------
The first set of statistical values for this mobile.

#1 = Alignment. Number must be between -1000 and +1000.
   -1000 to -350 is for Evil mobiles.
   -349 to +349 is for Neutral mobiles.
   +350 to +1000 is for Good mobiles.
#2 = Amount of gold this mobile carries. Must be a positive number between 0 and approximately 2.1 billion.
   Or, if set to -1, this mobile is flagged to generate random treasure instead of a fixed gold amount.
   The generated treasure depends on the mobile's level.
#3 = The height of this mobile in inches.
#4 = The weight of this mobile in pounds.
#5 = The maximum amount of movement points this mobile has.
#6 = The maximum amount of mana this mobile has.

Stats2 <#1> <#2> <#3> <#4> <#5> <#6> <#7>
-----------------------------------------
The second set of statisical values for this mobile.

#1 = Level. The mobile's base level from 1 to 110 ( unmodified code ).
   This level value is used as the basis for many automated statistical calculations.
#2 = THAC0 value ( To Hit Armor Class 0 ). This is a D&D concept best explained by one of the rulebooks.
   Value can be anything up to +20. Or set to +21 to perform an automatic calculation.
   Basic explanation of it is that lower values mean the mobile has an easier time hitting its enemies.
   Theoretically there is no low end limit and the value is allowed to go negative but isn't recommended
   to be set lower than -20 without a very good reason.
#3 = Armor Class. This value can range from -300 to +300 but for practical purposes should be between -100 and +100.
   The lower this value is set, the harder the mobile is to hit in combat.
#4 = Bonus hit points. This value is added on to the mobile's natural hit points.
   Natural hit points is calculated as: ld8 + bonus. l = level, d8 meaning 8 sided dice.
#5 = Number of damage dice. This value determines the number of dice to roll for determining combat damage.
#6 = Size of damage dice. This value determines the number of sides the combat dice being rolled have.
#7 = Additional damage added to the value rolled for combat damage.
   Note: 5, 6, and 7 are values applied as barehand damage. If the mobile is wielding a weapon, then the weapon's
   damage values are used instead and the barehand values are ignored.

Speaks              <string>~
-----------------------------
The names of the languages this mobile is capable of speaking. Separate names by spaces.

Speaking            <string>~
-----------------------------
The name of the language this mobile speaks by default. Only one name will be recognized here.

Language settings are chosen from the following:

"common", "elvish", "dwarven", "pixie", "ogre",
"orcish", "trollese", "rodent", "insectoid",
"mammal", "reptile", "dragon", "spiritual",
"magical", "goblin", "god", "ancient",
"halfling", "clan", "gith", "minotaur", "centaur", "gnomish"

Actflags            <string>~
-----------------------------
The names of the flags this mobile has set. Separate names with spaces.
Choose from the following table:

FLAG NAME     | DESCRIPTION
----------------------------------------------------------------------
npc           | MUST be included for all mobs ( autoset on bootup ).
sentinel      | Mob never moves from its room.
scavenger     | Mob picks up items.
innkeeper     | Mob is an Innkeeper, where PC's can rent.
banker        | Mob is a Banker, where PC's do their banking.
auction       | Mob is an auctioneer, where PC's conduct auctions. **
aggressive    | Mob attacks players on site.
stayarea      | Mob wanders, but won't leave its area.
wimpy         | Mob will flee when wounded.
practice      | Mob trains player class skills.
teacher       | Mob trains player race abilities.
immortal      | Mob cannot be harmed. Useful for shopkeepers :P
deadly        | Mob Has a deadly poison.
meta_aggr     | Mob is extremely aggressive, will attack anything it sees. Including other mobs.
guardian      | Mob protects its master.
running       | Mob hunts quickly.
nowander      | Mob doesn't wander unless attacked.
mountable     | Mob can be mounted.
mounted	      | Mob is mounted.
scholar       | Mob can teach languages.
secretive     | Mob's actions aren't seen.
mobinvis      | Mob has wizinvis, equal to its level.
noassist      | Mob won't assist other mobs.
pacifist      | Mob will never fight.
noattack      | Mob has no physical attacks.
annoying      | Other mobs will attack this mob.
smith         | Mob can forge items for players.
guildauc      | Mob is an auctioneer for a guild or clan. **
guildbank     | Mob is a banker for a guild or clan.
guildvendor   | Mob is a shopkeeper for a guild or clan.
guildrepair   | Mob is a repairsmith for a guild or clan.
guildforge    | Mob can forge items for a guild or clan.
guildidmob    | Mob can identify items for a guild or clan.
proto         | Mob is a prototype. Used only by OLC system.

** See the room flags section of rooms.txt for information on auction houses.
The GUILDAUC flag is used in place of the AUCTION flag for guild and clan auctioneers.

Affected            <string>~
-----------------------------
List of magical affects this mobile is affected by. Separate names with spaces.
Choose from the following table:

FLAG NAME     | DESCRIPTION
----------------------------------------------------------------------
blind         | Mob is blinded. (Kinda pointless :P)
invisible     | Mob is invisible.
detect_evil   | Mob can detect evil.
detect_invis  | Mob can see invisible.
detect_magic  | Mob can detect magic.
detect_hidden | Mob can detect hidden players.
hold          | Mob is paralyzed. (Kinda pointless :P)
sanctuary     | Mob has a sanctuary spell.
faerie_fire   | Mob is affected by a faerie fire spell.
infrared      | Mob has infravision.
curse         | Mob is cursed.
poison        | Mob is poisoned. (Not much point :P)
protect       | Mob is protected from evil.
paralysis     | Mob is paralyzed. (Again, pointless :P)
sneak         | Mob is sneaking.
hide          | Mob is hiding.
sleep         | Mob is sleeping.
charm         | Mob is charmed.
flying        | Mob is flying.
pass_door     | Mob can pass through doors.
floating      | Mob is floating.
truesight     | Mob has True Sight (see spell).
detect_traps  | Mob can detect traps.
scrying       | Mob can scry.
fireshield    | Mob is affected by a Fireshield spell.
shockshield   | Mob is affected by a Shockshield spell.
venomshield   | Mob is affected by a Venomshield spell.
acidmist      | Mob is affected by an Acidmist spell.
iceshield     | Mob is affected by an Iceshield spell.
berserk       | Mob is berserk, will fight until dead.
aqua_breath   | Mob can breathe underwater.
recurringspell| Mob has a recurring spell on it. ( Not sure )
contagious    | Mob carries a contagious disease.
bladebarrier  | Mob is affected by a Bladebarrier spell.
silence       | Mob cannot speak or cast spells.


Bodyparts           <string>~
-----------------------------
The list of body parts this mobile has. Separate names with spaces.
Choose from the following table:

FLAG NAME     | DESCRIPTION
----------------------------------------------------------------------
head          | Mob has a head.
arms          | Mob has arms.
legs          | Mob has legs.
heart         | Mob has a heart.
brains        | Mob has brains.
guts          | Mob has guts.
hands         | Mob has hands.
feet          | Mob has feet.
fingers       | Mob has fingers.
ear           | Mob has ears.
eye           | Mob has eyes.
long_tongue   | Mob has a long tongue.
eyestalks     | Mob has eyestalks.
tentacles     | Mob has tentacles.
fins          | Mob has fins.
wings         | Mob has wings.
tail          | Mob has a tail.
scales        | Mob has scales.
haunches      | Mob has haunches.
hooves        | Mob has hooves.
paws          | Mob has paws.
forelegs      | Mob has forelegs.
feathers      | Mob has feathers.

***Combat parts***

claws         | Mob has claws.
fangs         | Mob has fangs.
horns         | Mob has horns.
tusks         | Mob has tusks.
tailattack    | Mob uses its tail for a weapon.
sharpscales   | Mob has sharp scales.
beak          | Mob has a beak.

Resist              <string>~
-----------------------------
List of resistance flags this mobile has set.

Immune              <string>~
-----------------------------
List of immunity flags this mobile has set.

Suscept             <string>~
-----------------------------
List of susceptibility flags this mobile has set.

Absorb              <string>~
-----------------------------
List of absorbtion flags this mobile has set.

Names for the Resist, Immune, Suscept, and Absorb lines are in the Values.txt file.

Attacks             <string>~
-----------------------------
List of special attack flags this mobile has.
Choose from the following:

FLAG NAME     | DESCRIPTION
----------------------------------------------------------------------
bite          | Mob can bite.
claws         | Mob can use its claws.
tail          | Mob can use its tail.
sting         | Mob can sting.
punch         | Mob can use the punch skill.
kick          | Mob can use the kick skill.
trip          | Mob can use the trip skill.
bash          | Mob can use the bash skill.
stun          | Mob can use the stun skill.
gouge         | Mob can use the gouge skill.
backstab      | Mob can use the backstab skill.
drain         | Mob can cast energy drain.
firebreath    | Mob can breathe fire.
frostbreath   | Mob can breathe frost.
acidbreath    | Mob can breathe acid.
lightnbreath  | Mob can breathe lightning.
gasbreath     | Mob can breathe poison gas.
poison        | Mob can cast poison.
nastypoison   | Mob has a deadly poison. (Not operational)
gaze          | Mob has a gaze attack. (Not operational)
blindness     | Mob can cast blindness.
causeserious  | Mob can cast cause serious.
earthquake    | Mob can cast earthquake.
causecritical | Mob can cast cause critical.
curse         | Mob can cast curse.
flamestrike   | Mob can cast flamestrike.
harm          | Mob can cast harm.
fireball      | Mob can cast fireball.
colorspray    | Mob can cast color spray.
weaken        | Mob can cast weakness.
spiralblast   | Mob can cast spiral blast.


Defenses            <string>~
-----------------------------
List of special defense flags this mobile has set.
Choose from the following:

FLAG NAME     | DESCRIPTION
----------------------------------------------------------------------
parry         | Mob can use the parry skill.
dodge         | Mob can use the dodge skill.
heal          | Mob can cast heal.
curelight     | Mob can cast cure light.
cureserious   | Mob can cast cure serious.
curecritical  | Mob can cast cure critical.
dispelmagic   | Mob can cast dispel magic.
dispelevil    | Mob can cast dispel evil.
sanctuary     | Mob can cast sanctuary.
shield        | Mob can cast shield.
bless         | Mob can cast bless.
stoneskin     | Mob can cast stoneskin.
teleport      | Mob teleports when wounded.
disarm        | Mob can use the disarm skill.
grip          | Mob has the grip skill.
truesight     | Mob can cast truesight.


If this mobile is going to be a shopkeeper, then the following section needs to be added at this point:

ShopData <#1> <#2> <#3> <#4> <#5> <#6> <#7> <#8> <#9>
-----------------------------------------------------
The shop information values.

#1 through #5 = The item type numbers that this shopkeeper will sell.
#6 = Profit margin for selling items. The percentage of the cost of the item this shopkeeper will charge.
   Values from 0 to 99 will reduce the price of an item. Values from 101 up will increase the price of an item.
#7 = Profit margin for buying items. The percentage of the cost of the item this shopkeeper will pay to buy an item.
   Values from 0 to 99 will reduce the payment. Values from 101 up will increase the payment.
#8 = Hour of the day the shop opens.
#9 = Hour of the day the shop closes.

For a 24hr shop, specify open of 0 and close of 28 ( unmodified code ).

If this mobile is going to be a repairsmith, then the following section needs to be added at this point:

RepairData <#1> <#2> <#3> <#4> <#5> <#6> <#7>
---------------------------------------------
The shop information values.

#1 through #3 = The item type numbers that this smith will repair.
#4 = Repair cost factor. Percentage of the item's value this smith will charge to repair it.
#5 = Type of repairs this shop will perform.
   A value of 1 means the shop repairs damaged items.
   A value of 2 means the shop recharges magical items.
#6 = Hour of the day the shop opens.
#7 = Hour of the day the shop closes.

For a 24hr shop, specify open of 0 and close of 28 ( unmodified code ).

#MUDPROG
#ENDPROG
--------------
See the Misc.txt file for the format of Mudprog blocks. These are optional.

#ENDMOBILE
----------
String literal. This ending tag is required to mark the end of a #MOBILE block.
If it is left out, the file will be assumed to be corrupt.

===========================================================================================

An example of a finished mobile, with an attatched mobprogram:
(Mudprogs are covered in a seperate file)

#MOBILE
Vnum      1203
Keywords  krusty iguana~
Race      reptile~
Class     Warrior~
Gender    female~
Position  standing~
DefPos    standing~
Short     Krusty~
Long      A spectral iguana roams the immortal halls.
~
Desc      Wavering in and out of this diemsion and the afterlife, this spectral
iguana is all that remains of Samson's once lively pet iguana.
Considerably larger and meaner looking in undeath, the iguana is
nearly 50 feet in length, and instead of the normal green color
she is now an evil shade of black. The long claws once only used for
climbing have now become hideous slashing weapons that could shred
a grown man in an instant. The remains of an adamantite collar still
cling to the iguanas neck fold, the magical energy still pulsating
through it. A shiny gold medallion identifies the spectre as Krusty.
Only the magical forces of the immortal halls keep this beast of
undeath from ravaging the world below.......
~
Nattacks  0.000000
Stats1    0 0 0 0 150 100
Stats2    100 21 0 0 0 0 0
Speaks    common reptile~
Speaking  reptile~
Actflags  npc stayarea immortal~
Affected  detect_invis detect_hidden infrared flying truesight passdoor~
Bodyparts head legs guts feet eye tail scales claws~
Immune    poison drain sleep charm hold paralysis~
#MUDPROG
Progtype  act_prog~
Arglist   p has sent a swirling vortex to transport you.~
Comlist   if ispc($n)
mpgoto 1401
yell Why can't you people leave me alone dammit!
endif
~
#ENDPROG

#MUDPROG
Progtype  death_prog~
Arglist   100~
Comlist   mpat 1401 mpmload 1203
yell God dammit! STOP PICKING ON ME!
~
#ENDPROG

#MUDPROG
Progtype  act_prog~
Arglist   p flings you to the astral winds.~
Comlist   mpgoto 1401
yell Nice try, but I found my way home!
~
#ENDPROG

#ENDMOBILE