mud.h

./mudd/src/mud.h · 213.7 KB

From the archive emlen.tar.gz

Download the archive   « Back to the archive contents

#ifndef WINDOWS
#define false    0
#define true     1
typedef int socket_t;
#else
#include "winsock.h"
#include "windows.h"
typedef SOCKET socket_t;
#define NOCRYPT
#endif
#define FALSE    0 
#define TRUE     1  
#define yes      1
#define no       0 
#define YES      1  
#define NO       0
typedef unsigned char bool;
extern socket_t control;
typedef struct scriptassoc SA;
typedef struct social_type SOCIAL;
typedef struct item_info ITEM_INFO;
typedef struct fight_data FGT;
typedef struct dammsg_data DAM_MSG;
typedef struct power_data POWER;
typedef struct shell_command SHELL;
typedef struct channel_type CHANNEL;
typedef struct society_data SOCIETY_DATA;
typedef struct caste_data CASTE_DATA;
typedef struct auct_data AUCTION;
typedef struct cmd_type COMMAND;
typedef struct to_free TO_FREE;
typedef struct item_book I_BOOK;
typedef struct item_armor I_ARMOR;
typedef struct item_weapon I_WEAPON;
typedef struct item_missile I_MISSILE;
typedef struct item_drink_container I_DRINK;
typedef struct item_light I_LIGHT;
typedef struct item_tool I_TOOL;
typedef struct item_raw I_RAW;
typedef struct item_trap I_TRAP;
typedef struct item_shield I_SHIELD;
typedef struct item_vehicle I_VEHICLE;
typedef struct item_fountain I_FOUNTAIN;
typedef struct item_potion I_POTION;
typedef struct item_food I_FOOD;
typedef struct item_gem I_GEM;
typedef struct item_wand I_WAND;
typedef struct item_furniture I_FURNITURE;
typedef struct item_container I_CONTAINER;
typedef struct item_climbable I_CLIMBABLE;
typedef struct item_siege I_SIEGE;
typedef struct item_ammo I_AMMO;
typedef struct affect_data AFFECT_DATA;
typedef struct area_data AREA_DATA;
typedef struct ban_data BAN_DATA;
typedef struct voting_data VOTING_DATA;
typedef struct spell_data SPELL_DATA;
typedef struct gld_data GUILD_DATA; /* Guild data struct */
typedef struct dam_moves PERCENT_STRUCT;
typedef struct damages_struct DAM_STRUCT;
typedef struct mna_data MANA_DATA;
typedef struct track_data TRACK_DATA;
typedef struct char_data CHAR_DATA;
typedef struct online ONLINE; /* JRAJRA - keep track of who has been online */
typedef struct potion_ingredients POTION_INFO;
typedef struct rank_data RANK_DATA;
typedef struct bid_data BID_DATA;
typedef struct descriptor_data DESCRIPTOR_DATA;
typedef struct exit_data EXIT_DATA;
typedef struct door_data DOOR_DATA;
typedef struct extra_descr_data DESCRIPTION_DATA;
typedef struct playerbase_data PLAYERBASE_DATA;
typedef struct variable_data VARIABLE_DATA;
typedef struct item_check ITEM_CHECK;
typedef struct help_data HELP_DATA;
typedef struct mob_proto_data MOB_PROTOTYPE;
typedef struct script_dat SCRIPT_DAT;
typedef struct note_data NOTE_DATA;
typedef struct obj_data SINGLE_OBJECT;
typedef struct obj_proto_data OBJ_PROTOTYPE;
typedef struct temp_str TEMP_STR;
typedef struct pc_data REALCHAR_DATA;
typedef struct npc_data MOB_DATA;
typedef struct optional_data OPTIONAL_DATA;
typedef struct spec_procs SPEC_PROC;
typedef struct guard_datas GUARD_DATA;
typedef struct room_data ROOM_DATA;
typedef struct sector_data SECTOR_DATA;
typedef struct room_extended ROOM_MORE;
typedef struct reset_data RESET_DATA;
typedef struct shop_data SHOP_DATA;
typedef struct time_info_data TIME_INFO_DATA;
typedef struct weather_data WEATHER_DATA;
typedef struct clan_data CLAN_DATA;
typedef struct bank_item BANK_ITEM;
typedef void CHR_FUNCTION (CHAR_DATA *, CHAR_DATA *, char *argy);
typedef void DO_COMMAND (CHAR_DATA *, char *);
typedef bool SPEC_FUNCTION (CHAR_DATA * ch);

/* ======================================================================== */
/*                       All game-related DEFINES                           */
/* ======================================================================== */

#define HASH_MAX                 6138  /* Max list heads for rooms, objs, mobs */
#define STD_LENGTH               8192  /* Standard length string*/
#define SML_LENGTH               2048  /* Small length string*/
#define BATTLEGROUND_START_VNUM   600  /* Start bground room vnum */
#define BATTLEGROUND_END_VNUM     620  /* End bground room vnum */
#define INDOOR_FLY_HEIGHT          24  /* Things above this height cannot
                                          fly indoors - JRAJRA */ 
#define SKILL_COUNT               600  /* Must be 600 or higher */

#define NUM_ROLLS                   4  /* VERY unlikely to be changed */

#define DESC_CRASHER       0x00000001
#define DESC_ROLLING       0x00000002
#define DESC_ROLLED_YET    0x00000004
#define DESC_TPCOMMAND     0x00000008
#define DESC_WRONG_PWD     0x00000010
#define DESC_INSERT        0x00000020
#define DESC_BAD_LETTER    0x00000040


/* This is how deep bfs tracking goes before it stops. */


#define BFS_DEPTH  1000


#define STR   0  /* Strength raw power */
#define INT   1  /* Intelligence how well you use attack magic/learn */
#define WIS   2  /* Knowledge of ancient things and healing arts */
#define DEX   3  /* Manual dexterity...manipulating small things */
#define CON   4  /* Overall health */
#define LCK   5  /* Luck, affects many things... */
#define WIL   6  /* Willpower, how well you dominate/resist magic */
#define CHA   7  /* Charisma...helps you deal with mobs better. */

#define NUM_STATS                   8  /* 5 stats str int wis dex con
                                          now added luck, willpower, agility,
                                          endurance and charisma */
#define NUM_ALIGNMENTS              5  /* Coding for 4+newbie  
                                          aligments atm*/
#define NUM_ALIGN                   5  /* Cuz I forget what I call it
                                          sometimes */
#define MAX_GROUPSIZE               8  /* This is the base max groupsize. */
#define TOP_LEVEL                 110  /* The maximum level. */
#define MAX_NUM_BG_PRIZES          10  /* Max num of bg prizes */
#define MAX_COLORS                  8  /* Maximum player configurable colors */
#define RACE_COUNT                 25  /* Max races is 25. Don't change! */
#define MAX_CLAN_STORAGE           30  /* How many items can a clan 
                                          have in their clan storage? */
#define MAXST                      15  /* How many items can person
                                          have in person storage? */
#define MAX_IGNORE                 20  /* Max number of ignore
                                          slots a player has */
#define MAX_TROPHY                 20  /* Max number of trophies
                                          that someone has */
#define MAX_SCRIPT_FLAGS          300  /* Max number of scriptflags 
                                          a person can have */
#define MAP_WIDTH                  13  /* Overhead mapping width */
#define MAP_HEIGHT                  7  /* Overhead mapping height */
#define MAX_RANKING_DATA           15  /* Max number listed for ranking */
#define RANKING_INFO               10  /* Types of ranking info */
#define WGT_MULT                   10  /* The number of pebbles per  
                                          stone in weight ratios. */
#define SKILL                       0  /* Spell slot == 0 is skill */
#define SPELL                       1  /* Spell slot == 1 is spell */
#define PROF                        2  /* Spell slot == 2 is prof */
#define PK_QUIT_TIMER               8  /* Number of hours before
                                          you can quit to pk */
#define MOB_QUIT_TIMER              1  /* Number of hours before
                                          you can quit after 
                                          fighting a mob */

#define REMORT_ROOM              1200  /* All must type remort here */


#define WAR_TOKEN_VNUM             8   /* Obj vnum you must have to seize a
					  city */

#define COLOR_CHAT                  0
#define COLOR_CLANTALK              1
#define COLOR_IMMTALK               6
#define COLOR_YELL                  2
#define COLOR_SAY                   3
#define COLOR_TELL                  4
#define COLOR_GODTALK               5

#define MAX_TRADE                   5 /* Don't change this. */

#define MAX_CHAR_NAME_LENGTH       14 /* max name length for a player */

#define STOREDIV                   14 /* item cost is divided by this to
                                         determine the cost it will be to 
                                         store the item */
#define MAX_LEVEL                 110 /* max possible level */
#define LEVEL_BUILDER             103 /* Builder level */
#define LEVEL_IMMORTAL            100 /* Minimum immortal level */
#define IMM_LEVEL                 100 /* New Min immortal level */

/* ======================================================================== */
/*                        Do not change these...                            */
/* ======================================================================== */

#define PULSE_PER_SECOND           10
#define PULSE_VIOLENCE             15
#define PULSE_MOBILE              (6 * PULSE_PER_SECOND)     /* 6 */  
#define PULSE_TICK                (35 * PULSE_PER_SECOND)   /* 35 */
#define PULSE_AREA                (120 * PULSE_PER_SECOND) /* 120 */

/* ======================================================================== */
/*          Time of day defines.  Compatable with diku style muds.          */
/* ======================================================================== */

#define SUN_DARK                    0
#define SUN_RISE                    1
#define SUN_MORNING                 2
#define SUN_MIDDAY                  3
#define SUN_AFTERNOON               4
#define SUN_EVENING                 5
#define SUN_SET                     6


/* ======================================================================== */
/* Weather system model from Theisles, although I cannot guarentee similar  */
/*                            implimentation...                             */
/* ======================================================================== */

#define SKY_CLOUDLESS               0
#define SKY_CLOUDY                  1
#define SKY_RAINING                 2
#define SKY_LIGHTNING               3
#define SKY_FOGGY                   4

/* ======================================================================== */
/* Fight option defines. Can be toggled on/off through the 'fight' command. */
/* ======================================================================== */

#define F_HEADBUTT      0x00000001
#define F_JUJI          0x00000002
#define F_ELBOW         0x00000004
#define F_KNEE          0x00000008
#define F_BITE          0x00000010
#define F_CHOKE         0x00000020

#define F_AGGRESSIVE    0x00010000
#define F_POWER         0x00020000
#define F_GROUND        0x00040000

/* ======================================================================== */
/*                POSITIONS for ground_pos.  Many unused.                   */
/* ======================================================================== */

#define FP_CHOKE_1      0x00000001
#define FP_CHOKE_2      0x00000002
#define FP_CHOKE_3      0x00000004
#define FP_STUNNED      0x00000008
#define FP_BLEEDING     0x00000010
#define FP_TOO_HEAVY    0x00000020
#define FP_PUNCHING     0x00000040

/* ======================================================================== */
/*  These bits describe a spell's behavior, for use with the online spell   */
/*                        creation/editing system.                          */
/* ======================================================================== */

         /*+-------------------------------------------------+*/
         /*| These are the spell_bits 2 for "special spells" |*/
         /*+-------------------------------------------------+*/

#define SPELL_ASTRAL          0x00000001

#define SPELL_SUMMON          0x00000002 	/* Summons a mob/character.
						   mob summoning can be toggled
						   on/off in power.dat */
#define SPELL_TELEPORT        0x00000004	/* Teleports the victim */
#define SPELL_CHARM_PERSON    0x00000008	/* Unused for now. */

