merc.h
source/src/merc.h · 183.7 KB
From the archive forsakenlands.tgz
Download the archive « Back to the archive contents
/* Accommodate old non-Ansi compilers. */
#if defined(TRADITIONAL)
#define const
#define args( list ) ( )
#define DECLARE_DO_FUN( fun ) void fun( )
#define DECLARE_SPEC_FUN( fun ) bool fun( )
#define DECLARE_SPELL_FUN( fun ) void fun( )
#define DECLARE_SONG_FUN( fun ) void fun( )
#define DECLARE_MOB_FUN( fun ) void fun( )
#define DECLARE_OBJ_FUN( fun ) void fun( )
#define DECLARE_ROOM_FUN( fun ) void fun( )
#define DECLARE_EFF_UPDATE( fun ) int fun( )
#else
#define args( list ) list
#define DECLARE_DO_FUN( fun ) DO_FUN fun
#define DECLARE_SPEC_FUN( fun ) SPEC_FUN fun
#define DECLARE_SPELL_FUN( fun ) SPELL_FUN fun
#define DECLARE_SONG_FUN( fun ) SONG_FUN fun
#define DECLARE_EFF_UPDATE( fun ) EFF_UPDATE_FUN fun
#define DECLARE_MOB_FUN( fun ) OBJ_FUN fun
#define DECLARE_OBJ_FUN( fun ) OBJ_FUN fun
#define DECLARE_ROOM_FUN( fun ) ROOM_FUN fun
#endif
/* system calls */
int unlink();
int system();
/* 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 sh_int;
typedef int bool;
#define unix
#else
typedef short int sh_int;
typedef unsigned char bool;
#endif
typedef unsigned char byte;
typedef unsigned int word;
/* Structure types. */
typedef struct trap_data TRAP_DATA;
typedef struct trap_index_data TRAP_INDEX_DATA;
typedef struct cabal_index_data CABAL_INDEX_DATA;
typedef struct cabal_data CABAL_DATA;
typedef struct cabal_room_data CROOM_DATA;
typedef struct cabal_vroom_data CVROOM_DATA;
typedef struct cabal_skill_data CSKILL_DATA;
typedef struct cabal_member_data CMEMBER_DATA;
typedef struct cabal_vote_data CVOTE_DATA;
typedef struct bounty_data BOUNTY_DATA;
typedef struct _quest_node QUEST_DATA;
typedef struct bbid_data BBID_DATA;
typedef struct vote_data VOTE_DATA;
typedef struct affect_data AFFECT_DATA; //REGULAR AFFECT
typedef struct effect_type EFFECT_DATA; //GEN EFFECT.
typedef struct area_data AREA_DATA;
typedef struct ban_data BAN_DATA;
typedef struct buf_type BUFFER;
typedef struct alias_type ALIAS_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 affect_disp_data AFF_DISPLAY;
//OLD
typedef struct mob_prog_data MPROG_DATA;
//NEW
typedef struct prog_list PROG_LIST;
typedef struct prog_code PROG_CODE;
typedef struct obj_spell_data OBJ_SPELL_DATA;
typedef struct challenge_data CHALLENGE_DATA;
typedef struct obj_message_data OBJ_MESSAGE_DATA;
typedef struct trigfile_data TRIGFILE_DATA;
typedef struct skill_data SKILL_DATA;
// Struct double_list
// added by Athaekeetha
// A generic doubly linked list using void pointers so that it can hold
// pretty much a list of anything. Have fun :)
struct Double_List;
typedef struct _Double_List {
void * cur_entry; // current list element, cast to whatever you put in
struct _Double_List * next_node; // initialize when created, gcc wont!
struct _Double_List * prev_node; // same goes here!
} Double_List;
/* Function types. */
typedef void DO_FUN args( ( CHAR_DATA *ch, char *argument ) );
typedef bool SPEC_FUN args( ( CHAR_DATA *ch ) );
typedef void SPELL_FUN args( ( int sn, int level, CHAR_DATA *ch, void *vo, int target ) );
typedef void SONG_FUN args( ( int sn, int level, CHAR_DATA *ch, bool duet, bool sing, char *argument ) );
typedef void OBJ_FUN args( ( OBJ_DATA *obj, char *argument ) );
typedef void ROOM_FUN args( ( ROOM_INDEX_DATA *room, char *argument ) );
//Function for gen effects
typedef int EFF_UPDATE_FUN args ( (CHAR_DATA* ch, void* arg1, void* arg2, int gn, int* int1, int* int2, int flag) );
/* String and memory management parameters. */
#define MAX_PERM_BLOCK 120000
#define MAX_KEY_HASH 1024
#define MAX_STRING_LENGTH 4608
#define MAX_ROOM_VNUM 32769
#define MSL 4608
#define MAX_INPUT_LENGTH 256
#define MIL 256
#define PAGELEN 22
#define LOG_MALLOC TRUE
#define OBJCOUNT_PFILE_NUMBER 1500 //number of pfiles for 1:1 ratio of rares
#define STUPID_NUMBER_OF_SPELLS 1000
//Attack On Sight
#define AOS_LEVEL 200 //Number of race members required to kill before they attack on sight
#define AOS_KILLS_PER_LEVEL 50 //kills for each increase in hostilities
#define AOS_IMPROVE_TICKS 8 //ticks before 1 kill is removed from race_kills
/* Game parameters. *
* Increase the max'es if you add more of something. *
* Adjust the pulse numbers to suit yourself. */
#define MAX_CABAL 32
#define MAX_SOCIALS 256
#define MAX_SKILL 896
#define MAX_SECT 13
#define MAX_PSALM 32 //maximum amount of psalms in the game
#define START_PSALM 8 //starting max of psalms for character
#define MAX_TRAPVAL 5 //number of integer misc vals in traps
#define MAX_TRAPS 2 //number of traps/char
#define MAX_FREE_VNUM 256 //max number of free vnums the mud will keep track of
#define MAX_HOURS 24 //number of hours in a day
#define MAX_DAYS 10 //number of the days in the week
#define MAX_WEEKS 6 //number of weeks in the month
#define MAX_MONTHS 6 //number of months in a year
#define MAX_AFF_DISPLAY 32 //number of custom affects to allow
#define MAIN_PORT 6666
#define TEST_PORT 6665
/* VERSION FOR SAVE FILES */
#define SAVE_VERSION 3001
/* TOTAL SUPPORT IN THE WORLD */
#define WORLD_SUPPORT_VALUE 10000 //used to calculate support value for each area
#define CABAL_FULL_SUPPORT 25 //percent of world support
#define CABAL_FULL_SUPPORT_VAL 2500 //percent of world support
#define CABAL_UNDERDOG_SUP 1500 //support under which cabal is given underdog attack bonus
/* Safety counter for loops */
#define OUTPUT_SAFETY 1000 //comm.c game_loop_unix
//The end of gsn and begginning of gen is decided by MAX_SKILL!
#define MAX_EFF_UPDATE 32 //Ceiling on different flags.
#define MAX_EFFECTS 128 //Ceiling on amount of gen's
//the end of gen is decided by MAX_EFFECTS!
#define MAX_VALUE1 16 //Max length of the int. arrays.
#define MAX_VALUE2 1 //Max length of the int. arrays.
#define MAX_VALUE3 1 //Max length of the int. arrays.
#define MAX_MALFORM 9 //Max level of malforemd weapon.
#define MAX_SONG 64
#define MAX_GROUP 30
#define MAX_GROUPS 32 //Maximum various groups of s_skills in the mud
#define MAX_IN_GROUP 15
#define MAX_CLASS 32
#define MAX_CLASS_NOW 18
#define MAX_PC_RACE 32
#define MAX_RACE 65
#define MAX_ANATOMY 10
#define MAX_ADVENTURER_TIME 288000
/* number of crooms in a cabal index */
#define CROOM_LEVELS 12
/* AVATAR effects maxes */
#define MAX_AVATAR 7 //maximum levels avatar can achive.
#define MAX_AVATAR_CMD 4 //number of commands the "call" executes
#define DIVFAVOR_GAIN 1000 //divine favor worth of each kill
#define DIVFAVOR_LOSS -1000 //divine favor worth of each death
#define DIVFAVOR_COST -1 //BASE amount of favor list per tick at level 0
/* AWAKEN LIFE STATE CONSTANTS */
#define AWAKENLIFE_NONE 0
#define AWAKENLIFE_RAMP 1
#define AWAKENLIFE_DEST 2
#define AWAKENLIFE_MOVE 3
#define AWAKENLIFE_RETR 4
/* CRUSADER CRUSADE CONST */
#define CRUSADE_RACE 0
#define CRUSADE_CLASS 1
#define CRUSADE_CABAL 2
/* WEAPON ENHANCEMENT */
#define ENHANCE_NONE 0
#define ENHANCE_BASIC 1
#define ENHANCE_JUGGER 2
/* CONTINGENCY IDENTIFIERS */
#define CONT_NONE 0
#define CONT_DISPEL (A)
#define CONT_SUMMON (B)
#define CONT_ATTACK (C)
#define CONT_ATTACKED (D)
#define CONT_HP30 (E)
#define CONT_MN30 (F)
/* SEASONS */
#define SEASON_SPRING 0
#define SEASON_SUMMER 1
#define SEASON_FALL 2
#define SEASON_WINTER 3
/* bits for dispel/cancel/interrupt checks on skills */
#define GN_STATIC 0 //cannot be removed, must expire
#define GN_DISPEL (A) //can be dispelled
#define GN_CANCEL (B) //can be cancelled
#define GN_INTERRUPT (C) //can be physicly dispelled (haymaker)
#define GN_NODEATH (D) //is not removed on death
#define GN_EXTEND (E) //can be extended by various spells
#define GN_NO_DND (F) //cannot be memorized with DND system
#define GN_PSI (G) //removed if pos < resting
#define GN_PSI_WEE (H) //psi amp success if saves > -15
#define GN_PSI_MED (I) //psi amp success if saves > -30
#define GN_PSI_STR (J) //psi amp success if saves > -45
#define GN_NOCAST (K) //cannot be normaly cast
#define GN_BENEFICIAL (L) //beneficial spell
#define GN_HARMFUL (M) //bad spell
//combinations of GN bits
#define GN_ANYDISP (GN_DISPEL | GN_CANCEL | GN_INTERRUPT )
#define GN_NOCANCEL (GN_DISPEL | GN_INTERRUPT )
//shorthands
#define GN_INT GN_INTERRUPT
#define GN_STA GN_STATIC
#define GN_BEN (GN_BENEFICIAL | GN_ANYDISP | GN_EXTEND)
#define GN_HAR (GN_HARMFUL | GN_NOCANCEL)
#define GN_ANY GN_ANYDISP
/* these are used for check_crusade in fight.c */
#define CRUSADE_NONE 0
#define CRUSADE_MATCH 1
#define CRUSADE_NOTMATCH 2
/* used for weapon positions */
#define WEPPOS_NORMAL 0
#define WEPPOS_HIGH 1
#define WEPPOS_LOW 2
/* used for prefered battle positions */
#define BATPOS_MIDDLE 0
#define BATPOS_LEFT 1
#define BATPOS_RIGHT 2
/* CRIMES constants */
#define MAX_CRIME 6
#define CRIME_SHEATH 0
#define CRIME_LOOT 1
#define CRIME_THEFT 2
#define CRIME_ASSAULT 3
#define CRIME_MURDER 4
#define CRIME_OBSTRUCT 5
#define CRIME_FLAG_L (A)
#define CRIME_FLAG_T (B)
#define CRIME_FLAG_A (C)
#define CRIME_FLAG_M (D)
#define CRIME_FLAG_S (E)
#define CRIME_FLAG_O (F)
#define CRIME_ALLOW 0
#define CRIME_LIGHT 1
#define CRIME_NORMAL 2
#define CRIME_HEAVY 3
#define CRIME_DEATH 4
/* spell cancellation constants */
/* CABAL POINTS CONSTANTS */
#define MAX_TATTOO 9
#define MAX_DIETY 20//maximum number of dieties avaliable.
#define MAX_HOMETOWN 14
#define MAX_CELL 3//max number of cells in a jail.
#define MAX_DAMAGE_MESSAGE 110
#define MAX_LEVEL 60
#define MAX_QUEST 32
#define LEVEL_HERO (MAX_LEVEL - 10)
#define LEVEL_IMMORTAL (MAX_LEVEL - 9)
#define PULSE_PER_SECOND 4
#define PULSE_AGGR 2
#define PULSE_VIOLENCE ( 3 * PULSE_PER_SECOND)
#define PULSE_MOBILE (10 * PULSE_PER_SECOND)
#define PULSE_TICK (30 * PULSE_PER_SECOND)
#define PULSE_HALFTICK (PULSE_TICK / 2)
#define PULSE_AREA (60 * PULSE_PER_SECOND)
#define PULSE_ARMY (15 * PULSE_PER_SECOND)
#define PULSE_DATA (300 * PULSE_PER_SECOND)
#define PULSE_MSAVE (900 * PULSE_PER_SECOND)
#define PULSE_ARMYSAVE (900 * PULSE_PER_SECOND)
#define PULSE_LOGIN 2
#define PULSE_REBOOT 300 * PULSE_AREA
#define PULSE_SEED 120 * PULSE_AREA
#define PULSE_VOTE PULSE_REBOOT / 2
#define PULSE_CABAL PULSE_TICK
/* REBOOT FLAGS */
#define REBOOT_COLOR (A)
#define REBOOT_PURGE (B)
#define REBOOT_WIPE (C)
#define REBOOT_COUNT (D)
#define REBOOT_HELPS (E)
#define REBOOT_CABAL (F)
#define IMPLEMENTOR (MAX_LEVEL )
#define CREATOR (MAX_LEVEL - 1)
#define SUPREME (MAX_LEVEL - 2)
#define DEITY (MAX_LEVEL - 3)
#define GOD (MAX_LEVEL - 4)
#define IMMORTAL (MAX_LEVEL - 5)
#define DEMI (MAX_LEVEL - 6)
#define ANGEL (MAX_LEVEL - 7)
#define AVATAR (MAX_LEVEL - 8)
#define MASTER (MAX_LEVEL - 9)
#define HERO LEVEL_HERO
#define LEVEL_NEWBIE 5
/* Cabal Ranks */
#define RANK_MAX 6
#define MAX_CLANR RANK_MAX
#define RANK_LEADER 5
#define RANK_ELDER 4
#define RANK_TRUSTED 3
#define RANK_NEWBIE 0
/* HELP FILE CONSTANTS */
/* Defines */
#define HELP_ALL -1
#define HELP_CLASS -2
#define HELP_RACE -3
#define HELP_CABAL -4
#define HELP_PSALM -5
/* path finding */
#define BFS_ERROR -1
#define BFS_ALREADY_THERE -2
#define BFS_NO_PATH -3
/* Site ban structure. */
#define BAN_SUFFIX A
#define BAN_PREFIX B
#define BAN_NEWBIES C
#define BAN_ALL D
#define BAN_PERMIT E
#define BAN_PERMANENT F
/*continuum message defs*/
#define CONTINUUM_NONE 0
#define CONTINUUM_DEATH 1
#define CONTINUUM_ATTACK 2
#define CONTINUUM_HURT 3
/* Different types of shielding against WAIT_STATE */
#define LAG_SHIELD_NONE 0
#define LAG_SHIELD_PROT 1//protective shield
#define LAG_SHIELD_FFIELD 2//Forcefield
#define LAG_SHIELD_RFIELD 3//Reflectivefield
#define LAG_SHIELD_BALANCE 10//iron Balance
#define LAG_SHIELD_IWILL 11//iron will
#define LAG_SHIELD_ARMOR 12//Crusader armor enhancement
#define LAG_SHIELD_NONCORP 20//Mist form etc.
/* The system flags of gen effects, stored in flag1 */
#define EFF_F1_NONE 0 //No flags.
#define EFF_F1_NOSAVE (A) //Effect is not saved.
#define EFF_F1_NOEXTRACT (B) //UPDATE_KILL isn't run on extraction.
#define EFF_F1_ALLOW_EXTEND (C) //Spell is a normal spell effect and may be extended for benefit.
#define EFF_F1_CMDBLOCK (D) //Blocks Commands from execution (high priority).
#define EFF_F1_NODEATH (E) //Not removed on death
/*effect update constants, passed to the effect_update function*/
#define EFF_UPDATE_NONE 0 //Just in case we need this.
#define EFF_UPDATE_INIT 1 //Called to set the effect.
#define EFF_UPDATE_KILL 2 //Called when effect is stripped by handler
#define EFF_UPDATE_ENTER 3 //On entering a room flagged SPEC_UPDATE
#define EFF_UPDATE_LEAVE 4 //On leaving the room with SPEC_UPDATE
#define EFF_UPDATE_PRECOMBAT 5 //At the begginging of a combat round
#define EFF_UPDATE_POSTCOMBAT 6 //At the end of combat round.
#define EFF_UPDATE_PREATTACK 7 //Before attack
#define EFF_UPDATE_POSTATTACK 8 //After attack
#define EFF_UPDATE_PRESPELL 9 //Before spell is cast.
#define EFF_UPDATE_POSTSPELL 10 //After spell (after spell function is run)
#define EFF_UPDATE_PRECOMMAND 11 //Before any command
#define EFF_UPDATE_POSTCOMMAND 12 //After any command
#define EFF_UPDATE_PREDAMAGE 13 //Before any damage is applied
#define EFF_UPDATE_POSTDAMAGE 14 //After any damage is applied
#define EFF_UPDATE_TICK 15 //On tick
#define EFF_UPDATE_MOBTICK 16 //On mob update tick
#define EFF_UPDATE_PREDEATH 17 //Right before death
#define EFF_UPDATE_POSTDEATH 18 //Right after death
#define EFF_UPDATE_PREKILL 19 //Before Kill
#define EFF_UPDATE_POSTKILL 20 //Right after kill.
#define EFF_UPDATE_PREEXP 21 //Before granting Exp/Gold
#define EFF_UPDATE_POSTEXP 22 //After granting Exp/Gold
#define EFF_UPDATE_PREVIOLENCE 23 //Before any combat
#define EFF_UPDATE_POSTVIOLENCE 24 //After any combat
#define EFF_UPDATE_OBJTICK 25 //Object tick update
#define EFF_UPDATE_OBJTOCHAR 26 //After obj is taken by character.
#define EFF_UPDATE_DODGE 27 //On successful dodge.
#define EFF_UPDATE_PARRY 28 //On successfull parry/dual parry/monk parry
#define EFF_UPDATE_SHBLOCK 29 //On successfull Shield block.
#define EFF_UPDATE_VIOTICK 30 //On violence tick (3sec)
#define EFF_UPDATE_MOVE 31 //On attempt to move out of room
/* Defs for obj spells */
#define SPELL_TAR_SELF 1
#define SPELL_TAR_VICT 2
/* Bit wise flags for align/ethos of dieties */
#define DIETY_ALIGN_EVIL (A)
#define DIETY_ALIGN_GOOD (B)
#define DIETY_ALIGN_NEUTRAL (C)
#define DIETY_ETHOS_LAWFUL (A)
#define DIETY_ETHOS_NEUTRAL (B)
#define DIETY_ETHOS_CHAOTIC (C)
#define PATH_LIFE 0
#define PATH_DEATH 1
#define PATH_CHANCE 2
#define PATH_EQUIL 3
#define PATH_KNOW 4
#define PATH_FAITH 5
#define ALIGN_EVIL DIETY_ALIGN_EVIL
#define ALIGN_NEUTRAL DIETY_ALIGN_NEUTRAL
#define ALIGN_GOOD DIETY_ALIGN_GOOD
#define ETHOS_CHAOTIC DIETY_ETHOS_CHAOTIC
#define ETHOS_NEUTRAL DIETY_ETHOS_NEUTRAL
#define ETHOS_LAWFUL DIETY_ETHOS_LAWFUL
/* DEFINES AS PASSED BACK BY DEITY LOOKUP */
/* based on archtype in the table*/
#define DEITY_0 0 //One god
#define DEITY_1 1 //Justice
#define DEITY_2 2 //Warrior
#define DEITY_3 3 //MAge
#define DEITY_4 4 //Goods
#define DEITY_5 5 //CHaos
#define DEITY_6 6 //Undead
/* cabal flags */
#define CABAL_NONE 0 //empty
#define CABAL_CHANGED (A) //if changed in OLC
#define CABAL_SUBCABAL (B) //if cabal is a sub cabal
#define CABAL_CHAT (C) //if cabal has chat channel
#define CABAL_CANHIDE (D) //if member can hide his cabal flag
#define CABAL_CANSHOW (E) //if member can show his cabal flag
#define CABAL_JUSTICE (F) //members are counted as police when crimes are checked
#define CABAL_ROYAL (G) //cabal and its memebers are counted as royals (cabal name must be a homecity name)
#define CABAL_SERVICE (H) //cabal always gives negative trade bonus to its partner
#define CABAL_AREA (I) //cabal can own areas
#define CABAL_COFFER (J) //cabal can store large amounts of cps
#define CABAL_HIGHGAIN (K) //cabal members gain extra cp / tick
#define CABAL_VRCHANGED (L) //if the virtual rooms have changed
#define CABAL_HEARGUARD (M) //cabal can hear guards report criminals
#define CABAL_GATE (N) //cabal is closed up when no members are about
#define CABAL_GUARDMOB (O) //cabal has a standard guard
#define CABAL_TRADE (P) //cabal has at least 1 trade pact
#define CABAL_NAPACT (Q) //cabal has at least 1 non agression pact
#define CABAL_ALLIANCE (R) //cabal has at least 1 alliance
#define CABAL_VENDETTA (S) //cabal has at least 1 vendetta
#define CABAL_SPONSOR (T) //does cabal require sponsorship
#define CABAL_ALLOW_2 (U) //allows cabal powers of given rank
#define CABAL_ALLOW_3 (V) //allows cabal powers of given rank
#define CABAL_RAID (W) //allows cabal to use raids
#define CABAL_ALLOW_4 (X) //allows cabal powers of given rank
#define CABAL_ALLOW_5 (Y) //allows cabal powers of given rank
#define CABAL_ROUGE (Z) //cabal collects bounties and offers spy info
#define CABAL_SPIES (aa) //cabal has inside info on other cabals and bounties
#define CABAL_ELITE (bb) //cabal is allowed +2 max army units
#define CABAL_SWARM (cc) //cabal has faster recruitment
#define CABAL_NOMAGIC (dd) //cabal restricted on use of magic
#define CABAL_HISTORY (ee) //cabal allows its allies histories
/* cabal flags2 */
#define CABAL2_NEWBIE (A) //cabal allows its members newbie chat
#define CABAL2_NOTEALL (B) //cabal allows its members notes to all
#define CABAL2_AREAGAIN (C) //cabal allows its members notes to all
/* cabal room data flags */
#define CROOM_NODUP (A) //cabal room cannot be built more then once
#define CROOM_FIXEDNAME (B) //cabal room cannot have its name changed
#define CROOM_PITROOM (C) //cabal room serves as storage for decayed corpses. First notake container is the pit
#include "tome.h"
#include "dndspell.h"
#include "armies.h"
#include "raid.h"
#include "autoquest.h"
struct critical_type{
int min_anat;
char* name;
};
struct mob_prog_data
{
MPROG_DATA *next;
int type;
char * arglist;
char * comlist;
sh_int dowhen;
};
struct prog_list
{
int trig_type;
char * trig_phrase;
int vnum;
char * code;
PROG_LIST * next;
bool valid;
};
struct prog_code
{
int vnum;
char * code;
PROG_CODE * next;
};
struct struckdrunk
{
sh_int min_drunk_level;
sh_int number_of_rep;
char *replacement[11];
};
struct obj_spell_data
{
OBJ_SPELL_DATA *next;
sh_int spell;
sh_int target;
sh_int percent;
char *message;
char *message2;
};
struct challenge_data
{
CHALLENGE_DATA *next;
char *name;
char *record;
sh_int win;
sh_int loss;
sh_int tie;
sh_int refused;
};
struct _quest_node{
QUEST_DATA* next;
bool valid;
int save;
char* quest;
};
struct trigfile_data
{
TRIGFILE_DATA *next;
char *name;
sh_int dowhen;
};
struct obj_message_data
{
char *onself;
char *onother;
char *offself;
char *offother;
};
struct ban_data
{
BAN_DATA * next;
bool valid;
sh_int ban_flags;
sh_int level;
char * name;
char * text;
};
struct alias_type{
ALIAS_DATA* next; //next alias
ALIAS_DATA* prev; //prev alias
char* name; //name phrase for alias
char* content; //actual contents of the alias
};
struct buf_type
{
BUFFER * next;
bool valid;
sh_int state; /* error state of the buffer */
sh_int size; /* size in k */
char * string; /* buffer's string */
};
/* Time and weather stuff. */
#define SUN_DARK 0
#define SUN_RISE 1
#define SUN_LIGHT 2
#define SUN_SET 3
#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
{
sh_int mmhg;
sh_int change;
sh_int sky;
sh_int sunlight;
};
/* mud data global */
struct mud_type{
time_t crash_time; /* last crash */
time_t current_time; /* time of this pulse */
time_t save_time; /* time of last save */
char str_boot_time[MIL];
char str_save_time[MIL];
struct time_info_data time_info; /* mud day/hour etc. */
struct weather_data weather_info;/* mud weather */
int mudport; /* mudport */
int pfiles; /* total pfiles above level 15 */
int bounties; /* total of bounties collected */
int max_on; /* most people on */
int deaths; /* deaths so far */
int siege_iden; /* special identifier for sieges */
int tot_bastion; /* total of possible bastions in all loaded areas */
bool wizlock; /* Is wizlocked */
bool newlock; /* Is newlocked */
char* questor; /* current questor */
sh_int max_quest; /* max of quests ever */
time_t last_questor; /* last login by the questor */
};
/* chargen states (HAVE to correspond to places in chargen_table) */
#define CGEN_GREET 1
#define CGEN_MAIN 2
#define CGEN_HELP 3
#define CGEN_ENTER 4
#define CGEN_CREATE 5
#define CGEN_PASS 6
#define CGEN_IMMPASS 7
#define CGEN_MOTD 8
#define CGEN_READY 9
#define CGEN_CON_NAME 10
#define CGEN_NEW_PASS 11
#define CGEN_CON_PASS 12
#define CGEN_NEW_LAST 13
#define CGEN_CON_LAST 14
#define CGEN_NEW_SEX 15
#define CGEN_NEW_RACE 16
#define CGEN_CON_RACE 17
#define CGEN_NEW_CLAS 18
#define CGEN_CON_CLAS 19
#define CGEN_NEW_ALIG 20
#define CGEN_CON_ALIG 21
#define CGEN_NEW_ETHO 22
#define CGEN_CON_ETHO 23
#define CGEN_ROLL 24
#define CGEN_NEW_RELI 25
#define CGEN_CON_RELI 26
#define CGEN_NEW_HOME 27
#define CGEN_CON_HOME 28
#define CGEN_ASK_DETA 29
#define CGEN_NEW_DONE 30
#define CGEN_CON_BREAK 31
#define CGEN_DET_BODY 32
#define CGEN_DET_FACE 33
#define CGEN_DET_SKIN 34
#define CGEN_DET_EYES 35
#define CGEN_DET_HAIR 36
#define CGEN_DET_HAIRL 37
#define CGEN_DET_HAIRT 38
#define CGEN_DET_HAIRF 39
#define CGEN_DET_PERK 40
#define CGEN_CON_PERK 41
#define CGEN_DET_HAND 42
#define CGEN_DET_AGE 43
#define CGEN_CON_AGE 44
#define CGEN_DET_WEAP 45
#define CGEN_NEW_TELE 46
#define CGEN_NEW_ENEM 47
#define CGEN_NEW_ADVE 48
#define CGEN_NAGSCREEN 49
#define CGEN_NAGLAG 50
#define CGEN_MAX 51
//used for the tables in detailed character generation options
#define CGEN_MAX_BODY 14
#define CGEN_MAX_FACE 14
#define CGEN_MAX_SKIN 6
#define CGEN_MAX_HAIR 14
#define CGEN_MAX_HAIRL 10
#define CGEN_MAX_HAIRT 11
#define CGEN_MAX_HAIRF 10
#define CGEN_MAX_EYES 11
/* Connected state for a channel. */
#define CON_PLAYING 0
#define CON_GET_NAME 101
#define CON_GET_OLD_PASSWORD 102
#define CON_CONFIRM_NEW_NAME 103
#define CON_GET_NEW_PASSWORD 104
#define CON_CONFIRM_NEW_PASSWORD 105
#define CON_GET_FAMILY 106
#define CON_CONFIRM_FAMILY 107
#define CON_GET_NEW_RACE 108
#define CON_GET_NEW_SEX 109
#define CON_GET_NEW_CLASS 110
#define CON_GET_ALIGNMENT 112
#define CON_GET_ETHOS 113
#define CON_GET_HOMETOWN 114
#define CON_READ_IMOTD 115
#define CON_READ_MOTD 116
#define CON_GET_PURGE_PASSWORD 118
#define CON_CONFIRM_IMMORTAL 121
#define CON_QUICK_STATS 124
#define CON_BREAK_CONNECT 117
#define CON_HOTREBOOT_RECOVER 120
#define CON_SELECT 122
#define CON_VOTE_BOOTH 125
#define CON_VOTE 126
/* Descriptor (channel) structure. */
struct descriptor_data
{
DESCRIPTOR_DATA * next;
Double_List * snoop_by;
CHAR_DATA * character;
CHAR_DATA * original;
char ** pString;
int outsize;
char * outbuf;
char * showstr_head;
char * showstr_point;
char * host;
char * ident;
char inbuf [4 * MIL];
char incomm [MIL];
char inlast [MIL];
sh_int connected;
void * pEdit;
sh_int editor;
int ifd;
pid_t ipid;
int timer;
bool valid;
bool fcommand;
sh_int descriptor;
sh_int repeat;
int outtop;
sh_int port;
sh_int ip;
};
/* Attribute bonus structures. */
struct str_app_type
{
sh_int tohit;
sh_int todam;
sh_int carry;
sh_int wield;
};
struct int_app_type
{
sh_int practice;
sh_int learn;
sh_int manap;
};
struct wis_app_type
{
sh_int practice;
sh_int manap;
};
struct dex_app_type
{
sh_int defensive;
};
struct con_app_type
{
sh_int hitp;
sh_int shock;
};
/* TO types for act. */
#define TO_ROOM 0
#define TO_NOTVICT 1
#define TO_VICT 2
#define TO_CHAR 3
#define TO_ALL 4
#define TO_CHARVICT 5
#define TO_IMMROOM 6
#define TO_FORMAT 7
#define TO_WATCHROOM 8
/* weapon ratings */
#define WEAPON_ATT 0
#define WEAPON_DEF 1
#define WEAPON_WITHDIS 2
#define WEAPON_TOBEDIS 3
#define WEAPON_WITHSDIS 4
/* weapon class */
#define WEAPON_EXOTIC 0
#define WEAPON_SWORD 1
#define WEAPON_DAGGER 2
#define WEAPON_SPEAR 3
#define WEAPON_MACE 4
#define WEAPON_AXE 5
#define WEAPON_FLAIL 6
#define WEAPON_WHIP 7
#define WEAPON_POLEARM 8
#define WEAPON_STAFF 9
#define WEAPON_MAX 10
/* game tables */
extern const char* predict_table[];
extern const struct weapon_rate_type weapon_rating[WEAPON_MAX];
extern const int progress_table[];
extern const char* day_name[MAX_DAYS];
extern const char* month_name[MAX_MONTHS];
extern const struct deity_type deity_table[MAX_DIETY];
extern const struct flag_type path_table[];
extern const struct mal_deity_type mal_deity_table[];
extern const struct mal_name_type mal_name_table[];
extern const struct monk_type monk_table[8];
extern const struct hometown_type hometown_table[MAX_HOMETOWN];
extern const struct position_type position_table[];
extern const struct mcharge_type mcharge_table[];
extern const struct maxmcharge_type maxmcharge_table[];
extern const struct room_color_type room_color_table[MAX_SECT];
extern const struct study_msg_type study_msg_table[];
extern const struct sex_type sex_table[];
extern const struct ethos_type ethos_table[];
extern const struct anatomy_type anatomy_table[];
extern const struct size_type size_table[];
extern const struct warlord_type warlord_table[];
extern const struct song_type song_table[MAX_SONG];
extern const struct tarot_type tarot_table[];
extern const struct lagattack_type lagattack_table[];
extern const struct warn_type warn_table[];
extern const struct psalm_type psalm_table[];
extern const struct amodify_type amodify_table[];
extern const struct wmodify_type wmodify_table[];
extern struct objseed_type objseed_table[];
extern const struct jail_type jail_table[MAX_HOMETOWN];
extern const struct flag_type mprog_flags[];
extern const struct flag_type oprog_flags[];
extern const struct flag_type rprog_flags[];
extern const struct flag_type message_flags[];
/* flag tables */
extern const struct flag_type act_flags[];
extern const struct flag_type act2_flags[];
extern const struct flag_type plr_flags[];
extern const struct flag_type game_flags[];
extern const struct flag_type color_flags[];
extern const struct flag_type affect_flags[];
extern const struct flag_type affect2_flags[];
extern const struct flag_type off_flags[];
extern const struct flag_type imm_flags[];
extern const struct flag_type form_flags[];
extern const struct flag_type special_flags[];
extern const struct flag_type part_flags[];
extern const struct flag_type comm_flags[];
extern const struct flag_type extra_flags[];
extern const struct flag_type wear_flags[];
extern const struct flag_type army_flags[];
extern const struct flag_type army_types[];
extern const struct flag_type weapon_flags[];
extern const struct flag_type container_flags[];
extern const struct flag_type room_flags[];
extern const struct flag_type room_flags2[];
extern const struct flag_type exit_flags[];
extern const struct flag_type crime_table[];
extern const struct flag_type punish_table[];
extern const struct flag_type cabal_flags[];
extern const struct flag_type cabal_flags2[];
extern const struct flag_type cabal_progress_flags[];
extern const struct flag_type pact_flags[];
extern const struct flag_type croom_flags[];
extern const struct flag_type cont_table[];
/* structures */
struct flag_type
{
char *name;
int bit;
bool settable;
};
struct cabal_type
{
char *name;
char *who_name;
int cabal_vnum;
char *currency;
int pit_room;
int pit_vnum;
int enemy_vnum;
int respawn[5];
int bastion_vnum;
};
struct deity_type
{
char* way;
char* god;
sh_int path;
sh_int align;
sh_int ethos;
int shrine;
int tattoo;
};
struct mal_deity_type
{
char* god;
};
struct mal_name_type
{
char* lower;
char* higher;
};
struct tattoo_type
{
char *god;
sh_int vnum;
};
struct monk_type
{
char *wear;
sh_int value;
sh_int weight;
};
struct hometown_type
{
char *name;
//temples
int g_vnum;
int n_vnum;
int e_vnum;
//pit room
int pitr_g_vnum;
int pitr_n_vnum;
int pitr_e_vnum;
//pit
int pit_g_vnum;
int pit_n_vnum;
int pit_e_vnum;
//race
char* race;
};
struct jail_type
{
char* name;
int guardhouse; //Room with JailGuard
// (off_flags with guild_guard && grup = VNUM_JUSTICE
int entrance; //Room right past the guardhouse for checking entry.
int cell[MAX_CELL]; //Jail cells (room2 JAIL_CELL)
int exe_mob; //Executioner mob
int exe_room; //Room for executions
};
struct position_type
{
char *name;
char *short_name;
};
struct mcharge_type
{
char* desc;
};
struct maxmcharge_type
{
char* desc;
};
struct room_color_type
{
char ch;
};
struct study_msg_type
{
char* desc;
};
struct sex_type
{
char *name;
};
struct ethos_type
{
char *name;
};
struct anatomy_type
{
char *name;
};
struct size_type
{
char *name;
};
struct warlord_type
{
char *name;
};
struct tarot_type
{
char *name;
};
/* table with the nouns/verbs for lag attacks. */
struct lagattack_type
{
sh_int* gsn;
char* noun;//noun for the attack
char* to_char;//verb send to char. "your bash collides into"
char* to_vict;//verb sent to vict. "collides with your"
char* to_room;//verb to room "collides into"
char* ba_char;//message when balance is successfull.
char* ba_vict;
char* ba_room;
};
/* Help table types. */
struct help_data
{
HELP_DATA * next;
int vnum;
sh_int level;
sh_int type;
char * keyword;
char * text;
char * ansi_text;
};
/* Shop types. */
#define MAX_TRADE 5
struct shop_data
{
SHOP_DATA * next; /* Next shop in list */
int keeper; /* Vnum of shop keeper mob */
sh_int buy_type [MAX_TRADE]; /* Item types shop will buy */
sh_int profit_buy; /* Cost multiplier for buying */
sh_int profit_sell; /* Cost multiplier for selling */
sh_int open_hour; /* First opening hour */
sh_int close_hour; /* First closing hour */
};
/* warning table composition */
struct warn_type
{
char* subj;
char* text;
};
/* objseed table cell, used for seeding random objects into the game */
struct objseed_type
{
int vnum; //vnum obj object to seed
int num; //number of objects to seed
int chance; //chance for object to be created and reset
int amin; //minimum area vnum to seed in
int amax; //max area vnum to seed in
int rmin; //minimum room vnum to seed in
int rmax; //max area room to seed in
char* i_area[10];
int ia_num; //areas to select from using above
char* e_area[10];
int ea_num; //areas to exclude from selection
int i_sect[10];
int is_num; //sectors required to select
int e_sect[10];
int es_num; //sectors that exclude a choice
int i_rom1[32];
int ir1_num; //room1 bits required to select
int e_rom1[32];
int er1_num; //room1 bits that exclude a choice
int i_rom2[32];
int ir2_num; //room1 bits required to select
int e_rom2[32];
int er2_num; //room1 bits that exclude a choice
int pool; //size of area pool to choose from
bool fExit; //TRUE = Exit required for selection
};
/* used for modify armor */
struct amodify_type {
char* name; //name of modification
int level; //level of sophistication
int bit; //bit that signifies it
int ident; //integer identifier to be used in amodify function
int dur; //how long this takes to complete
int weight; //percent weight increase (+/-) min 1 lb
bool fPart; //does it needs part (same obj type)
bool fSame; //does the part need to be from same object
bool fRare; //does this need rare or unique parts?
int stones; //how many start stones needed
char* help; //help text (one line)
};
/* used for modify weapon */
struct wmodify_type {
char* name; //name of modification
int level; //level of sophistication
int hlevel; //level of holy weapon required
int bit; //bit that signifies it
int ident; //integer identifier to be used in amodify function
int dur; //how long this takes to complete
int weight; //percent weight increase (+/-) min 1 lb
bool fPart; //does it needs part (same obj type)
bool fRare; //does this need rare or unique parts?
int stones; //how many start stones needed
char* help; //help text (one line)
};
/* Per-class stuff. */
#define MAX_GUILD 16
#define MAX_STATS 6
/* STAT indexing constants */
#define STAT_STR 0
#define STAT_INT 1
#define STAT_WIS 2
#define STAT_DEX 3
#define STAT_CON 4
#define STAT_LUCK 5
#define MAX_MODIFIER 16 //Storest APPLY_XXXX modifiers with MOD_XXXX as index.
/* aff_mod indexing constants */
#define MOD_SPELL_LEVEL 0 /* Bonus to spell level on casting */
#define MOD_AFFL_LEVEL 1 /* Bonus to spell level on casting */
#define MOD_MALED_LEVEL 2 /* Bonus to spell level on casting */
#define MOD_MENTAL_LEVEL 3 /* Bonus to spell level on casting */
#define MOD_SPELL_COST 4 /* % increase to spell cost 100 = 2x cost, -50 = 0.5 cost */
#define MOD_WAIT_STATE 5 /* % increase to spell lag, 100 = 2x lag, -50 = 0.5 lag */
#define MOD_SPELL_LEARN 6 /* % increase of chance to learn from non-spells (100% = double normal) */
#define MOD_SKILL_LEARN 7 /* % increase of chance to learn from spells (100% = double normal) */
#define MOD_HIT_GAIN 8 /* hit recovery (100 = double normal) */
#define MOD_MANA_GAIN 9 /* mana recovery (100 = double normal) */
#define MOD_MOVE_GAIN 10/* move recovery (100 = double normal) */
#define MOD_AGE 11/* age in years */
struct class_type
{
char * name; /* the full name of the class */
char who_name [4]; /* Three-letter name for 'who' */
sh_int attr_prime; /* Prime attribute */
sh_int weapon; /* First weapon */
int align; /* Aligns allowed bits */
int guild[MAX_GUILD]; /* Vnum of guild entrance */
sh_int thac0_00; /* Thac0 for level 0 */
sh_int thac0_32; /* Thac0 for level 32 */
sh_int hp_min; /* Min hp gained on leveling */
sh_int hp_max; /* Max hp gained on leveling */
bool fMana; /* Class is magical */
bool sMana; /* Class is semi-magical */
sh_int extra_exp; /* Extra experience per level */
int* gcn; /* pointer to game class number */
char * base_group; /* base skills gained */
char * default_group; /* default skills gained */
sh_int stats[MAX_STATS]; /* stat modifiers by class */
char* ss; /* name of skill set if any */
};
struct item_type
{
sh_int type;
char * name;
};
struct thief_trap_type{
char* name;
int vnum;
int duration;
char* skill;
bool small; //can trap be put on "take" object
bool exit; //can trap be put on exit
bool obj; //can trap be put on obj
};
struct weapon_type
{
char * name;
sh_int vnum;
sh_int type;
sh_int *gsn;
sh_int *gsn_mastery;
sh_int *gsn_expert;
};
struct sheath_type
{
char * class; //class that this applies to
bool show; //can others see the weapon sheathed
bool both; //can class rearm itsself from Right sheath
char * l_str; //left sheath string
char * r_str; //right sheath string
};
struct weapon_rate_type
{
sh_int attack; //offensive rating of the weapon
sh_int defense; //defensive rating of the weapon
sh_int with_dis; //effectivness at disarming weapons
sh_int tobe_dis; //difficulaty of being disarmed
sh_int with_sdis; //effectivness at disarming shields
};
struct wiznet_type
{
char * name;
long flag;
sh_int level;
};
struct attack_type
{
char * name; /* name */
char * noun; /* message */
sh_int damage; /* damage class */
};
struct race_type
{
char * name; /* call name of the race */
bool pc_race; /* can be chosen by pcs */
long act2; /* act bits for the race */
long act; /* act bits for the race */
long aff; /* aff bits for the race */
long off; /* off bits for the race */
long imm; /* imm bits for the race */
long res; /* res bits for the race */
long vuln; /* vuln bits for the race */
long form; /* default form flag for the race */
long parts; /* default parts for the race */
int* grn; /* pointer to game race number */
};
/* additional data for pc races */
struct pc_race_type
{
char * name; /* MUST be in race_type */
char who_name[5]; /* 5 letter name for who */
char * anatomy; /* anatomy for monks */
sh_int class_mult; /* exp per level */
char * skills[5]; /* bonus skills for the race */
bool can_pick;
bool show; /* is the race shown to player in reputation screen etc. */
sh_int stats[MAX_STATS]; /* stat modifiers by race */
sh_int max_stats[MAX_STATS]; /* maximum stats */
sh_int size; /* aff bits for the race */
sh_int align; /* possible aligns bits */
sh_int ethos; /* possible ethos bits */
sh_int hit; /* starting hp */
sh_int mana; /* starting mana */
sh_int practice; /* starting practice */
int lifespan; /* maximum nautral age */
char * class_choice[MAX_CLASS];/* available classes */
};
struct spec_type
{
char * name; /* special function name */
SPEC_FUN * function; /* the function */
};
struct avatar_type
{
int min_favor; //minimum of divine favor needed for level.
int flags; //any flags to be applied to ch->act for each level.
char* cmd[MAX_AVATAR_CMD]; //commands avaliable each level to "call" command.
char* desc; //level description shown in "score"
};
bool MOBtrigger;
#define ERROR_PROG -1
#define IN_FILE_PROG 0
#define ACT_PROG (A)
#define SPEECH_PROG (B)
#define RAND_PROG (C)
#define FIGHT_PROG (D)
#define DEATH_PROG (E)
#define HITPRCNT_PROG (F)
#define ENTRY_PROG (G)
#define GREET_PROG (H)
#define ALL_GREET_PROG (I)
#define GIVE_PROG (J)
#define BRIBE_PROG (K)
#define TIME_PROG (L)
#define GET_PROG (M)
#define DROP_PROG (N)
#define GUILD_PROG (O)
#define BLOODY_PROG (P)
#define JUSTICE_PROG (Q)
#define TELL_PROG (R)
/* Overlapping triggers for new progs */
#define TRIG_ACT (A)
#define TRIG_SPEECH (B)
#define TRIG_RANDOM (C)
#define TRIG_FIGHT (D)
#define TRIG_HPCNT (E)
#define TRIG_DEATH (F)
#define TRIG_ENTRY (G)
#define TRIG_GREET (H)
#define TRIG_GRALL (I)
#define TRIG_BRIBE (J)
#define TRIG_KILL (K)
#define TRIG_DELAY (L)
#define TRIG_SURR (M)
#define TRIG_EXIT (N)
#define TRIG_EXALL (O)
#define TRIG_GET (P)
#define TRIG_DROP (Q)
#define TRIG_SIT (R)
#define TRIG_GIVE (S)
#define TRIG_TELL (U)
#define TRIG_USE (V)
#define TRIG_SPECIAL (W)
#define TRIG_LOOK (X)
#define TRIG_PUT (Y)
#define TRIG_SHOOT (Z)
/* Prog types */
#define PRG_MPROG 0
#define PRG_OPROG 1
#define PRG_RPROG 2
/* Data structure for notes. */
#define NOTE_NOTE 0
#define NOTE_IDEA 1
#define NOTE_PENALTY 2
#define NOTE_NEWS 3
#define NOTE_CHANGES 4
#define NOTE_APPLICATION 5
/* POSITIONS in the WARNING TABLE */
#define WARN_PK 0
#define WARN_PK_IMM 1 //same as belo but to imms
#define WARN_PK_END 2 //player pked exessivly
#define WARN_PK_VIO 3 //player pked on pk warning
#define WARN_LAWFUL 4 //city has become lawful
#define WARN_BOUNTY 5 //bounty fulfilled
#define WARN_GOODPK 6 //good aligned pking good aligned
#define WARN_TOME 7 //new tome is up for grabs
struct note_data
{
NOTE_DATA * next;
char * sender;
char * date;
char * to_list;
char * subject;
char * text;
bool valid;
sh_int type;
sh_int prefix;
time_t date_stamp;
};
/* An affect. */
struct affect_data
{
AFFECT_DATA * next;
bool valid;
int where;
int type;
int level;
int duration;
int location;
int modifier;
int bitvector;
char* string;
bool has_string;
int flags;
};
/* a trap */
struct trap_data{
TRAP_DATA * next;
TRAP_DATA * next_trap;
bool valid;
AREA_DATA* area;
TRAP_INDEX_DATA* pIndexData;
CHAR_DATA* owner; //owner of the trap if any
OBJ_DATA* on_obj; //obj on which trap is set
EXIT_DATA* on_exit; //exit on which trap is set
int vnum;
char* name;
char* echo; //custom echo to be shown to victim
char* oEcho; //custom echo to be shown to room
bool armed; //is it armed
sh_int age; //age in ticks, use to remove traps
sh_int type; //type of trap
sh_int level; //level of trap
sh_int duration; //duration (removed at 0 or ignored at -1)
int flags; //trap flags if any
int value[MAX_TRAPVAL]; //misc values
};
/* a trap index*/
struct trap_index_data{
TRAP_INDEX_DATA *next;
AREA_DATA* area;
int vnum;
char* name;
char* echo; //custom echo to be shown
char* oEcho; //custom echo to be shown to room
bool valid;
sh_int type; //type of trap
sh_int level; //level of trap
sh_int duration; //duration
int flags; //trap flags if any
int value[MAX_TRAPVAL]; //misc values
};
/* cabal skill data */
struct cabal_skill_data{
CSKILL_DATA* next;
SKILL_DATA* pSkill; //data on the actual skill
int min_rank; //min rank to use
int max_rank; //max rank to use
int min_cost; //minimum amount of cp before it can be used
int cost; //actual cost in cp's
int flag; //flags if needed (not used right now)
};
/* cabal member data */
struct cabal_member_data{
CMEMBER_DATA* next;
CABAL_DATA* pCabal;
char* name;
char* sponsor;
char* sponsored;
bool connected;
bool garrison_changed;
int vnum; //used to link cabal pointer
int class;
int race;
int level;
int rank;
int kills; //used for bounty records in sydicate
long cp;
long cp_pen; //added to player's cp's on update, used for penalties or bonuses when player is offline.
int armies[8]; //army queues related contents
int hours;
int mhours;
int month;
time_t last_update; //last time the data was updated used for mhours etc.
time_t time_stamp; //last time somone voted to promote/demote this person
time_t last_login; //last time the person logged in.
};
/* structure for cabal room data which represents choices of rooms a cabal can build */
struct cabal_room_data{
ROOM_INDEX_DATA* pRoomIndex;
int vnum;
int level; //croom flags that this room posseses
};
/* structure for cabal virtual room created based on croom data */
struct cabal_vroom_data{
CVROOM_DATA* next;
int vnum; //vnum of the skeleton room this was based on
ROOM_INDEX_DATA* pRoom; //room that this data represents
bool fComplete; //is this room complete, voted and ready to be loaded
int level; //cabal room level
int pos[3]; //3d coordinates
};
/* cabal vote data */
struct cabal_vote_data{
CVOTE_DATA* next;
int vote; //reference to the vote table
int cost; //cost in cp's to create the vote
int min; //min rank to use the vote
int max; //max rank touse the vote
};
/* cabal index data */
struct cabal_index_data{
/* cabal list */
CABAL_INDEX_DATA *next;
AREA_DATA* pArea;//area this is saved in.
int vnum;
int parent_vnum;
int version;
/* skills */
CSKILL_DATA* skills;
/* votes */
CVOTE_DATA* votes;
/* room choices */
CROOM_DATA* crooms[CROOM_LEVELS];
/* file name */
char* file_name;
/* clan name */
char* clan;
int anchor_vnum;
int guard_vnum;
int pit_vnum;
char* city_name;
char* enemy_name;
/* title prefixes for members */
char* mprefix;
char* fprefix;
char* sprefix; //sponsor prefix
char* gate_on; //string echoed with act(..) when gate is closed
char* gate_off; //string echoed with act(..) when gate is opened
char* gate_msg; //string shown when you try to enter locked cabal
/* army and its upgrade mob */
int army;
int army_upgrade;
int tower;
int tower_upgrade;
sh_int max_room; //maximum number of rooms allowed
char* name;
char* currency;
char* who_name;
char* immortal;
char* mranks[RANK_MAX]; //male/neutral
char* franks[RANK_MAX]; //female
int flags;
int flags2;
int progress; //progress flags
int min_rank; //for children, this is minimum cabal rank to join
int min_lvl;
int max_lvl;
int max_member;
int class[MAX_CLASS]; //classes allowed (-1 == class[0] means all)
int race[MAX_PC_RACE]; //races allowed (-1 == race[0] means all)
bool fAvatar; //are avatars allowed
int align; //aligns (good/neut/evil)
int ethos; //ethois (lawful, neut, chaotic)
};
/* cabal index data */
struct cabal_data{
CABAL_DATA* next;
CABAL_INDEX_DATA* pIndexData;
CABAL_DATA* parent;
int version;
int vnum;
/* enemy cabal */
CABAL_DATA* enemy;
/* members */
CMEMBER_DATA* members;
CMEMBER_DATA* last_recruit; //NULL or points to person who last got army
/* vitual rooms present */
CVROOM_DATA* cvrooms;
/* cabal object */
OBJ_DATA* citem;
/* cabal altar */
CHAR_DATA* altar;
/* cabal guard */
CHAR_DATA* cguard;
/* armies */
ARMY_DATA* armies;
/* army reports */
REPORT_QUEUE report_q;
/* last army report focus */
ROOM_INDEX_DATA* last_focus;
ROOM_INDEX_DATA* anchor;
ROOM_INDEX_DATA* pitroom;
AREA_DATA* city; //set in fix_cabals
MOB_INDEX_DATA* guard; //set in fix cabals
/* gate state */
bool fGate;
/* clan handle */
int clan;
/* armies ready to be conscripted by members */
int armies_ready;
int ready_gain; //contains fraction of a ready army in 1/10ths
sh_int cur_room; //current number of rooms built
/* monetary info */
long cp; //cps in coffers
long raid_cps; //net gain/loss from raids
long raid_sup;
long bonus_sup; //current bonus support due to recent raids (tends towards 0)
long cp_gain[9]; //last cp gain, income, trade, costs, last army, last room, last trade
int support[9]; //last support gain, income, trade, cost, last army, last room, last trade
int cp_tax; //amount in percent to divert from all member's gain to coffers.
/* time stamps */
time_t time_stamp; //last time the cp's were transfered over
time_t room_stamp; //last time the cabal was checked for pos. cp to sustain rooms
time_t member_stamp; //last time the cabal members were checked for time logged in
time_t raid_stamp; //last time the cabal made a raid
time_t present_stamp; //last time a person was present in cabal
char* name;
char* currency;
char* who_name;
char* immortal;
int flags;
int flags2;
int max_member;
int cur_member;
int max_leader;
int cur_leader;
int max_elder;
int cur_elder;
int class[MAX_CLASS]; //classes allowed (-1 == class[0] means all)
int race[MAX_PC_RACE]; //races allowed (-1 == race[0] means all)
bool fAvatar; //are avatars allowed
int align; //aligns (good/neut/evil)
int ethos; //ethois (lawful, neut, chaotic)
int progress; //progress flags
int present; //current number of members present
int count_present; //temporarly used to count ->present
};
/* a temp or learned skill */
struct skill_data
{
SKILL_DATA * next;
bool valid;
sh_int sn;
sh_int level;
sh_int rating;
sh_int learned;
sh_int keep;
};
/* where definitions */
#define TO_AFFECTS 0
#define TO_OBJECT 1
#define TO_IMMUNE 2
#define TO_RESIST 3
#define TO_VULN 4
#define TO_WEAPON 5
#define TO_AFFECTS2 6
#define TO_NONE 7
#define TO_SKILL 8
/* for objects (to_obj and to_weapon are above)*/
#define TO_WEAR 30 //wear flags
/* A kill structure (indexed by level). */
struct kill_data
{
sh_int number;
sh_int killed;
};
/************** information for area builders begin here *****************/
/* Cabal Vnums */
#define VNUM_LEGION 15500
#define VNUM_JUSTICE 15700
#define VNUM_KNIGHT 15910
#define VNUM_CHAOS 16100
#define VNUM_MYSTIC 16300
#define VNUM_WARLORD 16501
#define VNUM_ASSASSIN 27500
#define VNUM_HERALD 28100
/* Not Used */
#define VNUM_MASTER 4494
#define VNUM_SEEKER 4495
#define VNUM_BATTLE 4496
#define VNUM_ENTROPY 4497
#define VNUM_SHADOW 4498
/* Well known mob virtual numbers. */
#define MOB_VNUM_FLESH_GOLEM 1
#define MOB_VNUM_STONE_GOLEM 2
#define MOB_VNUM_ZOMBIE 3
#define MOB_VNUM_MAMMOTH 4
#define MOB_VNUM_SHADOWDEMON 5
#define MOB_VNUM_LEOPARD 6
#define MOB_VNUM_WYVERN 7
#define MOB_VNUM_DISPLACER 8
#define MOB_VNUM_KNIGHT_1 9
#define MOB_VNUM_TRAP_PROXY 10
#define MOB_VNUM_RAVEN 11
#define MOB_VNUM_DEMON 12
#define MOB_VNUM_SPECIAL_GUARD 13
#define MOB_VNUM_SHADOW 14
#define MOB_VNUM_NIGHTWALKER 15
#define MOB_VNUM_STALLION 16
#define MOB_VNUM_FAMILIAR 17
#define MOB_VNUM_HOUND 18
#define MOB_VNUM_KNIGHT_2 19
#define MOB_VNUM_KNIGHT_3 20
#define MOB_VNUM_NEMESIS 21
#define MOB_VNUM_MAGIC_EYE 22
#define MOB_VNUM_DUMMY 23
#define MOB_VNUM_VAPOR 24
#define MOB_VNUM_SOLID 25
#define MOB_VNUM_CLONE 26
#define MOB_VNUM_SKIN 27
#define MOB_VNUM_DECOY 28
#define MOB_VNUM_SPIDER 30
#define MOB_VNUM_PHOENIX 31
#define MOB_VNUM_WISH_TRAINER 32
#define MOB_VNUM_PLAYER_SPIRIT 33
#define MOB_VNUM_VANGUARD 34
#define MOB_VNUM_STALKER 35
#define MOB_VNUM_SERVANT_FIRE 36
#define MOB_VNUM_SERVANT_WATER 37
#define MOB_VNUM_SERVANT_AIR 38
#define MOB_VNUM_SERVANT_EARTH 39
#define MOB_VNUM_JUSTICE_SENTINEL 40
#define MOB_VNUM_ROYAL_GUARD 41
#define MOB_VNUM_JUSTICE_PATROL 42
#define MOB_VNUM_RAID_WEAK 52
#define MOB_VNUM_RAID_MEDI 53
#define MOB_VNUM_RAID_NORM 54
#define MOB_VNUM_RAID_STRO 55
#define MOB_VNUM_MONSTER 56
#define MOB_VNUM_ALTAR 57
#define MOB_VNUM_CABAL_GUARD 58
/* nexus mounts */
#define MOB_VNUM_SERPENT_1 43
#define MOB_VNUM_SERPENT_2 44
#define MOB_VNUM_SERPENT_3 45
#define MOB_VNUM_SERPENT_D1 46
#define MOB_VNUM_SERPENT_D2 47
#define MOB_VNUM_SERPENT_D3 48
#define MOB_VNUM_SERPENT_U1 49
#define MOB_VNUM_SERPENT_U2 50
#define MOB_VNUM_SERPENT_U3 51
/* Beast type Beast vnums */
#define BEAST_RACE_TIGER 0
#define BEAST_RACE_WOLF 1
#define BEAST_RACE_BEAR 2
#define BEAST_RACE_FALCON 3
#define BEAST_RACE_MAX 4
/* RT ASCII conversions -- used so we can have letters in this file */
#define A 1
#define B 2
#define C 4
#define D 8
#define E 16
#define F 32
#define G 64
#define H 128
#define I 256
#define J 512
#define K 1024
#define L 2048
#define M 4096
#define N 8192
#define O 16384
#define P 32768
#define Q 65536
#define R 131072
#define S 262144
#define T 524288
#define U 1048576
#define V 2097152
#define W 4194304
#define X 8388608
#define Y 16777216
#define Z 33554432
#define aa 67108864 /* doubled due to conflicts */
#define bb 134217728
#define cc 268435456
#define dd 536870912
#define ee 1073741824
/* align ranges */
#define EVIL_THRESH -350 /* Person is evil below this align */
#define GOOD_THRESH 350 /* Person is good above this align */
/* quest types */
#define QUEST_TEMP 0
#define QUEST_PERM 1
#define QUEST_INVIS 2
/* Familiar_act bits for special mobs. ie familiars. */
#define SPECIAL_SENTINEL (A) /* Will not move */
#define SPECIAL_RETURN (B) /* Returns to owner */
#define SPECIAL_WATCH (C) /* Echos stuff to owner */
#define SPECIAL_COWARD (D) /* Returns to owner when attacked */
/* ACT bits for mobs. */
#define ACT_IS_NPC (A) /* Auto set for mobs */
#define ACT_SENTINEL (B) /* Stays in one room */
#define ACT_SCAVENGER (C) /* Picks up objects */
#define ACT_CONTRACTER (D) /* Can make contracts */
#define ACT_MOUNT (E) /* Can make contracts */
#define ACT_AGGRESSIVE (F) /* Attacks PC's */
#define ACT_STAY_AREA (G) /* Won't leave area */
#define ACT_WIMPY (H) /* Flees in combat */
#define ACT_PET (I) /* Auto set for pets */
#define ACT_TRAIN (J) /* Can train PC's */
#define ACT_PRACTICE (K) /* Can practice PC's */
#define ACT_NONCOMBAT (L) /* Can practice PC's */
#define ACT_RAIDER (M) /* MOB created by a raid*/
#define ACT_UNDEAD (O) /* Acts like undead */
#define ACT_CLERIC (Q) /* Acts like cleric */
#define ACT_MAGE (R) /* Acts like mage */
#define ACT_THIEF (S) /* Acts like thief */
#define ACT_WARRIOR (T) /* Acts like warrior */
#define ACT_NOALIGN (U) /* No alignment */
#define ACT_NOPURGE (V) /* Can not be purged */
#define ACT_OUTDOORS (W) /* Stays outdoors */
#define ACT_INDOORS (Y) /* Stays indoors */
#define ACT_TOO_BIG (Z) /* Cant bj/bs/str/ass/cleave */
#define ACT_IS_HEALER (aa) /* Acts like healer */
#define ACT_GAIN (bb) /* Can gain converts */
#define ACT_UPDATE_ALWAYS (cc) /* Always reset */
#define ACT_WANDER (dd) /* Wanders a lot */
#define ACT_NO_WANDER (ee) /* Wanders a lot */
/* ACT2 bits for mobs. */
#define ACT_DUPLICATE (B) /* a duplicated mob */
#define ACT_NOEXP (C) /* no exp given */
#define ACT_LAWFUL (D) /* will jail criminals it kills */
#define ACT_HISTORY (E)
#define ACT_NEED_MASTER (F) /* extracted if no master */
#define ACT_MORPH (G) /* morphs to match opponent */
#define ACT_NOLOSS (H) /* no exp loss when pc killed */
#define ACT_NODEATH (I) /* MOB causes mort-wound not death to PCs (still runs spec_kill though)*/
/* damage classes */
#define DAM_NONE 0
#define DAM_BASH 1
#define DAM_PIERCE 2
#define DAM_SLASH 3
#define DAM_FIRE 4
#define DAM_COLD 5
#define DAM_LIGHTNING 6
#define DAM_ACID 7
#define DAM_POISON 8
#define DAM_NEGATIVE 9
#define DAM_HOLY 10
#define DAM_ENERGY 11
#define DAM_MENTAL 12
#define DAM_DISEASE 13
#define DAM_DROWNING 14
#define DAM_LIGHT 15
#define DAM_OTHER 16
#define DAM_HARM 17
#define DAM_CHARM 18
#define DAM_SOUND 19
#define DAM_SILVER 20
#define DAM_WOOD 21
#define DAM_IRON 22
#define DAM_MITHRIL 23
#define DAM_MALED 24
#define DAM_INTERNAL 25 //Not affected by any defense.
#define DAM_AIR 26
/* spell type for const.c */
#define SPELL_OTHER 0
#define SPELL_AFFLICTIVE 1
#define SPELL_MALEDICTIVE 2
#define SPELL_MALEDICTION 2
#define SPELL_MENTAL 3
#define SPELL_PROTECTIVE 4
#define SPELL_PROTECTION 4
#define SPELL_CURATIVE 5
#define SPELL_RESTORATIVE 6
/* OFF bits for mobiles */
#define OFF_AREA_ATTACK (A)
#define OFF_BACKSTAB (B)
#define OFF_BASH (C)
#define OFF_BERSERK (D)
#define OFF_DISARM (E)
#define OFF_DODGE (F)
#define OFF_FADE (G)
#define OFF_FAST (H)
#define OFF_KICK (I)
#define OFF_KICK_DIRT (J)
#define OFF_PARRY (K)
#define OFF_RESCUE (L)
#define OFF_TAIL (M)
#define OFF_TRIP (N)
#define OFF_CRUSH (O)
#define ASSIST_ALL (P)
#define ASSIST_ALIGN (Q)
#define ASSIST_RACE (R)
#define ASSIST_PLAYERS (S)
#define ASSIST_GUARD (T)
#define ASSIST_VNUM (U)
#define GUILD_GUARD (V)
#define CABAL_GUARD (W)
#define OFF_EXTRA_ATTACK (X)
#define OFF_DPARRY (Y)
/* perk bits */
#define PERK_OVERWEIGHT (A)
#define PERK_UNDERWEIGHT (B)
#define PERK_BOOKWORM (C)
#define PERK_ATHLETIC (D)
#define PERK_HEALTHY (E)
#define PERK_SICKLY (F)
#define PERK_STOUT (G)
#define PERK_NIMBLE (H)
#define PERK_CHARISMATIC (I)
#define PERK_FEARSOME (J)
#define PERK_GREEDY (K)
#define PERK_TALL (L)
#define PERK_SHORT (M)
#define PERK_ALCOHOLIC (N)
#define PERK_ADDICT (O)
#define PERK_LUCKY (P)
#define PERK_UNLUCKY (Q)
#define PERK_PIOUS (R)
#define PERK_MAGICAL (S)
#define PERK_ARTIFICER (T)
#define PERK_TINKERER (U)
#define PERK_EAGLEEYE (V)
#define PERK_ADVENTURER (X)
#define PERK_HEROIC (Y)
#define PERK_MERCY (Z)
#define CGEN_MAX_PERK 27
/* return values for check_imm */
#define IS_IMMUNE 0
#define IS_RESISTANT 1
#define IS_NORMAL 2
#define IS_VULNERABLE 3
/* IMM bits for mobs */
#define IMM_SUMMON (A)
#define IMM_CHARM (B)
#define IMM_MAGIC (C)
#define IMM_WEAPON (D)
#define IMM_BASH (E)
#define IMM_PIERCE (F)
#define IMM_SLASH (G)
#define IMM_FIRE (H)
#define IMM_COLD (I)
#define IMM_LIGHTNING (J)
#define IMM_ACID (K)
#define IMM_POISON (L)
#define IMM_NEGATIVE (M)
#define IMM_HOLY (N)
#define IMM_ENERGY (O)
#define IMM_MENTAL (P)
#define IMM_DISEASE (Q)
#define IMM_DROWNING (R)
#define IMM_LIGHT (S)
#define IMM_SOUND (T)
#define IMM_WOOD (X)
#define IMM_SILVER (Y)
#define IMM_IRON (Z)
#define IMM_MITHRIL (aa)
#define IMM_AIR (bb)
/* RES bits for mobs */
#define RES_SUMMON (A)
#define RES_CHARM (B)
#define RES_MAGIC (C)
#define RES_WEAPON (D)
#define RES_BASH (E)
#define RES_PIERCE (F)
#define RES_SLASH (G)
#define RES_FIRE (H)
#define RES_COLD (I)
#define RES_LIGHTNING (J)
#define RES_ACID (K)
#define RES_POISON (L)
#define RES_NEGATIVE (M)
#define RES_HOLY (N)
#define RES_ENERGY (O)
#define RES_MENTAL (P)
#define RES_DISEASE (Q)
#define RES_DROWNING (R)
#define RES_LIGHT (S)
#define RES_SOUND (T)
#define RES_WOOD (X)
#define RES_SILVER (Y)
#define RES_IRON (Z)
#define RES_MITHRIL (aa)
#define RES_AIR (bb)
/* VULN bits for mobs */
#define VULN_SUMMON (A)
#define VULN_CHARM (B)
#define VULN_MAGIC (C)
#define VULN_WEAPON (D)
#define VULN_BASH (E)
#define VULN_PIERCE (F)
#define VULN_SLASH (G)
#define VULN_FIRE (H)
#define VULN_COLD (I)
#define VULN_LIGHTNING (J)
#define VULN_ACID (K)
#define VULN_POISON (L)
#define VULN_NEGATIVE (M)
#define VULN_HOLY (N)
#define VULN_ENERGY (O)
#define VULN_MENTAL (P)
#define VULN_DISEASE (Q)
#define VULN_DROWNING (R)
#define VULN_LIGHT (S)
#define VULN_SOUND (T)
#define VULN_WOOD (X)
#define VULN_SILVER (Y)
#define VULN_IRON (Z)
#define VULN_MITHRIL (aa)
#define VULN_AIR (bb)
/* body form */
#define FORM_EDIBLE (A)
#define FORM_POISON (B)
#define FORM_MAGICAL (C)
#define FORM_INSTANT_DECAY (D)
#define FORM_OTHER (E) /* defined by material bit */
/* actual form */
#define FORM_ANIMAL (G)
#define FORM_SENTIENT (H)
#define FORM_UNDEAD (I)
#define FORM_CONSTRUCT (J)
#define FORM_MIST (K)
#define FORM_INTANGIBLE (L)
#define FORM_BIPED (M)
#define FORM_CENTAUR (N)
#define FORM_INSECT (O)
#define FORM_SPIDER (P)
#define FORM_CRUSTACEAN (Q)
#define FORM_WORM (R)
#define FORM_BLOB (S)
#define FORM_MAMMAL (V)
#define FORM_BIRD (W)
#define FORM_REPTILE (X)
#define FORM_SNAKE (Y)
#define FORM_DRAGON (Z)
#define FORM_AMPHIBIAN (aa)
#define FORM_FISH (bb)
#define FORM_COLD_BLOOD (cc)
#define FORM_HUMANOID FORM_EDIBLE|FORM_SENTIENT|FORM_MAMMAL|FORM_BIPED
/* body parts */
#define PART_HEAD (A)
#define PART_ARMS (B)
#define PART_LEGS (C)
#define PART_HEART (D)
#define PART_BRAINS (E)
#define PART_GUTS (F)
#define PART_HANDS (G)
#define PART_FEET (H)
#define PART_FINGERS (I)
#define PART_EAR (J)
#define PART_EYE (K)
#define PART_LONG_TONGUE (L)
#define PART_EYESTALKS (M)
#define PART_TENTACLES (N)
#define PART_FINS (O)
#define PART_WINGS (P)
#define PART_TAIL (Q)
/* for combat */
#define PART_CLAWS (U)
#define PART_FANGS (V)
#define PART_HORNS (W)
#define PART_SCALES (X)
#define PART_TUSKS (Y)
#define PART_HUMANOID PART_HEAD|PART_ARMS|PART_LEGS|PART_HEART|PART_BRAINS|PART_GUTS|PART_HANDS|PART_FEET|PART_FINGERS|PART_EAR|PART_EYE
#define PART_ANIMAL PART_HEAD|PART_LEGS|PART_HEART|PART_BRAINS|PART_GUTS|PART_EAR|PART_EYE|PART_CLAWS
/* Bits for 'affected_by'. */
#define AFF_BLIND (A)
#define AFF_INVISIBLE (B)
#define AFF_DETECT_EVIL (C)
#define AFF_DETECT_INVIS (D)
#define AFF_DETECT_MAGIC (E)
#define AFF_DETECT_HIDDEN (F)
#define AFF_DETECT_GOOD (G)
#define AFF_SANCTUARY (H)
#define AFF_FAERIE_FIRE (I)
#define AFF_INFRARED (J)
#define AFF_CURSE (K)
#define AFF_FAERIE_FOG (L)
#define AFF_POISON (M)
#define AFF_PROTECT_EVIL (N)
#define AFF_PROTECT_GOOD (O)
#define AFF_SNEAK (P)
#define AFF_HIDE (Q)
#define AFF_SLEEP (R)
#define AFF_CHARM (S)
#define AFF_FLYING (T)
#define AFF_PASS_DOOR (U)
#define AFF_HASTE (V)
#define AFF_CALM (W)
#define AFF_PLAGUE (X)
#define AFF_WEAKEN (Y)
#define AFF_TREEFORM (Z)
#define AFF_BERSERK (aa)
#define AFF_SIEGE (bb)
#define AFF_FLAG (cc)//Used for settings flags with other effects.
#define AFF_SLOW (dd)
#define AFF_WARD_LIGHT (ee)
/* Bits for 'affected2_by'. */
#define AFF_PROTECT_SHIELD (A)
#define AFF_ICE_SHIELD (B)
#define AFF_FIRE_SHIELD (C)
#define AFF_HOLD (D)
#define AFF_BLUR (E)
#define AFF_TERRAIN (F)
#define AFF_MISDIRECTION (G)
#define AFF_SHADOWFORM (H)
#define AFF_RAGE (I)
#define AFF_CAMOUFLAGE (J)
#define AFF_KEEN_SIGHT (K)
#define AFF_SILENCE (L)
#define AFF_SENSE_EVIL (M)
#define AFF_MANA_SHIELD (N)
#define AFF_BARRIER (O)
#define AFF_CATALEPSY (P)
#define AFF_SEVERED (Q)
#define AFF_PETRIFY (R)
#define AFF_NOREMOVE (bb)//affect is not removed when item is uneqiped
#define AFF_FLAG (cc)//Used for settings flags with other effects.
/* peforms automatic responses to combat actions */
#define CCOMBAT_TRIPPED 1
#define CCOMBAT_TRIP 2
#define CCOMBAT_DISARM 3
#define CCOMBAT_BASHED 4
#define CCOMBAT_EVADE 5
#define CCOMBAT_DPARRY 6
/* quests */
#define QUEST_CRUS 1
#define QUEST_AVTA 2
#define QUEST_DEMO 3
#define QUEST_VAMP 4
#define QUEST_UNDE 5
#define QUEST_PSI 6
/* death blow */
#define DB_NORMAL 0
#define DB_STRIP 1
#define DB_SPLIT 2
#define DB_FULL 3
/* Sex. */
#define SEX_NEUTRAL 0
#define SEX_MALE 1
#define SEX_FEMALE 2
/* Ethos */
#define CH_ETHOS_LAWFUL 0
#define CH_ETHOS_NEUTRAL 1
#define CH_ETHOS_CHAOTIC 2
/* AC types */
#define AC_PIERCE 0
#define AC_BASH 1
#define AC_SLASH 2
#define AC_EXOTIC 3
/* dice */
#define DICE_NUMBER 0
#define DICE_TYPE 1
#define DICE_BONUS 2
/* size */
#define SIZE_TINY 0
#define SIZE_SMALL 1
#define SIZE_MEDIUM 2
#define SIZE_LARGE 3
#define SIZE_HUGE 4
#define SIZE_GIANT 5
/* Well known object virtual numbers. */
#define OBJ_VNUM_PIT 1
#define OBJ_VNUM_SOUL 1
#define OBJ_VNUM_GOLD_ONE 2
#define OBJ_VNUM_GOLD_SOME 3
#define OBJ_VNUM_RANGER_STAFF 4
#define OBJ_VNUM_RANGER_ARROW 5
#define OBJ_VNUM_VANGUARD_WEP 6
#define OBJ_VNUM_TRAP_PROXY 8
#define OBJ_VNUM_TOWER_CORPSE 9
#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_GUTS 16
#define OBJ_VNUM_BRAINS 17
#define OBJ_VNUM_RANGER_BOW 18
#define OBJ_VNUM_TOME 19
#define OBJ_VNUM_MUSHROOM 20
#define OBJ_VNUM_LIGHT_BALL 21
#define OBJ_VNUM_SPRING 22
#define OBJ_VNUM_DISC 23
#define OBJ_VNUM_HOLY_ARMOR 25
#define OBJ_VNUM_HOLY_WEAPON 26
#define OBJ_VNUM_STEAK 27
#define OBJ_VNUM_BATTLE_PONCHO 28
#define OBJ_VNUM_JUSTICE_SHIELD 29
#define OBJ_VNUM_JUSTICE_BADGE 30
#define OBJ_VNUM_POTION 31
#define OBJ_VNUM_CHAOS_BLADE 32
#define OBJ_VNUM_JUSTICE_SHIELD2 33 //elder shield (heals)
#define OBJ_VNUM_ENTROPIC_SLUDGE 34
#define OBJ_VNUM_PLANAR_BLADE 35
#define OBJ_VNUM_RAID_OBJECT 36
#define OBJ_VNUM_CABAL_ITEM 37
#define OBJ_VNUM_BOULDER_HOLE 38
#define OBJ_VNUM_CROWN 39
#define OBJ_VNUM_LOCKER 40
#define OBJ_VNUM_LEGS 46
#define OBJ_VNUM_WARLORD_BELT 50
#define OBJ_VNUM_WARLORD_EARRING 51
#define OBJ_VNUM_WARLORD_PONCHO 52
#define OBJ_VNUM_WARLORD_SKULL 53
#define OBJ_VNUM_WARLORD_LIGHT 54
#define OBJ_VNUM_THROW 55
#define OBJ_VNUM_CLONE 56
#define OBJ_VNUM_FAMILIAR_TAG 57
#define OBJ_VNUM_FECES 59
#define OBJ_VNUM_GLASS 60
#define OBJ_VNUM_ROYAL_FLAG 61
#define OBJ_VNUM_ARMY_CORPSE 62
#define OBJ_VNUM_VOMIT 63
#define OBJ_VNUM_TORCH 65
#define OBJ_VNUM_DRUID_STAFF 66
#define OBJ_VNUM_PAPER 67
#define OBJ_VNUM_RESEARCH 69
#define OBJ_VNUM_HAND 70
#define OBJ_VNUM_FOOT 71
#define OBJ_VNUM_FINGERS 72
#define OBJ_VNUM_EAR 73
#define OBJ_VNUM_EYES 74
#define OBJ_VNUM_TONGUE 75
#define OBJ_VNUM_FINS 76
#define OBJ_VNUM_WINGS 77
#define OBJ_VNUM_TAIL 78
#define OBJ_VNUM_CLAWS 79
#define OBJ_VNUM_FANGS 80
#define OBJ_VNUM_HORN 81
#define OBJ_VNUM_TUSK 82
#define OBJ_VNUM_GRUM 83
#define OBJ_VNUM_HEALER_STAFF 84
#define OBJ_VNUM_PIXIE_DUST 90
#define OBJ_VNUM_PRAYER_BEADS 91
#define OBJ_VNUM_FAKE_CORPSE 92
#define OBJ_VNUM_BLOOD_POOL 100
#define OBJ_VNUM_MAL_WEAPON 101
#define OBJ_VNUM_VOODOO_DOLL 102
#define OBJ_VNUM_DUMMY_CABAL 103
#define OBJ_VNUM_EXECUTION 104
#define OBJ_VNUM_JAILBAG 105
#define OBJ_VNUM_BLOOD_SPOT 111
#define OBJ_VNUM_BLOOD_POOL2 113
#define OBJ_VNUM_STARSTONE 141
#define OBJ_VNUM_ARMORCRAFT 142
#define OBJ_VNUM_JUGGERNAUT 143
#define OBJ_VNUM_WEAPONCRAFT 144
#define OBJ_VNUM_ROSE 1001
#define OBJ_VNUM_SCHOOL_MACE 7780
#define OBJ_VNUM_SCHOOL_DAGGER 7781
#define OBJ_VNUM_SCHOOL_SWORD 7782
#define OBJ_VNUM_SCHOOL_SPEAR 7783
#define OBJ_VNUM_SCHOOL_STAFF 7784
#define OBJ_VNUM_SCHOOL_AXE 7785
#define OBJ_VNUM_SCHOOL_FLAIL 7786
#define OBJ_VNUM_SCHOOL_WHIP 7787
#define OBJ_VNUM_SCHOOL_POLEARM 7788
#define OBJ_VNUM_SCHOOL_VEST 7789
#define OBJ_VNUM_SCHOOL_SHIELD 7790
#define OBJ_VNUM_SCHOOL_BANNER 7791
#define OBJ_VNUM_SCHOOL_RECORDER 7792
#define OBJ_VNUM_VALMIRAN_MAP 4426
#define OBJ_VNUM_RHEYDIN_MAP 11569
#define OBJ_VNUM_S_SERINGALE_MAP 4427
#define OBJ_VNUM_E_THERA_MAP 4428
#define OBJ_VNUM_W_THERA_MAP 4429
#define OBJ_VNUM_WHISTLE 2116
#define OBJ_VNUM_SCHOOL_CROSSBOW 30390
/* Item types. */
#define ITEM_LIGHT 1
#define ITEM_SCROLL 2
#define ITEM_WAND 3
#define ITEM_STAFF 4
#define ITEM_WEAPON 5
#define ITEM_TREASURE 8
#define ITEM_ARMOR 9
#define ITEM_POTION 10
#define ITEM_CLOTHING 11
#define ITEM_FURNITURE 12
#define ITEM_TRASH 13
#define ITEM_CONTAINER 15
#define ITEM_HERB 16
#define ITEM_DRINK_CON 17
#define ITEM_KEY 18
#define ITEM_FOOD 19
#define ITEM_MONEY 20
#define ITEM_BOAT 22
#define ITEM_CORPSE_NPC 23
#define ITEM_CORPSE_PC 24
#define ITEM_FOUNTAIN 25
#define ITEM_PILL 26
#define ITEM_MAP 28
#define ITEM_GEM 32
#define ITEM_JEWELRY 33
#define ITEM_CABAL 34
#define ITEM_ARTIFACT 35
#define ITEM_RELIC 36
#define ITEM_THROW 37
#define ITEM_INSTRUMENT 38
#define ITEM_SOCKET 39
#define ITEM_RESEARCH 40
#define ITEM_RANGED 42
#define ITEM_PROJECTILE 43
/* Extra flags. Make sure to add in tables.c*/
#define ITEM_GLOW (A)
#define ITEM_HUM (B)
#define ITEM_DARK (C)
#define ITEM_LOCK (D)
#define ITEM_EVIL (E)
#define ITEM_INVIS (F)
#define ITEM_MAGIC (G)
#define ITEM_NODROP (H)
#define ITEM_BLESS (I)
#define ITEM_ANTI_GOOD (J)
#define ITEM_ANTI_EVIL (K)
#define ITEM_ANTI_NEUTRAL (L)
#define ITEM_NOREMOVE (M)
#define ITEM_INVENTORY (N)
#define ITEM_NOPURGE (O)
#define ITEM_ROT_DEATH (P)
#define ITEM_VIS_DEATH (Q)
#define ITEM_PSI_ENHANCE (R)
#define ITEM_NONMETAL (S)
#define ITEM_NOLOCATE (T)
#define ITEM_MELT_DROP (U)
#define ITEM_HAD_TIMER (V)
#define ITEM_SELL_EXTRACT (W)
#define ITEM_USE (X)
#define ITEM_BURN_PROOF (Y)
#define ITEM_NOUNCURSE (Z)
#define ITEM_CABALTAKE (aa) //used to check if cabal item has
//already been taken (cannot recive
//bonus after it has been removed)
#define ITEM_HOLDS_RARE (bb) //used to check if container can hold
//rare items
#define ITEM_UPDATE_ALWAYS (cc) //oprog is always updaed even if no one
//in area
#define ITEM_STAIN (dd) //Stain flag used for anticheating.
#define ITEM_SOCKETABLE (ee) //can put gems in weapon
/* Wear flags. */
/* Note.. make sure to adjust in do_compare */
#define ITEM_TAKE (A)
#define ITEM_WEAR_FINGER (B)
#define ITEM_WEAR_NECK (C)
#define ITEM_WEAR_BODY (D)
#define ITEM_WEAR_HEAD (E)
#define ITEM_WEAR_LEGS (F)
#define ITEM_WEAR_FEET (G)
#define ITEM_WEAR_HANDS (H)
#define ITEM_WEAR_ARMS (I)
#define ITEM_WEAR_SHIELD (J)
#define ITEM_WEAR_ABOUT (K)
#define ITEM_WEAR_WAIST (L)
#define ITEM_WEAR_WRIST (M)
#define ITEM_WIELD (N)
#define ITEM_HOLD (O)
#define ITEM_NO_SAC (P)
#define ITEM_WEAR_FLOAT (Q)
#define ITEM_WEAR_SECONDARY (R)
#define ITEM_UNIQUE (S)
#define ITEM_WEAR_TATTOO (T)
#define ITEM_WEAR_SHROUD (U)
#define ITEM_REPLACEME (W)
#define ITEM_REPLACEME2 (V)
#define ITEM_RARE (X)
#define ITEM_PARRY (Y)
#define ITEM_WEAR_EARRING (Z)
#define ITEM_WEAR_QUIVER (aa)
//#define ITEM_REPLACEME (bb)
#define ITEM_HAS_OWNER (cc)//requires gen_has_owner
#define ITEM_WEAR_FACE (dd)
#define ITEM_WEAR_RANGED (ee)//Holds ranged items
/* weapon types */
#define WEAPON_FLAMING (A)
#define WEAPON_FROST (B)
#define WEAPON_VAMPIRIC (C)
#define WEAPON_SHARP (D)
#define WEAPON_VORPAL (E)
#define WEAPON_TWO_HANDS (F)
#define WEAPON_SHOCKING (G)
#define WEAPON_POISON (H)
#define WEAPON_JEWELED (I)
#define WEAPON_PARALYZE (J)
#define WEAPON_WOUNDS (K)
#define WEAPON_DEADLY (L)
/* ranged weapon flags */
#define RANGED_NONE 0
#define RANGED_FAST (A) //takes half the time to fire out of combat, and auto fires back when shot at
#define RANGED_LONGRANGE (B) //has half the range penalties to skill
#define RANGED_PASSDOOR (C) //shots ignore doors
#define RANGED_ARMORPIERCE (D) //shots ignore armor
#define RANGED_SLOW (E) //takes longer to reload in combat
#define RANGED_UNLIMITED (F) //creates its own ammo
/* projectile types */
#define PROJECTILE_ARROW (A)
#define PROJECTILE_BOLT (B)
#define PROJECTILE_STONE (C)
#define PROJECTILE_QUARREL (D)
#define PROJECTILE_DART (E)
#define PROJECTILE_SPEAR (F)
#define PROJECTILE_BLADE (G)
#define PROJECTILE_BULLET (H)
/* projectile special types */
#define PROJ_SPEC_POISON (A)
#define PROJ_SPEC_PLAGUE (B)
#define PROJ_SPEC_SHARP (C)
#define PROJ_SPEC_BLUNT (D)
#define PROJ_SPEC_PARALYZE (E)
#define PROJ_SPEC_FLAMING (F)
#define PROJ_SPEC_FROST (G)
#define PROJ_SPEC_SLEEP (H)
#define PROJ_SPEC_BARBED (I)
#define PROJ_SPEC_SHOCK (J)
#define PROJ_SPEC_EXPLODE (K)
#define PROJ_SPEC_VORPAL (L)
#define PROJ_SPEC_PASSDOOR (M)
/* trap flags */
#define TRAP_NONE 0
#define TRAP_NODISARM (A)
#define TRAP_ALLDISARM (B)
#define TRAP_EASY (C)
#define TRAP_MEDIUM (D)
#define TRAP_HARD (E)
#define TRAP_NODODGE (F)
#define TRAP_SAVES (G)
#define TRAP_INVIS (H)
#define TRAP_VIS (I)
#define TRAP_DELAY (J)
#define TRAP_NOTIFY (K)
#define TRAP_REARM (L)
#define TRAP_SILENT (M)
#define TRAP_PERMAMENT (N)
#define TRAP_AREA (O) //area effect on group of victim
/* trap types */
#define TTYPE_NONE 0
#define TTYPE_DAMAGE 1
#define TTYPE_XDAMAGE 2
#define TTYPE_SPELL 3
#define TTYPE_DUMMY 4
#define TTYPE_MOB 5
/* trap reset types */
#define TRAP_ON_OBJ 0
#define TRAP_ON_EXIT 1
/* socket flags */
#define SOCKET_ARMOR (A) //can only be put on armor
#define SOCKET_WEAPON (B) //can only be put on a weapon
/* Apply types (for affects). */
#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_SIZE 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_AFFL 20
#define APPLY_SAVING_MALED 21
#define APPLY_SAVING_MENTAL 22
#define APPLY_SAVING_BREATH 23
#define APPLY_SAVING_SPELL 24
#define APPLY_SPELL_AFFECT 25
#define APPLY_LUCK 26
#define APPLY_SPELL_LEVEL 27 /* Bonus to spell level on casting */
#define APPLY_AFFL_LEVEL 28 /* Bonus to spell level on casting */
#define APPLY_MALED_LEVEL 29 /* Bonus to spell level on casting */
#define APPLY_MENTAL_LEVEL 30 /* Bonus to spell level on casting */
#define APPLY_WAIT_STATE 31 /* % increase to spell lag, 100 = 2x lag, -50 = 0.5 lag */
#define APPLY_SPELL_LEARN 32 /* % increase of chance to learn from non-spells (100% = double normal) */
#define APPLY_SKILL_LEARN 33 /* % increase of chance to learn from spells (100% = double normal) */
#define APPLY_HIT_GAIN 34 /* hit recovery (100 = double normal) */
#define APPLY_MANA_GAIN 35 /* mana recovery (100 = double normal) */
#define APPLY_MOVE_GAIN 36 /* move recovery (100 = double normal) */
#define APPLY_SPELL_COST 37 /* % increase to spell cost 100 = 2x cost, -50 = 0.5 cost */
/* object applies */
#define APPLY_O_NONE APPLY_NONE //nothing
#define APPLY_O_COND 100 //conditon of obj
#define APPLY_O_LEVEL 101 //level of object
#define APPLY_O_CABAL 102 //cabal of object
#define APPLY_O_WEIGHT 103 //weight of object (1/10 lb)
#define APPLY_O_COST 104 //cost of object
#define APPLY_O_VAL0 105 //val0 of object
#define APPLY_O_VAL1 106 //val1 of object
#define APPLY_O_VAL2 107 //val2 of object
#define APPLY_O_VAL3 108 //val3 of object
#define APPLY_O_VAL4 109 //val4 of object
#define APPLY_O_DTYPE 110 //damage type of weapon
/* Values for containers (value[1]). */
#define CONT_CLOSEABLE 1
#define CONT_PICKPROOF 2
#define CONT_CLOSED 4
#define CONT_LOCKED 8
#define CONT_PUT_ON 16
/* Well known room virtual numbers. */
#define ROOM_VNUM_LIMBO 2
#define ROOM_VNUM_LIMIT 3
#define ROOM_VNUM_CABAL_LIMBO 4
#define ROOM_VNUM_CROOM_DUMMY 5
#define ROOM_VNUM_CROOM_GARDEN 8
#define ROOM_VNUM_BOUNTY 6
#define ROOM_VNUM_MAZE 7
#define ROOM_VNUM_BURROW 101
#define ROOM_VNUM_TEMPLE 11665
#define ROOM_VNUM_ALTAR 4490
#define ROOM_VNUM_SCHOOL 7700
#define ROOM_VNUM_PORTAL 7700
#define ROOM_VNUM_CRUS_PORTAL 6400
#define ROOM_VNUM_PSI_PORTAL 12601
#define ROOM_VNUM_DARK_RIFT 1051
/* Room flags. */
#define ROOM_DARK (A)
#define ROOM_MARK (B)
#define ROOM_NO_MOB (C)
#define ROOM_INDOORS (D)
#define ROOM_DAMAGE (E) //Causes small damage each combat tick
#define ROOM_NO_QUIT (I)
#define ROOM_PRIVATE (J)
#define ROOM_SAFE (K)
#define ROOM_SOLITARY (L)
#define ROOM_PET_SHOP (M)
#define ROOM_NO_INOUT (N)
#define ROOM_IMP_ONLY (O)
#define ROOM_GODS_ONLY (P)
#define ROOM_PATH_MARK (Q)
#define ROOM_NEWBIES_ONLY (R)
#define ROOM_NO_GHOST (S)
#define ROOM_NOWHERE (T)
#define ROOM_REGISTRY (U)
#define ROOM_NO_GATEIN (V)
#define ROOM_NO_GATEOUT (W)
#define ROOM_NO_SUMMONIN (X)
#define ROOM_NO_SUMMONOUT (Y)
#define ROOM_NO_RECALL (Z)
#define ROOM_NO_VORTEX (aa)
#define ROOM_NO_SCAN (bb)
#define ROOM_NO_TELEPORTIN (cc)
#define ROOM_NO_TELEPORTOUT (dd)
#define ROOM_DARK_RIFT (ee)
/* room2 flags */
#define ROOM_NO_MAGIC (A)
#define ROOM_NO_RESET (B)
#define ROOM_DAY (C)
#define ROOM_NIGHT (D)
#define ROOM_NO_NEWBIES (E)
#define ROOM_ALARM (F)
#define ROOM_SPEC_UPDATE (G)
#define ROOM_JAILCELL (H) //Special flags for jail rooms, must also be included in jail_table
#define ROOM_PSI_FEAR (I)
#define ROOM_MERCY (J)
#define ROOM_NOHUNGER (K) //no hunger/thirst
#define ROOM_LIBRARY (L) //library (tomes avaliable)
#define ROOM_GUILD_ENTRANCE (M) //guild entrance
/* Directions. */
#define DIR_NORTH 0
#define DIR_EAST 1
#define DIR_SOUTH 2
#define DIR_WEST 3
#define DIR_UP 4
#define DIR_DOWN 5
#define MAX_DOOR 6
/* Exit flags. */
#define EX_ISDOOR (A)
#define EX_CLOSED (B)
#define EX_LOCKED (C)
#define EX_PICKPROOF (F)
#define EX_NOPASS (G)
#define EX_EASY (H)
#define EX_HARD (I)
#define EX_INFURIATING (J)
#define EX_NOCLOSE (K)
#define EX_NOLOCK (L)
#define EX_SECRET (M)
/* Sector types. */
#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_SWAMP 8
#define SECT_AIR 9
#define SECT_DESERT 10
#define SECT_LAVA 11
#define SECT_SNOW 12
/* Equipment wear locations. */
#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_FACE 7
#define WEAR_LEGS 8
#define WEAR_FEET 9
#define WEAR_HANDS 10
#define WEAR_ARMS 11
#define WEAR_SHIELD 12
#define WEAR_ABOUT 13
#define WEAR_WAIST 14
#define WEAR_WRIST_L 15
#define WEAR_WRIST_R 16
#define WEAR_WIELD 17
#define WEAR_HOLD 18
#define WEAR_FLOAT 19
#define WEAR_SECONDARY 20
#define WEAR_SHROUD 21
#define WEAR_TATTOO 22
#define WEAR_EARRING 23
#define WEAR_RANGED 24
#define WEAR_SHEATH_L 25
#define WEAR_SHEATH_R 26
#define WEAR_QUIVER 27
#define MAX_WEAR 28
/**************** information for area builders end here *****************/
/* Conditions. */
#define COND_DRUNK 0
#define COND_FULL 1
#define COND_THIRST 2
#define COND_HUNGER 3
/* Positions. */
#define POS_DEAD 0
#define POS_MORTAL 1
#define POS_INCAP 2
#define POS_STUNNED 3
#define POS_MEDITATE 4
#define POS_SLEEPING 5
#define POS_RESTING 6
#define POS_SITTING 7
#define POS_FIGHTING 8
#define POS_STANDING 9
/* ACT bits for players. */
#define PLR_IS_NPC (A) /* Don't EVER set. */
/* RT auto flags */
#define PLR_AUTOASSIST (C)
#define PLR_AUTOEXIT (D)
#define PLR_AUTOLOOT (E)
#define PLR_AUTOSAC (F)
#define PLR_AUTOGOLD (G)
#define PLR_AUTOSPLIT (H)
/* RT personal flags */
#define PLR_HOLYLIGHT (N)
#define PLR_UNDEAD (O)
#define PLR_NOSUMMON (Q)
#define PLR_NOFOLLOW (R)
/* penalty flags */
#define PLR_PERMIT (U)
#define PLR_LOG (W)
#define PLR_DENY (X)
#define PLR_FREEZE (Y)
#define PLR_WANTED (Z)
#define PLR_DOOF (bb)
#define PLR_HEARALL (cc)
#define PLR_OUTCAST (dd)
/* ACT2 bits for players. */
#define PLR_NOQUIT (A)
#define PLR_NOWHO (B)
#define PLR_ANNOY (C)
#define PLR_GIMP (D)
#define PLR_GARBLE (H)
#define PLR_EQLIMIT (I)
#define PLR_MASQUERADE (J) //Masquerade flag for vamps.
#define PLR_CODING (K) // IMM is coding flag
#define PLR_ROYAL (L) //Player is a royal
#define PLR_NOBLE (M) //Player is a noble
#define PLR_DESC (N) //Used for desc approval
#define PLR_AVATAR (P) //Used for AVATAR type
#define PLR_NOPURGE (Q) //Rares are not purged due to lack of presence
/* MSG flags used for log in messages actual messages stored in table */
#define MSG_NONE 0
#define MSG_QUEST (A)
#define MSG_PURGE (B)
#define MSG_CAB_ACCEPT (C)
#define MSG_CAB_REJECT (D)
#define MSG_CAB_PROM (E)
#define MSG_CAB_DEMO (F)
#define MSG_CAB_EXPEL (G)
#define MSG_CAB_TEXPEL (H)
#define MSG_BOUNTY (I)
#define MSG_BOUNTY_REWARD (J)
#define MSG_BOUNTY_RETURN (K)
#define MSG_CABAL_ALLOW (L)
/* COLOR flags, used for color stuff */
#define COLOR_ON (A) //color on
#define COLOR_DAMAGE (B) //damage color code on
/* AFFECT flags, used for affects */
#define AFLAG_NONE 0
/* GAME flags, used for gameplay */
#define GAME_AMOB (A) //Autoaim on mobs
#define GAME_APC (B) //Autoaim on PC's
#define GAME_AOBJ (C) //Autoaim on Obj's
#define GAME_SHOW_CABAL (D) //Shows char's cabal to players
#define GAME_NOREQ_CABAL (E) //Doest auto-requip
#define GAME_NOEXP (F) //Used to prevent getting exp
#define GAME_STAIN (G) //Cheating Stain flag.
#define GAME_SEX (H) //Autosex on whois list
#define GAME_NEWBIE (I) //Allows player to use newbie chat
#define GAME_PKWARN (J) //Player recived AUTO warning about pk
#define GAME_NOSPELLS (K) //Player cannot cast spells
#define GAME_ASHEATH (L) //Players auto sheath in cities
#define GAME_MERCY (M) //Stun death instead of regular death
#define GAME_NOQUESTOR (N) //Cannot become master questor
#define GAME_NOALIAS (O) //aliases disabled
#define GAME_NEWSCORE (P) //new score sheet
#define GAME_DNDS (Q) // DND SPELL SYSTEM USED
#define GAME_NOAUTOFIRE (R) //no ranged weapons in combat
/* RT comm flags -- may be used on both mobs and chars */
#define COMM_QUIET (A)
#define COMM_DEAF (B)
#define COMM_NOWIZ (C)
#define COMM_NOAUCTION (D)
#define COMM_NOPRAY (E)
#define COMM_NOQUESTION (F)
#define COMM_YELLSOFF (G)
#define COMM_NOCABAL (H)
#define COMM_NONEWBIE (I)
#define COMM_NOCLAN (J)
#define COMM_TELEPATH (X)
/* display flags */
#define COMM_COMPACT (L)
#define COMM_BRIEF (M)
#define COMM_PROMPT (N)
#define COMM_TELNET_GA (P)
#define COMM_SHOW_AFFECTS (Q)
/* penalties */
#define COMM_NOEMOTE (T)
#define COMM_NOYELL (U)
#define COMM_NOTELL (V)
#define COMM_NOCHANNELS (W)
#define COMM_SNOOP_PROOF (Y)
#define COMM_AFK (Z)
/* WIZnet flags */
#define WIZ_ON (A)
#define WIZ_TICKS (B)
#define WIZ_LOGINS (C)
#define WIZ_SITES (D)
#define WIZ_LINKS (E)
#define WIZ_DEATHS (F)
#define WIZ_RESETS (G)
#define WIZ_MOBDEATHS (H)
#define WIZ_FLAGS (I)
#define WIZ_PENALTIES (J)
#define WIZ_FIGHTING (K)
#define WIZ_LEVELS (L)
#define WIZ_SECURE (M)
#define WIZ_SWITCHES (N)
#define WIZ_SNOOPS (O)
#define WIZ_RESTORE (P)
#define WIZ_LOAD (Q)
#define WIZ_NEWBIE (R)
#define WIZ_NOTES (S)
#define WIZ_SPAM (T)
#define WIZ_MEMORY (U)
#define WIZ_SAVE (V)
/* Prototype for a mob. */
struct mob_index_data
{
MOB_INDEX_DATA * next;
SPEC_FUN * spec_fun;
SHOP_DATA * pShop;
AREA_DATA * area;
CABAL_INDEX_DATA* pCabal;
/* OLD MPROG */
MPROG_DATA * mobprogs;
TRIGFILE_DATA * trigfile;
/* NEW MPROG */
PROG_LIST * mprogs;
long mprog_flags;
char * player_name;
char * short_descr;
char * long_descr;
char * description;
long act;
long act2;
sh_int race;
sh_int size;
sh_int start_pos;
sh_int default_pos;
bool new_format;
long affected_by;
long affected2_by;
long off_flags;
long imm_flags;
long res_flags;
long vuln_flags;
long gold;
long form;
long parts;
int vnum;
sh_int group;
sh_int count;
sh_int killed;
sh_int alignment;
sh_int level;
sh_int hitroll;
sh_int hit[3];
sh_int mana[3];
sh_int damage[3];
sh_int ac[4];
sh_int dam_type;
sh_int sex;
sh_int progtypes;
};
/* Dennis */
/* One character (PC or NPC). */
struct char_data
{
CHAR_DATA * next;
CHAR_DATA * next_player;
CHAR_DATA * next_in_room;
CHAR_DATA * master;
CHAR_DATA * leader;
CHAR_DATA * fighting;
CHAR_DATA * reply;
CHAR_DATA * pet;
CHAR_DATA * hunting;
CHAR_DATA * summoner;
CHAR_DATA * doppel;
CHAR_DATA * mprog_target;
sh_int mprog_delay;
SPEC_FUN * spec_fun;
void* spec_data; //misc pointer for persistent data
PATH_QUEUE* spec_path; //path data for spec progs
MOB_INDEX_DATA * pIndexData;
DESCRIPTOR_DATA * desc;
AFFECT_DATA * affected;
AFFECT_DATA * affected2;
OBJ_DATA * carrying;
OBJ_DATA * on;
TRAP_DATA* traps[MAX_TRAPS];
ROOM_INDEX_DATA * in_room;
ROOM_INDEX_DATA * was_in_room;
PC_DATA * pcdata;
CABAL_DATA* pCabal;
char * name;
char * short_descr;
char * long_descr;
char * description;
char * prompt;
char * prefix;
time_t logon;
time_t logoff;
int save_ver;
sh_int lines; /* for the pager */
sh_int position;
bool extracted;
sh_int reload; //used by ranged weapons to count down to 0 to reload
sh_int armor[4];
sh_int hit;
sh_int mana;
sh_int move;
sh_int max_hit;
sh_int max_mana;
sh_int max_move;
sh_int perm_stat[MAX_STATS];
sh_int mod_stat[MAX_STATS];
sh_int aff_mod[MAX_MODIFIER];
bool valid;
bool caballeader;
sh_int hunttime;
sh_int group;
sh_int hometown;
sh_int tattoo;
sh_int sex;
sh_int class;
sh_int race;
sh_int level;
sh_int trust;
sh_int timer;
sh_int idle;
sh_int wait;
int played;
int in_bank;
long exp;
long max_exp;
sh_int mpactnum;
long special;
long id;
long gold;
long act;
long act2;
long comm; /* RT added to pad the vector */
long wiznet; /* wiz stuff */
long game; /* gameplay flags (autoaim, autohealth, etc)*/
int color; /* color flags */
long imm_flags;
long res_flags;
long vuln_flags;
long affected_by;
long affected2_by;
sh_int invis_level;
sh_int incog_level;
sh_int practice;
sh_int train;
sh_int carry_weight;
sh_int carry_number;
sh_int savingaffl;
sh_int savingmaled;
sh_int savingmental;
sh_int savingbreath;
sh_int savingspell;
sh_int alignment;
sh_int hitroll;
sh_int damroll;
sh_int wimpy;
int homevnum;
sh_int status;
long form;
long parts;
sh_int size;
long off_flags;
sh_int damage[3];
sh_int dam_type;
sh_int start_pos;
sh_int default_pos;
};
/* data for custom display of effects */
struct affect_disp_data{
int gsn;
char name[3];
};
/* Data which only PC's have. */
struct pc_data
{
PC_DATA * next;
BUFFER * buffer;
MOB_INDEX_DATA * pStallion; //points to index to be used
CHAR_DATA * familiar;
CHAR_DATA * guarding;
CHAR_DATA * guarded_by;
CHAR_DATA * eavesdropped;
CHAR_DATA * eavesdropping;
CHAR_DATA * duet;
NOTE_DATA * pnote;
VOTE_DATA * pvote;
BBID_DATA * pbbid;
BOUNTY_DATA* pbounty;
CVROOM_DATA* pcvroom;
TOME_DATA* ptome;
SKILL_DATA * newskills;
QUEST_DATA* quests;
CABAL_DATA* last_cabal;
CMEMBER_DATA* member;
ALIAS_DATA* aliases;
DNDS_MEMORY dndmemory[MAX_SKILL];
DNDS_HEADER* dndspells; //pointer to one of the templates
DNDS_HEADER dndtemplates[DNDS_TEMPLATES][DNDS_MAXLEVEL];
ROOM_INDEX_DATA* army_focus;
ROOM_INDEX_DATA* last_focus;
AQUEST_DATA aquest;
AFF_DISPLAY custom_aff[MAX_AFF_DISPLAY];
char * dndtemplate_name[DNDS_TEMPLATES];
char * pwd;
char * pwddel;
char * pwdimm;
char * bamfin;
char * bamfout;
char * title;
char * ignore;
char * family;
char * alias;
char * race;
char * deity;
char * clan;
char * royal_guards;
bool royal_confirm;
bool valid;
bool group_known [MAX_GROUP];
bool confirm_delete;
bool confirm_quit;
sh_int month;
int mplayed;
int divfavor;
int messages; //flags for general message on login
long cpoints; //cabal points
int clan_points;
sh_int ss_picked[MAX_GROUPS]; //how many skills picked group
sh_int psalms[MAX_PSALM]; //psalms gained
sh_int psalm_pen; //maximum psalm penalty
int beacon;
sh_int way;
sh_int ethos;
sh_int last_level;
sh_int security;
sh_int kpc;
sh_int knpc;
sh_int dpc;
sh_int dnpc;
sh_int dall;
sh_int flagged;
sh_int rank;
sh_int clan_rank;
sh_int clan_handle;
sh_int beast_type;
sh_int enemy_race;
byte race_kills[MAX_PC_RACE];
time_t fight_delay;
time_t pk_delay;
time_t ghost;
time_t last_note;
time_t last_idea;
time_t last_penalty;
time_t last_news;
time_t last_changes;
time_t last_application;
time_t last_vote;
time_t last_bounty;
time_t bank_stamp;
long birth_date;
sh_int vote_skip;
time_t last_app;
sh_int perm_hit;
sh_int perm_mana;
sh_int perm_move;
sh_int true_sex;
sh_int condition [4];
sh_int learned [MAX_SKILL];
sh_int to_learned [MAX_SKILL];
int progress [MAX_SKILL];
sh_int songlearned [MAX_SONG];
sh_int roomnum;
sh_int transnum;
sh_int quest[MAX_QUEST];
sh_int questorder[MAX_QUEST];
sh_int anatomy[MAX_ANATOMY];
sh_int wep_pos; //weapon position (low, high, normal)
sh_int bat_pos; //battle position (left, right, middle)
sh_int max_quests; //total of perm quests
sh_int body_type;
sh_int face_type;
sh_int skin_color;
sh_int eye_color;
sh_int hair_color;
sh_int hair_length;
sh_int hair_texture;
sh_int facial_hair;
sh_int start_wep;
sh_int nagtimer;
int perk_bits;
bool lefthanded;
bool fDetail;
};
/* Liquids. */
#define LIQ_WATER 0
struct liq_type
{
char * liq_name;
char * liq_color;
sh_int liq_affect[5];
};
/* 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 valid;
};
/* Prototype for an object. */
struct obj_index_data
{
OBJ_INDEX_DATA * next;
EXTRA_DESCR_DATA * extra_descr;
AFFECT_DATA * affected;
AREA_DATA * area;
OBJ_SPELL_DATA * spell;
OBJ_MESSAGE_DATA * message;
PROG_LIST * oprogs;
CABAL_INDEX_DATA* pCabal;
long oprog_flags;
char * name;
char * short_descr;
char * description;
char * material;
bool new_format;
int vnum;
sh_int reset_num;
sh_int item_type;
sh_int level;
sh_int class;
sh_int race;
sh_int condition;
sh_int count;
sh_int weight;
int extra_flags;
int wear_flags;
int cost;
int value[5];
};
/* One object. */
struct obj_data
{
OBJ_DATA * next;
OBJ_DATA * next_content;
OBJ_DATA * next_bidobj;
OBJ_DATA * contains;
OBJ_DATA * in_obj;
OBJ_DATA * on;
CHAR_DATA * carried_by;
BBID_DATA * bbid;
EXTRA_DESCR_DATA * extra_descr;
AFFECT_DATA * affected;
TRAP_DATA* traps;
OBJ_SPELL_DATA* spell;
OBJ_INDEX_DATA * pIndexData;
ROOM_INDEX_DATA * in_room;
CABAL_DATA* pCabal;
CHAR_DATA * oprog_target;
sh_int oprog_delay;
char * name;
char * short_descr;
char * description;
char * material;
long owner;
int recall;
int extra_flags;
long wear_flags;
int cost;
int value [5];
bool valid;
bool enchanted;
bool eldritched;
bool extracted;
sh_int item_type;
sh_int wear_loc;
sh_int weight;
sh_int level;
sh_int condition;
sh_int race;
sh_int class;
sh_int timer;
int homevnum;
int vnum;
sh_int idle;
int save_ver;
};
/* Exit data. */
struct exit_data
{
ROOM_INDEX_DATA* to_room;
int vnum;
EXIT_DATA * next;
EXIT_DATA * next_in_area;
TRAP_DATA* traps;
char * keyword;
char * description;
sh_int exit_info;
sh_int key;
int rs_flags;
sh_int orig_door;
};
/* Area-reset definition. *
* '*': comment *
* 'M': read a mobile *
* 'O': read an object *
* 'P': put object in object *
* 'G': give object to mobile *
* 'E': equip object to mobile *
* 'R': randomize room exits *
* 'T': trap on object or exit *
* 'S': stop (end of list) */
struct reset_data
{
RESET_DATA * next;
char command;
int arg1;
int arg2;
int arg3;
int arg4;
};
/* Area definition. */
struct area_data
{
AREA_DATA * next;
RESET_DATA * reset_first;
RESET_DATA * reset_last;
CABAL_DATA * pCabal; //cabal which owns area (royal, or area cabal)
TOWER_DATA* towers; //data for each cabal's towers in area
EXIT_DATA* exits;
RAID_DATA* raid;
char * name;
char * file_name;
char * credits;
char * builders;
char * prefix;
time_t last_raid;
bool empty;
int vnum;
int startroom;
int area_flags;
int support; //value of support this area grants when taken over
sh_int security;
sh_int age;
sh_int nplayer;
sh_int low_range;
sh_int high_range;
int min_vnum;
int max_vnum;
sh_int idle;
sh_int bastion_max;
sh_int bastion_current;
sh_int crimes[MAX_CRIME];
sh_int cabal_distance[MAX_CABAL];
sh_int cabal_influence[MAX_CABAL];
};
/* Room type. */
struct room_index_data
{
ROOM_INDEX_DATA * next;
CHAR_DATA * people;
ARMY_ROOM_DATA room_armies;
OBJ_DATA * contents;
EXTRA_DESCR_DATA * extra_descr;
AREA_DATA * area;
EXIT_DATA * exit [6];
EXIT_DATA * old_exit[6];
RESET_DATA * reset_first;
RESET_DATA * reset_last;
PROG_LIST * rprogs;
CHAR_DATA * rprog_target;
CABAL_DATA* pCabal;
long rprog_flags;
sh_int rprog_delay;
char * name;
char * description;
char * description2;
int room_flags;
int room_flags2;
int vnum;
int cabal_vnum;
Double_List * watch_vnums;
sh_int light;
sh_int sector_type;
sh_int heal_rate;
sh_int mana_rate;
sh_int psitimer;
sh_int temp;
long tracks[MAX_ANATOMY];//contains mud time when someone last stepped into this room
};
/* 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
#define TYPE_NOBLOCKHIT 10000
/* 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
#define TAR_OBJ_CHAR_DEF 5
#define TAR_OBJ_CHAR_OFF 6
#define TAR_OBJ_ROOM 7
#define TAR_DOOR 8
#define TAR_ROOM_CHAR_DEF 9
#define TAR_OBJ_WORN 10
#define TARGET_CHAR 0
#define TARGET_OBJ 1
#define TARGET_ROOM 2
#define TARGET_NONE 3
#define TARGET_DOOR 4
/* Skills include spells as a particular case. */
struct skill_type
{
char * name; /* Name of skill */
sh_int skill_level[MAX_CLASS]; /* Level needed by class */
sh_int rating[MAX_CLASS]; /* How hard it is to learn */
SPELL_FUN * spell_fun; /* Spell pointer (for spells) */
sh_int target; /* Legal targets */
sh_int minimum_position; /* Position for caster / user */
sh_int * pgsn; /* Pointer to associated gsn */
sh_int spell_type; /* Spell type */
sh_int min_mana; /* Minimum mana used */
sh_int beats; /* Waiting time after use */
char * noun_damage; /* Damage message */
char * msg_off; /* Wear off message */
char * msg_off2; /* Wear off message to others */
int flags; /* Special behavior flags */
};
struct psalm_type{
char* name; //showin in format: Psalm of <name>
sh_int* gsn; //gsn of the spell in skill_table
sh_int* check; //gsn/sn to check for when checking for presence
int chant; //wait before psalm is cast (meditation length)
int wait; //wait before a new chant can be attempted
bool fTwo; //can another prayer be put after this one
bool fRand; //can this prayer be the randoShowing the first 100 KB of 183.7 KB. Download the archive for the full file.