/*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. * * * * Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * * * Envy Diku Mud improvements copyright (C) 1994 by Michael Quan, David * * Love, Guilherme 'Willie' Arnold, and Mitchell Tse. * * * * EnvyMud 2.0 improvements copyright (C) 1995 by Michael Quan and * * Mitchell Tse. * * * * EnvyMud 2.2 improvements copyright (C) 1996, 1997 by Michael Quan. * * * * In order to use any part of this Envy Diku Mud, you must comply with * * the original Diku license in 'license.doc', the Merc license in * * 'license.txt', as well as the Envy license in 'license.nvy'. * * In particular, you may not remove either of these copyright notices. * * * * Much time and thought has gone into this software and you are * * benefitting. We hope that you share your changes too. What goes * * around, comes around. * ***************************************************************************/ // Set this one to 1 if you have a big fucking problem that causes the // MUD to explode and you can't figure it out. It'll log all kinds of // useless messages to help you track it down - Veygoth //#define HARDCORE_DEBUG /* * Accommodate old non-Ansi compilers. */ #if defined( TRADITIONAL ) #define const #define args( list ) ( ) #define DECLARE_DO_FUN( fun ) void fun( ) #define DECLARE_MOB_FUN( fun ) bool fun( ) #define DECLARE_OBJ_FUN( fun ) bool fun( ) #define DECLARE_SPELL_FUN( fun ) void fun( ) #define DECLARE_GAME_FUN( fun ) void fun( ) #define DECLARE_HIT_FUN( fun ) void fun( ) #else #define args( list ) list #define DECLARE_DO_FUN( fun ) DO_FUN fun #define DECLARE_MOB_FUN( fun ) MOB_FUN fun #define DECLARE_OBJ_FUN( fun ) OBJ_FUN fun #define DECLARE_SPELL_FUN( fun ) SPELL_FUN fun #define DECLARE_GAME_FUN( fun ) GAME_FUN fun #define DECLARE_HIT_FUN( fun ) HIT_FUN fun #endif /* * Short scalar types. * Diavolo reports AIX compiler has bugs with short types. */ #if !defined( FALSE ) #define FALSE 0 #endif #if !defined( TRUE ) #define TRUE 1 #endif #if defined( _AIX ) #if !defined( const ) #define const #endif typedef int unlong; typedef int bool; #define unix #else typedef unsigned long unlong; typedef unsigned char bool; #endif /* * Ok here we define strdup so it can no longer be confused * with str_dup. Suggested by erwin@pip.dknet.dk - Kahn. */ #define strdup STRDUP_ERROR__USE_STR_DUP! /* * Bit defines, so you don't have to recalculate/think up * all the bitvalues every time -- Zen -- */ #define BV00 (1 << 0) /* 1 */ #define BV01 (1 << 1) /* 2 */ #define BV02 (1 << 2) /* 4 */ #define BV03 (1 << 3) /* 8 */ #define BV04 (1 << 4) /* 16 */ #define BV05 (1 << 5) /* 32 */ #define BV06 (1 << 6) /* 64 */ #define BV07 (1 << 7) /* 128 */ #define BV08 (1 << 8) /* 256 */ #define BV09 (1 << 9) /* 512 */ #define BV10 (1 << 10) /* 1024 */ #define BV11 (1 << 11) /* 2048 */ #define BV12 (1 << 12) /* 4096 */ #define BV13 (1 << 13) /* 8192 */ #define BV14 (1 << 14) /* 16384 */ #define BV15 (1 << 15) /* 32768 */ #define BV16 (1 << 16) /* 65536 */ #define BV17 (1 << 17) /* 131072 */ #define BV18 (1 << 18) /* 262144 */ #define BV19 (1 << 19) /* 524288 */ #define BV20 (1 << 20) /* 1048576 */ #define BV21 (1 << 21) /* 2097152 */ #define BV22 (1 << 22) /* 4194304 */ #define BV23 (1 << 23) /* 8388608 */ #define BV24 (1 << 24) /* 16777216 */ #define BV25 (1 << 25) /* 33554432 */ #define BV26 (1 << 26) /* 67108864 */ #define BV27 (1 << 27) /* 134217728 */ #define BV28 (1 << 28) /* 268435456 */ #define BV29 (1 << 29) /* 536870912 */ #define BV30 (1 << 30) /* 1073741824 */ #define BV31 _ERROR_DO_NOT_TRY_TO_USE_THE_SIGN_BIT_ON_A_SIGNED_INTEGER_ /* BV31 is the sign bit, we'll leave it alone - erwin@pip.dknet.dk */ /* * Structure types. */ typedef struct who_data WHO_DATA; typedef struct affect_data AFFECT_DATA; typedef struct bitvect_data BITVECT_DATA; typedef struct area_data AREA_DATA; typedef struct ban_data BAN_DATA; typedef struct char_data CHAR_DATA; typedef struct descriptor_data DESCRIPTOR_DATA; typedef struct exit_data EXIT_DATA; typedef struct extra_descr_data EXTRA_DESCR_DATA; typedef struct help_data HELP_DATA; typedef struct kill_data KILL_DATA; typedef struct mob_index_data MOB_INDEX_DATA; typedef struct note_data NOTE_DATA; typedef struct obj_data OBJ_DATA; typedef struct obj_index_data OBJ_INDEX_DATA; typedef struct pc_data PC_DATA; typedef struct reset_data RESET_DATA; typedef struct room_index_data ROOM_INDEX_DATA; typedef struct shop_data SHOP_DATA; typedef struct time_info_data TIME_INFO_DATA; typedef struct weather_data WEATHER_DATA; typedef struct mob_prog_data MPROG_DATA; typedef struct mob_prog_act_list MPROG_ACT_LIST; typedef struct act_prog_data ACT_PROG_DATA; typedef struct soc_index_data SOC_INDEX_DATA; typedef struct class_type CLASS_TYPE; typedef struct clan_data CLAN_DATA; typedef struct hunt_hate_fear HHF_DATA; typedef struct system_data SYSTEM_DATA; typedef struct game_data GAME_DATA; typedef struct history_data HISTORY_DATA; typedef struct alias_data ALIAS_DATA; typedef struct quest_data QUEST_DATA; // Veygoth typedef struct quest_index_data QUEST_INDEX_DATA; // Veygoth typedef struct quest_item QUEST_ITEM; // Veygoth typedef struct talk_data TALK_DATA; // Veygoth typedef struct event_data EVENT_DATA; // Veygoth typedef struct mem_data MEM_DATA; // Veygoth typedef struct trophy_data TROPHY_DATA; // Veygoth typedef struct coin_data COIN_DATA; // Veygoth typedef struct frag_data FRAG_DATA; // Veygoth /* * Function types. */ typedef void DO_FUN args( ( CHAR_DATA *ch, char *argument ) ); typedef bool MOB_FUN args( ( CHAR_DATA *ch ) ); typedef bool OBJ_FUN args( ( OBJ_DATA *obj, CHAR_DATA *keeper ) ); typedef void SPELL_FUN args( ( int sn, int level, CHAR_DATA *ch, void *vo ) ); typedef void GAME_FUN args( ( CHAR_DATA *ch, CHAR_DATA *croupier, int amount, int cheat, char *argument ) ); typedef bool HIT_FUN args( ( CHAR_DATA *ch, CHAR_DATA *victim, int hit, int dam ) ); /* * String and memory management parameters. */ #define MAX_KEY_HASH 32767 #define MAX_STRING_LENGTH 4096 #define MAX_INPUT_LENGTH 319 #define MAX_WORD_HASH 27 /* The latin alphabet has 26 letters */ /* * Game parameters. * Increase the max'es if you add more of something. * Adjust the pulse numbers to suit yourself. */ #define MAX_CHUNKS 70 /* Used in ssm.c */ #define EXP_PER_LEVEL 2000 #define MAX_SKILL 70 #define MAX_SPELL 150 #define MAX_ATTACK 17 #define MAX_CLASS 18 #define MAX_RACE 70 #define MAX_COIN_RACE 38 // Last race to carry coins #define MAX_PC_RACE 17 #define MAX_LEVEL 65 #define MAX_CIRCLE 12 // Number of spell circles #define MAX_ALIAS 10 #define MAX_HISTORY 10 #define MAX_FRAG 10 // Number of people to keep track of // on each fraglist #define BASE_SPELL_ADEPT 75 #define BASE_SKILL_ADEPT 25 #define MAX_SKILL_ADEPT 95 #define MAX_SPELL_ADEPT 99 #define MAX_BASE_ATTRIBUTE 100 #define L_DIR MAX_LEVEL // = Overlord #define L_SEN ( L_DIR - 1 ) // = Implementor #define L_JUN ( L_SEN - 1 ) // = Greater God #define L_APP ( L_JUN - 1 ) // = Lesser God #define L_DEM ( L_APP - 1 ) // = Demigod #define L_IMM ( L_DEM - 1 ) // = Immortal #define L_AVA ( L_IMM - 1 ) // = Avatar #define L_BUI ( L_AVA - 1 ) // = Builder #define LEVEL_IMMORTAL L_AVA #define LEVEL_HERO ( LEVEL_IMMORTAL - 1 ) // Builders are basically Heros #define L_HER LEVEL_HERO // Veygoth - this is the number of bitvectors in use. If you fill up // another batch of vectors, just increment this by one and add the // definitions #define NUM_AFFECT_VECTORS 5 #define NUM_ITEM_EXTRA_VECTORS 2 // This definition is used for corpse saving. They are saved with vnums // so that they can be loaded back up over crashes and be allowed to // decay after a while. If there are enough zones to make this number a // problem simply up the number. The mud will start saving the corpses // at the new number and after a reboot they will load at the higer vnums. // -- Veygoth #define CORPSE_VNUM 90000 #define PULSE_PER_SECOND 4 #define PULSE_MEMORIZE 4 #define PULSE_AGGRESS 5 #define PULSE_VIOLENCE ( 3 * PULSE_PER_SECOND ) #define PULSE_HITGAIN ( 3 * PULSE_PER_SECOND + (PULSE_PER_SECOND / 2) ) #define PULSE_MANAGAIN ( 5 * PULSE_PER_SECOND ) #define PULSE_MOVEGAIN ( 6 * PULSE_PER_SECOND ) #define PULSE_ROOM ( 5 * PULSE_PER_SECOND ) #define PULSE_OBJECT ( 9 * PULSE_PER_SECOND ) #define PULSE_MOBILE ( 7 * PULSE_PER_SECOND ) #define PULSE_LIST ( 40 * PULSE_PER_SECOND ) #define PULSE_OBJ_UPDATE ( 30 * PULSE_PER_SECOND ) #define PULSE_CHAR_UPDATE ( 30 * PULSE_PER_SECOND ) #define PULSE_WEATHER ( 120 * PULSE_PER_SECOND ) #define PULSE_AREA ( 300 * PULSE_PER_SECOND ) #define PULSE_SAVE_CORPSES ( 600 * PULSE_PER_SECOND ) /* 10 minutes */ #define PULSE_SAVE_SYSDATA ( 900 * PULSE_PER_SECOND ) /* 15 minutes */ #define PULSE_DB_DUMP ( 1800 * PULSE_PER_SECOND ) /* 30 minutes */ /* * Player character key data struct * Stuff for new error trapping of corrupt pfiles. */ struct key_data { char key[12]; /* Increase if you make a key > 11 chars */ int string; /* TRUE for string, FALSE for int */ unlong deflt; /* Default value or pointer */ void * ptrs[7]; /* Increase if you have > 6 parms/line */ }; #define MAND 3344556 /* Magic # for manditory field */ #define SPECIFIED 3344557 /* Key was used already. */ #define DEFLT 3344558 /* Use default from fread_char_obj */ /* * Site ban structure. */ struct ban_data { BAN_DATA * next; char * name; }; /* * Time and weather stuff. * Note that weather changes according to the month (winter). */ #define SUN_DARK 0 #define SUN_RISE 1 #define SUN_LIGHT 2 #define SUN_SET 3 #define MOON_RISE 4 #define MOON_SET 5 #define SKY_CLOUDLESS 0 #define SKY_CLOUDY 1 #define SKY_RAINING 2 #define SKY_LIGHTNING 3 struct time_info_data { int hour; int day; int month; int year; }; struct weather_data { int mmhg; int change; int sky; int sunlight; int windspeed; int winddir; int temperature; }; /* * Colour originally by Lope of Loping Through The MUD * * Redone by Veygoth to support the &+ color codes. */ #define MOD_CLEAR "[0m" /* Resets Color (&n) */ #define MOD_BOLD "[1m" #define MOD_FAINT "[2m" #define MOD_UNDERLINE "[4m" #define MOD_BLINK "[5m" #define MOD_REVERSE "[7m" // Foreground Colors #define FG_BLACK "[0;30m" /* (&+l) */ #define FG_RED "[0;31m" /* (&+r) */ #define FG_GREEN "[0;32m" /* (&+g) */ #define FG_YELLOW "[0;33m" /* (&+y) */ #define FG_BLUE "[0;34m" /* (&+b) */ #define FG_MAGENTA "[0;35m" /* (&+m) */ #define FG_CYAN "[0;36m" /* (&+c) */ #define FG_WHITE "[0;37m" /* (&+w) */ // Bold Foreground Colors #define FG_B_BLACK "[1;30m" /* (&+L) */ #define FG_B_RED "[1;31m" /* (&+R) */ #define FG_B_GREEN "[1;32m" /* (&+G) */ #define FG_B_YELLOW "[1;33m" /* (&+Y) */ #define FG_B_BLUE "[1;34m" /* (&+B) */ #define FG_B_MAGENTA "[1;35m" /* (&+M) */ #define FG_B_CYAN "[1;36m" /* (&+C) */ #define FG_B_WHITE "[1;37m" /* (&+W) */ // Background Colors #define BG_BLACK "[40m" #define BG_RED "[41m" #define BG_GREEN "[42m" #define BG_YELLOW "[43m" #define BG_BLUE "[44m" #define BG_MAGENTA "[45m" #define BG_CYAN "[46m" #define BG_WHITE "[47m" /* * Connected state for a channel. */ #define CON_PLAYING 0 #define CON_GET_NAME 1 #define CON_GET_OLD_PASSWORD 2 #define CON_CONFIRM_NEW_NAME 3 #define CON_GET_NEW_PASSWORD 4 #define CON_CONFIRM_NEW_PASSWORD 5 //#define CON_DISPLAY_RACE 6 No longer used #define CON_GET_NEW_RACE 7 #define CON_CONFIRM_NEW_RACE 8 #define CON_GET_NEW_SEX 9 //#define CON_DISPLAY_CLASS 10 No longer used #define CON_GET_NEW_CLASS 11 #define CON_CONFIRM_CLASS 12 #define CON_GET_COLOR 13 //#define CON_SHOW_MOTD 14 No longer used #define CON_READ_MOTD 15 #define CON_MENU 16 // Veygoth #define CON_PASSWD_GET_OLD -10 #define CON_PASSWD_GET_NEW -11 #define CON_PASSWD_CONFIRM_NEW -12 #define CON_RETIRE_GET_PASSWORD -13 #define CON_RETIRE_CONFIRM -14 #define IS_PLAYING( d ) ( d->connected <= CON_PLAYING ) /* * Race structures */ struct race_type { char * name; char * colorname; // added by Veygoth char * key; int race_abilities; int size; int str_mod; int int_mod; int wis_mod; int dex_mod; int con_mod; int agi_mod; int cha_mod; int pow_mod; int luk_mod; int hp_gain; int mana_gain; int move_gain; int thirst_mod; int hunger_mod; char * dmg_message; char * walk_message; char * hate; int parts; int resistant; int immune; int susceptible; int language; int racewar_side; }; #define RACE_HUMAN 0 #define RACE_BARBARIAN 1 #define RACE_GREYELF 2 #define RACE_RAKSHASA 3 #define RACE_HALFELF 4 #define RACE_FLIND 5 #define RACE_DROW 6 #define RACE_DWARF 7 #define RACE_DUERGAR 8 #define RACE_HALFLING 9 #define RACE_TROLL 10 #define RACE_OGRE 11 #define RACE_ORC 12 #define RACE_GNOME 13 #define RACE_CENTAUR 14 #define RACE_GITHYANKI 15 #define RACE_GOBLIN 16 #define RACEWAR_NONE 0 #define RACEWAR_GOOD 1 #define RACEWAR_EVIL 2 #define RACEWAR_NEUTRAL 3 #define MAX_RACEWAR_SIDE 4 /* Race size defines by Maniac */ #define SIZE_ANY 0 #define SIZE_MINUTE 1 #define SIZE_SMALL 2 #define SIZE_PETITE 3 // (both small and average - small humans) #define SIZE_AVERAGE 4 // (human sized) #define SIZE_MEDIUM 5 // (both average and large - large humans) #define SIZE_LARGE 6 #define SIZE_HUGE 7 #define SIZE_GIANT 8 #define SIZE_TITANIC 9 #define SIZE_GARGANTUAN 10 #define SIZE_NONE 11 // insubstantial /* Race ability bits */ #define RACE_NO_ABILITIES 0 #define RACE_PC_AVAIL BV00 #define RACE_WATERBREATH BV01 #define RACE_FLY BV02 #define RACE_SWIM BV03 #define RACE_WATERWALK BV04 #define RACE_PASSDOOR BV05 #define RACE_INFRAVISION BV06 #define RACE_DETECT_ALIGN BV07 #define RACE_DETECT_INVIS BV08 #define RACE_DETECT_HIDDEN BV09 #define RACE_PROTECTION BV10 #define RACE_SANCT BV11 #define RACE_WEAPON_WIELD BV12 #define RACE_MUTE BV13 #define RACE_BODYSLAM BV14 #define RACE_CHARGE BV15 #define RACE_ULTRAVISION BV16 // Not imped yet /* Language bits, to be implemented, took most of these off SMAUG */ #define LANG_UNKNOWN 0 /* Anything else */ #define LANG_COMMON BV00 /* Human base language */ #define LANG_ELVEN BV01 /* Elven base language */ #define LANG_DWARVEN BV02 /* Dwarven base language */ #define LANG_PIXIE BV03 /* Pixie|Faerie base language */ #define LANG_OGRE BV04 /* Ogre base language */ #define LANG_ORCISH BV05 /* Orc base language */ #define LANG_TROLLISH BV06 /* Troll base language */ #define LANG_RODENT BV07 /* Small mammals */ #define LANG_INSECTOID BV08 /* Insects */ #define LANG_MAMMAL BV09 /* Larger mammals */ #define LANG_REPTILE BV10 /* Small reptiles */ #define LANG_DRAGON BV11 /* Large reptiles, Dragons */ #define LANG_SPIRITUAL BV12 /* Necromancers or undeads|spectres */ #define LANG_MAGICAL BV13 /* Spells maybe? Magical creatures */ #define LANG_GOBLIN BV14 /* Goblin base language */ #define LANG_GOD BV15 /* Clerics possibly? God creatures */ #define LANG_HALFLING BV16 /* Halfling base language */ #define LANG_GITH BV17 /* Gith Language */ #define LANG_DROW BV18 /* Drow base language */ #define LANG_KOBOLD BV19 /* Kobold base language */ #define LANG_GNOMISH BV20 /* Gnome base language */ #define LANG_PLANT BV21 /* Plant language */ #define LANG_FISH BV22 /* Fish language */ #define LANG_ANIMAL BV23 /* Animal language */ #define LANG_CLAN BV24 /* Clan language */ /* * Drunkeness communication structure. */ struct struckdrunk { int min_drunk_level; int number_of_rep; char *replacement[11]; }; /* * History data structure. */ struct history_data { HISTORY_DATA * next; HISTORY_DATA * prev; char * comm; }; /* * Descriptor (channel) structure. */ struct descriptor_data { DESCRIPTOR_DATA * next; DESCRIPTOR_DATA * snoop_by; CHAR_DATA * character; CHAR_DATA * original; char * host; unsigned int descriptor; int connected; bool fcommand; bool color; char inbuf [ MAX_INPUT_LENGTH*4 ]; char flusher [ MAX_INPUT_LENGTH*4 ]; char incomm [ MAX_INPUT_LENGTH ]; HISTORY_DATA * infirst; HISTORY_DATA * inlast; int histsize; int repeat; char * showstr_head; char * showstr_point; char * flush_point; char * outbuf; int outsize; int outtop; void * olc_editing; char ** str_editing; }; /* * Attribute bonus structures. */ struct str_app_type { int tohit; int todam; int carry; int wield; }; struct int_app_type { int learn; }; struct wis_app_type { int practice; }; struct agi_app_type { int defensive; }; struct con_app_type { int hitp; int shock; }; /* * TO types for act. */ #define TO_ROOM 0 #define TO_NOTVICT 1 #define TO_VICT 2 #define TO_CHAR 3 /* * Help table types. */ struct help_data { HELP_DATA * next; int level; char * keyword; char * text; AREA_DATA * area; }; /* * Shop types. */ #define MAX_BUY 10 // Max number of item types shop will buy #define MAX_SELL 20 // Max number of items shop can sell. struct shop_data { SHOP_DATA * next; /* Next shop in list */ int keeper; /* Vnum of shop keeper mob */ int buy_type [ MAX_BUY ]; /* Item types shop will buy */ int sell_item[ MAX_SELL ]; /* Items that shop is selling */ int profit_buy; /* Cost multiplier for buying */ int profit_sell; /* Cost multiplier for selling */ int open_hour; /* First opening hour */ int close_hour; /* First closing hour */ }; struct game_data { GAME_DATA * next; /* Next game in list */ int croupier; /* Vnum of croupier mob */ GAME_FUN * game_fun; /* Game fun run by mob */ int bankroll; /* Amount of gold in the bank */ int max_wait; /* Number of pulse to decision */ bool cheat; /* True if mob cheats */ }; #define CLASS_NONE 0 #define CLASS_WARRIOR 1 #define CLASS_SORCERER 2 #define CLASS_PSIONICIST 3 #define CLASS_CLERIC 4 #define CLASS_THIEF 5 #define CLASS_ASSASSIN 6 #define CLASS_MERCENARY 7 #define CLASS_PALADIN 8 #define CLASS_ANTIPALADIN 9 #define CLASS_RANGER 10 #define CLASS_ELEMENT_EARTH 11 #define CLASS_ELEMENT_AIR 12 #define CLASS_ELEMENT_FIRE 13 #define CLASS_ELEMENT_WATER 14 #define CLASS_BARD 15 #define CLASS_SHAMAN 16 #define CLASS_DRUID 17 /* * Per-class stuff. */ struct class_type { char * name; /* Full class name */ char * who_name; /* Three-letter name for 'who' */ int attr_prime; /* Prime attribute */ int weapon; /* First weapon */ int guild; /* Vnum of guild room */ int skill_adept; /* Maximum skill level */ int thac0_00; /* Thac0 for level 0 */ int thac0_47; /* Thac0 for level 47 */ int hp_min; /* Min hp gained on leveling */ int hp_max; /* Max hp gained on leveling */ bool fMana; /* Class gains mana on level */ }; #define CLAN_PLAIN 0 #define CLAN_NOKILL 1 #define CLAN_ORDER 2 #define CLAN_GUILD 3 #define RANK_EXILED 1 /* Exiled from a clan */ #define RANK_CLANSMAN 2 /* Foot soldier */ #define RANK_CLANHERO 3 /* Knight */ #define RANK_SUBCHIEF 4 /* Knight Lord */ #define RANK_CHIEFTAIN 5 /* Second in command */ #define RANK_OVERLORD 6 /* Head clan leader */ struct clan_data { CLAN_DATA * next; /* next clan in list */ char * filename; /* Clan filename */ char * who_name; /* Clan who name */ char * name; /* Clan name */ char * motto; /* Clan motto */ char * description; /* A brief description of the clan */ char * overlord; /* Head clan leader */ char * chieftain; /* Second in command */ int frags; /* Number of total frags clan has */ int pkills; /* Number of pkills on behalf of clan */ int pdeaths; /* Number of pkills against clan */ int mkills; /* Number of mkills on behalf of clan */ int mdeaths; /* Number of clan deaths due to mobs */ int illegal_pk; /* Number of illegal pk's by clan */ int score; /* Overall score */ int clan_type; /* See clan type defines */ int subchiefs; /* Number of subchiefs */ int clanheros; /* Number of clanheros */ int members; /* Number of clan members */ int clanobj1; /* Vnum of first clan obj (ring) */ int clanobj2; /* Vnum of second clan obj (shield) */ int clanobj3; /* Vnum of third clan obj (weapon) */ int recall; /* Vnum of clan's recall room */ int donation; /* Vnum of clan's donation pit */ int class; /* For guilds */ }; /* * Data structure for notes. */ struct note_data { NOTE_DATA * next; char * sender; char * date; char * to_list; char * subject; char * text; time_t date_stamp; }; /* * For do_who output. */ struct who_data { WHO_DATA * prev; WHO_DATA * next; char * text; }; /* * For alias output. */ struct alias_data { ALIAS_DATA * next; char * cmd; char * subst; }; struct trophy_data { int vnum; int number; }; /* * An affect. */ struct affect_data { AFFECT_DATA * next; int skill; int spell; int duration; int location; int modifier; int bitvector[NUM_AFFECT_VECTORS]; int level; bool deleted; }; struct bitvect_data { int group; int vector; }; /* * A kill structure (indexed by level). */ struct kill_data { int number; int killed; }; /* * Resistant Immune Susceptible flags. */ #define RIS_NONE 0 #define RIS_FIRE BV00 #define RIS_COLD BV01 #define RIS_ELECTRICITY BV02 #define RIS_ENERGY BV03 #define RIS_ACID BV04 #define RIS_POISON BV05 #define RIS_CHARM BV06 #define RIS_MENTAL BV07 #define RIS_WHITE_MANA BV08 #define RIS_BLACK_MANA BV09 #define RIS_DISEASE BV10 #define RIS_DROWNING BV11 #define RIS_LIGHT BV12 #define RIS_SOUND BV13 #define RIS_MAGIC BV14 #define RIS_NONMAGIC BV15 #define RIS_SILVER BV16 #define RIS_IRON BV17 #define RIS_WOOD BV18 #define RIS_WEAPON BV19 #define RIS_BASH BV20 #define RIS_PIERCE BV21 #define RIS_SLASH BV22 /* * Damage types. */ #define DAM_NONE 0 /* weapon damage types */ #define DAM_BASH 1 #define DAM_PIERCE 2 #define DAM_SLASH 3 #define DAM_OTHER 1000 /* magical damage types */ #define DAM_FIRE 1001 #define DAM_COLD 1002 #define DAM_ELECTRICITY 1003 #define DAM_ACID 1004 #define DAM_POISON 1005 #define DAM_CHARM 1006 #define DAM_MENTAL 1007 #define DAM_ENERGY 1008 #define DAM_WHITE_MANA 1009 #define DAM_BLACK_MANA 1010 #define DAM_DISEASE 1011 #define DAM_DROWNING 1012 #define DAM_LIGHT 1013 #define DAM_SOUND 1014 #define DAM_HARM 1015 #define DAM_DISINTEGRATION 1016 /* * Return values for check_ris(). */ #define IS_NORMAL 0 #define IS_RESISTANT 1 #define IS_IMMUNE 2 #define IS_SUSCEPTIBLE 3 /* * Types of attacks. * Must be non-overlapping with spell/skill types, * but may be arbitrary beyond that. */ #define TYPE_UNDEFINED -1 #define TYPE_HIT 1000 struct attack_type { char * name; int * wpn_gsn; int dam_type; HIT_FUN * hit_fun; }; /* * School flags, used to define skill realm, to be implemented. */ #define SCHOOL_NONE 0 /* no school realm required */ #define SCHOOL_ABJURATION BV00 /* abjuration magics */ #define SCHOOL_ALTERATION BV01 /* alteration magics */ #define SCHOOL_CONJURATION BV02 /* conjuration magics */ #define SCHOOL_SUMMONING BV03 /* summoning magics */ #define SCHOOL_ILLUSION BV04 /* illusionist magics */ #define SCHOOL_PHANTASM BV05 /* phantasm projection realm */ #define SCHOOL_INVOCATION BV06 /* invocation magics */ #define SCHOOL_EVOCATION BV07 /* evocative magics */ #define SCHOOL_ENCHANTMENT BV08 /* enchantment magics */ #define SCHOOL_CHARM BV09 /* charm skills */ #define SCHOOL_DIVINATION BV10 /* divinatory arts */ #define SCHOOL_NECROMANCY BV11 /* necromantic skills */ #define SCHOOL_OFFENSIVE BV13 /* offensive martial arts */ #define SCHOOL_DEFENSIVE BV14 /* defensive martial arts */ #define SCHOOL_STEALTH BV15 /* stealth related skills */ #define SCHOOL_SURVIVAL BV16 /* wilderness suvival skills */ /* * Mana types. */ #define MANA_ANY -1 #define MANA_NONE 0 #define MANA_EARTH BV00 #define MANA_AIR BV01 #define MANA_FIRE BV02 #define MANA_WATER BV03 /* * Target types. */ #define TAR_IGNORE 0 #define TAR_CHAR_OFFENSIVE 1 #define TAR_CHAR_DEFENSIVE 2 #define TAR_CHAR_SELF 3 #define TAR_OBJ_INV 4 /*************************************************************************** * * * VALUES OF INTEREST TO AREA BUILDERS * * (Start of section ... start here) * * * ***************************************************************************/ /* * Well known mob virtual numbers. * Defined in #MOBILES. */ #define MOB_VNUM_CITYGUARD 3060 #define MOB_VNUM_VAMPIRE 3404 #define MOB_VNUM_SECRETARY 3142 #define MOB_VNUM_MIDGAARD_MAYOR 3143 #define MOB_VNUM_AIR_ELEMENTAL 8914 #define MOB_VNUM_EARTH_ELEMENTAL 8915 #define MOB_VNUM_WATER_ELEMENTAL 8916 #define MOB_VNUM_FIRE_ELEMENTAL 8917 #define MOB_VNUM_DUST_ELEMENTAL 8918 /* * ACT bits for mobs. * Used in #MOBILES. */ // bv00 not used. special proc in DikuEdit #define ACT_SENTINEL BV01 /* Stays in one room */ #define ACT_SCAVENGER BV02 /* Picks up objects */ #define ACT_IS_NPC BV03 /* Auto set for mobs */ #define ACT_NICE_THIEF BV04 #define ACT_AGGRESSIVE BV05 /* Attacks PC's */ #define ACT_STAY_AREA BV06 /* Won't leave area */ #define ACT_WIMPY BV07 /* Flees when hurt */ #define ACT_AGGROEVIL BV08 #define ACT_AGGROGOOD BV09 #define ACT_AGGRONEUT BV10 #define ACT_MEMORY BV11 #define ACT_NOPARA BV12 #define ACT_NOSUMMON BV13 #define ACT_NOBASH BV14 #define ACT_TEACHER BV15 #define ACT_OUTLAW BV16 #define ACT_CANFLY BV17 #define ACT_CANSWIM BV18 #define ACT_CANT_TELEKINESE BV19 // bv20 unused #define ACT_MOVED BV20 // bv21 unused #define ACT_PET BV21 // bv22 unused // bv23 unused #define ACT_WITNESS BV24 #define ACT_NOCHARM BV25 #define ACT_PROTECTOR BV26 #define ACT_MOUNT BV27 #define ACT_AGGROEVILRACE BV28 #define ACT_AGGROGOODRACE BV29 #define ACT_HUNTER BV30 //#define ACT_AGGROOUTCAST BV30 /* * Body parts. */ #define PART_NONE 0 #define PART_HEAD BV00 #define PART_ARMS BV01 #define PART_LEGS BV02 #define PART_HEART BV03 #define PART_BRAINS BV04 #define PART_GUTS BV05 #define PART_HANDS BV06 #define PART_FEET BV07 #define PART_FINGERS BV08 #define PART_EAR BV09 #define PART_EYE BV10 #define PART_LONG_TONGUE BV11 #define PART_EYESTALKS BV12 #define PART_TENTACLES BV13 #define PART_FINS BV14 #define PART_WINGS BV15 #define PART_TAIL BV16 /* * Body parts used in combat. */ #define PART_CLAWS BV17 #define PART_FANGS BV18 #define PART_HORNS BV19 #define PART_SCALES BV20 #define PART_TUSKS BV21 /* * Bits for 'affected_by'. * Used in #MOBILES. */ // Bits have changed from an integer to a structure to allow for easy // expansion of bitvectors, since anything that handles these affect bits // will be passed the number of the variable that it is part of. // // If additional bitvectors are added, the loading code in db.c will // set them to zero automatically. It will be up to you to modify the // file formats to load higher bitvectors - Veygoth // // values are set in bit.c extern const BITVECT_DATA AFF_AWARE; extern const BITVECT_DATA AFF_NONE; extern const BITVECT_DATA AFF_BLIND; extern const BITVECT_DATA AFF_CHANGE_SEX; extern const BITVECT_DATA AFF_CHARM; extern const BITVECT_DATA AFF_CURSE; extern const BITVECT_DATA AFF_DETECT_EVIL; extern const BITVECT_DATA AFF_FAERIE_FIRE; extern const BITVECT_DATA AFF_DETECT_GOOD; extern const BITVECT_DATA AFF_DETECT_HIDDEN; extern const BITVECT_DATA AFF_DETECT_INVIS; extern const BITVECT_DATA AFF_DETECT_MAGIC; extern const BITVECT_DATA AFF_FLAMING; extern const BITVECT_DATA AFF_FLYING; extern const BITVECT_DATA AFF_GHOUL; extern const BITVECT_DATA AFF_GILLS; extern const BITVECT_DATA AFF_HIDE; extern const BITVECT_DATA AFF_HOLD; extern const BITVECT_DATA AFF_INFRARED; extern const BITVECT_DATA AFF_INVISIBLE; extern const BITVECT_DATA AFF_IS_FLEEING; extern const BITVECT_DATA AFF_LEVITATE; extern const BITVECT_DATA AFF_MUTE; extern const BITVECT_DATA AFF_PASS_DOOR; extern const BITVECT_DATA AFF_PLAGUE; extern const BITVECT_DATA AFF_POISON; extern const BITVECT_DATA AFF_PROTECT_EVIL; extern const BITVECT_DATA AFF_PROTECT_GOOD; extern const BITVECT_DATA AFF_POLYMORPH; extern const BITVECT_DATA AFF_SANCTUARY; extern const BITVECT_DATA AFF_SKL_AWARE; extern const BITVECT_DATA AFF_SLEEP; extern const BITVECT_DATA AFF_SNEAK; extern const BITVECT_DATA AFF_STONESKIN; extern const BITVECT_DATA AFF_SUMMONED; extern const BITVECT_DATA AFF_ULTRAVISION; extern const BITVECT_DATA AFF_VAMP_BITE; extern const BITVECT_DATA AFF_WATERWALK; /* * Sex. * Used in #MOBILES. */ #define SEX_NEUTRAL 0 #define SEX_MALE 1 #define SEX_FEMALE 2 /* * Well known object virtual numbers. * Defined in #OBJECTS. */ #define OBJ_VNUM_MONEY_ONE 2 #define OBJ_VNUM_MONEY_SOME 3 #define OBJ_VNUM_CORPSE_NPC 10 #define OBJ_VNUM_CORPSE_PC 11 #define OBJ_VNUM_SEVERED_HEAD 12 #define OBJ_VNUM_TORN_HEART 13 #define OBJ_VNUM_SLICED_ARM 14 #define OBJ_VNUM_SLICED_LEG 15 #define OBJ_VNUM_FINAL_TURD 16 //#define OBJ_VNUM_GUTS 17 //#define OBJ_VNUM_BRAINS 18 #define OBJ_VNUM_IRON_RATION 20 #define OBJ_VNUM_LIGHT_BALL 21 #define OBJ_VNUM_WATERSKIN 22 #define OBJ_VNUM_BLACK_POWDER 8903 #define OBJ_VNUM_FLAMEBLADE 8920 #define OBJ_VNUM_STAKE 3811 #define OBJ_VNUM_LICENSE 3011 #define OBJ_VNUM_CLAN_CARD 3381 #define OBJ_VNUM_PORTAL 23 // Newbie items // New design allows a start vnumber and a range for random newbie eq. #define OBJ_VNUM_QUILL 24 #define OBJ_VNUM_NEWBIE_VEST 100 #define NUM_NEWBIE_VEST 10 #define OBJ_VNUM_NEWBIE_HELM 110 #define NUM_NEWBIE_HELM 5 #define OBJ_VNUM_NEWBIE_SLEEVES 120 #define NUM_NEWBIE_SLEEVES 3 #define OBJ_VNUM_NEWBIE_PANTS 130 #define NUM_NEWBIE_PANTS 3 #define OBJ_VNUM_NEWBIE_BOOTS 140 #define NUM_NEWBIE_BOOTS 2 #define OBJ_VNUM_NEWBIE_CLOAK 150 #define NUM_NEWBIE_CLOAK 2 #define OBJ_VNUM_NEWBIE_SWORD 200 #define NUM_NEWBIE_SWORD 10 #define OBJ_VNUM_NEWBIE_DAGGER 210 #define NUM_NEWBIE_DAGGER 13 #define OBJ_VNUM_NEWBIE_2HSWORD 223 #define NUM_NEWBIE_2HSWORD 16 #define OBJ_VNUM_NEWBIE_KNIFE 239 #define NUM_NEWBIE_KNIFE 4 #define OBJ_VNUM_NEWBIE_SHORTSWORD 243 #define NUM_NEWBIE_SHORTSWORD 11 #define OBJ_VNUM_NEWBIE_MACE 254 #define NUM_NEWBIE_MACE 10 #define OBJ_VNUM_NEWBIE_STAFF 264 #define NUM_NEWBIE_STAFF 10 /* * Item types. * Used in #OBJECTS. */ #define TYPE_LIGHT 1 #define TYPE_SCROLL 2 #define TYPE_WAND 3 #define TYPE_STAFF 4 #define TYPE_WEAPON 5 #define TYPE_RANGED_WEAPON 6 // was 31 #define TYPE_MISSILEWEAP 7 #define TYPE_TREASURE 8 #define TYPE_ARMOR 9 #define TYPE_POTION 10 #define TYPE_CLOTHING 11 // not armor #define TYPE_OTHER 12 #define TYPE_TRASH 13 #define TYPE_TRAP 14 #define TYPE_CONTAINER 15 #define TYPE_NOTE 16 #define TYPE_DRINK_CON 17 #define TYPE_KEY 18 #define TYPE_FOOD 19 #define TYPE_MONEY 20 #define TYPE_PEN 21 // includes quill #define TYPE_BOAT 22 #define TYPE_BOOK 23 #define TYPE_BATTERY 24 // don't think this will be used. #define TYPE_PORTAL 25 #define TYPE_TIMER 26 #define TYPE_VEHICLE 27 #define TYPE_SHIP 28 #define TYPE_SWITCH 29 #define TYPE_QUIVER 30 #define TYPE_LOCKPICK 31 #define TYPE_INSTRUMENT 32 #define TYPE_SPELLBOOK 33 #define TYPE_TOTEM 34 #define TYPE_STORAGECHEST 35 #define TYPE_SCABBARD 36 #define TYPE_SHIELD 37 #define TYPE_CORPSE_NPC 38 // was 23 #define TYPE_CORPSE_PC 39 // was 24 #define TYPE_FOUNTAIN 40 // was 25 #define TYPE_PILL 41 // was 26 #define TYPE_MESSAGE_BOARD 43 #define TYPE_WANTED_LIST 45 #define TYPE_WALL 46 #define TYPE_WARP_STONE 47 // was 29 #define TYPE_AMMO 48 // was 32 #define TYPE_GEM 49 // was 33 /* * Extra flags. * Used in #OBJECTS. */ // Veygoth: modified to fit basternae area format. // extern const BITVECT_DATA ITEM_GLOW; extern const BITVECT_DATA ITEM_NOSHOW; extern const BITVECT_DATA ITEM_BURIED; extern const BITVECT_DATA ITEM_NOSELL; extern const BITVECT_DATA ITEM_EVIL; extern const BITVECT_DATA ITEM_INVIS; extern const BITVECT_DATA ITEM_MAGIC; extern const BITVECT_DATA ITEM_NODROP; extern const BITVECT_DATA ITEM_BLESS; extern const BITVECT_DATA ITEM_ANTI_GOOD; extern const BITVECT_DATA ITEM_ANTI_EVIL; extern const BITVECT_DATA ITEM_ANTI_NEUTRAL; extern const BITVECT_DATA ITEM_SECRET; extern const BITVECT_DATA ITEM_FLOAT; extern const BITVECT_DATA ITEM_NOBURN; extern const BITVECT_DATA ITEM_NOLOCATE; extern const BITVECT_DATA ITEM_NOID; extern const BITVECT_DATA ITEM_NOSUMMON; extern const BITVECT_DATA ITEM_LIT; extern const BITVECT_DATA ITEM_TRANSIENT; extern const BITVECT_DATA ITEM_NOSLEEP; extern const BITVECT_DATA ITEM_NOCHARM; extern const BITVECT_DATA ITEM_TWOHANDED; extern const BITVECT_DATA ITEM_NORENT; extern const BITVECT_DATA ITEM_GOODONLY; extern const BITVECT_DATA ITEM_HUM; extern const BITVECT_DATA ITEM_LEVITATES; extern const BITVECT_DATA ITEM_INVENTORY; extern const BITVECT_DATA ITEM_WAS_DISARMED; extern const BITVECT_DATA ITEM_WHOLEBODY; extern const BITVECT_DATA ITEM_WHOLEHEAD; // extra2 flags, basternae area format - Veygoth extern const BITVECT_DATA ITEM_SILVER; extern const BITVECT_DATA ITEM_THROW_RETURN; extern const BITVECT_DATA ITEM_THROW_ONEROOM; extern const BITVECT_DATA ITEM_THROW_TWOROOMS; extern const BITVECT_DATA ITEM_ARTIFACT; extern const BITVECT_DATA ITEM_ENLARGED; extern const BITVECT_DATA ITEM_REDUCED; extern const BITVECT_DATA ITEM_POISONED; /* * Wear flags. * Used in #OBJECTS. */ #define ITEM_TAKE BV00 #define ITEM_WEAR_FINGER BV01 #define ITEM_WEAR_NECK BV02 #define ITEM_WEAR_BODY BV03 #define ITEM_WEAR_HEAD BV04 #define ITEM_WEAR_LEGS BV05 #define ITEM_WEAR_FEET BV06 #define ITEM_WEAR_HANDS BV07 #define ITEM_WEAR_ARMS BV08 #define ITEM_WEAR_SHIELD BV09 #define ITEM_WEAR_ABOUT BV10 #define ITEM_WEAR_WAIST BV11 #define ITEM_WEAR_WRIST BV12 #define ITEM_WIELD BV13 #define ITEM_HOLD BV14 #define ITEM_WEAR_EYES BV17 #define ITEM_WEAR_FACE BV18 #define ITEM_WEAR_EAR BV19 #define ITEM_QUIVER BV20 #define ITEM_BADGE BV21 #define ITEM_WEAR_ONBACK BV22 #define ITEM_ATTACH_BELT BV23 #define ITEM_HORSE_BODY BV24 #define ITEM_TAIL BV25 #define ITEM_NOSE BV26 #define ITEM_HORNS BV27 // Anti Flags for objects - Veygoth // // more than one set of bits - this should be converted to type // extern const BITVECT_DATA and defined in bit.c // #define USE_ANYONE BV00 #define USE_WARRIOR BV01 #define USE_RANGER BV02 #define USE_PALADIN BV03 #define USE_ANTI BV04 #define USE_CLERIC BV05 #define USE_MONK BV06 #define USE_DRUID BV07 #define USE_SHAMAN BV08 #define USE_INVOKER BV09 #define USE_NECRO BV10 #define USE_CONJ BV11 #define USE_PSI BV12 #define USE_THIEF BV13 #define USE_ASSASSIN BV14 #define USE_MERCENARY BV15 #define USE_BARD BV16 #define USE_NOHUMAN BV17 #define USE_NOGREYELF BV18 #define USE_NOHALFELF BV19 #define USE_NODWARF BV20 #define USE_NOHALFLING BV21 #define USE_NOGNOME BV22 #define USE_NOBARBARIAN BV23 #define USE_NODUERGAR BV24 #define USE_NODROW BV25 #define USE_NOTROLL BV26 #define USE_NOOGRE BV27 #define USE_NOILLITHID BV28 #define USE_NOORC BV29 #define USE_ANTIEVILRACE BV30 // Anti2 Flags #define USE_ANTITHRIKREEN BV00 #define USE_ANTICENTAUR BV01 #define USE_ANTIGITHYANKI BV02 #define USE_ANTIMINOTAUR BV03 #define USE_ANTIMALE BV04 #define USE_ANTIFEMALE BV05 #define USE_ANTINEUTER BV06 #define USE_ANTIAQUAELF BV07 #define USE_ANTISAHAUGIN BV08 #define USE_ANTIGOBLIN BV09 #define USE_ANTIRAKSHASA BV10 #define USE_ANTIFLIND BV11 #define USE_ANTIGOODRACE BV30 // Material types - Veygoth // material types for objects -- Veygoth #define MAT_UNDEFINED 0 #define MAT_NONSUBSTANTIAL 1 #define MAT_FLESH 2 #define MAT_CLOTH 3 #define MAT_BARK 4 #define MAT_SOFTWOOD 5 #define MAT_HARDWOOD 6 #define MAT_GLASS 7 #define MAT_CRYSTAL 8 #define MAT_CERAMIC 9 #define MAT_BONE 10 #define MAT_STONE 11 #define MAT_HIDE 12 #define MAT_LEATHER 13 #define MAT_CUREDLEATHER 14 #define MAT_IRON 15 #define MAT_STEEL 16 #define MAT_BRASS 17 #define MAT_MITHRIL 18 #define MAT_ADAMANTIUM 19 #define MAT_BRONZE 20 #define MAT_COPPER 21 #define MAT_SILVER 22 #define MAT_ELECTRUM 23 #define MAT_GOLD 24 #define MAT_PLATINUM 25 #define MAT_GEM 26 #define MAT_DIAMOND 27 #define MAT_PAPER 28 #define MAT_PARCHMENT 29 #define MAT_LEAVES 30 #define MAT_RUBY 31 #define MAT_EMERALD 32 #define MAT_SAPPHIRE 33 #define MAT_IVORY 34 #define MAT_DRAGONSCALE 35 #define MAT_OBSIDIAN 36 #define MAT_GRANITE 37 #define MAT_MARBLE 38 #define MAT_LIMESTONE 39 #define MAT_LIQUID 40 #define MAT_BAMBOO 41 #define MAT_REEDS 42 #define MAT_HEMP 43 #define MAT_GLASSTEEL 44 #define MAT_EGGSHELL 45 #define MAT_CHITINOUS 46 #define MAT_REPTILESCALE 47 #define MAT_GENERICFOOD 48 #define MAT_RUBBER 49 #define MAT_FEATHER 50 #define MAT_SILK 51 #define MAT_SPIDERSILK 52 #define MAX_MATERIAL 53 // craftsmanship values - Veygoth #define CRAFT_TERRIBLE 0 #define CRAFT_EXT_POOR 1 #define CRAFT_VERY_POOR 2 #define CRAFT_FAIRLY_POOR 3 #define CRAFT_WELL_BELOW_AVE 4 #define CRAFT_BELOW_AVE 5 #define CRAFT_SLIGHT_BELOW_AVE 6 #define CRAFT_AVERAGE 7 #define CRAFT_SLIGHT_ABOVE_AVE 8 #define CRAFT_ABOVE_AVE 9 #define CRAFT_WELL_ABOVE_AVE 10 #define CRAFT_EXCELLENT 11 #define CRAFT_SKILLED_ARTISAN 12 #define CRAFT_GIFTED_ARTISAN 13 #define CRAFT_MASTER_ARTISAN 14 #define CRAFT_ONEOFAKIND 15 /* * Apply types (for affects). * Used in #OBJECTS. */ #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_SEX 6 #define APPLY_CLASS 7 #define APPLY_LEVEL 8 #define APPLY_AGE 9 #define APPLY_HEIGHT 10 #define APPLY_WEIGHT 11 #define APPLY_MANA 12 #define APPLY_HIT 13 #define APPLY_MOVE 14 #define APPLY_GOLD 15 #define APPLY_EXP 16 #define APPLY_AC 17 #define APPLY_HITROLL 18 #define APPLY_DAMROLL 19 #define APPLY_SAVING_PARA 20 #define APPLY_SAVING_ROD 21 #define APPLY_SAVING_PETRI 22 #define APPLY_SAVING_BREATH 23 #define APPLY_SAVING_SPELL 24 #define FIRE_PROT 25 #define APPLY_AGI 26 #define APPLY_POW 27 #define APPLY_CHA 28 #define APPLY_LUK 30 #define APPLY_MAX_STR 31 #define APPLY_MAX_DEX 32 #define APPLY_MAX_INT 33 #define APPLY_MAX_WIS 34 #define APPLY_MAX_CON 35 #define APPLY_MAX_AGI 36 #define APPLY_MAX_POW 37 #define APPLY_MAX_CHA 38 #define APPLY_MAX_LUK 40 #define APPLY_RACE_STR 41 #define APPLY_RACE_DEX 42 #define APPLY_RACE_INT 43 #define APPLY_RACE_WIS 44 #define APPLY_RACE_CON 45 #define APPLY_RACE_AGI 46 #define APPLY_RACE_POW 47 #define APPLY_RACE_CHA 48 #define APPLY_RACE_LUK 50 #define APPLY_CURSE 51 #define APPLY_RESISTANT 52 // was 26 #define APPLY_IMMUNE 53 // was 27 #define APPLY_SUSCEPTIBLE 54 // was 28 #define APPLY_RACE 55 /* * Values for containers (value[1]). * Used in #OBJECTS. */ #define CONT_CLOSEABLE BV00 #define CONT_PICKPROOF BV01 #define CONT_CLOSED BV02 #define CONT_LOCKED BV03 /* * Values for portals (value[3]). * Used in #OBJECTS. */ #define PORTAL_NO_CURSED BV00 #define PORTAL_GO_WITH BV01 #define PORTAL_RANDOM BV02 #define PORTAL_BUGGY BV03 #define PORTAL_CLOSEABLE BV04 #define PORTAL_PICKPROOF BV05 #define PORTAL_CLOSED BV06 #define PORTAL_LOCKED BV07 /* Portal Values: * [0] - Destination room * [1] - Trigger command * [2] - Number of charges * [3] - Portal Flags * [4] - Key #, 0 for none */ /* * Values for ranged weapons (value[3]). * Used in #OBJECTS. */ #define RNG_BOW 0 #define RNG_CROSSBOW 1 #define RNG_CATAPULT 2 /* * Well known room virtual numbers. * Defined in #ROOMS. */ #define ROOM_VNUM_LIMBO 200 #define ROOM_VNUM_CHAT 200 #define ROOM_VNUM_TEMPLE 200 #define ROOM_VNUM_ALTAR 200 #define ROOM_VNUM_START 16558 /* * Room flags. * Used in #ROOMS. */ // Rooms with an asterisk after their bitvector value do not have any // supporting code and have no effect on the game yet. -- Veygoth // // we may have to create a second bitvector for rooms since this // one is full. If so we should define these as // extern const BITVECT_DATA and define them in bit.c // #define ROOM_DARK BV00 #define ROOM_LIMITSCAN BV01 // Veygoth - bit not used, might // as well make use of it. // this is for the ANSI worldmap #define ROOM_NO_MOB BV02 #define ROOM_INDOORS BV03 #define ROOM_SILENT BV04 #define ROOM_UNDERWATER BV05 // * #define ROOM_NO_RECALL BV06 #define ROOM_NO_MAGIC BV07 #define ROOM_TUNNEL BV08 // * #define ROOM_PRIVATE BV09 #define ROOM_SAFE BV11 #define ROOM_NO_PRECIP BV12 // * #define ROOM_SINGLE_FILE BV13 // * #define ROOM_JAIL BV14 // * #define ROOM_NO_TELEPORT BV15 #define ROOM_SOLITARY BV16 // a.k.a. ROOM_PRIVATEZONE #define ROOM_HEAL BV17 #define ROOM_NO_HEAL BV18 #define ROOM_INN BV19 #define ROOM_DOCKABLE BV20 // * #define ROOM_MAGICDARK BV21 #define ROOM_MAGICLIGHT BV22 #define ROOM_NO_SUMMON BV23 // * #define ROOM_GUILDROOM BV24 // * #define ROOM_TWILIGHT BV25 #define ROOM_NO_PSIONICS BV26 #define ROOM_NO_GATE BV27 #define ROOM_BANK BV28 #define ROOM_PET_SHOP BV29 // Unused in editor. #define ROOM_NO_SCAN BV30 // This set of vectors is quite full. // In fact, this ROOM_PET_SHOP is an invalid value. // room_flags2 /* * Directions. * Used in #ROOMS. */ #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 DIR_NORTHWEST 6 #define DIR_SOUTHWEST 7 #define DIR_NORTHEAST 8 #define DIR_SOUTHEAST 9 #define MAX_DIR 10 /* * Exit flags. * Used in #ROOMS. */ #define EX_ISDOOR BV00 #define EX_CLOSED BV01 #define EX_LOCKED BV02 // bv3 = rsclosed // bv4 = rslocked // bv5 = pickable #define EX_SECRET BV06 #define EX_BLOCKED BV07 #define EX_PICKPROOF BV08 #define EX_WALLED BV09 #define EX_SPIKED BV10 #define EX_ILLUSION BV11 #define EX_BASHED BV12 #define EX_BASHPROOF BV13 #define EX_PASSPROOF BV14 #define EX_TRAPPED BV15 #define EX_EAT_KEY BV16 // Destroys the key #define EX_JAMMED BV17 /* * Sector types. * Used in #ROOMS. */ // Veygoth - Changed to be identical to Basternae's sector flags. // Sector types 8-11 are different from that which stock UltraEnvy // used, and 12+ are new types. If using old Envy zones, these // values will have to be converted for each individual room. // It is safer to just not to use old Envy zones. #define SECT_INSIDE 0 #define SECT_CITY 1 #define SECT_FIELD 2 #define SECT_FOREST 3 #define SECT_HILLS 4 #define SECT_MOUNTAIN 5 #define SECT_WATER_SWIM 6 #define SECT_WATER_NOSWIM 7 #define SECT_AIR 8 // Was SECT_UNDERWATER #define SECT_UNDERWATER 9 // Was SECT_AIR #define SECT_UNDERWATER_GROUND 10 // Was SECT_DESERT #define SECT_PLANE_FIRE 11 // Was SECT_ICELAND #define SECT_OCEAN 12 #define SECT_UNDERG_WILD 13 #define SECT_UNDERG_CITY 14 #define SECT_UNDERG_INSIDE 15 #define SECT_UNDERG_WATER 16 #define SECT_UNDERG_WATER_NOSWIM 17 #define SECT_UNDERG_NOGROUND 18 #define SECT_PLANE_AIR 19 #define SECT_PLANE_WATER 20 #define SECT_PLANE_EARTH 21 #define SECT_PLANE_ETHEREAL 22 #define SECT_PLANE_ASTRAL 23 #define SECT_DESERT 24 #define SECT_ARCTIC 25 #define SECT_SWAMP 26 #define SECT_MAX 27 /* * Equpiment wear locations. * Used in #RESETS. */ #define WEAR_NONE -1 //#define WEAR_LIGHT 0 #define WEAR_FINGER_L 1 #define WEAR_FINGER_R 2 #define WEAR_NECK_1 3 #define WEAR_NECK_2 4 #define WEAR_BODY 5 #define WEAR_HEAD 6 #define WEAR_LEGS 7 #define WEAR_FEET 8 #define WEAR_HANDS 9 #define WEAR_ARMS 10 //#define WEAR_SHIELD 11 #define WEAR_ABOUT 12 #define WEAR_WAIST 13 #define WEAR_WRIST_L 14 #define WEAR_WRIST_R 15 #define WEAR_HAND 16 //#define WEAR_HOLD 17 #define WEAR_HAND_2 18 //#define WEAR_MISSILE_WIELD 19 #define WEAR_EYES 19 #define WEAR_FACE 20 #define WEAR_EAR_L 21 #define WEAR_EAR_R 22 #define WEAR_BADGE 23 #define WEAR_ONBACK 24 #define WEAR_BELT_1 25 #define WEAR_BELT_2 26 #define WEAR_BELT_3 27 #define WEAR_QUIVER 29 #define MAX_WEAR 30 /*************************************************************************** * * * VALUES OF INTEREST TO AREA BUILDERS * * (End of this section ... stop here) * * * ***************************************************************************/ /* * Conditions. */ #define COND_DRUNK 0 #define COND_FULL 1 #define COND_THIRST 2 /* * Positions. */ #define POS_DEAD 0 #define POS_MORTAL 1 #define POS_INCAP 2 #define POS_STUNNED 3 #define POS_SLEEPING 4 #define POS_RECLINING 5 #define POS_RESTING 6 #define POS_SITTING 7 #define POS_KNEELING 8 #define POS_FIGHTING 9 #define POS_STANDING 10 /* * MUD ACT bits for sysdata. */ #define MUD_AUTOSAVE_DB BV00 #define MUD_VERBOSE_QUESTLOAD BV01 #define MUD_NEWLOCK BV02 /* * ACT bits for players. */ // Almost out of bits. 8 and 24 still available. // // - Veygoth #define PLR_AUTOEXIT BV00 #define PLR_SHOUT BV01 #define PLR_SCRIBING BV02 #define PLR_IS_NPC BV03 /* Don't EVER set. */ #define PLR_MEMORIZING BV04 #define PLR_MEDITATING BV05 #define PLR_BLANK BV06 #define PLR_BRIEF BV07 #define PLR_CASTING BV08 #define PLR_COMBINE BV09 #define PLR_PROMPT BV10 #define PLR_TELNET_GA BV11 #define PLR_HOLYLIGHT BV12 #define PLR_WIZINVIS BV13 #define PLR_WIZBIT BV14 #define PLR_SILENCE BV15 #define PLR_NO_EMOTE BV16 #define PLR_MOVED BV17 #define PLR_NO_TELL BV18 #define PLR_LOG BV19 #define PLR_DENY BV20 #define PLR_FREEZE BV21 #define PLR_THIEF BV22 #define PLR_KILLER BV23 #define PLR_CAST_TICK BV24 #define PLR_AFK BV25 #define PLR_COLOUR BV26 #define PLR_EDIT_INFO BV27 #define PLR_PAGER BV28 #define PLR_MOUNTABLE BV29 /* Can be mounted */ //#define PLR_CAMPING BV30 #define PLR_FOG BV30 /* WIZNET flags */ #define WIZ_ON BV00 /* On|Off switch */ #define WIZ_TICKS BV01 /* Tick's. */ #define WIZ_LOGINS BV02 /* Login|Logoff. */ #define WIZ_DEATHS BV03 /* Plr death's. */ #define WIZ_RESETS BV04 /* Area reset's. */ #define WIZ_FLAGS BV05 /* KILLER & THIEF flag. */ #define WIZ_SACCING BV06 /* Item saccing. */ #define WIZ_LEVELS BV07 /* Level's advancing. */ #define WIZ_SECURE BV08 /* log -> screen. */ #define WIZ_SWITCHES BV09 /* Switch. */ #define WIZ_SNOOPS BV10 /* Snoops. */ #define WIZ_RESTORE BV11 /* Restores. */ #define WIZ_LOAD BV12 /* oload, mload. */ #define WIZ_NEWBIE BV13 /* Newbie's. */ #define WIZ_SPAM BV14 /* Spamming. */ #define WIZ_CHAT BV15 /* Wiznet chatting. */ #define WIZ_DEBUG BV16 /* Debug info. */ #define WIZ_PETITION BV17 /* Petitions */ /* * Obsolete bits. */ #if 0 #define PLR_CHAT BV08 /* Obsolete */ #define ACT_GAMBLE BV11 /* Runs a gambling game */ #endif /* * Channel bits. */ #define CHANNEL_IMMTALK BV03 #define CHANNEL_SHOUT BV06 #define CHANNEL_YELL BV07 #define CHANNEL_CLANTALK BV09 /* * Prototype for a mob. * This is the in-memory version of #MOBILES. */ struct mob_index_data { MOB_INDEX_DATA * next; MOB_FUN * spec_fun; MOB_FUN * spec_fun2; GAME_DATA * pGame; SHOP_DATA * pShop; AREA_DATA * area; MPROG_DATA * mobprogs; char * player_name; char * short_descr; char * long_descr; char * description; int vnum; int count; int killed; int sex; int class; int level; int act; int affected_by[NUM_AFFECT_VECTORS]; int alignment; int race; int progtypes; int resistant; int immune; int susceptible; }; // this is the main quest header function for a mob struct quest_index_data { int vnum; // vnum of mobile quest is attached to QUEST_DATA *quests; // the individual quests associated with each mob TALK_DATA *messages; // talk data associated with a mob QUEST_INDEX_DATA *next; }; // this should be the individual quests within a mob // corresponds to the _questQuest struct in DE. struct quest_data { QUEST_DATA *next; QUEST_ITEM *receive; QUEST_ITEM *give; char *disappear; char *complete; }; struct talk_data { TALK_DATA *next; char *keywords; char *message; }; struct quest_item { bool complete; bool give; int type; int value; QUEST_ITEM *next; }; // Structure for time-based events - Veygoth struct event_data { EVENT_DATA * next; // Next event int type; // Event type void * arg1; // Can be one of many types void * arg2; // Can be one of many types int time; // Time in pulses int var; // A miscellaneous variable bool deleted; }; // Types of events // --------------- // Not all these will necessarily be implemented. Any that are will have // an asterisk placed next to them. Just because there is an event // defined doesen't mean we should convert everything to events and break // them up into subcomponents, since some things may run smoother when // lumped together in a single function. - Veygoth #define EVENT_NONE 0 #define EVENT_SAVE_SYSDATA 1 // Imped #define EVENT_SAVE_CORPSES 2 // Imped #define EVENT_HIT_GAIN 3 #define EVENT_MANA_GAIN 4 #define EVENT_MOVE_GAIN 5 #define EVENT_RESET_AREA 6 #define EVENT_MEMORIZE_UPDATE 7 #define EVENT_WEATHER_UPDATE 8 // Imped #define EVENT_MOBILE_UPDATE 9 // Imped #define EVENT_OBJECT_UPDATE 10 // Imped #define EVENT_SLOW_CHAR_UPDATE 11 #define EVENT_CHAR_UPDATE 12 // Imped #define EVENT_LIST_UPDATE 13 // Imped #define EVENT_VIOLENCE_UPDATE 14 // Imped #define EVENT_AGGR_UPDATE 15 #define EVENT_HUNGER 16 #define EVENT_PULSE_REGENERATE 17 #define EVENT_CAST_TICK 18 #define EVENT_ROOM_AFF_ADD 19 #define EVENT_ROOM_AFF_REMOVE 20 #define EVENT_ROOM_PROC 21 #define EVENT_MOB_PROC 22 #define EVENT_OBJ_PROC 23 #define EVENT_ZONE_PROC 24 #define EVENT_QUEST_PROC 25 #define EVENT_SHIP_PROC 26 #define EVENT_ROOM_DMG_SPELL 27 #define EVENT_PERSON_DMG_SPELL 28 #define EVENT_SPELL_CAST 29 #define EVENT_CAMP 30 #define EVENT_DELAYED_COMMAND 31 #define EVENT_FALLING_CHAR 32 #define EVENT_FALLING_OBJ 33 #define EVENT_OBJ_DECAY 34 #define EVENT_SKILL_RESET 35 #define EVENT_SHIP_MOVE 36 #define EVENT_FIRE_PLANE 37 #define EVENT_AUTOSAVE 38 #define EVENT_TRACK_DECAY 39 #define EVENT_SPELL_SCRIBING 40 #define EVENT_SPELLCAST 41 #define EVENT_COMBAT 42 #define EVENT_BARD_SONG 43 #define EVENT_BARD_EFFECTDECAY 44 #define EVENT_STUNNED 45 #define EVENT_KO 46 #define EVENT_BRAIN_DRAIN 47 #define EVENT_BERSERK 49 #define EVENT_MOB_HUNT 50 #define EVENT_UNDERWATER 51 #define EVENT_SWIMMING 52 #define EVENT_ROOM_UPDATE 53 #define EVENT_AREA_UPDATE 54 #define EVENT_OBJECT_SPECIAL 55 struct hunt_hate_fear { char * name; CHAR_DATA * who; }; struct coin_data { int copper; int silver; int gold; int platinum; }; /* * One character (PC or NPC). */ struct char_data { CHAR_DATA * next; CHAR_DATA * next_in_room; CHAR_DATA * master; CHAR_DATA * leader; CHAR_DATA * fighting; CHAR_DATA * reply; CHAR_DATA * riding; CHAR_DATA * rider; MOB_FUN * spec_fun; MOB_FUN * spec_fun2; MOB_INDEX_DATA * pIndexData; DESCRIPTOR_DATA * desc; AFFECT_DATA * affected; NOTE_DATA * pnote; OBJ_DATA * carrying; ROOM_INDEX_DATA * in_room; ROOM_INDEX_DATA * was_in_room; PC_DATA * pcdata; char * name; char * short_descr; char * long_descr; char * description; int sex; int class; int race; int level; int trust; int played; int cast_spl; int cast_time; int perm_str; int perm_int; int perm_wis; int perm_dex; int perm_con; int perm_agi; int perm_cha; int perm_pow; int perm_luk; int mod_str; int mod_int; int mod_wis; int mod_dex; int mod_con; int mod_agi; int mod_cha; int mod_pow; int mod_luk; time_t logon; time_t save_time; time_t last_note; int timer; int wait; int hit; int max_hit; int mana; int max_mana; int move; int max_move; COIN_DATA money; int exp; int act; int affected_by[NUM_AFFECT_VECTORS]; int position; int carry_weight; int carry_number; int saving_throw[5]; // added by Veygoth int alignment; int hitroll; int damroll; int armor; int wimpy; int deaf; bool deleted; MPROG_ACT_LIST * mpact; int mpactnum; HHF_DATA * hunting; HHF_DATA * hating; HHF_DATA * fearing; int resistant; int immune; int susceptible; }; /* * Data which only PC's have. */ struct pc_data { PC_DATA * next; CHAR_DATA * consent; CHAR_DATA * guarding; MEM_DATA * memorized; MEM_DATA * memorized_last; char * pwd; char * pwdnew; char * bamfin; char * bamfout; char * immskll; char * title; char * prompt; int condition [ 3 ]; int pagelen; int skl_lrn [ MAX_SKILL ]; int spl_lrn [ MAX_SPELL ]; bool switched; ALIAS_DATA * alias_list; TROPHY_DATA trophy[MAX_LEVEL]; int security; int mprog_edit; CLAN_DATA * clan; int rank; int frags; int pkills; int pdeaths; int mkills; int mdeaths; int illegal_pk; int wiznet; int firstaid; COIN_DATA bank; }; // Guild frags will be stored separately with each guild's data. // This is a huge struct, and updating and referencing it should be // a huge chore - Veygoth struct frag_data { int top_frags[MAX_FRAG]; char *top_fraggers[MAX_FRAG]; int bottom_frags[MAX_FRAG]; char *bottom_fraggers[MAX_FRAG]; int class_top_frags[MAX_CLASS][MAX_FRAG]; char *class_top_fraggers[MAX_CLASS][MAX_FRAG]; int class_bottom_frags[MAX_CLASS][MAX_FRAG]; char *class_bottom_fraggers[MAX_CLASS][MAX_FRAG]; int race_top_frags[MAX_PC_RACE][MAX_FRAG]; char *race_top_fraggers[MAX_PC_RACE][MAX_FRAG]; int race_bottom_frags[MAX_PC_RACE][MAX_FRAG]; char *race_bottom_fraggers[MAX_PC_RACE][MAX_FRAG]; int total_race_frags[MAX_PC_RACE]; int total_class_frags[MAX_PC_RACE]; int total_side_frags[MAX_RACEWAR_SIDE]; }; // Spell memorization structure struct mem_data { MEM_DATA *next; MEM_DATA *prev; // access only during memorizing int sn; int memtime; // time in pulses int full_memtime; // time in pulses int circle; bool memmed; }; /* * Liquids. */ #define LIQ_WATER 0 #define LIQ_MAX 27 struct liq_type { char *liq_name; char *liq_color; int liq_affect [ 3 ]; }; /* * Extra description data for a room or object. */ struct extra_descr_data { EXTRA_DESCR_DATA *next; /* Next in list */ char *keyword; /* Keyword in look/examine */ char *description; /* What to see */ bool deleted; }; /* * Prototype for an object. */ // remember that if you change anything here you will have to modify the // create_object function to give a value to the object instance - Veygoth struct obj_index_data { OBJ_INDEX_DATA * next; OBJ_FUN * spec_fun; EXTRA_DESCR_DATA * extra_descr; AFFECT_DATA * affected; char * name; char * short_descr; char * description; int vnum; int item_type; int extra_flags[NUM_ITEM_EXTRA_VECTORS]; int affected_by[NUM_AFFECT_VECTORS]; int wear_flags; int anti_flags; int anti_flags2; int material; int size; int volume; int craftsmanship; int count; int weight; int cost; /* Unused */ int level; int condition; int value [ 8 ]; AREA_DATA * area; /* OLC */ }; /* * One object. */ struct obj_data { OBJ_DATA * next; OBJ_DATA * next_content; OBJ_DATA * contains; OBJ_DATA * in_obj; OBJ_FUN * spec_fun; CHAR_DATA * carried_by; EXTRA_DESCR_DATA * extra_descr; AFFECT_DATA * affected; OBJ_INDEX_DATA * pIndexData; ROOM_INDEX_DATA * in_room; char * name; char * short_descr; char * description; int item_type; int extra_flags[NUM_ITEM_EXTRA_VECTORS]; int affected_by[NUM_AFFECT_VECTORS]; int wear_flags; int anti_flags; int anti_flags2; int material; int size; int volume; int craftsmanship; int wear_loc; int weight; int cost; int level; int timer; int value [ 8 ]; int condition; bool deleted; }; /* * Exit data. */ struct exit_data { ROOM_INDEX_DATA * to_room; int vnum; int exit_info; int key; char * keyword; char * description; EXIT_DATA * next; /* OLC */ int rs_flags; /* OLC */ int orig_door; /* OLC */ }; /* * Reset commands: * '*': comment * 'M': read a mobile * 'O': read an object * 'P': put object in object * 'G': give object to mobile * 'E': equip object to mobile * 'D': set state of door * 'R': randomize room exits * 'S': stop (end of list) */ /* * Area-reset definition. */ struct reset_data { RESET_DATA * next; char command; int arg1; int arg2; int arg3; int arg4; int arg5; int arg6; int arg7; }; /* * Area definition. */ struct area_data { AREA_DATA * next; RESET_DATA * reset_first; RESET_DATA * reset_last; char * name; int recall; int age; int nplayer; char * filename; /* OLC */ char * builders; /* OLC Listing of builders */ int security; /* OLC Value 0-infinity */ int lvnum; /* OLC Lower vnum */ int uvnum; /* OLC Upper vnum */ int vnum; /* OLC Area vnum */ int area_flags; /* OLC */ int low_r_vnum; int hi_r_vnum; int low_o_vnum; int hi_o_vnum; int low_m_vnum; int hi_m_vnum; int llv; int ulv; char * author; char * resetmsg; }; /* * System information and flags. */ struct system_data { int max_players; /* Maximum players this boot */ int all_time_max; /* Maximum players ever */ char * time_of_max; /* Time of max players ever */ int act; /* Mud act flags */ }; /* * Room type. */ struct room_index_data { ROOM_INDEX_DATA * next; CHAR_DATA * people; OBJ_DATA * contents; EXTRA_DESCR_DATA * extra_descr; AREA_DATA * area; EXIT_DATA * exit [ MAX_DIR ]; char * name; char * description; int vnum; int room_flags; int orig_room_flags; /* OLC */ int light; int fall_chance; // Not yet imped - Veygoth int sector_type; RESET_DATA * reset_first; /* OLC */ RESET_DATA * reset_last; /* OLC */ }; /* * Skills do not include spells anymore - Veygoth. */ struct skill_type { char * name; /* Name of skill */ int skill_level [ MAX_CLASS ]; /* Level needed by class */ int * pgsn; /* Pointer to associated gsn */ int beats; /* Waiting time after use */ char * noun_damage; /* Damage message */ char * msg_off; /* Wear off message */ }; // May expand to include more damage messages - Veygoth. struct spell_type { char * name; /* Name of skill */ int spell_circle[ MAX_CLASS ]; /* Circle needed by class */ SPELL_FUN * spell_fun; /* Spell pointer (for spells) */ int target; /* Legal targets */ bool cast_combat; /* Can you cast it in a fight?*/ int * pgsn; /* Pointer to associated gsn */ int min_mana; /* Minimum mana used */ int beats; /* Waiting time after use */ char * msg_damage; /* Damage message */ char * msg_damage_vict; /* Damage message to victim */ char * msg_damage_room; /* Damage message to room */ char * msg_damage_self; /* Damage message target self */ char * msg_damage_self_rm; /* Room dmg msg, self = target*/ char * msg_kill; /* Kill Message */ char * msg_off; /* Wear off message */ int realms; /* Skill realm requirements */ int mana_type; /* Mana type (for spells) */ }; /* Mob program structures */ struct act_prog_data { ACT_PROG_DATA * next; void * vo; }; struct mob_prog_act_list { MPROG_ACT_LIST * next; char * buf; CHAR_DATA * ch; OBJ_DATA * obj; void * vo; }; struct mob_prog_data { MPROG_DATA * next; int type; char * arglist; char * comlist; }; bool MOBtrigger; #define ERROR_PROG -1 #define IN_FILE_PROG 0 #define ACT_PROG BV00 #define SPEECH_PROG BV01 #define RAND_PROG BV02 #define FIGHT_PROG BV03 #define DEATH_PROG BV04 #define HITPRCNT_PROG BV05 #define ENTRY_PROG BV06 #define GREET_PROG BV07 #define ALL_GREET_PROG BV08 #define GIVE_PROG BV09 #define BRIBE_PROG BV10 /* * These are skill_lookup return values for common skills and spells. */ extern int gsn_aware; /* Veygoth */ extern int gsn_backstab; extern int gsn_bandage; /* Veygoth */ extern int gsn_bash; /* Veygoth */ extern int gsn_berserk; /* by Thelonius */ extern int gsn_blindfighting; /* Veygoth */ extern int gsn_bodyslam; /* Veygoth */ extern int gsn_charge; /* Veygoth */ extern int gsn_circle; /* by Thelonius */ extern int gsn_disarm; extern int gsn_dodge; extern int gsn_headbutt; /* Veygoth */ extern int gsn_guard; /* Veygoth */ extern int gsn_hide; extern int gsn_peek; extern int gsn_pick_lock; extern int gsn_poison_weapon; /* by Thelonius */ extern int gsn_quick_chant; /* Veygoth */ extern int gsn_scrolls; /* by Binky / Thelonius */ extern int gsn_snare; /* by Binky / Thelonius */ extern int gsn_sneak; extern int gsn_staves; /* by Binky / Thelonius */ extern int gsn_steal; extern int gsn_switch; /* Veygoth */ extern int gsn_untangle; /* by Thelonius */ extern int gsn_wands; /* by Binky / Thelonius */ extern int gsn_doorbash; extern int gsn_dual; /* by Thelonius */ extern int gsn_enhanced_damage; extern int gsn_kick; extern int gsn_parry; extern int gsn_rescue; extern int gsn_second_attack; extern int gsn_springleap; /* Veygoth */ extern int gsn_third_attack; /* * Psionicist gsn's (by Thelonius). */ extern int gsn_chameleon; extern int gsn_heighten; extern int gsn_shadow; /* * New gsn's (by Zen & other ppl). */ extern int gsn_shield_block; extern int gsn_fast_healing; extern int gsn_fourth_attack; extern int gsn_brew; extern int gsn_scribe; extern int gsn_dirt; extern int gsn_meditate; /* by Zen */ extern int gsn_swim; /* by Zen */ extern int gsn_track; extern int gsn_trip; extern int gsn_unarmed; extern int gsn_whirlwind; extern int gsn_mount; extern int gsn_hit; extern int gsn_slash; extern int gsn_pierce; extern int gsn_whip; extern int gsn_explode; extern int gsn_pound; extern int gsn_suction; extern int gsn_shot; /* * Race gsn's (by Kahn). */ extern int gsn_vampiric_bite; // Misc gsn's by Veygoth extern int gsn_carve; /* * Spell GSN's */ extern int spl_armor; extern int spl_bless; extern int spl_blindness; extern int spl_breathe_water; /* by Thelonius */ extern int spl_burning_hands; extern int spl_charm_person; extern int spl_curse; extern int spl_detect_evil; extern int spl_detect_good; extern int spl_detect_invis; extern int spl_detect_magic; extern int spl_domination; extern int spl_flame_shield; extern int spl_fly; extern int spl_frost_shield; extern int spl_giant_strength; extern int spl_infravision; extern int spl_invis; extern int spl_levitation; extern int spl_mass_invis; extern int spl_mass_vortex_lift; /* by Zen */ extern int spl_mute; /* by Thelonius */ extern int spl_plague; extern int spl_poison; extern int spl_shield; extern int spl_sleep; extern int spl_turn_undead; extern int spl_shock_shield; /* * Utility macros. */ #define UMIN( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) #define UMAX( a, b ) ( ( a ) > ( b ) ? ( a ) : ( b ) ) #define URANGE( a, b, c ) ( ( b ) < ( a ) ? ( a ) \ : ( ( b ) > ( c ) ? ( c ) \ : ( b ) ) ) #define LOWER( c ) ( ( c ) >= 'A' && ( c ) <= 'Z' \ ? ( c ) + 'a' - 'A' : ( c ) ) #define UPPER( c ) ( ( c ) >= 'a' && ( c ) <= 'z' \ ? ( c ) + 'A' - 'a' : ( c ) ) #define IS_SET( flag, bit ) ( ( flag ) & ( bit ) ) #define SET_BIT( var, bit ) ( ( var ) |= ( bit ) ) #define REMOVE_BIT( var, bit ) ( ( var ) &= ~( bit ) ) #define TOGGLE_BIT( var, bit ) ( ( var ) ^= ( bit ) ) // IS_AFFECTED now in bit.c - Veygoth /* * Character macros. */ #define IS_NPC( ch ) ( IS_SET( ( ch )->act, ACT_IS_NPC ) ) #define IS_IMMORTAL( ch ) ( get_trust( ch ) >= LEVEL_IMMORTAL ) #define IS_HERO( ch ) ( get_trust( ch ) >= LEVEL_HERO ) #define IS_GOOD( ch ) ( ch->alignment >= 350 ) #define IS_EVIL( ch ) ( ch->alignment <= -350 ) #define IS_NEUTRAL( ch ) ( !IS_GOOD( ch ) && !IS_EVIL( ch ) ) #define IS_AWAKE( ch ) ( ch->position > POS_SLEEPING ) #define IS_OUTSIDE( ch ) ( !IS_SET( \ ( ch )->in_room->room_flags, \ ROOM_INDOORS ) ) #define WAIT_STATE( ch, pulse ) ( ( ch )->wait += pulse ) #define MANA_COST( ch, sn ) ( IS_NPC( ch ) ? 0 : UMAX ( \ spells_table[sn].min_mana, \ 100 / ( 2 + UMAX ( 0, ch->level - \ spells_table[sn].spell_circle[ch->class] ) ) ) ) #define IS_SWITCHED( ch ) ( ch->pcdata->switched ) #define WCHAN( ch, chan ) ( IS_SET( ch->pcdata->wiznet, chan ) ) #define CHECK_RES( ch, bit ) ( IS_SET( ch->resistant \ | race_table[ch->race].resistant, bit ) ) #define CHECK_IMM( ch, bit ) ( IS_SET( ch->immune \ | race_table[ch->race].immune, bit ) ) #define CHECK_SUS( ch, bit ) ( IS_SET( ch->susceptible \ | race_table[ch->race].susceptible, bit ) ) /* * Object macros. */ #define CAN_WEAR( obj, part ) ( IS_SET( ( obj)->wear_flags, ( part ) ) ) /* * Description macros. */ #define PERS( ch, looker ) ( can_see( looker, ( ch ) ) ? \ ( IS_NPC( ch ) ? ( ch )->short_descr \ : ( ch )->name ) : "someone" ) /* * Structure for a command in the command lookup table. */ struct cmd_type { char * const name; DO_FUN * do_fun; int position; int level; int log; bool show; }; /* * Structure for a social in the socials table. */ struct soc_index_data { SOC_INDEX_DATA * next; char * name; char * char_no_arg; char * others_no_arg; char * char_found; char * others_found; char * vict_found; char * char_auto; char * others_auto; bool deleted; }; /* * Global constants. */ // Veygoth - converted to 100-point based system, but allowing up to // 250 for insane godlike things like the strength of a titan... // 100 is normal human average. extern const struct str_app_type str_app [ 251 ]; extern const struct int_app_type int_app [ 251 ]; extern const struct wis_app_type wis_app [ 251 ]; extern const struct agi_app_type agi_app [ 251 ]; extern const struct con_app_type con_app [ 251 ]; extern struct class_type * class_table [ MAX_CLASS ]; extern const struct cmd_type cmd_table [ ]; extern const struct liq_type liq_table [ LIQ_MAX ]; extern struct skill_type skills_table [ MAX_SKILL ]; extern struct spell_type spells_table [ MAX_SPELL ]; extern const struct social_type social_table [ ]; extern const struct race_type race_table [ MAX_RACE ]; extern const struct attack_type attack_table [ ]; extern const struct struckdrunk drunk [ ]; extern const int memchart [MAX_LEVEL] [MAX_CIRCLE]; extern const int lesser_memchart [MAX_LEVEL] [MAX_CIRCLE]; extern const int topdown_eq [MAX_WEAR]; // Illegal name list extern char strName [ ]; // Targets for spells.c extern char *target_name; /* * Global variables. */ extern HELP_DATA * help_first; extern SHOP_DATA * shop_first; extern GAME_DATA * game_first; extern CLAN_DATA * clan_first; extern QUEST_INDEX_DATA * quest_first; extern EVENT_DATA * event_first; extern MEM_DATA * mem_first; extern MEM_DATA * memdata_free; extern BAN_DATA * ban_list; extern CHAR_DATA * char_list; extern DESCRIPTOR_DATA * descriptor_list; extern NOTE_DATA * note_list; extern OBJ_DATA * object_list; extern AFFECT_DATA * affect_free; extern BAN_DATA * ban_free; extern CHAR_DATA * char_free; extern DESCRIPTOR_DATA * descriptor_free; extern EXTRA_DESCR_DATA * extra_descr_free; extern NOTE_DATA * note_free; extern OBJ_DATA * obj_free; extern PC_DATA * pcdata_free; extern FRAG_DATA fraglist; extern char bug_buf [ ]; extern time_t current_time; extern bool fLogAll; extern FILE * fpReserve; extern KILL_DATA kill_table [ ]; extern char log_buf [ ]; extern TIME_INFO_DATA time_info; extern WEATHER_DATA weather_info; extern time_t down_time; extern time_t warning1; extern time_t warning2; extern bool Reboot; extern SYSTEM_DATA sysdata; extern int num_descriptors; extern int top_event; extern int top_memdata; /* * Command functions. * Defined in act_*.c (mostly). */ DECLARE_DO_FUN( do_advance ); DECLARE_DO_FUN( do_afk ); DECLARE_DO_FUN( do_allow ); DECLARE_DO_FUN( do_answer ); DECLARE_DO_FUN( do_areas ); DECLARE_DO_FUN( do_ask ); DECLARE_DO_FUN( do_assist ); // Veygoth DECLARE_DO_FUN( do_at ); DECLARE_DO_FUN( do_auction ); DECLARE_DO_FUN( do_auto ); DECLARE_DO_FUN( do_autoexit ); DECLARE_DO_FUN( do_aware ); // Veygoth DECLARE_DO_FUN( do_backstab ); DECLARE_DO_FUN( do_bamfin ); DECLARE_DO_FUN( do_bamfout ); DECLARE_DO_FUN( do_ban ); DECLARE_DO_FUN( do_bandage ); // Veygoth DECLARE_DO_FUN( do_bash ); // Veygoth DECLARE_DO_FUN( do_beep ); DECLARE_DO_FUN( do_berserk ); /* by Thelonius */ DECLARE_DO_FUN( do_bet ); /* by Thelonius */ DECLARE_DO_FUN( do_blank ); DECLARE_DO_FUN( do_bodyslam ); // Veygoth DECLARE_DO_FUN( do_brandish ); DECLARE_DO_FUN( do_brief ); DECLARE_DO_FUN( do_bug ); DECLARE_DO_FUN( do_buy ); DECLARE_DO_FUN( do_carve ); // Veygoth DECLARE_DO_FUN( do_cast ); DECLARE_DO_FUN( do_chameleon ); /* by Thelonius */ DECLARE_DO_FUN( do_channels ); DECLARE_DO_FUN( do_charge ); // Veygoth DECLARE_DO_FUN( do_charlist ); // Veygoth DECLARE_DO_FUN( do_chat ); DECLARE_DO_FUN( do_circle ); /* by Thelonius */ DECLARE_DO_FUN( do_close ); DECLARE_DO_FUN( do_colour ); /* Colour Command By Lope */ DECLARE_DO_FUN( do_combine ); DECLARE_DO_FUN( do_commands ); DECLARE_DO_FUN( do_compare ); DECLARE_DO_FUN( do_config ); DECLARE_DO_FUN( do_consent ); // Veygoth DECLARE_DO_FUN( do_consider ); DECLARE_DO_FUN( do_credits ); DECLARE_DO_FUN( do_deny ); DECLARE_DO_FUN( do_deposit ); // Veygoth DECLARE_DO_FUN( do_description ); DECLARE_DO_FUN( do_disarm ); DECLARE_DO_FUN( do_disconnect ); DECLARE_DO_FUN( do_disengage ); // Veygoth DECLARE_DO_FUN( do_donate ); DECLARE_DO_FUN( do_doorbash ); DECLARE_DO_FUN( do_down ); DECLARE_DO_FUN( do_drink ); DECLARE_DO_FUN( do_drop ); DECLARE_DO_FUN( do_east ); DECLARE_DO_FUN( do_eat ); DECLARE_DO_FUN( do_echo ); DECLARE_DO_FUN( do_emote ); DECLARE_DO_FUN( do_equipment ); DECLARE_DO_FUN( do_examine ); DECLARE_DO_FUN( do_exits ); DECLARE_DO_FUN( do_exp ); DECLARE_DO_FUN( do_fee ); DECLARE_DO_FUN( do_feed ); DECLARE_DO_FUN( do_fill ); DECLARE_DO_FUN( do_find ); // Veygoth DECLARE_DO_FUN( do_firstaid ); // Veygoth DECLARE_DO_FUN( do_flee ); DECLARE_DO_FUN( do_fog ); // Veygoth DECLARE_DO_FUN( do_follow ); DECLARE_DO_FUN( do_force ); DECLARE_DO_FUN( do_forget ); // Veygoth DECLARE_DO_FUN( do_fraglist ); // Veygoth DECLARE_DO_FUN( do_freeze ); DECLARE_DO_FUN( do_get ); DECLARE_DO_FUN( do_give ); DECLARE_DO_FUN( do_glance ); // Veygoth DECLARE_DO_FUN( do_goto ); DECLARE_DO_FUN( do_group ); DECLARE_DO_FUN( do_gtell ); DECLARE_DO_FUN( do_guard ); // Veygoth DECLARE_DO_FUN( do_headbutt ); // Veygoth DECLARE_DO_FUN( do_heighten ); /* by Thelonius */ DECLARE_DO_FUN( do_help ); DECLARE_DO_FUN( do_hide ); DECLARE_DO_FUN( do_holylight ); DECLARE_DO_FUN( do_idea ); DECLARE_DO_FUN( do_immtalk ); DECLARE_DO_FUN( do_imtlset ); DECLARE_DO_FUN( do_innate ); // Veygoth DECLARE_DO_FUN( do_inventory ); DECLARE_DO_FUN( do_invis ); DECLARE_DO_FUN( do_kick ); DECLARE_DO_FUN( do_kill ); DECLARE_DO_FUN( do_kneel ); DECLARE_DO_FUN( do_list ); DECLARE_DO_FUN( do_load ); DECLARE_DO_FUN( do_lock ); DECLARE_DO_FUN( do_log ); DECLARE_DO_FUN( do_look ); DECLARE_DO_FUN( do_meditate ); DECLARE_DO_FUN( do_memdata ); // Veygoth DECLARE_DO_FUN( do_memorize ); // Veygoth DECLARE_DO_FUN( do_memory ); DECLARE_DO_FUN( do_mfind ); DECLARE_DO_FUN( do_mload ); DECLARE_DO_FUN( do_mpasound ); DECLARE_DO_FUN( do_mpat ); DECLARE_DO_FUN( do_mpecho ); DECLARE_DO_FUN( do_mpechoaround ); DECLARE_DO_FUN( do_mpechoat ); DECLARE_DO_FUN( do_mpforce ); DECLARE_DO_FUN( do_mpgoto ); DECLARE_DO_FUN( do_mpjunk ); DECLARE_DO_FUN( do_mpkill ); DECLARE_DO_FUN( do_mpmload ); DECLARE_DO_FUN( do_mpoload ); DECLARE_DO_FUN( do_mppurge ); DECLARE_DO_FUN( do_mpstat ); DECLARE_DO_FUN( do_mptransfer ); DECLARE_DO_FUN( do_mset ); DECLARE_DO_FUN( do_mstat ); DECLARE_DO_FUN( do_mwhere ); DECLARE_DO_FUN( do_music ); DECLARE_DO_FUN( do_newlock ); DECLARE_DO_FUN( do_news ); // Veygoth DECLARE_DO_FUN( do_noemote ); DECLARE_DO_FUN( do_north ); DECLARE_DO_FUN( do_northeast ); // Veygoth DECLARE_DO_FUN( do_northwest ); // Veygoth DECLARE_DO_FUN( do_note ); DECLARE_DO_FUN( do_notell ); DECLARE_DO_FUN( do_numlock ); DECLARE_DO_FUN( do_ofind ); DECLARE_DO_FUN( do_oload ); DECLARE_DO_FUN( do_open ); DECLARE_DO_FUN( do_order ); DECLARE_DO_FUN( do_oset ); DECLARE_DO_FUN( do_ostat ); DECLARE_DO_FUN( do_owhere ); DECLARE_DO_FUN( do_pagelen ); DECLARE_DO_FUN( do_pardon ); DECLARE_DO_FUN( do_password ); DECLARE_DO_FUN( do_peace ); DECLARE_DO_FUN( do_petition ); // Veygoth DECLARE_DO_FUN( do_pick ); DECLARE_DO_FUN( do_poison_weapon); /* by Thelonius */ DECLARE_DO_FUN( do_practice ); DECLARE_DO_FUN( do_prompt ); DECLARE_DO_FUN( do_ptell ); // Veygoth DECLARE_DO_FUN( do_purge ); DECLARE_DO_FUN( do_put ); DECLARE_DO_FUN( do_pwhere ); DECLARE_DO_FUN( do_qstat ); // Veygoth DECLARE_DO_FUN( do_quaff ); DECLARE_DO_FUN( do_question ); DECLARE_DO_FUN( do_qui ); DECLARE_DO_FUN( do_quit ); DECLARE_DO_FUN( do_reboo ); DECLARE_DO_FUN( do_reboot ); DECLARE_DO_FUN( do_recall ); DECLARE_DO_FUN( do_recho ); DECLARE_DO_FUN( do_recite ); DECLARE_DO_FUN( do_recline ); // Veygoth DECLARE_DO_FUN( do_remove ); DECLARE_DO_FUN( do_rent ); DECLARE_DO_FUN( do_reply ); DECLARE_DO_FUN( do_report ); DECLARE_DO_FUN( do_rescue ); DECLARE_DO_FUN( do_rest ); DECLARE_DO_FUN( do_restore ); DECLARE_DO_FUN( do_return ); DECLARE_DO_FUN( do_rset ); DECLARE_DO_FUN( do_rstat ); DECLARE_DO_FUN( do_sacrifice ); DECLARE_DO_FUN( do_save ); DECLARE_DO_FUN( do_say ); DECLARE_DO_FUN( do_score ); DECLARE_DO_FUN( do_sell ); DECLARE_DO_FUN( do_set ); // Veygoth DECLARE_DO_FUN( do_shadow ); /* by Thelonius */ DECLARE_DO_FUN( do_shopstat ); // Veygoth DECLARE_DO_FUN( do_shout ); DECLARE_DO_FUN( do_showdesc ); // Veygoth DECLARE_DO_FUN( do_shutdow ); DECLARE_DO_FUN( do_shutdown ); DECLARE_DO_FUN( do_silence ); DECLARE_DO_FUN( do_sit ); // Veygoth DECLARE_DO_FUN( do_sla ); DECLARE_DO_FUN( do_slay ); DECLARE_DO_FUN( do_sleep ); DECLARE_DO_FUN( do_slist ); DECLARE_DO_FUN( do_slookup ); DECLARE_DO_FUN( do_snare ); /* by Binky / Thelonius */ DECLARE_DO_FUN( do_sneak ); DECLARE_DO_FUN( do_snoop ); DECLARE_DO_FUN( do_socials ); DECLARE_DO_FUN( do_south ); DECLARE_DO_FUN( do_southeast ); // Veygoth DECLARE_DO_FUN( do_southwest ); // Veygoth DECLARE_DO_FUN( do_spells ); DECLARE_DO_FUN( do_springleap ); // Veygoth DECLARE_DO_FUN( do_split ); DECLARE_DO_FUN( do_splookup ); // Veygoth DECLARE_DO_FUN( do_sset ); DECLARE_DO_FUN( do_sstime ); DECLARE_DO_FUN( do_stake ); DECLARE_DO_FUN( do_stand ); DECLARE_DO_FUN( do_stat ); // Veygoth DECLARE_DO_FUN( do_steal ); DECLARE_DO_FUN( do_switch ); DECLARE_DO_FUN( do_tell ); DECLARE_DO_FUN( do_time ); DECLARE_DO_FUN( do_title ); DECLARE_DO_FUN( do_train ); DECLARE_DO_FUN( do_transfer ); DECLARE_DO_FUN( do_trip ); // Veygoth DECLARE_DO_FUN( do_trophy ); // Veygoth DECLARE_DO_FUN( do_trust ); DECLARE_DO_FUN( do_typo ); DECLARE_DO_FUN( do_unlock ); DECLARE_DO_FUN( do_untangle ); /* by Thelonius */ DECLARE_DO_FUN( do_up ); DECLARE_DO_FUN( do_users ); DECLARE_DO_FUN( do_value ); DECLARE_DO_FUN( do_visible ); DECLARE_DO_FUN( do_wake ); DECLARE_DO_FUN( do_wear ); DECLARE_DO_FUN( do_weather ); DECLARE_DO_FUN( do_west ); DECLARE_DO_FUN( do_where ); // Veygoth DECLARE_DO_FUN( do_who ); DECLARE_DO_FUN( do_whois ); DECLARE_DO_FUN( do_will ); // Veygoth DECLARE_DO_FUN( do_wimpy ); DECLARE_DO_FUN( do_withdraw ); // Veygoth DECLARE_DO_FUN( do_wizhelp ); DECLARE_DO_FUN( do_wizify ); DECLARE_DO_FUN( do_wizlist ); DECLARE_DO_FUN( do_wizlock ); DECLARE_DO_FUN( do_yell ); DECLARE_DO_FUN( do_zap ); DECLARE_DO_FUN( do_mpedit ); DECLARE_DO_FUN( do_scan ); DECLARE_DO_FUN( do_brew ); DECLARE_DO_FUN( do_scribe ); DECLARE_DO_FUN( do_delet ); DECLARE_DO_FUN( do_delete ); DECLARE_DO_FUN( do_enter ); DECLARE_DO_FUN( do_retir ); DECLARE_DO_FUN( do_retire ); DECLARE_DO_FUN( do_alia ); DECLARE_DO_FUN( do_alias ); DECLARE_DO_FUN( do_unalia ); DECLARE_DO_FUN( do_unalias ); DECLARE_DO_FUN( do_dirt ); DECLARE_DO_FUN( do_grats ); DECLARE_DO_FUN( do_wartalk ); DECLARE_DO_FUN( do_sober ); DECLARE_DO_FUN( do_clookup ); DECLARE_DO_FUN( do_track ); DECLARE_DO_FUN( do_whirlwind ); DECLARE_DO_FUN( do_mount ); DECLARE_DO_FUN( do_dismount ); DECLARE_DO_FUN( do_initiate ); DECLARE_DO_FUN( do_exil ); DECLARE_DO_FUN( do_exile ); DECLARE_DO_FUN( do_promote ); DECLARE_DO_FUN( do_demote ); DECLARE_DO_FUN( do_crecall ); DECLARE_DO_FUN( do_cdonate ); DECLARE_DO_FUN( do_leav ); DECLARE_DO_FUN( do_leave ); DECLARE_DO_FUN( do_claninfo ); DECLARE_DO_FUN( do_guilds ); DECLARE_DO_FUN( do_clans ); DECLARE_DO_FUN( do_orders ); DECLARE_DO_FUN( do_showclan ); DECLARE_DO_FUN( do_setclan ); DECLARE_DO_FUN( do_makeclan ); DECLARE_DO_FUN( do_mudconfig ); DECLARE_DO_FUN( do_shoot ); DECLARE_DO_FUN( do_reload ); DECLARE_DO_FUN( do_wiznet ); DECLARE_DO_FUN( do_astat ); DECLARE_DO_FUN( do_history ); /* * Spell functions. * Defined in spells.c. */ DECLARE_SPELL_FUN( spell_null ); DECLARE_SPELL_FUN( spell_acid_blast ); DECLARE_SPELL_FUN( spell_armor ); DECLARE_SPELL_FUN( spell_bless ); DECLARE_SPELL_FUN( spell_blindness ); DECLARE_SPELL_FUN( spell_burning_hands ); DECLARE_SPELL_FUN( spell_breathe_water ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_call_lightning ); DECLARE_SPELL_FUN( spell_cause_critical ); DECLARE_SPELL_FUN( spell_cause_light ); DECLARE_SPELL_FUN( spell_cause_serious ); DECLARE_SPELL_FUN( spell_change_sex ); DECLARE_SPELL_FUN( spell_charm_person ); DECLARE_SPELL_FUN( spell_chill_touch ); DECLARE_SPELL_FUN( spell_colour_spray ); DECLARE_SPELL_FUN( spell_cone_of_silence ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_continual_light ); DECLARE_SPELL_FUN( spell_control_weather ); DECLARE_SPELL_FUN( spell_create_food ); DECLARE_SPELL_FUN( spell_create_skin ); DECLARE_SPELL_FUN( spell_create_water ); DECLARE_SPELL_FUN( spell_cure_blindness ); DECLARE_SPELL_FUN( spell_cure_critical ); DECLARE_SPELL_FUN( spell_cure_light ); DECLARE_SPELL_FUN( spell_cure_poison ); DECLARE_SPELL_FUN( spell_cure_serious ); DECLARE_SPELL_FUN( spell_curse ); DECLARE_SPELL_FUN( spell_destroy_cursed ); DECLARE_SPELL_FUN( spell_detect_evil ); DECLARE_SPELL_FUN( spell_detect_hidden ); DECLARE_SPELL_FUN( spell_detect_invis ); DECLARE_SPELL_FUN( spell_detect_magic ); DECLARE_SPELL_FUN( spell_detect_poison ); DECLARE_SPELL_FUN( spell_dispel_evil ); DECLARE_SPELL_FUN( spell_dispel_magic ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_earthquake ); DECLARE_SPELL_FUN( spell_enchant_weapon ); DECLARE_SPELL_FUN( spell_energy_drain ); DECLARE_SPELL_FUN( spell_exorcise ); DECLARE_SPELL_FUN( spell_faerie_fire ); DECLARE_SPELL_FUN( spell_faerie_fog ); DECLARE_SPELL_FUN( spell_fireball ); DECLARE_SPELL_FUN( spell_flamestrike ); DECLARE_SPELL_FUN( spell_flaming ); DECLARE_SPELL_FUN( spell_fly ); DECLARE_SPELL_FUN( spell_gate ); DECLARE_SPELL_FUN( spell_general_purpose ); DECLARE_SPELL_FUN( spell_giant_strength ); DECLARE_SPELL_FUN( spell_harm ); DECLARE_SPELL_FUN( spell_heal ); DECLARE_SPELL_FUN( spell_high_explosive ); DECLARE_SPELL_FUN( spell_identify ); DECLARE_SPELL_FUN( spell_infravision ); DECLARE_SPELL_FUN( spell_invis ); DECLARE_SPELL_FUN( spell_know_alignment ); DECLARE_SPELL_FUN( spell_lightning_bolt ); DECLARE_SPELL_FUN( spell_locate_object ); DECLARE_SPELL_FUN( spell_magic_missile ); DECLARE_SPELL_FUN( spell_mass_heal ); DECLARE_SPELL_FUN( spell_mass_invis ); DECLARE_SPELL_FUN( spell_mute ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_pass_door ); DECLARE_SPELL_FUN( spell_poison ); DECLARE_SPELL_FUN( spell_polymorph_other ); DECLARE_SPELL_FUN( spell_power_word_lag ); // Veygoth DECLARE_SPELL_FUN( spell_protection_evil ); DECLARE_SPELL_FUN( spell_recharge_item ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_refresh ); DECLARE_SPELL_FUN( spell_remove_alignment ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_remove_curse ); DECLARE_SPELL_FUN( spell_remove_silence ); /* by Thelonius */ DECLARE_SPELL_FUN( spell_sanctuary ); DECLARE_SPELL_FUN( spell_shocking_grasp ); DECLARE_SPELL_FUN( spell_shield ); DECLARE_SPELL_FUN( spell_sleep ); DECLARE_SPELL_FUN( spell_stone_skin ); DECLARE_SPELL_FUN( spell_summon ); DECLARE_SPELL_FUN( spell_teleport ); DECLARE_SPELL_FUN( spell_turn_undead ); DECLARE_SPELL_FUN( spell_ventriloquate ); DECLARE_SPELL_FUN( spell_weaken ); DECLARE_SPELL_FUN( spell_word_of_recall ); DECLARE_SPELL_FUN( spell_acid_breath ); DECLARE_SPELL_FUN( spell_fire_breath ); DECLARE_SPELL_FUN( spell_frost_breath ); DECLARE_SPELL_FUN( spell_gas_breath ); DECLARE_SPELL_FUN( spell_lightning_breath ); DECLARE_SPELL_FUN( spell_vampiric_bite ); /* * Psi spell_functions, in spells.c (by Thelonius). */ DECLARE_SPELL_FUN( spell_adrenaline_control); DECLARE_SPELL_FUN( spell_agitation ); DECLARE_SPELL_FUN( spell_aura_sight ); DECLARE_SPELL_FUN( spell_awe ); DECLARE_SPELL_FUN( spell_ballistic_attack ); DECLARE_SPELL_FUN( spell_biofeedback ); DECLARE_SPELL_FUN( spell_cell_adjustment ); DECLARE_SPELL_FUN( spell_combat_mind ); DECLARE_SPELL_FUN( spell_complete_healing ); DECLARE_SPELL_FUN( spell_control_flames ); DECLARE_SPELL_FUN( spell_create_sound ); DECLARE_SPELL_FUN( spell_death_field ); DECLARE_SPELL_FUN( spell_detonate ); DECLARE_SPELL_FUN( spell_disintegrate ); DECLARE_SPELL_FUN( spell_displacement ); DECLARE_SPELL_FUN( spell_domination ); DECLARE_SPELL_FUN( spell_ectoplasmic_form ); DECLARE_SPELL_FUN( spell_ego_whip ); DECLARE_SPELL_FUN( spell_energy_containment); DECLARE_SPELL_FUN( spell_enhance_armor ); DECLARE_SPELL_FUN( spell_enhanced_strength ); DECLARE_SPELL_FUN( spell_flesh_armor ); DECLARE_SPELL_FUN( spell_inertial_barrier ); DECLARE_SPELL_FUN( spell_inflict_pain ); DECLARE_SPELL_FUN( spell_intellect_fortress); DECLARE_SPELL_FUN( spell_lend_health ); DECLARE_SPELL_FUN( spell_levitation ); DECLARE_SPELL_FUN( spell_mental_barrier ); DECLARE_SPELL_FUN( spell_mind_thrust ); DECLARE_SPELL_FUN( spell_project_force ); DECLARE_SPELL_FUN( spell_psionic_blast ); DECLARE_SPELL_FUN( spell_psychic_crush ); DECLARE_SPELL_FUN( spell_psychic_drain ); DECLARE_SPELL_FUN( spell_psychic_healing ); DECLARE_SPELL_FUN( spell_share_strength ); DECLARE_SPELL_FUN( spell_thought_shield ); DECLARE_SPELL_FUN( spell_ultrablast ); /* * New spell functions, in spells.c (by Zen). */ DECLARE_SPELL_FUN( spell_detect_good ); DECLARE_SPELL_FUN( spell_dispel_good ); DECLARE_SPELL_FUN( spell_meteor_swarm ); DECLARE_SPELL_FUN( spell_chain_lightning ); DECLARE_SPELL_FUN( spell_vortex_lift ); DECLARE_SPELL_FUN( spell_wizard_eye ); DECLARE_SPELL_FUN( spell_mass_vortex_lift ); DECLARE_SPELL_FUN( spell_portal ); DECLARE_SPELL_FUN( spell_nexus ); DECLARE_SPELL_FUN( spell_protection_good ); DECLARE_SPELL_FUN( spell_create_buffet ); DECLARE_SPELL_FUN( spell_cure_disease ); DECLARE_SPELL_FUN( spell_plague ); DECLARE_SPELL_FUN( spell_flame_shield ); DECLARE_SPELL_FUN( spell_frost_shield ); DECLARE_SPELL_FUN( spell_shock_shield ); DECLARE_SPELL_FUN( spell_ethereal_shield ); /* * Weapon functions. * Defined in fight.c. */ DECLARE_HIT_FUN( hit_vorpal ); DECLARE_HIT_FUN( hit_suck_disarm ); /* * OS-dependent declarations. * These are all very standard library functions, * but some systems have incomplete or non-ansi header files. */ #if defined( _AIX ) char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( amiga ) #define AmigaTCP #endif #if defined( apollo ) int atoi args( ( const char *string ) ); void * calloc args( ( unsigned nelem, size_t size ) ); char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( hpux ) char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( linux ) char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( macintosh ) || defined( WIN32 ) #define NOCRYPT #if defined( unix ) #undef unix #endif #endif #if defined( MIPS_OS ) char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( NeXT ) char * crypt args( ( const char *key, const char *salt ) ); #endif #if defined( sequent ) char * crypt args( ( const char *key, const char *salt ) ); int fclose args( ( FILE *stream ) ); int fprintf args( ( FILE *stream, const char *format, ... ) ); int fread args( ( void *ptr, int size, int n, FILE *stream ) ); int fseek args( ( FILE *stream, long offset, int ptrname ) ); void perror args( ( const char *s ) ); int ungetc args( ( int c, FILE *stream ) ); #endif #if defined( sun ) char * crypt args( ( const char *key, const char *salt ) ); int fclose args( ( FILE *stream ) ); int fprintf args( ( FILE *stream, const char *format, ... ) ); size_t fread args( ( void *ptr, size_t size, size_t nitems, FILE *stream ) ); int fseek args( ( FILE *stream, long offset, int ptrname ) ); void perror args( ( const char *s ) ); int ungetc args( ( int c, FILE *stream ) ); #endif #if defined( ultrix ) char * crypt args( ( const char *key, const char *salt ) ); #endif /* * Stuff for DEC UNIX on Alpha (OSF3.2C) * Fusion */ #if defined( _OSF_SOURCE ) char * crypt args( ( const char *key, const char *salt ) ); int system args( ( const char *string ) ); ssize_t read args( ( int fd, void *buf, size_t nbyte ) ); ssize_t write args( ( int fd, const void *buf, size_t nbyte ) ); int close args( ( int fd ) ); #endif /* * The crypt(3) function is not available on some operating systems. * In particular, the U.S. Government prohibits its export from the * United States to foreign countries. * Turn on NOCRYPT to keep passwords in plain text. */ #if defined( NOCRYPT ) #define crypt( s1, s2 ) ( s1 ) #endif /* * Data files used by the server. * * AREA_LIST contains a list of areas to boot. * All files are read in completely at bootup. * Most output files (bug, idea, typo, shutdown) are append-only. * * The NULL_FILE is held open so that we have a stream handle in reserve, * so players can go ahead and telnet to all the other descriptors. * Then we close it whenever we need to open a file (e.g. a save file). */ #if defined( macintosh ) #define PLAYER_DIR "" /* Player files */ #define BACKUP_DIR "proto.are" /* Backup player files */ #define SYSTEM_DIR "" /* System directory */ #define CLASS_DIR "" /* New class loading scheme */ #define NULL_FILE "" /* To reserve one stream */ #define AREA_DIR "" /* Area files */ #define CLAN_DIR "" /* Clan files */ #define MOB_DIR "" /* MOBProg files */ #endif #if defined( unix ) || defined( linux ) #define PLAYER_DIR "../player/" /* Player files */ #define BACKUP_DIR "../backup/" /* Backup player files */ #define SYSTEM_DIR "../sys/" /* System directory */ #define CLASS_DIR "../classes/" /* New class loading scheme */ #define NULL_FILE "/dev/null" /* To reserve one stream */ #define AREA_DIR "../area/" /* Area files */ #define CLAN_DIR "../clans/" /* Clan files */ #define MOB_DIR "../mobprogs/" /* MOBProg files */ #endif #if defined( AmigaTCP ) #define PLAYER_DIR "envy:player/" /* Player files */ #define BACKUP_DIR "envy:backup/" /* Backup player files */ #define SYSTEM_DIR "envy:sys/" /* System directory */ #define CLASS_DIR "envy:classes/" /* New class loading scheme */ #define NULL_FILE "proto.are" /* To reserve one stream */ #define AREA_DIR "envy:area/" /* Area files */ #define CLAN_DIR "envy:clans/" /* Clan files */ #define MOB_DIR "envy:mobprogs/"/* MOBProg files */ #endif #if defined( WIN32 ) #define PLAYER_DIR "..\\player\\" /* Player files */ #define BACKUP_DIR "..\\backup\\" /* Backup player files */ #define SYSTEM_DIR "..\\sys\\" /* System directory */ #define CLASS_DIR "..\\classes\\" /* New class loading scheme */ #define NULL_FILE "nul" /* To reserve one stream */ #define AREA_DIR "..\\area\\" /* Area files */ #define CLAN_DIR "..\\clans\\" /* Clan files */ #define MOB_DIR "..\\mobprogs\\"/* MOBProg files */ #endif #define AREA_LIST "AREA.LST" /* List of areas */ #define CLASS_LIST "CLASS.LST" /* List of classes */ #define CLANS_LIST "CLANS.LST" /* List of clans */ #define NAME_LIST "NAMES.LST" /* List of illegal names */ #define BUG_FILE "BUGS.TXT" /* For 'bug' and bug( ) */ #define IDEA_FILE "IDEAS.TXT" /* For 'idea' */ #define TYPO_FILE "TYPOS.TXT" /* For 'typo' */ #define NOTE_FILE "NOTES.TXT" /* For 'notes' */ #define CLAN_FILE "CLANS.TXT" /* For clan code */ #define SHUTDOWN_FILE "SHUTDOWN.TXT" /* For 'shutdown' */ #define DOWN_TIME_FILE "TIME.TXT" /* For automatic shutdown */ #define BAN_FILE "BAN.TXT" /* For banned site save */ #define SOCIAL_FILE "SOCIALS.TXT" /* For socials */ #define SYSDATA_FILE "SYSDATA.TXT" /* For mud configuration */ #define ANSI_TITLE_FILE "MUDTITLE.ANS" /* For ansi mud title screen */ #define ASCII_TITLE_FILE "MUDTITLE.ASC" /* For ascii mud title screen */ #define CORPSE_FILE "CORPSES.DAT" /* For saving of player corpses */ #define FRAG_FILE "FRAGLIST.DAT" /* Frag stuff */ /* * Our function prototypes. * One big lump ... this is every function in Merc. */ #define CD CHAR_DATA #define MID MOB_INDEX_DATA #define OD OBJ_DATA #define AD AFFECT_DATA #define ED EXTRA_DESCR_DATA #define OID OBJ_INDEX_DATA #define RID ROOM_INDEX_DATA #define MF MOB_FUN #define OF OBJ_FUN #define SID SOC_INDEX_DATA #define GF GAME_FUN #define CLD CLAN_DATA #define QID QUEST_INDEX_DATA #define QD QUEST_DATA #define QI QUEST_ITEM #define TD TALK_DATA #define MD MEM_DATA /* act_comm.c */ void add_follower args( ( CHAR_DATA *ch, CHAR_DATA *master ) ); void add_follower_nomsg args( ( CHAR_DATA *ch, CHAR_DATA *master ) ); void stop_follower args( ( CHAR_DATA *ch ) ); void die_follower args( ( CHAR_DATA *ch, char *name ) ); bool is_same_group args( ( CHAR_DATA *ach, CHAR_DATA *bch ) ); bool is_note_to args( ( CHAR_DATA *ch, NOTE_DATA *pnote ) ); bool is_same_clan args( ( CHAR_DATA *ach, CHAR_DATA *bch ) ); void send_ansi_title args( ( DESCRIPTOR_DATA *d ) ); void send_ascii_title args( ( DESCRIPTOR_DATA *d ) ); /* act_info.c */ void set_title args( ( CHAR_DATA *ch, char *title ) ); bool check_blind args( ( CHAR_DATA *ch ) ); void show_room_info args( ( CHAR_DATA *ch, ROOM_INDEX_DATA *room ) ); char *get_sex args( ( CHAR_DATA *ch ) ); char *get_exp_string args( ( CHAR_DATA *ch ) ); /* act_move.c */ void move_char args( ( CHAR_DATA *ch, int door ) ); /* act_obj.c */ bool remove_obj args( ( CHAR_DATA *ch, int iWear, bool fReplace ) ); int get_cash args( ( CHAR_DATA *ch ) ); void spend_cash args( ( CHAR_DATA *ch, int amount ) ); void recieve_cash args( ( CHAR_DATA *ch, int amount ) ); void set_cost args( ( OBJ_INDEX_DATA *obj ) ); char *coin_string args( ( int cost ) ); /* act_wiz.c */ ROOM_INDEX_DATA * find_location args( ( CHAR_DATA *ch, char *arg ) ); /* act_clan.c */ bool is_clan args( ( CHAR_DATA *ch ) ); /* comm.c */ void close_socket args( ( DESCRIPTOR_DATA *dclose ) ); void write_to_buffer args( ( DESCRIPTOR_DATA *d, const char *txt, int length ) ); char * condition_string args( ( CHAR_DATA *ch ) ); char * condition_meter args( ( CHAR_DATA *ch ) ); void send_to_room args( ( const char *txt, ROOM_INDEX_DATA *room ) ); void send_to_all_char args( ( const char *text ) ); void send_to_char args( ( const char *txt, CHAR_DATA *ch ) ); void printf_to_char args( ( CHAR_DATA *ch, char *fmt, ... ) ); void show_string args( ( DESCRIPTOR_DATA *d, char *input ) ); void act args( ( const char *format, CHAR_DATA *ch, const void *arg1, const void *arg2, int type ) ); char * text_number args( ( int number ) ); void newbie_eq_char args( ( CHAR_DATA *ch ) ); /* * Colour stuff by Lope of Loping Through The MUD */ int colour args( ( char *type, CHAR_DATA *ch, char *string ) ); void colourconv args( ( char *buffer, const char *txt, CHAR_DATA *ch ) ); void send_to_char_bw args( ( const char *txt, CHAR_DATA *ch ) ); /* db.c */ void boot_db args( ( void ) ); void area_update args( ( void ) ); CD * new_character args( ( bool player ) ); AD * new_affect args( ( void ) ); OD * new_object args( ( void ) ); ED * new_extra_descr args( ( void ) ); CD * create_mobile args( ( MOB_INDEX_DATA *pMobIndex ) ); OD * create_object args( ( OBJ_INDEX_DATA *pObjIndex, int level ) ); QID * create_quest args( ( void ) ); QD * create_quest_data args( ( void ) ); TD * create_quest_message args( ( void ) ); QI * create_quest_item args( ( void ) ); void clear_char args( ( CHAR_DATA *ch ) ); void free_char args( ( CHAR_DATA *ch ) ); char * get_extra_descr args( ( const char *name, EXTRA_DESCR_DATA *ed ) ); MID * get_mob_index args( ( int vnum ) ); OID * get_obj_index args( ( int vnum ) ); RID * get_room_index args( ( int vnum ) ); char fread_letter args( ( FILE *fp ) ); int fread_number args( ( FILE *fp, int *status ) ); char * fread_string args( ( FILE *fp, int *status ) ); void fread_to_eol args( ( FILE *fp ) ); char * fread_word args( ( FILE *fp, int *status ) ); void * alloc_mem args( ( int sMem ) ); void * alloc_perm args( ( int sMem ) ); void free_mem args( ( void *pMem, int sMem ) ); char * str_dup args( ( const char *str ) ); void free_string args( ( char *pstr ) ); int number_fuzzy args( ( int number ) ); int number_range args( ( int from, int to ) ); int number_percent args( ( void ) ); int number_door args( ( void ) ); int number_bits args( ( int width ) ); int number_mm args( ( void ) ); int dice args( ( int number, int size ) ); int interpolate args( ( int level, int value_00, int value_32 ) ); void smash_tilde args( ( char *str ) ); bool str_cmp args( ( const char *astr, const char *bstr ) ); bool str_prefix args( ( const char *astr, const char *bstr ) ); bool str_infix args( ( const char *astr, const char *bstr ) ); bool str_suffix args( ( const char *astr, const char *bstr ) ); char * capitalize args( ( const char *str ) ); char * all_capitalize args( ( const char *str ) ); void append_file args( ( CHAR_DATA *ch, char *file, char *str ) ); void bug args( ( const char *str, int param ) ); void log_string args( ( const char *str ) ); void tail_chain args( ( void ) ); void bugf args( ( char *fmt, ... ) ); void logf args( ( char *fmt, ... ) ); void log_clan args( ( const char *str ) ); void temp_fread_string args( ( FILE *fp, char *str ) ); void save_sysdata args( ( void ) ); int class_convert args( ( int class ) ); /* event.c */ void create_event args( ( int type, int time, void *arg1, void *arg2, int var ) ); void event_update args( ( void ) ); /* fight.c */ void violence_update args( ( void ) ); void multi_hit args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dt ) ); void damage args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dam, int dt, int wpn, int dam_type ) ); void spell_damage args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dam, int dt, int dam_type ) ); void raw_kill args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void death_cry args( ( CHAR_DATA *ch ) ); void stop_hunting args( ( CHAR_DATA *ch ) ); void stop_hating args( ( CHAR_DATA *ch ) ); void stop_fearing args( ( CHAR_DATA *ch ) ); void start_hunting args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void start_hating args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void start_fearing args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool is_hunting args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool is_hating args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool is_fearing args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void stop_fighting args( ( CHAR_DATA *ch, bool fBoth ) ); void update_pos args( ( CHAR_DATA *victim ) ); void check_killer args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool is_safe args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool licensed args( ( CHAR_DATA *ch ) ); int check_trophy args( ( CHAR_DATA *ch, CHAR_DATA *victim, int members ) ); CD * check_guarding args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); /* handler.c */ int get_trust args( ( CHAR_DATA *ch ) ); int get_age args( ( CHAR_DATA *ch ) ); int get_curr_str args( ( CHAR_DATA *ch ) ); int get_curr_int args( ( CHAR_DATA *ch ) ); int get_curr_wis args( ( CHAR_DATA *ch ) ); int get_curr_dex args( ( CHAR_DATA *ch ) ); int get_curr_con args( ( CHAR_DATA *ch ) ); int get_curr_agi args( ( CHAR_DATA *ch ) ); int get_curr_cha args( ( CHAR_DATA *ch ) ); int get_curr_pow args( ( CHAR_DATA *ch ) ); int get_curr_luk args( ( CHAR_DATA *ch ) ); int get_max_str args( ( CHAR_DATA *ch ) ); int get_max_int args( ( CHAR_DATA *ch ) ); int get_max_wis args( ( CHAR_DATA *ch ) ); int get_max_dex args( ( CHAR_DATA *ch ) ); int get_max_con args( ( CHAR_DATA *ch ) ); int get_max_agi args( ( CHAR_DATA *ch ) ); int get_max_cha args( ( CHAR_DATA *ch ) ); int get_max_pow args( ( CHAR_DATA *ch ) ); int get_max_luk args( ( CHAR_DATA *ch ) ); int get_hitroll args( ( CHAR_DATA *ch, int wpn ) ); int get_damroll args( ( CHAR_DATA *ch, int wpn ) ); int can_carry_n args( ( CHAR_DATA *ch ) ); int can_carry_w args( ( CHAR_DATA *ch ) ); bool is_name args( ( const char *str, char *namelist ) ); bool is_name_prefix args( ( const char *str, char *namelist ) ); void affect_to_char args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) ); void affect_remove args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) ); void affect_strip args( ( CHAR_DATA *ch, int skl, int spl ) ); bool is_affected args( ( CHAR_DATA *ch, int skl, int spl ) ); void affect_join args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) ); void char_from_room args( ( CHAR_DATA *ch ) ); void char_to_room args( ( CHAR_DATA *ch, ROOM_INDEX_DATA *pRoomIndex ) ); void obj_to_char args( ( OBJ_DATA *obj, CHAR_DATA *ch ) ); void obj_from_char args( ( OBJ_DATA *obj ) ); int apply_ac args( ( OBJ_DATA *obj, int iWear ) ); OD * get_eq_char args( ( CHAR_DATA *ch, int iWear ) ); void equip_char args( ( CHAR_DATA *ch, OBJ_DATA *obj, int iWear ) ); void unequip_char args( ( CHAR_DATA *ch, OBJ_DATA *obj ) ); int count_obj_list args( ( OBJ_INDEX_DATA *obj, OBJ_DATA *list ) ); void obj_from_room args( ( OBJ_DATA *obj ) ); void obj_to_room args( ( OBJ_DATA *obj, ROOM_INDEX_DATA *pRoomIndex ) ); void obj_to_obj args( ( OBJ_DATA *obj, OBJ_DATA *obj_to ) ); void obj_from_obj args( ( OBJ_DATA *obj ) ); void extract_obj args( ( OBJ_DATA *obj ) ); void extract_char args( ( CHAR_DATA *ch, bool fPull ) ); CD * get_char_room args( ( CHAR_DATA *ch, char *argument ) ); CD * get_char_area args( ( CHAR_DATA *ch, char *argument ) ); CD * get_char_world args( ( CHAR_DATA *ch, char *argument ) ); OD * get_obj_type args( ( OBJ_INDEX_DATA *pObjIndexData ) ); OD * get_obj_list args( ( CHAR_DATA *ch, char *argument, OBJ_DATA *list ) ); OD * get_obj_carry args( ( CHAR_DATA *ch, char *argument ) ); OD * get_obj_wear args( ( CHAR_DATA *ch, char *argument ) ); OD * get_obj_here args( ( CHAR_DATA *ch, char *argument ) ); OD * get_obj_world args( ( CHAR_DATA *ch, char *argument ) ); OD * create_money args( ( int copper, int silver, int gold, int platinum ) ); int get_obj_number args( ( OBJ_DATA *obj ) ); int get_obj_weight args( ( OBJ_DATA *obj ) ); bool room_is_dark args( ( ROOM_INDEX_DATA *pRoomIndex ) ); bool room_is_private args( ( ROOM_INDEX_DATA *pRoomIndex ) ); bool can_see args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); bool can_see_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj ) ); bool can_drop_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj ) ); char * item_type_name args( ( OBJ_DATA *obj ) ); char * affect_loc_name args( ( int location ) ); char * affect_bit_name args( ( int vector[NUM_AFFECT_VECTORS] ) ); char * extra_bit_name args( ( OBJ_DATA *obj ) ); char * parts_bit_name args( ( int vector ) ); char * ris_bit_name args( ( int vector ) ); CD * get_char args( ( CHAR_DATA *ch ) ); bool longstring args( ( CHAR_DATA *ch, char *argument ) ); bool authorized args( ( CHAR_DATA *ch, char *skllnm ) ); void end_of_game args( ( void ) ); int race_lookup args( ( const char *race ) ); int race_key_lookup args( ( const char *race ) ); int skill_affect_lookup args( ( const char *race ) ); int spell_affect_lookup args( ( const char *race ) ); int advatoi args( ( const char *s ) ); CLD * clan_lookup args( ( const char *name ) ); int race_full_lookup args( ( const char *race ) ); int check_ris args( ( CHAR_DATA *ch, int dam_type ) ); int get_ac args( ( CHAR_DATA *ch ) ); /* interp.c */ void substitute_alias args( ( DESCRIPTOR_DATA *d ) ); void interpret args( ( CHAR_DATA *ch, char *argument ) ); bool is_number args( ( char *arg ) ); int number_argument args( ( char *argument, char *arg ) ); char * one_argument args( ( char *argument, char *arg_first ) ); bool IS_SWITCHED args( ( CHAR_DATA *ch ) ); /* magic.c */ int skill_lookup args( ( const char *name ) ); int spell_lookup args( ( const char *name ) ); bool saves_spell args( ( int level, CHAR_DATA *victim, int dam_type ) ); void obj_cast_spell args( ( int sn, int level, CHAR_DATA *ch, CHAR_DATA *victim, OBJ_DATA *obj ) ); int calc_memtime args( ( CHAR_DATA *ch, int sn ) ); MD * create_memdata args( ( CHAR_DATA *ch, int sn ) ); void memorize_update args( ( void ) ); void forget_all args( ( CHAR_DATA *ch ) ); void say_spell args( ( CHAR_DATA *ch, int sn ) ); void finish_spell args( ( CHAR_DATA *ch, int sn, char *argument ) ); /* mob_prog.c */ #ifdef DUNNO_STRSTR char * strstr args ( (const char *s1, const char *s2 ) ); #endif void mprog_wordlist_check args ( ( char * arg, CHAR_DATA *mob, CHAR_DATA* actor, OBJ_DATA* object, void* vo, int type ) ); void mprog_percent_check args ( ( CHAR_DATA *mob, CHAR_DATA* actor, OBJ_DATA* object, void* vo, int type ) ); void mprog_act_trigger args ( ( char* buf, CHAR_DATA* mob, CHAR_DATA* ch, OBJ_DATA* obj, void* vo ) ); void mprog_bribe_trigger args ( ( CHAR_DATA* mob, CHAR_DATA* ch, int amount ) ); void mprog_entry_trigger args ( ( CHAR_DATA* mob ) ); void mprog_give_trigger args ( ( CHAR_DATA* mob, CHAR_DATA* ch, OBJ_DATA* obj ) ); void mprog_greet_trigger args ( ( CHAR_DATA* mob ) ); void mprog_fight_trigger args ( ( CHAR_DATA* mob, CHAR_DATA* ch ) ); void mprog_hitprcnt_trigger args ( ( CHAR_DATA* mob, CHAR_DATA* ch ) ); void mprog_death_trigger args ( ( CHAR_DATA* mob ) ); void mprog_random_trigger args ( ( CHAR_DATA* mob ) ); void mprog_speech_trigger args ( ( char* txt, CHAR_DATA* mob ) ); /* save.c */ void backup_char_obj args( ( CHAR_DATA *ch ) ); /* Zen was here :) */ void delete_char_obj args( ( CHAR_DATA *ch ) ); /* Zen was here :) */ void save_char_obj args( ( CHAR_DATA *ch ) ); bool load_char_obj args( ( DESCRIPTOR_DATA *d, char *name ) ); void save_corpses args( ( void ) ); void load_corpses args( ( void ) ); /* special.c */ MF * spec_mob_lookup args( ( const char *name ) ); OF * spec_obj_lookup args( ( const char *name ) ); /* spells.c */ /* tables.c */ void clear_social args( ( SOC_INDEX_DATA *soc ) ); void extract_social args( ( SOC_INDEX_DATA *soc ) ); SID * new_social args( ( void ) ); void free_social args( ( SOC_INDEX_DATA *soc ) ); void load_socials args( ( void ) ); void save_socials args( ( void ) ); void load_classes args( ( void ) ); void save_classes args( ( void ) ); void save_clan args( ( CLAN_DATA *clan ) ); void save_clan_list args( ( void ) ); void load_clans args( ( void ) ); void set_skills args( ( CHAR_DATA *ch ) ); void set_spells args( ( CHAR_DATA *ch ) ); void skill_practice args( ( CHAR_DATA *ch, int sn ) ); void spell_practice args( ( CHAR_DATA *ch, int sn ) ); CLAN_DATA * get_clan args( ( const char *name ) ); /* track.c */ void found_prey args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void hunt_victim args( ( CHAR_DATA *ch) ); /* gamble.c */ GF * game_lookup args( ( const char *name ) ); /* update.c */ void advance_level args( ( CHAR_DATA *ch ) ); void demote_level args( ( CHAR_DATA *ch ) ); void gain_exp args( ( CHAR_DATA *ch, int gain ) ); void gain_condition args( ( CHAR_DATA *ch, int iCond, int value ) ); void ban_update args( ( void ) ); void char_update args( ( void ) ); void mobile_update args( ( void ) ); void list_update args( ( void ) ); void object_update args( ( void ) ); void obj_spec_update args( ( void ) ); void aggr_update args( ( void ) ); void weather_update args( ( void ) ); void time_update args( ( void ) ); void room_update args( ( void ) ); void hit_update args( ( void ) ); void mana_update args( ( void ) ); void move_update args( ( void ) ); /* wiznet.c */ void wiznet args ( ( CHAR_DATA *ch, int chan, int level, const char * string ) ); /* olc_save.c */ char * mprog_type_to_name args ( ( int type ) ); char * fix_string args ( ( const char *str ) ); #undef CD #undef MID #undef OD #undef OID #undef RID #undef MF #undef OF #undef SID #undef GF #undef CLD /*************************************************************************** * * * OLC * * (Start of section ... start here) * * * ***************************************************************************/ /* * This structure is used in spec_*.c to lookup spec funs and * also in olc_act.c to display listings of spec funs. */ struct spec_mob_type { char * spec_name; MOB_FUN * spec_fun; }; struct spec_obj_type { char * spec_name; OBJ_FUN * spec_fun; }; struct game_type { char * game_name; GAME_FUN * game_fun; }; /* This structure is used in bit.c to lookup flags and stats */ struct flag_type { char * name; int bit; bool settable; }; /* * Area flags. */ #define AREA_NONE 0 #define AREA_CHANGED BV00 /* Area has been modified */ #define AREA_ADDED BV01 /* Area has been added to */ #define AREA_LOADING BV02 /* Used for counting in db.c */ #define AREA_VERBOSE BV03 #define NO_FLAG -99 /* Must not be used in flags or stats */ /* * Command functions. * Defined in olc.c */ DECLARE_DO_FUN( do_aedit ); DECLARE_DO_FUN( do_redit ); DECLARE_DO_FUN( do_oedit ); DECLARE_DO_FUN( do_medit ); DECLARE_DO_FUN( do_asave ); DECLARE_DO_FUN( do_alist ); DECLARE_DO_FUN( do_resets ); /* * Interpreter prototypes. */ void aedit args( ( CHAR_DATA * ch, char *argument ) ); void redit args( ( CHAR_DATA * ch, char *argument ) ); void medit args( ( CHAR_DATA * ch, char *argument ) ); void oedit args( ( CHAR_DATA * ch, char *argument ) ); void mpedit args( ( CHAR_DATA * ch, char *argument ) ); /* * Global Constants */ extern char * const dir_name [ ]; extern const int rev_dir [ ]; extern const struct spec_mob_type spec_mob_table [ ]; extern const struct spec_obj_type spec_obj_table [ ]; extern const struct game_type game_table [ ]; extern const int class_avail [MAX_PC_RACE][MAX_CLASS]; extern const int repop_point [MAX_PC_RACE][MAX_CLASS]; /* * Global variables */ extern AREA_DATA * area_first; extern AREA_DATA * area_last; extern SHOP_DATA * shop_last; extern GAME_DATA * game_last; extern int top_affect; extern int top_area; extern int top_ed; extern int top_exit; extern int top_help; extern int top_mob_index; extern int top_obj_index; extern int top_reset; extern int top_room; extern int top_shop; extern int top_game; extern int top_vnum_mob; extern int top_vnum_obj; extern int top_vnum_room; extern char str_empty [1]; extern MOB_INDEX_DATA * mob_index_hash [ MAX_KEY_HASH ]; extern OBJ_INDEX_DATA * obj_index_hash [ MAX_KEY_HASH ]; extern ROOM_INDEX_DATA * room_index_hash [ MAX_KEY_HASH ]; extern SOC_INDEX_DATA * soc_index_hash [ MAX_WORD_HASH ]; extern ACT_PROG_DATA * mob_act_list; /* db.c */ void reset_area args( ( AREA_DATA * pArea ) ); void reset_room args( ( ROOM_INDEX_DATA *pRoom ) ); void do_abort args( ( void ) ); /* fraglist.c */ void check_frag args( ( CHAR_DATA *ch, CHAR_DATA *victim ) ); void load_fraglist args( ( void ) ); void save_fraglist args( ( void ) ); /* string.c */ void string_edit args( ( CHAR_DATA *ch, char **pString ) ); void string_append args( ( CHAR_DATA *ch, char **pString ) ); char * string_replace args( ( char * orig, char * old, char * new ) ); void string_add args( ( CHAR_DATA *ch, char *argument ) ); char * format_string args( ( char *oldstring /*, bool fSpace */ ) ); char * first_arg args( ( char *argument, char *arg_first, bool fCase ) ); char * string_unpad args( ( char * argument ) ); char * string_proper args( ( char * argument ) ); /* olc.c */ bool run_olc_editor args( ( DESCRIPTOR_DATA *d ) ); char *olc_ed_name args( ( CHAR_DATA *ch ) ); char *olc_ed_vnum args( ( CHAR_DATA *ch ) ); /* spec_mob.c */ char * spec_mob_string args( ( MOB_FUN *fun ) ); /* spec_obj.c */ char * spec_obj_string args( ( OBJ_FUN *fun ) ); /* gamble.c */ char * game_string args( ( GAME_FUN *fun ) ); /* bit.c */ extern const struct flag_type area_flags [ ]; extern const struct flag_type sex_flags [ ]; extern const struct flag_type exit_flags [ ]; extern const struct flag_type door_resets [ ]; extern const struct flag_type room_flags [ ]; extern const struct flag_type sector_flags [ ]; extern const struct flag_type type_flags [ ]; extern const struct flag_type extra_flags [ ]; extern const struct flag_type wear_flags [ ]; extern const struct flag_type act_flags [ ]; extern const struct flag_type affect_flags [ ]; extern const struct flag_type apply_flags [ ]; extern const struct flag_type wear_loc_strings [ ]; extern const struct flag_type wear_loc_flags [ ]; extern const struct flag_type weapon_flags [ ]; extern const struct flag_type container_flags [ ]; extern const struct flag_type liquid_flags [ ]; extern const struct flag_type material_flags [ ]; extern const struct flag_type mprog_type_flags [ ]; extern const struct flag_type portal_door_flags [ ]; extern const struct flag_type portal_flags [ ]; extern const struct flag_type mana_flags [ ]; extern const struct flag_type clan_flags [ ]; extern const struct flag_type rank_flags [ ]; void set_bitvector args( ( AFFECT_DATA *af, BITVECT_DATA bvect ) ); bool IS_AFFECTED args( ( CHAR_DATA *ch, BITVECT_DATA bvect ) ); void SET_AFF_BIT args( ( CHAR_DATA *ch, BITVECT_DATA bvect ) ); void REMOVE_AFF_BIT args( ( CHAR_DATA *ch, BITVECT_DATA bvect ) ); void TOGGLE_AFF_BIT args( ( CHAR_DATA *ch, BITVECT_DATA bvect ) ); bool IS_OBJ_STAT args( ( OBJ_DATA *obj, BITVECT_DATA bvect ) ); void SET_OBJ_STAT args( ( OBJ_DATA *obj, BITVECT_DATA bvect ) ); void REMOVE_OBJ_STAT args( ( OBJ_DATA *obj, BITVECT_DATA bvect ) ); /*************************************************************************** * * * OLC * * (End of this section ... stop here) * * * ***************************************************************************/