#define SPELL_MESSAGE         0x00000010	/* Sends a message to another player */
#define SPELL_DISPEL_MAGIC    0x00000020	/* Dispels magic */
#define SPELL_IDENTIFY        0x00000040	/* Behaves as an identify spell */
#define SPELL_LOCATE_OBJECT   0x00000080	/* Behaves as locate object spell */
#define SPELL_SCRY            0x00000100	/* Behaves as scry spell -
						   used to look into the room where
						   someone else in the game is. */
#define SPELL_LOCATE_PERSON   0x00000200	/* Behaves as locate spell -
						   used to see the room name
						   where someone is in. */
#define SPELL_RECALL          0x00000400	/* The recall spell */

#define SPELL_OBJ_TO_ROOM     0x00001000	/* If the spell creates an
						   object, it will go into the
						   room instead of the character's */
#define SPELL_PORTAL          0x00002000        /* Creates a portal from
						   caster to target. */

#define SPELL_MOB_TO_ROOM     0x00004000        /* Spell "creates" a mob */
	
#define SPELL_DETECT_ALIGN    0x00008000        /* Makes opp align show up
						   on "who" list. */

#define SPELL_NECROMANCY      0x00010000        /* Resurrects a corpse to
						   serve the caster */
         /*+------------------------------------------------+*/
         /*| These are the spell_bits 1 for "normal spells" |*/
         /*+------------------------------------------------+*/
			   
#define SPELL_ICE             0x00000001        /* Ice spell */
#define SPELL_SHOCK           0x00000002        /* Electric spell */
#define SPELL_WIND            0x00000004        /* Wind spell */
#define SPELL_SHARD           0x00000020        /* Shard breath */
#define SPELL_VAMPIRIC        0x00000040        /* Drains hps to caster */
#define SPELL_ACID            0x00000080	/* Eats equipment */
#define SPELL_FIRE            0x00000100	/* Burns equipment */
#define SPELL_ADD_MOVE        0x00000200	/* Heals Moves */
#define SPELL_REMOVES_BIT     0x00000400	/* Removes a bit (like poison) */

#define SPELL_TWO_SAVES       0x00000800	/* Victim gets 2 saves, so
						   the possibility of resisting
                                                   is greatly increased. */
 
#define SPELL_HALVED_SAVE     0x00001000	/* If victim "saves", dam is 
						   halved */

#define SPELL_HEALS_DAM       0x00002000	/* Heals Hps */
#define SPELL_MASS_DISTORTION 0x00004000        /* Mass distortion...half */
#define SPELL_LIGHT           0x00008000        /* Light spells */
#define SPELL_NOCAST          0x00010000        /* Can't be cast */
#define SPELL_MULTIMANA       0x00020000        /* Multiple mana used */
#define SPELL_AREA            0x00040000        /* Area Spell */
#define SPELL_RANGED          0x00080000        /* Inherantly Ranged */                                            
/* ======================================================================== */
/*     Connected states, similar to MERC's, used to define what state a     */
/*                           connection is in.                              */
/* ======================================================================== */

#define CON_PLAYING                      0	/* Playing the game */
#define CON_STATE_ONE                    1	/* At login screen */
#define CON_GET_OLD_PASSWORD             2	/* Entering password */
#define CON_CONFIRM_NEW_NAME             3	/* New user, confirming new name */
#define CON_GET_NEW_PASSWORD             4	/* Asking for new password */
#define CON_CONFIRM_NEW_PASSWORD         5	/* Confirming new password */
#define CON_GET_NEW_SEX                  6	/* Get sex of new user */
#define CON_GET_NEW_RACE                 7	/* Get race of new user */
#define CON_CONFIRM_NEW_RACE             8	/* Confirm this race */
#define CON_READ_MOTD                   10	/* Reading the message of the day */
#define CON_CONFIRM_ROLL                11	/* Confirming stat roll */
#define CON_GET_NEW_ANSI                12	/* Asking for ANSI */
#define CON_ASK_MENU                    13	/* Login Menu.  Unused. */
#define CON_SHOW_TITLE                  14	/* Showing the title screen. */
#define CON_GET_PAGELEN                 15	/* Asking page length */
#define CON_CHANNELD                    16	/* Special for mudlink */
#define CON_RWHO			17	/* Executing remote who */

#define CON_AEDITOR                     -1	/* Area Editor */
#define CON_REDITOR                     -2	/* Room Editor */
#define CON_MEDITOR                     -3	/* Mob Editor */
#define CON_OEDITOR                     -4	/* Object Editor */
#define CON_CEDITOR                     -5	/* Clan Editor */
#define CON_FSEDITOR                    -7	/* Fullscreen Editor */
#define CON_PEDITOR                     -8	/* Player editor */
#define CON_SEDITOR                     -9	/* Spell Editor */
#define CON_GODMENU                    -10	/* God Menu */
#define CON_SOCEDIT                    -11	/* Social Editor */
#define CON_SCRIPTEDITOR               -12	/* Script/trigger Editor */
#define CON_SOCIEDITOR                 -13      /* Society Editor */
#define CON_SHELL		       -14	/* Shell */
#define CON_HEDITOR                    -15      /* Help Editor */
/* ======================================================================== */
/*               Used for ACT calls, similar to diku style 'act'            */
/* ======================================================================== */

#define TO_ROOM             0	/* Display to the room, not to char */
#define TO_NOTVICT          1	/* Display to the room, not char or victim */
#define TO_VICT             2	/* Display to the victim */
#define TO_CHAR             3	/* Display to the character */
#define TO_ROOM_SPAM        4	/* Display TO_ROOM only if spam mode off */
#define TO_NOTVICT_SPAM     5	/* Display TO_NOTVICT only if spam mode off */
#define TO_VICT_SPAM        6	/* Display TO_VICT only if spam mode off */
#define TO_CHAR_SPAM        7	/* Display TO_CHAR only if spam mode off */

#define RC_GOODRACE     0x04000000     /* Mask for good race */
#define RC_EVILRACE     0x08000000     /* Mask for evil race */
#define RC_NEUTRALRACE  0x10000000     /* Unused. */

/* ======================================================================== */
/*                             Mob types.                                   */
/* ======================================================================== */

#define MOB_HUMAN                0 
#define MOB_ELF                  1 
#define MOB_DWARF                2 
#define MOB_GNOME                3 
#define MOB_GIANT                4 
#define MOB_DRAGON               5 
#define MOB_CANINE               6
#define MOB_RODENT               7
#define MOB_INSECT               8
#define MOB_UNDEAD               9
#define MOB_GOLEM               10
#define MOB_DEMON               11
#define MOB_TROLL               12
#define MOB_BIRD                13
#define MOB_FISH                14
#define MOB_STATUE              15
#define MOB_FELINE              16
#define MOB_PLANT               17
#define MOB_GENERAL_ANIMAL      18
#define MOB_FAERIE              19
#define MOB_REPTILE             20
#define MOB_GHOST               21	
#define MOB_OTHER               22
#define MOB_OGRE                23	
#define MOB_ELEMENTAL           24	
#define MOB_ORC                 25	
#define MOB_DUMMY               27	
#define MOB_ARACHNID            28
#define MOB_GNOLL               29
#define MOB_BUGBEAR             30
#define MOB_SKAVEN              31
#define MOB_TROGLODYTE          32
#define MOB_GOBLIN              33
#define MOB_ILLITHID            34
#define MOB_KENDER              35
#define MOB_MINOTAUR            36
#define MOB_SPRITE              37
#define MOB_DRACONIAN           38
#define MOB_HOBGOBLIN           39
#define MOB_HOBBIT              40
#define MOB_CENTAUR             41
#define MOB_MUTANT              42
#define MOB_NUKE                43
#define MAX_MOB_TYPE            45

/* ======================================================================== */
/*  Hit types for weapons.  Some unused.  Tried to maintain compatability   */
/*                        with diku type muds...                            */
/* ======================================================================== */

#define TYPE_UNDEFINED               -1
#define TYPE_HIT                     1000	/* Max 1000 dynamic spells */
#define TYPE_SLASH                   1001
#define TYPE_PIERCE                  1002
#define TYPE_WHIP                    1003
#define TYPE_POLEARM                 1004
#define TYPE_POUND                   1005
#define TYPE_SUCTION                 1006
#define TYPE_SHOT                    1090
#define MAX_ATTACK                   17         /* Unused! (?) max index+1 */
#define MAX_ATTACK_TYPES             8

/* ======================================================================== */
/*            Maximum player defined aliases a person can set up            */
/* ======================================================================== */

#define MAXALIAS      35

/* ======================================================================== */
/*                  Color defines and other ANSI codes.                     */
/* ======================================================================== */

#define BLACK      "\x1b[1;30m"
#define RED        "\x1b[31m"
#define GREEN      "\x1b[32m"
#define YELLOW     "\x1b[33m"
#define BLUE       "\x1b[34m"
#define PURPLE     "\x1b[35m"
#define CYAN       "\x1b[36m"
#define GREY       "\x1b[37m"

#define B_BLACK    "\x1b[40m"
#define B_RED      "\x1b[41m"
#define B_GREEN    "\x1b[42m"
#define B_YELLOW   "\x1b[43m"
#define B_BLUE     "\x1b[44m"
#define B_PURPLE   "\x1b[45m"
#define B_CYAN     "\x1b[46m"
#define B_GREY     "\x1b[47m"

#define CLRSCR     "\x1b[2J"
#define CLREOL     "\x1b[K"

#define DOWNARROW  "\x1b[B"
#define RIGHTARROW "\x1b[C"
#define UPARROW    "\x1b[A"
#define LEFTARROW  "\x1b[D"
#define HOMEPOS    "\x1b[H"

#define BOLD       "\x1b[1m"
#define FLASH      "\x1b[5m"
#define INVERSE    "\x1b[7m"
#define NTEXT      "\x1b[0;37m"

#define TAB        "\x9"

/* ======================================================================== */
/*                 The color for items laying on the ground.                */
/* ======================================================================== */

#define ITEMCOLOR  "\x1b[0;36m"

#define ACT_CRASHER         0x00000001

/* ======================================================================== */
/*  Tried to keep things similar to Diku/Merc, for area conversion, but I   */
/*                  don't think it's very possible.. sigh                   */
/* ======================================================================== */

#define ACT_STAY_AREA        0x00000001		
#define ACT_SENTINEL         0x00000002		
#define ACT_SCAVENGER        0x00000004		
#define ACT_AGGRESSIVE       0x00000008		
#define ACT_WIMPY            0x00000010		
#define ACT_KILLSQUISHY      0x00000020  	
#define ACT_PET              0x00000040		
#define ACT_UNTOUCHABLE	     0x00000080		
#define ACT_PRACTICE         0x00000100		
#define ACT_UNVAL            0x00000200		
#define ACT_FASTHUNT         0x00000400  
#define ACT_HUNTED_NOTHERE   0x00000800	
#define ACT_SCRAMBLE         0x00001000		
#define ACT_MOUNTABLE        0x00002000		
#define ACT_ANGRY            0x00008000		
#define ACT_BANK_TELLER      0x00020000		
#define ACT_STAYOFFROAD      0x00020000	
#define ACT_DEALER           0x00040000
/* ======================================================================== */
/*  On all flags from here on, there was no attempt to keep other codebase  */
/*                             value flags.                                 */
/* ======================================================================== */

#define REPAIRS_FREE         0x00080000		/* Repairs items for free */
#define REPAIRS_ONE          0x00100000		/* repairs 1/8 cost */
#define REPAIRS_TWO          0x00200000		/* ditto except 1/4 cost */

#define ACT_ATTITUDE         0x04000000		/* attacks if looked at */
#define ACT_AVENGED          0x08000000         /* Avengers come if killed */
#define ACT_REBOOT_ONLY      0x10000000         /* Dont repop after killed */

/* ======================================================================== */
/*            The following is coins data for 5 types of coins              */
/* ======================================================================== */

#define COPPER          0
#define SILVER          1
#define GOLD            2
#define PLATINUM        3
#define OBSIDIAN        4
#define MAX_COINS       5

/* ======================================================================== */
/*                              Mob acts.                                   */
/* ======================================================================== */

#define ACT3_GUARD_DOOR       0x00000002  /* Set to guard a door */
#define ACT3_GUARD_DOOR_ALIGN 0x00000008  /* Guards door from 'good'*/
#define ACT3_WALL             0x00000010  /* This mob is a wall */
#define ACT3_MIMIC            0x00000020  /* This mob looks like an item */


#define ACT3_AREA_CASTER      0x00000100  /* Mob casts area spells sometimes */
#define ACT3_THIEF            0x00000200  /* Mob steals and backstabs */
#define ACT3_MUTE             0x00010000  /* Can't yell */
#define ACT3_RIDE             0x00020000  /* Rides prev mob reset */
#define ACT3_FOLLOW           0x00040000  /* Will follow " " " " */
#define ACT3_REGENERATE       0x00080000  /* Regenerates fast rate */
#define ACT3_SLEEP            0x00400000  /* Sleeps sometimes*/
#define ACT3_DISABLED         0x01000000  /* Mapping disabled */
#define ACT3_STAYROAD         0x02000000  /* Stays on road */

#define ACT4_ENTERSCRIPT      0x00000001  /* Mob has an assoc enter script */
#define ACT4_LEAVESCRIPT      0x00000002  /* Mob has an assoc leave script */
#define ACT4_COMMANDSCRIPT    0x00000004  /* Mob has command script on it. */
#define ACT4_QUICKTICK        0x00000008  /* Mob has a script every quicktick */
#define ACT4_MOVESCRIPT       0x00000010  /* Mob has a script when it moves. */

     /*+--------------------------------------------------------+*/
     /*| These are the flags to check if the mob attacks anyone |*/
     /*+--------------------------------------------------------+*/

#define ACT4_KILL_OPP         0x00004000  /* spams  */
#define ACT4_KILL_SAME        0x00008000  /* spams KILL EVIL */
#define ACT4_KILL_CLAN        0x00010000  /* Kills members asshole clans */
#define ACT4_PROTECTOR        0x00020000  /* Casts spells at "enemy" */
#define ACT4_KILLALLONE       0x00040000  /* Kills everything flag one */
#define ACT4_KILLALLTWO       0x00080000  /* Kills everything flag two */
#define ACT4_KILLMOPP         0x00100000  /* Kills mobs of diff align */
#define ACT4_KILLMGOOD        0x00200000  /* Kills good mobs */
#define ACT4_SUMMONER         0x00400000  /* Summons help while in combat */
#define ACT4_KILLGLADIATOR    0x00800000  /* kills 'gladiator' */
#define ACT4_SLEEPAGGRO       0x01000000  /* aggro towards sleeping players */
#define ACT4_ASSISTONE        0x02000000  /* assists mobs with name AONE */
#define ACT4_ASSISTTWO        0x04000000  /* assists mobs with name ATWO */
#define ACT4_REST             0x08000000  /* mob rests when no PC's in room */
#define ACT4_RANGER           0x10000000  /* attacks "beast" */
#define ACT4_ASSISTALL        0x20000000  /* Will assist all fighting mobs in room */
#define ACT4_RESCUEONE        0x40000000  /* rescue mobs with name PRTCT */
#define ACT4_RESCUETWO        0x40000000  /* rescue mobs with name CODEONE */

/* ======================================================================== */
/*  Aff flags are COMPLETELY different. Here is the idea. The first aff[0]  */
/* gives the affects on a char (sometimes bad or good, the elemental stuff  */
/* at the end of aff[0] is the shields like from Eye of the storm twinkmuds */
/* and the second aff[1] tells what the char is resistant to. It allows for */
/*  what I feel is cleaner code. aff[2] are beneficial affects aff[3] are   */
/*               detects for things in aff[2] if necessary.                 */
/* ======================================================================== */

                 /*+--------------------------------+*/
                 /*| These are to ref things better |*/
                 /*+--------------------------------+*/

#define HURT 0
#define PROT 1
#define AFF 2
#define DET 3
#define REMOVE 4


/* Mob list 1 less than player list, 
   Player list must be 1 less than total_list */

#define MOB_LIST          80
#define PLAYER_LIST       81
#define TOTAL_LIST        82


/* Split up object list like this... */

#define OBJ_TIMED          0
#define OBJ_UNTIMED        1


/* These are the flags for societies */

#define SOCIETY_EXPLORER       0x00000001
#define SOCIETY_AGGRESSIVE     0x00000002
#define SOCIETY_WARLIKE        0x00000004
#define SOCIETY_SPAWNING       0x00000008
#define SOCIETY_DESTRUCTIBLE   0x00000010
#define SOCIETY_XENOPHOBIC     0x00000020
#define SOCIETY_BUILDERS       0x00000040
#define SOCIETY_EXPANDING      0x00000080



#define CASTE_WARRIOR          0x00000001
#define CASTE_GATHERER         0x00000002
#define CASTE_LEADER           0x00000004
#define CASTE_BUILDER          0x00000008
#define CASTE_MERCHANT         0x00000010
#define CASTE_EXPLORER         0x00000020


/* These are for special combat things mobs do. */

#define TACTICS_BACKSTAB     0x00000001
#define TACTICS_CIRCLE       0x00000002
#define TACTICS_KICK         0x00000004
#define TACTICS_BASH         0x00000008
#define TACTICS_TACKLE       0x00000010
#define TACTICS_FLURRY       0x00000020
#define TACTICS_FLAIL        0x00000040
#define TACTICS_BASHCAST     0x00000080
#define TACTICS_DISARM       0x00000100
#define TACTICS_HEAL         0x00000200 

 /*+----------------------------------------------------------------------+*/
 /*| These are used only in HURT and PROT. Makes it easier to add affects |*/
 /*|        to a person based on their resistances and things.            |*/
 /*+----------------------------------------------------------------------+*/

#define BLIND       0x00000001    /* Cannot see */
#define POISON      0x00000002    /* Poison - harder to regen */
#define PLAGUE      0x00000004    /* Bad sickness spreads */
#define CURSE       0x00000008    /* Cannot recall */
#define CONFUSE     0x00000010    /* Sometimes commands do random things */
#define OUTLINE     0x00000020    /* Easier to hit */    
#define WOUND       0x00000040    /* Loses hps fast. same as leaves blood */
#define LETHARGY    0x00000080    /* Loses moves fast when moving. */
#define MINDSAP     0x00000100    /* Loses mana fast. */
#define PARALYZE    0x00000200    /* Cannot do anything. */
#define CHARM       0x00000400    /* Follows order from its master. */
#define FEAR        0x00000800    /* Harder time attacking - less dam etc */
#define SLOW        0x00001000    /* Fewer attacks, slower casting */
#define FUMBLE      0x00002000    /* More likely to drop stuff. */
#define BEACON      0x00004000    /* You are on where. prot = prot_locate */
#define MUTE        0x00008000    /* You cannot talk or cast */
#define DEAF        0x00010000    /* You cannot hear... */
#define NUMB        0x00020000    /* Hard to pick up and hold things... */
#define SLEEP       0x00040000    /* Character is forced to sleep. */
#define VAMPIRIC    0x00080000    /* No heal, drains hps attacking */
#define LIGHT       0x00100000    /* Creature is hurt by light. */
#define BURNING     0x00200000    /* You're on fire, makes you lose hp. */

/*+------------------------------------------------------------------------+*/
/*|  These things are used under PROT And AFF And HURT under HURT they are |*/
/*|  painful, under PROT they protect, and under AFF they are shields like |*/
/*|                  from Eye of the Storm twinkmuds.                      |*/
/*+------------------------------------------------------------------------+*/

#define GAS         0x00800000      /* Corrosive gas causes poison too */
#define FIRE        0x01000000      /* Fireshield/resist */
#define WIND        0x02000000      /* Air..causes spells to fail */
#define ACID        0x04000000      /* Causes Eq to be broken */
#define CHAOS       0x08000000      /* Chaos changes hps and stuff */
#define SHARDS      0x10000000      /* Shards of rocks spinning around */
#define SHOCK       0x20000000      /* Shockshield */
#define ICE         0x40000000      /* Iceshield/resist */
#define ETHEREAL    0x80000000    /* Ethereal, non_magical weapons pass
				     through*/
           /*+-------------------------------------------+*/
           /*| These are used in DET and AFF for can_see |*/
           /*+-------------------------------------------+*/

#define INVIS       0x00000001      /* Invis */
#define HIDE        0x00000002      /* Hidden */
#define CHAMELEON   0x00000004      /* Chameleoned (super hide) */
#define VANISH      0x00000008      /* Rarer invis */
#define FOGGY       0x00000010      /* Pass through doors, hard to see */
#define DARK        0x00000020      /* Needs infrared to see */
#define COLD        0x00000040      /* In dark, need more than infra to see. */
#define SNEAK       0x00000080      /* Makes no noise entering room */

          /*+-----------------------------------------------+*/
          /*|     These are used in AFF regular affects     |*/
          /*| Don't go above 0x0040000 due to shields here. |*/
          /*+-----------------------------------------------+*/

#define MAGIC         0x00000100    /* Is this person or thing magical? */
#define SANCTUARY     0x00000200    /* Some Dam prot */
#define FLYING        0x00000400    /* Flying or not */
#define REGENERATE    0x00000800    /* Fast hps regen */
#define MINDSHIELD    0x00001000    /* protects from spells */
#define WATER_BREATH  0x00002000    /* Breath underwater */
#define PROT_ALIGN    0x00004000    /* Absorb some dam from other aligns */
#define SPEED         0x00008000    /* More combat attacks */
#define SAFE          0x00010000    /* Safe from attacks */
#define REFLECT       0x00020000    /* Sends spells back at caster */
#define PROTECT       0x00040000    /* Massive reduction in combat damage */

/* ======================================================================== */
/*             Sexflags - specifically follow Diku standard                 */
/* ======================================================================== */

#define SEX_NEUTRAL                   0
#define SEX_MALE                      1
#define SEX_FEMALE                    2

/* ======================================================================== */
/*        These loosely follow theisles std and mortal conquest std         */
/* ======================================================================== */

#define OBJ_VNUM_CORPSE_NPC           10   /* vnum of generic mob corpse */
#define OBJ_VNUM_CORPSE_PC            11   /* vnum of generic player corpse */
#define OBJ_VNUM_SEVERED_HEAD         12   /* vnum of severed head */
#define OBJ_VNUM_TORN_HEART           13   /* torn heart */
#define OBJ_VNUM_SLICED_ARM           14   /* sliced arm */
#define OBJ_VNUM_SLICED_LEG           15   /* sliced leg */
#define OBJ_VNUM_INTESTINES           16   /* intestines */
#define OBJ_VNUM_BLOOD                40   /* Blood trails */
#define ROOM_VNUM_ARENA              504   /* Arena room number */
#define VNUM_WAITONE                 508   /* Waiting room 1 for arena */
#define VNUM_WAITTWO                 509   /* Waiting room 2 for arena */
#define ARENA_WAIT_TICK                2   /* Ticks in waiting room before
                                              the arena battle begins */
#define SEARCH_INV_FIRST               1   /* Search inventory first, for use
                                              with find_item_here. */
#define SEARCH_ROOM_FIRST              2   /* Search room first. */

/* ======================================================================== */
/*   Full compatibility with Theisles, but possible additions.  I can't     */
/*   guarentee all flags do exactly the same things.  Ranged weapons are    */
/*   completely disabled, as I lifted the ranged weapon code from an old    */
/*   version of mortal conquest, and feel bad about using it.  I'll code    */
/*                          my own in due time.                             */
/* ======================================================================== */

#define ITEM_ARMOR                  1
#define ITEM_WEAPON                 2
#define ITEM_RAW                    3
#define ITEM_FOOD                   4
#define ITEM_CONTAINER              5
#define ITEM_DRINK_CON              6
#define ITEM_GEM                    7
#define ITEM_LIGHT                  8
#define ITEM_TOOL                   9
#define ITEM_AMMO                  10
#define ITEM_TREASURE              11
#define ITEM_POTION                12
#define ITEM_BOOK                  13
#define ITEM_FURNITURE             14
#define ITEM_TRASH                 15
#define ITEM_KEY                   16
#define ITEM_SCROLL                17
#define ITEM_WAND                  18
#define ITEM_VEHICLE               19
#define ITEM_CORPSE_NPC            20
#define ITEM_CORPSE_PC             21
#define ITEM_FOUNTAIN              22
#define ITEM_PILL                  23
#define ITEM_STAFF                 24
#define ITEM_CLIMBABLE             25
#define ITEM_SCALABLE              26
#define ITEM_SCALE_DEV             27
#define ITEM_MAP                   28
#define ITEM_TRAP                  29
#define ITEM_SHIELD                30
#define ITEM_MISSILE               31
#define ITEM_SIEGE                 32
#define ITEM_NUKE                  33
#define ITEM_MAX                   34

          /*+---------------------------------------------+*/
          /*| Different types of raw materials this is v0 |*/
          /*+---------------------------------------------+*/

#define RAW_MINERAL  1
#define RAW_HERB     2
#define RAW_WOOD     3
#define RAW_FIBER    4
#define RAW_CLOTH    5
#define RAW_HIDE     6
#define RAW_SHARD    7

              /*+-------------------------------------+*/
              /*| Pseudo oop - identifies a structure |*/
              /*+-------------------------------------+*/

#define K_OBJECT         1	/* structure is an object */
#define K_OBJ            1	/* structure is an object */
#define K_CHAR           2	/* structure is a character */
#define K_ROOM           3	/* structure is a room */
#define K_PC             4	/* structure is a player structure */
#define K_ONLINE         5      /* structure is an online spot */


              /*+---------------------------------------+*/
              /*| These values follow Theisles standard |*/
              /*+---------------------------------------+*/

#define CONT_CLOSEABLE                0x01	/* Can container be opened/closed? */
#define CONT_PICKPROOF                0x02	/* Is the container pickproof? */
#define CONT_CLOSED                   0x04	/* Does the container default to closed? */
#define CONT_LOCKED                   0x08	/* Is the container locked? */
#define CONT_INDESTRUCTABLE           0x10      /* This item cannot be 
                                                   destroyed by fire */
#define CONT_WHEELED                  0x20      /* This item can be pulled */
#define CONT_MORTAR                   0x40      /* This item is a mortar for brewing */
#define LIGHT_LIT                     0x01	/* Is the light lit? */
#define LIGHT_FILLABLE                0x02	/* Is the light refillable? */
#define TOOL_TINDERBOX                0x01	/* Is this a tinderbox? */
#define TOOL_LOCKPICK                 0x02	/* Is this a lockpick? */
#define TOOL_FLASH_POWDER             0x04      /* Is this flash powder? */
#define TOOL_FORGING                  0x08      /* This is a forging hammer */
#define TOOL_PICKAXE                  0x10      /* This is pickaxe for mining*/
#define TOOL_NEEDLE                   0x20      /* This is a needle */
#define TOOL_PESTLE                   0x40      /* This is a pestle for brewing */

/* ======================================================================== */
/*  For portals. Value 4 to retain compatibility with mortal conquest code  */
/* ======================================================================== */

#define FURN_EXIT                     4
#define FURN_FORGE                    8         /* This is a forge. */
#define FURN_ANVIL                   16         /* This is an anvil */
#define FURN_LOOM                    32         /* This is a loom for weaving */
#define FURN_PLAYABLE                64         /* This is a playable furniture */

/* ======================================================================== */
/*            I tried to keep compatibility with merc/theisles.             */
/* ======================================================================== */

#define ITEM_GLOW            0x00000001	/* Can hit ghosts if on a weapon */
#define ITEM_HUM             0x00000002	/* Can hit ghosts if on a weapon */
#define ITEM_COMMANDSCRIPT   0x00000004 /* Item has command script on it */
#define ITEM_DROPSCRIPT      0x00000008 /* Item has a script when dropped */
#define ITEM_EVIL            0x00000010	/* Registers with detect evil */
#define ITEM_INVIS           0x00000020	/* Item is invisible */
#define ITEM_MAGIC           0x00000040	/* Item registers with detect magic */
#define ITEM_NODROP          0x00000080	/* Can't drop this item */
#define ITEM_GIVESCRIPT      0x00000100 /* Item has a script when given */
#define ITEM_VAMPIRIC        0x00000400 /* Item drains hps to attacker */
#define ITEM_NOREMOVE        0x00001000	/* Can't unequip this item */
#define ITEM_INVENTORY       0x00002000	/* For shop use, internal */
#define ITEM_NOSAVE          0x00004000	/* Item doesn't save when you quit */
#define ITEM_POWER           0x00008000	/* Item of power.. Eats up sanct */
#define ITEM_UNSEEN          0x00010000 /* Hidden. - cannot search */
#define ITEM_PIERCE          0x00020000	/* Gives a bonus for piercing skill */
#define ITEM_SLASHING        0x00040000	/* slashing */
#define ITEM_CONCUSSION      0x00080000	/* pounding/concussion */
#define ITEM_WHIP            0x00100000	/* whipping */
#define ITEM_HEAVY_SLASH     0x00200000	/* VERY HEAVY - hitroll */
#define ITEM_LIGHT_SLASH     0x00400000	/* Gives a large slashing bonus */
#define ITEM_GOOD            0x00800000 /* Registers with detect good */
#define ITEM_SAVE            0x01000000	/* Item stays on  death. */
#define ITEM_NOSTORE         0x02000000	/* Cannot store this item  */
#define ITEM_POLEARM         0x04000000	/* Polearm */

#define ITEM_ELEMENTAL       0x08000000 /* Item causes elemental effects */
#define ITEM_WOUND           0x10000000 /* Wounding item */
#define ITEM_BLIND           0x20000000 /* Blinding item */
#define ITEM_POISON          0x40000000 /* Poison item */

#define ITEM_TAKE            0x00000001
#define ITEM_FLOATING        0x00000002
#define ITEM_WEAR_HEAD       0x00000004
#define ITEM_WEAR_EYES       0x00000008
#define ITEM_WEAR_EARS       0x00000010
#define ITEM_WEAR_FACE       0x00000020
#define ITEM_WEAR_NECK       0x00000040
#define ITEM_WEAR_ARMS       0x00000080
#define ITEM_WEAR_ELBOW      0x00000100
#define ITEM_WEAR_SHIELD     0x00000200
#define ITEM_WEAR_WRIST      0x00000400
#define ITEM_WEAR_HANDS      0x00000800
#define ITEM_WEAR_FINGER     0x00001000
#define ITEM_WIELD           0x00002000
#define ITEM_WEAR_SHOULDER   0x00004000
#define ITEM_WEAR_BODY       0x00008000
#define ITEM_WEAR_ABOUT      0x00010000
#define ITEM_WEAR_BACK       0x00020000
#define ITEM_WEAR_WAIST      0x00040000
#define ITEM_WEAR_BELT       0x00080000
#define ITEM_WEAR_KNEE       0x00100000
#define ITEM_WEAR_LEGS       0x00200000
#define ITEM_WEAR_ANKLE      0x00400000
#define ITEM_WEAR_FEET       0x00800000

#define MAX_WEAR                     24

/* ======================================================================== */
/*           Theisles/merc compatible, although many are unused             */
/* ======================================================================== */

#define APPLY_NONE                    0
#define APPLY_STR                     1
#define APPLY_DEX                     2
#define APPLY_INT                     3
#define APPLY_WIS                     4
#define APPLY_CON                     5
#define APPLY_LCK                     6
#define APPLY_WIL                     7
#define APPLY_AGI                     8
#define APPLY_END                     9
#define APPLY_CHA                    10
/* 11 */
#define APPLY_MANA                   12
#define APPLY_HIT                    13
#define APPLY_MOVE                   14
/* 15 16 */
#define APPLY_AC                     17	/* Positive is good */
#define APPLY_HITROLL                18	/* Positive is good */
#define APPLY_DAMROLL                19	/* Positive is good */
#define APPLY_SAVING_THROW           20	/* Positive is good */
/* 21 */
#define APPLY_KICK_DAMAGE            22
#define APPLY_SNEAK                  23
#define APPLY_HIDE                   24
#define APPLY_WARMTH                 25
#define APPLY_RANDOM_STAT            26
#define MAX_APPLY                    27

/* ======================================================================== */
/*  Once again, the room flags keep semi-compatibility, although manny are  */
/*                 unused, and some are very different                      */
/* ======================================================================== */

#define R_MARK               0x00000001	/* Room is dark */
#define ROOM_NO_MOB          0x00000002	/* No mobs will wander in. */
#define ROOM_INDOORS         0x00000004	/* Room is indoors */
#define ROOM_LOWMAGIC        0x00000008 /* Room suppresses magic */
#define ROOM_HIGHMAGIC       0x00000010 /* Extra magic power here...*/
#define ROOM_UNDERGROUND     0x00000020 /* This room is underground */
#define ROOM_PET_SHOP        0x00000040	/* Is a pet shop */
#define ROOM_NOHEAR          0x00000080 /* cannot hear from here */
#define ROOM_NOISY           0x00000100 /* Noisy; yells don't go as far */
#define ROOM_DARK            0x00000200	/* Mark a room */
#define ROOM_NOSUMMON        0x00000400	/* Can't summon TO/FROM this room */
#define ROOM_UNTRACKABLE     0x00000800	/* Can't track through this room */
#define ROOM_NOMAGIC         0x00001000	/* No spells allowed here */
#define ROOM_SILENCE         0x00002000	/* Nobody can talk from here */
#define ROOM_NO_RECALL       0x00004000	/* Can't recall from here */
#define ROOM_CLANSTORE       0x00008000	/* This is a clan storage room */
#define ROOM_SHADED          0x00010000 /* Is room shaded or not? */
#define ROOM_LIT             0x00020000 /* Is room ALWAYS lit? */
#define ROOM_MINERALS        0x00040000 /* Room has minerals */
#define ROOM_COMMANDSCRIPT   0x08000000 /* Room has command script. */
#define ROOM_ENTERSCRIPT     0x10000000 /* Room has an enter script. */
#define ROOM_LEAVESCRIPT     0x20000000 /* Room has a leave script. */
#define ROOM_DROPSCRIPT      0x40000000 /* Room has a dropped item script */
#define ROOM_GETSCRIPT       0x01000000 /* Room has a get item script */

/* ======================================================================== */
/*   These are for the transport update routine...to split them off from    */
/* The rest of the types of things which are not checked each second or 2.  */
/* ======================================================================== */

#define ROOM2_FALLSFAST       0x00000001 /* Person falls down if they are in*/
#define ROOM2_EXTRAHEAL       0x00000002 /* Slight healing bonus in this room2 */
#define ROOM2_EXTRAMANA       0x00000004 /* Slight mana bonus in this room2.. buggy */
#define ROOM2_MOVING          0x00000008 /* Room2 has a 'current' */
#define ROOM2_MANADRAIN       0x00000010 /* Drains all mana */
#define ROOM2_POISONTRAP      0x00000040 /* Poison arrows shoot characters */
#define ROOM2_ARROWTRAP       0x00000080 /* Arrows shoot characters */
#define ROOM2_ROCKTRAP        0x00000100 /* Rocks fall on characters */
#define ROOM2_SPIKETRAP       0x00000200 /* Spikes stab characters */
#define ROOM2_GASTRAPONE      0x00000400 /* Unused, not working */
#define ROOM2_GASTRAPTWO      0x00000800 /* Noxious gas poisons characters */

#define ROOM2_GEYSERTRAP      0x00001000 /* Gyser scalds */

#define ROOM2_AVALANCHE       0x00002000 /* Avalanche... goes off once (buggy) */
#define ROOM2_ACIDSPRAY       0x00004000 /* Sprays player with acid */

#define ROOM2_FIRETRAP        0x00008000 /* Fire burns characters */

/* ======================================================================== */
/*             Direction compatibility with all diku-based muds             */
/* ======================================================================== */

#define DIR_NORTH                     0
#define DIR_EAST                      1
#define DIR_SOUTH                     2
#define DIR_WEST                      3
#define DIR_UP                        4
#define DIR_DOWN                      5
#define MAX_DIR                       6

/* ======================================================================== */
/*                  Mortal Conquest compatible exit flags                   */
/* ======================================================================== */

#define EX_ISDOOR            0x00000001	/* This IS a door */
#define EX_CLOSED            0x00000002	/* Door is closed */
#define EX_LOCKED            0x00000004 /* Door is locked */
#define EX_PICKPROOF         0x00000010	/* Door cannot be picked */
#define EX_BASHPROOF         0x00000020	/* Door cannot be broken */
#define EX_ISWALL            0x00000040 /* Exit is a wall... */
#define EX_HIDDEN            0x00000100	/* Hidden door */
#define EX_RESET             0x00000200	/* Resets on repop if broken */
#define EX_HASTRAP           0x00000400 /* This exit has a trap */
#define EX_EAT_KEY           0x00000800 /* The exit destroys keys used in it */

/* ======================================================================== */
/*                              Sector types.                               */
/*                 Small compatibility with Mortal Conquest                 */
/* ======================================================================== */

                     /*+-----------------------+*/
                     /*| easy movement sectors |*/
                     /*+-----------------------+*/

#define SECT_INSIDE                   0	/* Inside, set INDOORS flag too! */
#define SECT_CITY                     1	/* City, easy moving */
#define SECT_TOWN                     2 /* Town area */
#define SECT_ROAD                     3 /* Road sector */
#define SECT_TRAIL                    4 /* Trail Sector */
#define SECT_PATH                     5 /* A trail through wilderness */
#define SECT_BRIDGE		      6 /* Bridge Sector */
#define SECT_FIELD                    7	/* Field, easy moving */
#define SECT_GRASSLANDS               8 /* Grasslands - open rich */
#define SECT_SAVANNAH                 9 /* Warm, lush grasslands */

 /*+---------------------------------------------------------------------+*/
 /*| End of easy movement sectors begin special sectors which need stuff.|*/
 /*+---------------------------------------------------------------------+*/

#define SECT_WATER_SWIM              10	/* Swimable water */
#define SECT_WATER_NOSWIM            11	/* Unswimable water */
#define SECT_UNDERWATER              12	/* Underwater */
#define SECT_MOUNTAIN                13	/* Need mountain boots-vehicle	 */
#define SECT_AIR                     14	/* Air sector */
#define SECT_CLOUDS                  15 /* Up in the clouds */   
#define SECT_SNOW                    16	/* Hard moving, cold */

       /*+---------------------------------------------------------+*/
       /*| End special sectors that need stuff, now onto the rest. |*/
       /*+---------------------------------------------------------+*/

#define SECT_ICE		     17 /* Ice sector.. slippery footing */
#define SECT_ARCTIC                  18 /* Cold like sect_snow... */
#define SECT_TUNDRA                  19 /* Cold and barren wastes */
#define SECT_TROPICAL                20	/* Tropical, hot */
#define SECT_MARSH		     21 /* Marsh sector.. no blood trails */
#define SECT_SWAMP                   22 /* Swamp area..yeah im scraping */
#define SECT_HOLLOW                  23 /* Cool and dark marsh... */
#define SECT_STEPPE                  24 /* Cool, dry grasslands */
#define SECT_PLAINS                  25 /* Plains sector (big field) */
#define SECT_BRUSH                   26 /* Brush sector... */
#define SECT_FOREST                  27	/* Forest, tough going */
#define SECT_WOODS                   28 /* Another forest type */
#define SECT_CANYON                  29 /* Canyon--dark alot */
#define SECT_HILLS                   30	/* Hills, tough going */
#define SECT_ROCKY                   31 /* Rocky, hard to keep footing */
#define SECT_WASTELAND               32 /* Almost as bad as desert, dry */
#define SECT_DESERT                  33	/* Desert, -2 thirst, hot */
#define SECT_RUINS                   34 /* Ancient, abandoned place */
#define SECT_LAVA                    35 /* Lava Area */
#define SECT_ASTRAL                  36 /* Astral sector...need spell */

               /*+------------------------------------+*/
               /*| These are the underground sectors! |*/
               /*+------------------------------------+*/

#define SECT_CAVE                    37 /* Underground cave */
#define SECT_HOLE                    38 /* A Place over a hole */
#define SECT_CAVERN                  39 /* BIG cave underground */
#define SECT_PASSAGE                 40 /* A type of tunnel */
#define SECT_ALCOVE                  41 /* A Small chamber */
#define SECT_CHAMBER                 42 /* An underground opening */
#define SECT_VAULT                   43 /* MASSIVE cave..can fly */
#define SECT_SUBTERRANIAN            44 /* under the earth area */
#define SECT_SHAFT                   45 /* A shaft...dunno */
#define SECT_PIT                     46 /* Above or in a pit */
#define SECT_TUNNEL                  47 /* Underground path */
#define SECT_TUBE                    48 /* Round formed tunnel */
#define SECT_NUKE                    49 /* This is used to nuke rooms */
#define SECT_MAX                     50 /* End of sectors */

/* ======================================================================== */
/*                     Food/Liquids player state                            */
/* ======================================================================== */

#define COND_DRUNK                    0
#define COND_FULL                     1
#define COND_THIRST                   2
#define COND_STARVING                 3

/* ======================================================================== */
/*                          Miscellaneous stuff                             */
/* ======================================================================== */

#define AUTH                          2
#define MAX_HOLD                      6  /* Number of hold slots chars get.. */
#define WEAR_NONE                    -1
#define WRITE_AUTH                    1

/* ======================================================================== */
/*                              Guild Flags                                 */
/* ======================================================================== */

#define GUILD_WARRIOR      0 
#define GUILD_WIZARD       1
#define GUILD_HEALER       2 
#define GUILD_THIEF        3
#define GUILD_RANGER       4
#define GUILD_MYSTIC       5
#define GUILD_ASSASSIN     6
#define GUILD_TINKER       7
#define GUILD_BATTLEMASTER 8
#define GUILD_SORCERER     9

#define NUM_GUILDS         10

#define NUM_TIERS          5
#define MAX_TIERS          5

/* ======================================================================== */
/*                               Positions                                  */
/* ======================================================================== */

#define POSITION_DEAD                      0    /* Dead */
#define POSITION_MORTAL                    1	/* Mortally wounded */
#define POSITION_INCAP                     2	/* Incapacitated */
#define POSITION_STUNNED                   3	/* Stunned */
#define POSITION_SLEEPING                  4	/* Sleeping */
#define POSITION_RESTING                   5	/* Resting */
#define POSITION_BASHED                    6	/* Bashed to ground */
#define POSITION_GROUNDFIGHTING            7	/* Groundfighting */
#define POSITION_FIGHTING                  8	/* Fighting */
#define POSITION_CIRCLE                    9	/* Circling */
#define POSITION_FALLING                  10	/* Falling! */
#define POSITION_MEDITATING               11    /* Meditation */
#define POSITION_STANDING                 12	/* Standing, not fighting */
#define POSITION_RUNNING                  13	/* Running */
#define POSITION_SEARCHING                14	/* Searching for exit/item */
#define POSITION_BACKSTAB                 15	/* Backstab preparation */
#define POSITION_INVEST                   16	/* Investigating */
#define POSITION_CASTING                  17	/* Casting a spell */
#define POSITION_SHOOTING                 18    /* Shooting a wpn */
#define POSITION_MINING                   19    /* Mining for chunks */
#define POSITION_FIRING                   20    /* Firing a siege engine */
#define MAX_POSITIONS                     20    /* MAX num positions. */

/* ======================================================================== */
/*                           Player set bits                                */
/* ======================================================================== */

#define PLR_HOLYLIGHT        0x00000004	/* Can see in the dark, invis, etc */
#define PLR_MAPPING          0x80000000 /* is the player mapping */
#define PLR_NOIBM            0x40000000 /* Plr does not use ibm for map */
#define PLR_VIEWMOBS         0x10000000 /* Plr views mobs on map */
#define PLR_VIEWPLAYERS      0x08000000 /* Plr views mobs on map */
#define PLR_MAPSPAM          0x08000000 /* Plr gets spammy updates */
#define PLR_LOG              0x00000010	/* Keep logs of this player's commands */
#define PLR_DENY             0x00000020	/* Deny this character from logging in */
#define PLR_FREEZE           0x00000040	/* Freeze this character */
#define PLR_HOLYPEACE        0x00010000 /* No on can fight in rooms you are */
#define PLR_HOLYWALK         0x00020000	/* Can walk through anything, anywhere */
#define PLR_HOLYLAG          0x00100000	/* Is this immortal delayed on delayed 				   commands like mortals? */
#define PLR_NOCLAN           0x00200000 /* Is this person forbidden to join a clan? */
#define PLR_LAMER            0x00400000 /* Is this person a lamer? */
#define PLR_NOACTION         0x00800000 /* Is player forbidden to auct? */
#define PLR_NOAUCTION        0x02000000 /* Plr cannot auction anymore */ 
#define PLR_HAS_SHOES        0x04000000 /* Players has shoes on */
#define PLR_HAS_MTN_BOOTS    0x08000000 /* Players has mtn boots on*/
#define PLR_HAS_SCUBA        0x10000000 /* Players has scuba on */
#define PLR_HAS_BOAT         0x20000000 /* Players has a boat */
#define PLR_HAS_SNOWSHOES    0x40000000 /* Players snowshoes  */
#define PLR_HAS_SHIELD       0x80000000 /* This player is using a shield */

/* ======================================================================== */
/*    This is the new automatic description system different desc types     */
/*                   set while creating a character.                        */
/* ======================================================================== */

#define DESC_BUILD                    0 /* Character's Build */
#define DESC_FACIAL_FEATURE           1 /* Character's facial feature */
#define DESC_EYES_COLOR               2 /* Character's eyes color */
#define DESC_EYES_ASPECT              3 /* Character's eyes aspect */
#define DESC_SKIN_COMPLEXION          4 /* Character's skin complexion */
#define DESC_HAIR_LENGTH              5 /* Character's hair length */
#define DESC_HAIR_COLOR               6 /* Character's hair color */
#define DESC_HAIR_STYLE               7 /* Character's hair style */
#define DESC_FACIAL_HAIR              8 /* Character's facial hair */
#define DESC_FUR_COLOR                9 /* Character's fur color */

#define NUM_DESC_TYPES                9

/* ======================================================================== */
/*                  Bits for immort notification on events                  */
/* ======================================================================== */

#define WIZ_NOTIFY           0x00000080
#define WIZ_NOTIFY_1         0x00000100
#define WIZ_NOTIFY_2         0x00000200
#define WIZ_NOTIFY_LOGIN     0x00000400
#define WIZ_NOTIFY_DEATH     0x00000800
#define WIZ_NOTIFY_BUG       0x00001000
#define WIZ_NOTIFY_LOG       0x00002000
#define WIZ_NOTIFY_SCRIPT    0x00004000

/* ======================================================================== */
/*                         Internal channel ID's                            */
/* ======================================================================== */

#define CHANNEL_AUCTION      0x00000001
#define CHANNEL_CHAT         0x00000002
#define CHANNEL_CLANTALK     0x00000004
#define CHANNEL_IMMTALK      0x00000008
#define CHANNEL_NOTIFY       0x00000010
#define CHANNEL_YELL         0x00000080
#define CHANNEL_GODTALK      0x00000100

/* ======================================================================== */
/*      Auto's conforming to theisles 1.0 and mortal conquest standards     */
/* ======================================================================== */

#define PLR_AUTOGOLD         0x00000100	/* Gets gold from kills */
#define PLR_AUTOEXIT         0x00000200	/* Displays exits in room desc */
#define PLR_AUTOLOOT         0x00000400	/* Loots all kills */
#define PLR_AUTOSAC          0x00000800	/* Sacs corpses of all kills */
#define PLR_BLANK            0x00001000	/* Blank line before prompt */
#define PLR_BRIEF            0x00002000	/* Brief mode - no long room descs */
#define PLR_COMBINE          0x00004000	/* Combine object listings */
#define PLR_PROMPT           0x00008000	/* Prompt is on/off */
#define PLR_TELNET_GA        0x00010000 /* Non-compat, but same name!  Warning */
#define PLR_ASSIST           0x00020000	/* Auto-assists people in group against
					   mobs.  To assist against other players,
					   you must manually type assist. */
#define PLR_AUTOSPLIT        0x00040000	/* auto-splits any cash looted */
#define PLR_SILENCE          0x00080000	/* Player cannot use channels */
#define PLR_AUTOSCAN         0x00100000 /* You get the scan messages from
                                           players of opp align in adjacent
                                           rooms */
#define PLR_AUTOBLINK        0x00200000 /* Player uses blink skill. */
#define PLR_ANSI             0x00400000	/* Ansi is on/off for this player? */
#define PLR_ANONYMOUS        0x00800000 /* Use the old editors */
#define PLR_DESTROY          0x01000000 /* Player tries to destroy items */
#define PLR_PROMPT_UP        0x08000000	/* Prompt with map or down below? */
#define PLR_NOSUMMON         0x10000000 /* Plr cannot be summoned */
#define PLR_ASCII            0x20000000 /* Internal Ascii (high ibm chars) */

/* ======================================================================== */
/*  Mana types retain full compatibility with Mortal conquest and Theisles  */
/* ======================================================================== */

#define MANA_ANY           0x80
#define MANA_NONE          0x00
#define MANA_EARTH         0x01
#define MANA_AIR           0x02
#define MANA_FIRE          0x04
#define MANA_WATER         0x08
#define MANA_SPIRIT        0x10

#define MANA_TYPES 5

/* ======================================================================== */
/*                           Spelltype targets..                            */
/* ======================================================================== */

#define TAR_IGNORE                  0x00000000	/* No target needed */
#define TAR_CHAR_OFFENSIVE          0x00000001	/* Offensive spell */
#define TAR_CHAR_DEFENSIVE          0x00000002	/* Defensive spell */
#define TAR_CHAR_SELF               0x00000004	/* Self only */
#define TAR_OBJ_INV                 0x00000008	/* Object in inventory */
#define TAR_ALL_IN_ROOM             0x00000010	/* Everyone in room */

#ifdef WINDOWS
#define PLAYER_DIR      "..\\plr\\"
#define PLAYER_DIR_2    "..\\plr\\"
#define NULL_FILE       "..\\src\\LoC"
#else
#define PLAYER_DIR      "../plr/"
#define PLAYER_DIR_2    "../plr/"
#define NULL_FILE       "/dev/null"
#endif

#define AREA_LIST       "playarea.lst"
#define NOTE_FILE       "plnotes.txt"

extern char *globalalias_name[200];
extern char *globalalias_expansion[200];

struct scriptassoc {
	SA	*next;
	char	*flagname;
	char	*flagtext;
};

extern SA *sa_head[27];  /* 1=A, 26=Z */

/* ======================================================================== */
/*                           Auction Data                                   */
/* ======================================================================== */

struct auct_data 
{
  CHAR_DATA *bychar;
  CHAR_DATA *tochar;
  short going;
  int minbid;
  int bid;
  int number;
  char item_name[SML_LENGTH];
  SINGLE_OBJECT *item;
  AUCTION *next;
};

/* ======================================================================== */
/*     This reads from dam.dat.  Allows for configurable damage messages    */
/* ======================================================================== */

struct dammsg_data
  {
    short generic_range[20][2];
    short generic_percent[20][2];
    char *gen_m[20];
    char *gen_m1[20];
    char *gen_m2[20];
};

/* ======================================================================== */
/* This reads from power.dat.  It can be used to configure the entire mud.  */
/* ======================================================================== */

struct power_data
  {
    bool all_newbies_good;	/* Do all newbies start as good? */
    int level_to_choose;        /* Level newbies choose their side */
    int choose_in_room;         /* Which room people choose sides in */
    short initial_hp[2];	/* Initial hit points for newbies */
    short remort_hp[2];		/* Remort initial hit points */
    short initial_mv[2];	/* Initial move points for newbies */
    short remort_mv[2];		/* Remort initial move points */
    short hitgain[10][5];	/* Hit gains in a given level range */
    short rem_hitgain[10][5];	/* Remort hit gains in a given level range */
    short movegain[10][4];  	/* Move gains in a given level range */
    short rem_movegain[10][4];	/* Remort move gains in a given level range */
    bool remort_bonus_fixed;    /* Tells if remort bonus is fixed JRAJRA */
    int remort_in_room;         /* Must be here to "remort" */
    int transform_in_room;	/* Must be in this room to transform */
    bool add_to_stats;		/* Remorts add stats? */
    short max_remorts;		/* Maximum remorts */
    short remorts_for_restart;  /* Number of remorts needed to restart
				   as a "restart race" */
    short remort_level;		/* Level you must be to remort */
    bool vaporize_inv;		/* Vaporize inventory when remorting? */
    bool vaporize_all;		/* Vaporize everything when remorting? */
    int beams_to_room;		/* Jump to this room after remorting? */
    bool weather;		/* Weather effects on/off */
    bool player_prompt;		/* Player defined prompts? */
    bool skill_loss_on_mob_death; /* skills lost on mob death? */
    bool skill_loss_on_pk_death;  /* skills lost on pk death? */
    int amount_lost_on_death;	  /* Actual skill amount lost on death */
    bool arena_on;		/* Arena active? */
    bool arena_good_evil;	/* Good/Evil fights in arena? */
    bool validation;		/* Validation system on/off */
    char email_to[50];		/* Email to here for validation */
    int space_allowed;          /* Space allowed for bootup */
    bool easier_moves;		/* Easier movement method */
    int max_prac_spells;	/* Maximum spell percentage you can practice to */
    int max_prac_skills;	/* Maximum skill percentage you can practice to */
    int newbie_object[10];	/* Newbies start with these objects */
    bool allow_where;		/* Allow use of 'where' command? */
    int space_needed;		/* Shared string space needed on bootup. */
    bool evil_can_cast;		/* Evil can cast spells? */
    short practice_percent;	/* Use to scale practices per level */
    short repair_weapons[3];	/* Costs to repair weapons */
    short repair_armors;	/* Costs to repair armor */
    short tinker_discount;	/* Discount for tinker guild members */
    short resize_divisor;	/* Resize divisor for resize cost */
    short groundfight_stand;	/* Chance of standing in a groundfight */
    bool equip_in_combat;	/* Equip armor in combat? */
    bool remove_while_fighting;	/* Remove armor while fighting? */
    bool score_while_fighting;	/* Use score while fighting? */
    bool give_while_fighting;	/* Give objects while fighting? */
    char *god_names[5];		/* Holds the name of mudgods. */
    int level_to_see_numeric_stats; /* Level to see numeric stats, unused. */
    short base_hp_regen;	/* Base hp regen per heartbeat */
    short base_mp_regen;	/* Base mp regen per heartbeat */
    short hp_bonus_resting;	/* Hp regen bonus for resting */
    short hp_bonus_sleeping;	/* Hp regen bonus for sleeping */
    short mp_bonus_resting;	/* Move bonus for resting */
    short mp_bonus_sleeping;	/* Move bonus for sleeping */
    short med_mana_regen_bonus;	/* Meditating regen for mana */
    short base_mana_regen_bonus; /* Non-meditating regen for mana */
    bool tackle_with_weapon;	/* Allow tackling with a weapon? */
    bool tackle_person_with_weapon; /* Allow tackling a person with a weapon? */
    bool allow_rerolls;		/* Allow rerolls in old creation method? */
    short flurry_mps;		/* Move point cost for flurry */
    char *learned[20];		/* Description of how well you know spells/skills */
    short low_range[20];	/* Range for learned */
    short high_range[20];	/* Range for learned */
    char *exp_to_level;		/* Interpretted exp to level. */
    char *highlev_exp_to_level; /* Interpretted highlevel exp to level */
    short prereq;		/* Minimum you must know a given skill for it
				   to count as a satisfied prerequisite. */
    char *mob_exp;		/* Mob exp to level, interpretted. */
    short armor_lev_min[20];	/* Armor level range */
    short armor_lev_max[20];	/* Armor level range */
    char *armor_lev_word[20];	/* Armor level range descriptions. */
    bool restore_when_level;	/* Free restore when you level? */
    bool can_summon_mobs;	/* Does the game allow mob summoning? */
    bool morts_use_color_chat;	/* Can morts use colors in channels? */
    bool show_race_select_info;	/* Shows race stats to newbies? */
    char flee_chance;		/* Percent chance that fleeing will fail */
    bool bash_slip_to_tackle;	/* Can a bash slip into a groundfight? */
    bool penalize_evil_in_sun;	/* Penalize evil in direct sunlight? */
    bool get_from_corpse_while_in_combat; /* Loot corpses while fighting? */
    char plague_chance;		/* Chance others in the room will catch
				   plague from you, if infected. */
    char *gods;			/* Gods who run the place */
    int  max_level;		/* maximum level, cannot exceed 90 */
    bool can_fight_self;	/* Can fight yourself? */
    char loot_level;		/* What level can you loot a corpse? */
    bool auction_lag;	
    bool good_kill_good;
    bool evil_kill_evil;
    int remort_req[13][6];
    int augment_cost[12][7];
    int big_group_pkill_whore;
    short stats_per_remort;
    short guild_points_per_remort;
    short resistance_points_per_remort;

};

/* ======================================================================== */
/*                       Mob info (used in def.)                            */
/* ======================================================================== */

struct mob_nfo
{
  char *name;
  char *attackname;
  short color;
  char symbol;
};


/* ======================================================================== */
/*                    For use with syslag, sysfinger.                       */
/* ======================================================================== */

struct shell_command
  {
    SHELL *next;
    char caller[50];
    char fname[20];
    int wait;
  };

/* ======================================================================== */
/*                            Banned site data                              */
/* ======================================================================== */

struct ban_data
  {
    BAN_DATA *next;
    char *name;		/* Numeric site ban */
    bool newbie;	/* Newbie banned?  If so, people from this site
			   must go through email validation to play! */
    char *who_banned;   /* Keep a trace of who banned */
    char *ban_time;     /* Time that the *name was sitebanned */
    char *ban_reason;   /* Reason why *name is banned */
  };

/* ======================================================================== */
/*                              Bank item data                              */
/* ======================================================================== */

struct bank_item
   {
     int warpoints;
     int gold;
   };

/* ======================================================================== */
/*                          Combat Field Structure                          */
/* ======================================================================== */

                  /*+----------------------------------+*/
                  /*| Damages.. partially implimented. |*/
                  /*+----------------------------------+*/

struct damages_struct
  {
    char *kick_dam;
  };



/* See society.c for better documentation of this next part. This is
   designed to set up a community of mobs that grows and interacts
   and eventually does things like send out war parties and sends
   out new colonies etc. Very much in the beginning stages... */

#define NUM_CASTES        10
#define MAX_CASTE_RANKS   5   /* Change this if you want more ranks */


struct society_data
{
  SOCIETY_DATA *next;    /* Next society in the list */
  int vnum;              /* What the society number for this is. */
  char *name;            /* The name of the society */
  int room_start_vnum;   /* Society starts in this room */
  int num_start_rooms;   /* How many rooms above this number they start in */
  CASTE_DATA *caste[NUM_CASTES];
  int flags;             /* Flags this society takes. */
};


struct caste_data 
{
  int num_ranks;                    /* How many ranks there are in this. */
  int mob_start_vnum;               /* The vnum where the mobs start */
  char *name;                       /* The caste name */
  short chance_to_advance[MAX_CASTE_RANKS]; /* How likely you are to adv */
  short curr_pop[MAX_CASTE_RANKS];  /* How many of each rank exist.. */
  short max_pop[MAX_CASTE_RANKS];   /* Max population of each rank */
  int flags;                        /* Flags for this caste - goals etc.. */
};




                     /*+------------------------------+*/
                     /*| The key to the spell editor. |*/
                     /*+------------------------------+*/

struct spell_data
{
  SPELL_DATA *next;		/* Next spell, hashed by number */
  SPELL_DATA *next_a;		/* Next spell, hashed by spell name */
  int slot;			/* 0 = skill, 1 = spell, 2 = prof */
  int gsn;			/* General slot number.  internal use */
  int spell_type;		/* Offensive, defensive, etc... */
  int spell_bits;		/* SPELL_SUMMON, etc.. */
  int spell_bits2;            /* More spell bits :P */
  char *spell_name;		/* The spell's name */
  int spell_level;		/* Minimum level to cast this spell */
  char *prereq_1;		/* Spell prereq #1 */
  char *prereq_2;		/* Spell prereq #2 */
  SPELL_DATA *pre1;           /* Prereq1 to be less cpu intensive */
  SPELL_DATA *pre2;             /* Prereq2 to be less cpu intensive */
  int num_prereqs[3];           /* Number of prereqs for spell */
  bool go_to_second;            /* Is there vert line to second prereq? */
  char *noun_damage;		/* Noun damage for offensive combat spells */
  char *act_to_ch_1;		/* Shown to character when he/she casts */
  char *act_to_ch_2;		/* Just another line to show to char */
  char *act_to_vict_1;	        /* To victim */
  char *act_to_vict_2;
  char *act_to_notvict_1;	/* To everyone in room besides char + vict */
  char *act_to_notvict_2;
  int aff[4];                   /* Affect flags added by spell. */
  int location[5];		/* Modifies this location (str, dex, etc) */
  char *duration;		/* Needs to be a string so we can have vars */
  char *modifier[5];		/* Amount to modify location */
  char *damage;	      	        /* If combat spell, how much dam (w/vars) */
  int mana;			/* Minimum Mana cost */
  int mana_type;		/* Mana type */
  int multi_mana_level[MANA_TYPES];      /* Multiple Mana Levels */
  int multi_mana;              /* Is it a Multiple Mana Spell? */
  int casting_time;		/* Casting delay time. 10 = 1 combat round */
  int position;		        /* Position you must be in to cast */
  char *wear_off_msg;		/* When the spell wears off, this msg is disp'd */
  int creates_obj;		/* Creates this object vnum */
  unsigned char min_stat[NUM_STATS];
  unsigned char guilds[NUM_GUILDS];
  int in_room;                /* Must be in this room vnum to cast. */
  int spell_lag;              /* Number of hours between castings */
  int fail_chance;            /* percent chance it fails  */
  int pk_fail_chance;         /* percent chance it succeeds if person has pk                                    noquit timer set > 2 */
};

/* ======================================================================== */
/*                        Where a blow is struck.                           */
/* ======================================================================== */

#define STRIKE_BODY   1
#define STRIKE_HEAD   2
#define STRIKE_LEGS   3
#define STRIKE_ARMS   4

/* ======================================================================== */
/*                        Structure that armor has.                         */
/* ======================================================================== */

struct item_armor
  {
    char tag;
    signed char warmth;		/* v9 */
    signed char protects_legs;	/* v0 */
    signed char protects_body;	/* v1 */
    signed char protects_head;	/* v2 */
    signed char protects_arms;	/* v3 */
    signed char max_condition;	/* v6 */
    signed char condition_now;	/* v7 */
  };

/* ======================================================================== */
/*                       Weapons have these values.                         */
/* ======================================================================== */

struct item_weapon
  {
    char tag;
    signed short damage_p;	/* v0 */
    signed short strength;	/* v1 */
    unsigned short casts_spell; /* v2 */
    signed short attack_type;	/* v3 */
    signed short firstdice;	/* v7 */
    signed short seconddice;	/* v8 */
  };

/* ======================================================================== */
/*                       Missiles have these values.                        */
/* ======================================================================== */

struct item_missile
{
char tag;
signed char damage_p;       /* v0 - How damaged is it */
signed char strength;       /* v1 - How much damage it can absorb */
signed char aiming_time;    /* v2 - How long it takes to aim */
signed char shots_per_use;  /* v3 - Number of ammo released with each shot*/
signed char ammo_type;      /* v4 - must match ammo... */
signed char range;          /* v5 - How far it can shoot */
};

/* ======================================================================== */
/*                         Ammos have these values.                         */
/* ======================================================================== */

struct item_ammo
{
char tag;
signed char firstdice;      /* v7 - damage dice */
signed char seconddice;     /* v8 - damage dice */
signed char ammo_type;      /* v4 what kinds of ammo */
signed char shots_left;     /* v0 */
signed char total_shots;    /* v1 */
};

/* ======================================================================== */
/*                         Shields have these values.                       */
/* ======================================================================== */

struct item_shield
{
char tag;
int current_power;          /* v0 */
int max_power;              /* v1 */
};

/* ======================================================================== */
/*                   Drink Containers have these values.                    */
/* ======================================================================== */

struct item_drink_container
  {
    char tag;
    signed char max_liquid;     /* v1 */
    signed char liquid_now;     /* v0 */
    signed char liquid_type;    /* v2 */
    signed char not_poison;     /* v3 */
  };

/* ======================================================================== */
/*                         Lights have these values.                        */
/* ======================================================================== */

struct item_light
  {
    char tag;
    signed char light_lit;	/* v3 */
    signed char light_now;	/* v0 */
    signed char max_light;	/* v1 */
    signed char light_fillable;	/* v2 */
  };

/* ======================================================================== */
/*                           Tools have these values.                       */
/* ======================================================================== */

struct item_tool
  {
    char tag;
    signed char tool_type;	/* v0 */
    signed char uses;		/* v1 */
    signed char max_uses;	/* v2 */
  };

/* ======================================================================== */
/*                      Raw items have these values.                        */
/* ======================================================================== */

struct item_raw
{
  char tag;
  char type;                    /* v0 Cloth mineral wood herb etc... */
  char rank;                    /* v1 iron, steel, adamantium etc... */
};

/* ======================================================================== */
/*                        Traps have these values.                          */
/* ======================================================================== */

struct item_trap
{
  char tag;
  unsigned char location;     /* v0 */
  unsigned char type;         /* v1 */
};

/* ======================================================================== */
/*                         Vehicules have these values.                     */
/* ======================================================================== */

struct item_vehicle
  {
    char tag;
    signed char sector_use;	/* v0 */
  };

/* ======================================================================== */
/*                         Fountains have these values.                     */
/* ======================================================================== */

struct item_fountain
  {
    char tag;
    signed short liquid;	/* v0 */
    signed short spells[3];	/* v1-> */
  };

/* ======================================================================== */
/*                         Potions have these values.                       */
/* ======================================================================== */

struct item_potion
  {				/* Scrolls/pills/potions */
    char tag;
    unsigned char spell_level;	/* v0 */
    signed short spells[3];	/* v1-> */
  };

/* ======================================================================== */
/*                          Food have these values.                         */
/* ======================================================================== */

struct item_food
  {
    char tag;
    signed char hours;		/* v0 */
    signed char not_poison;	/* v3 */
  };

/* ======================================================================== */
/*                            Gems have these values.                       */
/* ======================================================================== */

struct item_gem
  {
    char tag;
    signed short gem_type;	/* v0 */
    signed short mana_now;	/* v1 */
    signed short max_mana;	/* v2 */
    unsigned short max_level;	/* v3 */
    unsigned short casts_spell; /* v4 */
  };

/* ======================================================================== */
/*                          Wands have these values.                        */
/* ======================================================================== */

struct item_wand
  {                                /* Wands/staffs */
    char tag;
    unsigned char spell_level;     /* v0 */
    signed char max_charges;       /* v1 */
    signed char current_charges;   /* v2 */
    signed short spells[3];        /* v3-> */
  };

/* ======================================================================== */
/*                       Furnitures have these values.                      */
/* ======================================================================== */

struct item_furniture
  {
    char tag;
    signed char type;		/* v0 */
    int to_room_vnum;		/* v1 */
    int gametype;               /* v3 */ /* Used for play command. */
    signed char portal_flags;	/* v5 */ /* OR!!!! if it is an anvil,
                                         this number is the maximum rank of
                                         item that can be forged on it! */
  };
/* ======================================================================== */
/*                    Siege engines have these values.                      */
/* ======================================================================== */

struct item_siege
  {
    char tag;
    signed char type;		/* v0 */
    signed char flags;          /* v1 - usually ammo type */
    signed char ammo_type;      /* v2 - uses ammo just like bows */
    signed char firing_time;    /* v3 - how long it takes to fire */
    signed char range;          /* v4 - how far it can shoot */
    short hps;                  /* v5 - how much damage it has left*/
    short max_hps;              /* v6 - how much damage it can take */
    
  };

/* ======================================================================== */
/*                       Containers have these values.                      */
/* ======================================================================== */

struct item_container
  {
    char tag;
    int max_weight;		/* v0 */
    int flags;   		/* v1 */
    int key_vnum;		/* v2 */
    int money;			/* v8 */
    int trap_type;              /* v3 */
    char reason_for_death[30];
    char looted_by[30];
    char looted_by_two[30];
  };

/* ======================================================================== */
/*                      Climbable items have these values.                  */
/* ======================================================================== */

struct item_climbable
  {
    char tag;
    signed char up_down;	/* v0 */
    int above;			/* v2 */
    int below;			/* v3 */
  };

/* ======================================================================== */
/*                        Books items have these values.                    */
/* ======================================================================== */

struct item_book
  {
    char tag;
    signed short teaches;	/* v0 */
  };

/* ======================================================================== */
/*                               Time info data                             */
/* ======================================================================== */

struct time_info_data
  {
    short year;
    short month;
    short hour;
    short day;
  };



/* ======================================================================== */
/*   Weather compatibility followed from Theisles.. may be different than   */
/*                       expected though... warning!                        */
/* ======================================================================== */

struct weather_data
  {
    int mmhg;		/* Mercury mm */
    short temperature;	/* Farenheight temp */
    int change;		/* Last change */
    short sky;		/* Sky value */
    short sunlight;	/* Sunlight value */
    short winddir;	/* Wind direction */
    short windspeed;	/* Wind speed */
  };

/* ======================================================================== */
/*                            Item infos                                    */
/* ======================================================================== */

struct item_info
{
  char name[20];        /* The name of the item type */
  int  number;          /* The actual type number */
  char desc[200];       /* Brief description of what this type of item does. */
};

/* ======================================================================== */
/* The bidding is messy, but it's a port from long ago when I wrote it for  */
/*                           midpoint void...                               */
/* ======================================================================== */

struct bid_data
  {
    char fighters[2][17];	/*[0] and [1] hold the two fighters' names */
    char bidders[50][17];	/*Character names of bidders (didn't to structs cuz 
                                  of quitting/etc */
    long bids[50];		/*actually monetary bid */
    bool bidfor[50];		/*FALSE for fighter 0, TRUE for fighter 1 */
    bool taking_bids;		/*Are we still up for bidding or has the fight begun? */
    int waitticks;
  };

    /*+------------------------------------------------------------+*/
    /*| Ranking data holds top MAX_RANKING_DATA on multiple topics |*/
    /*+------------------------------------------------------------+*/

struct rank_data
{
  char name[17];
  float value;
  int alignment;
};

/* ======================================================================== */
/*        Semi-compatibility with Theisles, but nothing guarenteed!         */
/* ======================================================================== */

struct descriptor_data
  {
    socket_t descriptor;        /* Actual file descriptor number */
    DESCRIPTOR_DATA *next;
    DESCRIPTOR_DATA *snoop_by;	/* Snooping by another descriptor */
    CHAR_DATA *original;	/* Original, for use in switching into mobs */
    CHAR_DATA *character;	/* player this descriptor is attached to */
    int timeout_counter;	/* Login screen timeout counter */
    short connected;		/* Connect state */
    int atimes;			/* Authorization ident attempts */
    socket_t auth_fd;		/* Authorization ident file desc */
    int auth_state;		/* Authorization state */
    int auth_inc;
    char abuf[100];		/* Authorization buffer for in/out */
    char host[30];		/* Hostname this player comes from */
    char hosttwo[30];		/* Host prefix for extra checking */
    char *hostname;		/* Hostname.  Unused due to slow dns lookups */
    char *username;		/* Username result from ident */
    int max_outbuf;		/* Maximum outbuffer size used so far.  Outbuffer
				   is allocated in 256 byte chunks, and can
				   grow depending on how much text needs to
				   be in the buffer at once. */
    char inbuf[2002];		/* Input buffer */
    char incomm[2004];		/* Input command buffer */
    char inlast[2004];		/* Last Input buffer contents */
    int repeat;			/* Repeat count; catch spammers */
    char *outbuf;		/* Output buffer pointer */
    char *showstr_head;		/* Head of string pausing */
    char *showstr_point;	/* Pointer to showstring string pausing */
    void *pEdit;		/* Pointer to structure currently editing */
    int outsize;		/* Output size */
    int outtop;			/* Output max */
    int location;		/* Location in fullscreen editor */
    char **pString;		/* Pointer to string currently editing */
    int fdpair[2];		/* File desc pair for shelling */
    short roll[NUM_ROLLS];      /* Rolling choice for each option (current = 4) */
    int act;                    /* Combines a lot of other stuff */
  };

/* ======================================================================== */
/*  Theisles and mortal conquest compat.  Yes, I copied their file parsing  */
/*   and general helpfile format ideas! However, since it's not the exact   */
/*           same code, I can't guarentee files will be compat.             */
/* ======================================================================== */

struct help_data
  {
    HELP_DATA *next;
    short level;	/* Minimum level to see this helpfile */
    char *keyword;	/* Keyword list to get this helpfile */
    char *text;		/* Actual help text */
  };

/* ======================================================================== */
/*                           CHANNELS follow..                              */
/* ======================================================================== */

#define TO_ALL -2
#define TO_SAME -1

struct channel_type
  {
    CHANNEL *next;
    bool clan;		/* Clan channel? */
    bool clan2;		/* Sect channel? */
    char *channel_name;	/* Channel name */
    char *commands[3];	/* Commands to use this channel */
    int level;		/* Level to use this channel */
    int to_level;	/* Channel is seen by all higher than this level */
    char *color;	/* Color of this channel for newbies */
    int moves;		/* Takes this amount of moves to use channel */
    char to_align;      /* 1 = same align as you  2 = good  3 = evil
                           4 = both aligns */
  };

/* ======================================================================== */
/*                              Shop Data                                   */
/*                            Not compatible                                */
/* ======================================================================== */

struct shop_data
  {
    SHOP_DATA *next;
    int keeper;			/* Vnum of shopkeeper */
    short buy_type[MAX_TRADE]; 	/* What a shopkeeper will buy */
    short profit_buy;		/* Buying profit, in percent */
    short decrease;		/* Decrease percent for multiple items */
    short items_until_decrease;	/* Decrease percent after this many items */
    short profit_sell;		/* Selling profit, in percent */
    unsigned char open_hour;	/* Time the shop opens */
    unsigned char close_hour;	/* Time the shop closes */
    int creates_vnum;		/* Shopkeeper makes this object */
    short creates_hours;	/* ever creates_hours hours. */
  };

/* ======================================================================== */
/*                              Clan Data                                   */
/* ======================================================================== */

struct clan_data
  {
    CLAN_DATA *next;		/* Next Clan in List */
    short vnum;			/* Clan vnum */
    char leader[20];		/* Name of Clan's Leader/Owner */
    char name[60];		/* Name of Clan Itself */
    int start_vnum;		/* Starting vnum of where clanhouse begins */
    short alignment;		/* 1=good,2=evil,0=neut,3=special */
    short minlev;		/* Minlevel of new members */
    char *members[100];		/* Clan members */
    SINGLE_OBJECT *storage[MAX_CLAN_STORAGE]; /* Clan storage */
    bool shitlist;
    int upgrade_level;          /* How far has this clan upgraded? */
  };

/* ======================================================================== */
/*                      Race data for player races                          */
/*                      And now player aligns too                           */
/* ======================================================================== */

struct race_data
  {
    char name[40];              /* Name of the race */
    short bonus[NUM_STATS];	/* Initial stat bonuses */
    short limits[NUM_STATS];	/* Stat limits */
    int start_room;             /* Starting room,100-110 or so 100 = newbie */
    int max_slots[3];           /* Max skills/spells/profs */
    short height_min;           /* Minimum height */
    short height_max;           /* Maximum height */
    int aff[4];
    int nat_augments;           /* Natural augments for this race...*/

   /*+------------------------------------------------------------------+*/
   /*| This is set only when the player enters the game the first time. |*/
   /*+------------------------------------------------------------------+*/

    int natarmor;               /* Natural skin armor class */
    int regen_hit_percent;      /* Hit point regeneration percent */
    int regen_move_percent;     /* Move point regenration percent */
    bool restart_race;          /* Can this race switch alignment? */

   /*+------------------------------------------------------------------+*/
   /*|  These following things are to differentiate races so that they  |*/
   /*|   are not all clones.  The 100 = normal means its a percent of   |*/
   /*|          normal. 0 = normal means its a straight number.         |*/
   /*+------------------------------------------------------------------+*/

    int attack_spell_percent;   /* Spell power bonus or penalty... 100 = normal */
    int combat_damage_bonus;    /* Natural APB 0 = normal */
    int backstab_percent;       /* Bonus to backstab damage 100 = normal*/
    int heal_percent;           /* Bonus to healing 100 = normal*/
    int hps_bonus;              /* Extra or negative hps per level 0 = normal */
    int mana_percent;           /* Natural extra or less mana 100 = normal */
    int nat_skills[3];          /* Each race has up to three natural skills. */
    short parts[4];             /* 0 = leg pairs, 1 = torsos, 2 = heads, 3 = pairs of arms */
  };

/* ======================================================================== */
/*                              Color data                                  */
/*                       Compat with mortal conquest                        */
/* ======================================================================== */

struct color_data
  {
    char code[10];
    char act_code[5];
    char name[15];
    int number;
  };

/* ======================================================================== */
/*                             Material data                                */
/* ======================================================================== */

struct material_data
  {
    char *name;
    char *colorname;
    short weight;  /* /4 for body, /5 for legs, /6 for arms, /7 for head,
                      /7 for feet, /9 for gloves */

    char strength; /* the armor durability/hp value */
    short armor;
    int cost;     /* /3 for body, /5 for legs, /5 for arms, /6 for head
                     /7 for feet, /8 for gloves, etc */

    short wpn_start_location;
    bool nametype;
    int initflags;
    short bonushit;
    short bonushp;
    short bonusmove;
    short bigbonus;
    short kickbonus;
  };

/* ======================================================================== */
/*                             Forged items                                 */
/* ======================================================================== */

struct forged_items
{
  char *name;          /* For forging of first type */
  char *name2;         /* For items of second type */
  int wear_loc;        /* Not including item_take */
  int item_type;       /* armor wpns tool etc */
  int chunk_cost;      /* How many chunks to forge this? */
  int weight_divisor;  /* Divide chunk wgt by this to make the item */
  int cost_divisor;    /* Divide cost by this */
  int num_wear_slots;  /* 1 or 2 */
  int location;        /* Upper = 0; middle = 1; lower = 2 */
  int adjust;          /* Are armor or wpn values of this type adjusted up or down? */
  int armor_location;  /* Where does this armor give ac bonus? 4 = all */
};

/* ======================================================================== */
/*                 Flag data for online creation flags                      */
/* ======================================================================== */

struct flag_data
  {
    char what_you_type[50];	/* What you type to get the flag toggled */
    char how_it_appears[50];	/* How the flag display appears */
    int flagname;		/* The actual FLAG */
  };

/* ======================================================================== */
/*                             Wearing data                                 */
/* ======================================================================== */

struct wearing_data
{
  short part_of_body;
  char what_you_type[50];
  char how_it_appears[50];
  int flagname;
  char wear_name[50];
  short num_slots;
  short weight;
};

/* ======================================================================== */
/*                               Mana data                                  */
/* ======================================================================== */

struct mna_data
{
  char what_you_type[20];       /* The name of the mana type */
  char how_it_appears[20];      /* What actually shows up */
  char color[20];               /* This is the color seen when accessed */
  char letter[3];               /* The single letter used for this */
  int flagname;                 /* The flagname associated with this mana */
  char colorname[20];           /* What color shows up on created gems */
  
};

/* ======================================================================== */
/*             Note data base is compatible with mortal conquest            */
/* ======================================================================== */

struct note_data
{
  NOTE_DATA *next;
  char *sender;         /* Note's sender */
  char *date;		/* Date it wa

Showing the first 100 KB of 213.7 KB. Download the archive for the full file.

Site Stats

Snippets: 1791
Codebases: 571