/************************************************************************ Realms of Aurealis James Rhone aka Vall of RoA structures.h Header file defining all structs and structures. One of the two files from the great structs.h split of 12/8/97. ******** Heavily modified and expanded ******** ******** 100% Completely Original Code ******** *** BE AWARE OF ALL RIGHTS AND RESERVATIONS *** ******** Heavily modified and expanded ******** ******** 100% Completely Original Code ******** All rights reserved henceforth. Please note that no guarantees are associated with any code from Realms of Aurealis. All code which has been released to the general public has been done so with an 'as is' pretense. RoA is based on both Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well as the RoA license. *** Read, Learn, Understand, Improve *** *************************************************************************/ #ifndef ROA_STRUCTURES_H #define ROA_STRUCTURES_H #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <sys/types.h> #include <time.h> // structures and defines ARE now seperated 12/18/97 -jtrhone #include "defines.h" // Some type definitions for Darkenelfs sanity. /03/16/98 -callahan #include "typedefs.h" typedef signed char sbyte; typedef unsigned char ubyte; typedef signed short int sh_int; typedef unsigned short int ush_int; typedef char BOOL; typedef char byte; typedef sh_int room_num; typedef sh_int obj_num; /* ======================== Magic/Skill/Spell Structures ========================= */ // an array of these will be defined for each gskill...7/6/98 -jtrhone typedef struct gskill_type { int level; // min level to learn... int rcbitv; // anti race class bitvector... int max_perc; // how much max can person learn this gskill int bitv; // flags like G_DIALECT or G_NEWBIE or something } gskill; /* ======================== Miscellaneous Structures ========================= */ // for mob_chart suggestions RoA struct chart_type { int hit; int ac; int hitroll; float damage; long exp; long gold; }; struct msg_type { char *attacker_msg; /* message to attacker */ char *victim_msg; /* message to victim */ char *room_msg; /* message to room */ }; struct message_type { int level; // MIN LEVEL to get this mesg -roa struct msg_type die_msg; /* messages when death */ struct msg_type miss_msg; /* messages when miss */ struct msg_type hit_msg; /* messages when hit */ struct msg_type god_msg; /* messages when hit on god */ struct message_type *next; /* to next messages of this kind. */ }; struct message_list { int a_type; /* Attack type */ int num_mesgs; /* How many attack messages to chose from. */ struct message_type *msg; /* List of messages. */ }; struct dex_skill_type { sh_int p_pocket; sh_int p_locks; sh_int traps; sh_int sneak; sh_int hide; }; struct dex_app_type { sh_int reaction; sh_int miss_att; sh_int defensive; }; struct str_app_type { sh_int tohit; /* To Hit (THAC0) Bonus/Penalty */ sh_int todam; /* Damage Bonus/Penalty */ sh_int carry_w; /* Maximum weight that can be carrried */ sh_int wield_w; /* Maximum weight that can be wielded */ }; struct wis_app_type { byte bonus; /* how many bonus skills a player can */ /* practice pr. level */ }; struct int_app_type { byte learn; /* how many % a player learns a spell/skill */ }; struct con_app_type { sh_int hitp; /* bonus number of hitpoints per level based on con */ sh_int shock; /* if one hit takes more than this percentage of total hitpoints from char, they go into shock for a round*/ }; // autoauction code revamp by RoA typedef struct autoauction { int id; /* the idnum of this auction */ BOOL bid_on; /* Whether the item has been bid upon */ long last_bid; /* The last bid on the item */ long bidder_id_num; /* The person that last bids idnumber */ long seller_id_num; /* The person that is selling's idnum */ long selling_price; /* Price asking for the item */ int state_of_sale; /* Going 1, 2, 3, sold */ struct obj_data *item_auc; /* Item being auctioned */ struct autoauction *next; // next item in auction list } aucdata; /* following struct is for arena data */ struct arena_data { BOOL in_progress; BOOL locked; byte minlevel; byte maxlevel; // new arena stuff for mortal initiated arena BOOL mortal_initiated; // check all this only if mort initted it sh_int ticks_to_start; // how many ticks til it begins sh_int ticks_since_kill; // how many ticks since last kill(idlecheck) BOOL official; // if number in >= 5 when started->get win }; /* we use an array of 20 of these structs for the RoA WWW gossip page */ struct goss_data { char name[MAX_INPUT_LENGTH]; char said[MAX_INPUT_LENGTH]; }; /* for sorted who list, RoA */ struct who_data { char name[MAX_INPUT_LENGTH]; byte level; BOOL incog; }; /* RoA racial restriction struct */ struct race_allowance { BOOL cls[NUM_CLASSES+1]; /* 11 defined classes plus undefined */ }; // ok, each class has a common set of attributes... 7/8/98 -jtrhone typedef struct class_skill { BOOL innate; BOOL learnable; int minlevel; // min level to prac/perform } clskill; // added stat ranks (str, intel, wis, dex, con) to structure 7/28/98 -jtrhone typedef struct class_info { char class_name[64]; char class_abbrev[16]; char male_legend[16]; char female_legend[16]; char default_title[128]; int max_perc; int str, intel, wis, dex, con; clskill skills[MAX_SKILLS]; } clinfo; // race info structure added 8/22/98 -jtrhone typedef struct race_info { char race_name[64]; char racial_string[16]; char male_legend[16]; char female_legend[16]; char default_title[128]; int str, stradd, intel, wis, dex, con, lang; int race_allow[NUM_CLASSES+1]; clskill skills[MAX_SKILLS]; } rcinfo; /* the structure used to store an roa_social read int, only used temp in perform_roa_social and as a tag on player for OLSC - Online Social Creation RoA jtrhone */ struct roa_social_struct { char *name; /* whats the filename of this social */ int minlevel; int hide; int min_victim_pos; /* Position of victim */ /* No argument was supplied */ char *char_no_arg; char *others_no_arg; /* An argument was there, and a victim was found */ char *char_found; /* new one is gonna read in all strings */ char *others_found; char *vict_found; /* An argument was there, but no victim was found */ char *not_found; /* The victim turned out to be the character */ char *char_auto; char *others_auto; }; /* we gonna have an array of these allocated in db.c */ /* itll find the command if it exists and read in the social data */ /* each tie a social is used... file access? yes but it fits well with the updating possibilities of OLCable socials - RoA jtrhone */ struct roa_social_data { char social[30]; }; /* array of help table indexes for OLHC */ struct roa_help_data { char help[TITLE_LENGTH]; }; // this is the struct for finger info -roa struct finger_type { char *rl_name; char *age; char *city; char *state; char *country; char *phone; char *plan; }; // generic client descriptor structure where client connect to // before their login request 5/20/98 -jtrhone typedef struct cldesc_type { int desc; int timer; struct cldesc_type *next; } cldesc; // RoAClient PID structure.. linked list of current client PIDs and // their associated server required information typedef struct client_pid_info { int pid; // which child PID int bitvector; // any flags on that child? struct char_data *ch; // ptr to char this is goin to... struct descriptor_data *d; // ptr to the descriptor this is goin to... char *stream; // allocated memory to that child // that parent can wipe now? struct client_pid_info *next; // next one in line... } clpid_info; // RoA trap type structure, for traps on rooms,exits,containers 4/10/98 -jtrhone typedef struct trap_type { int type; // what type of trap? int level; // level of trap (in case ch leaves) int timer; // in case this trap is a timebomb like trap int bitv; // any trap flags, TR_ARMED, TR_DISARMED, TR_REVEALED, etc BOOL assassin; // set by an assassin? struct char_data *ch; // ptr to setter struct trap_type *next; // next trap in list... } trap; struct alias { char *alias; char *replacement; int type; struct alias *next; }; struct affected_type { int type; /* SPELL NUMBER THAT CAUSED THIS is now INT!! */ sh_int duration; /* For how long its effects will last */ sh_int modifier; /* This is added to apropriate ability shint!*/ byte location; /* Tells which ability to change(APPLY_XXX)*/ long bitvector; /* Tells which bits to set (AFF_XXX) */ long bitvector2; /* tells which bits to set on AFF2 RoA */ struct affected_type *next; }; // ID-nums for various functs. Gag, reveal, conceal. 03/16/98 callahan struct id_list { long idnum; struct id_list *next; }; struct follow_type { struct char_data *follower; struct follow_type *next; }; struct shop_data_type { int vhome; /* the vnum of the shopkeeps home */ int vshop; /* the vnum of the shopkeeps shop */ int open; int close; }; // for mobproc trigger/reaction lists built by mobprocs themselves -roa struct mtrig_type { char *trigger; char *reaction; struct mtrig_type *next; }; // for roomproc trigger/reaction lists built by roomprocs themselves -roa // 6/4/98 -jtrhone typedef struct rtrig_type { char *trigger; char *reaction; struct rtrig_type *next; } rtrig; typedef struct memory_rec_struct { long id; struct memory_rec_struct *next; } memory_rec; /* This structure is purely intended to be an easy way to transfer */ /* and return information about time (real or mudwise). */ struct time_info_data { int hours, day, month, year; }; /* These data contain information about a players time data */ struct time_data { time_t birth; /* This represents the characters age */ time_t logon; /* Time of the last logon (used to calculate played) */ int played; /* This is the total accumulated time played in secs */ }; typedef struct skill_type { byte perc; BOOL learned; } skl_info; typedef struct extra_descr_data { char *keyword; /* Keyword in look/examine */ char *description; /* What to see */ struct extra_descr_data *next; /* Next in list */ } exdescdata; /* ======================== Object Structures ========================= */ struct obj_affected_type { byte location; /* Which ability to change (APPLY_XXX) */ sh_int modifier; /* How much it changes by moved to signed shortint */ }; typedef struct obj_data { sh_int item_number; /* Where in data-base */ byte type_flag; /* Type of item */ sh_int in_room; /* In what room -1 when conta/carr */ /* pointer stuff, descrips, linked list ptrs */ char *name; /* Title of object :get etc. */ char *description; /* When in room */ char *shdesc; /* when worn/carry/in cont. */ char *actdesc; /* long description when looked at */ char *wear_mesg; /* the wear message to room */ char *rem_mesg; /* the removal message to room */ char *weap_sing; /* singular weapon (or util string) */ char *weap_plur; /* plural weapon (or util string) */ struct extra_descr_data *exdesc; /* extra descriptions */ struct char_data *carried_by; /* Carried by :NULL in room/conta */ struct obj_data *in_obj; /* In what object NULL when none */ struct obj_data *contains; /* Contains objects */ struct obj_data *next_content; /* For 'contains' lists */ struct obj_data *next; /* For the object list */ struct obj_affected_type affected[MAX_OBJ_AFFECT]; trap *traps; // ptr to list of traps... /* misc numbers for object */ int value[4]; /* Values of the item (see list) */ int weight; /* Weight what else */ int cost; /* Value when sold (gp.) */ int timer; /* Timer for object */ int plr_num; /* used for corpse looting and assassins */ BOOL viewed; /* for list_obj_to_char ROA*/ BOOL lit; /* is this light lit? */ BOOL touched; /* has it been handled by a player? */ BOOL original; /* is this an original shopkeeper item? */ byte min_level; /* min level for player to use */ int success_rate; /* for items like wands, scrolls, potions */ /* for loading */ int total_game_limit; int percent_load; int alternate_load; /* for SPELLEQ */ int eqspell; long eqaffbit; long eqaff2bit; /* To set character AFF_XXX flags */ /* for the flags on the object */ int wear_flags; /* Where you can wear it */ int extras; /* If it hums,glows etc */ int extras2; int wvector; // what eq slots this object takes up when worn... 5/28/98 -jtrhone /* hits/maxhits what material its made of, owner id/obj_id for instrum */ int obj_hits; int max_obj_hits; int made_of; int owner_of; int obj_id; // following for ITEM_THROWABLE objects, // (if not throwing use normal dice in the o->values[] array) int throw_plushit; int throw_numdam; int throw_sizedam; int throw_plusdam; // for poisoned weapons/etc. BOOL poisoned; int poison_duration; // duration of poison in ticks... /* object position restoration variables */ int objsave_parent; int objsave_self; int objsave_where; int tmp1; // unused as of yet, just a slot holder int tmp2; // unused as of yet, just a slot holder } obdata; /* ======================== Character/Mobile Structures ========================= */ struct char_player_data { char *name; /* PC / NPC s name (kill ... ) */ char *short_descr; /* for 'actions' */ char *long_descr; /* for 'look'.. Only here for testing */ char *description; /* Extra descriptions */ char *title; /* PC / NPC s title */ char *afk_str; /* AFK string... */ byte sex; /* PC / NPC s sex */ byte cls; /* PC s class or NPC alignment */ byte level; /* PC / NPC s level */ sh_int hometown; /* PC s Hometown (zone) */ TimeData time; /* PC s AGE in days */ ubyte weight; /* PC / NPC s weight */ ubyte height; /* PC / NPC s height */ }; /* Used in CHAR_FILE_U *DO*NOT*CHANGE* */ struct char_ability_data { sbyte str; sbyte str_add; /* 000 - 100 if strength 18 */ sbyte intel; sbyte wis; sbyte dex; sbyte con; sbyte cha; }; /* Used in CHAR_FILE_U *DO*NOT*CHANGE* */ struct char_point_data { sh_int mana; sh_int max_mana; /* Max move for PC/NPC */ sh_int hit; sh_int max_hit; /* Max hit for PC/NPC */ sh_int move; sh_int max_move; /* Max move for PC/NPC */ sh_int armor; /* -100..100armor class */ int gold; /* Money carried */ int bank_gold; /* Gold the char has in a bank account */ int exp; /* The experience of the player */ sbyte hitroll; /* Any bonus or penalty to the hit roll */ sbyte damroll; /* Any bonus or penalty to the damage roll */ }; /* PC || NPC SPECIAL DATA */ struct char_special_data { struct char_data *fighting; /* Opponent */ struct char_data *holder; /* char who held this char */ long affected_by; /* Bitvector for spells/skills affected by */ long affected2_by; /* Bitvector for spells/skills aff2 by */ byte position; /* Standing or ... */ int carry_weight; /* Carried weight */ byte carry_items; /* Number of items carried */ sh_int was_in_room; /* storage of location for linkdead people */ int timer; /* Timer for update */ /* RoA specials */ sh_int num_of_images; /* For mirror image changed from int */ sh_int violence_wait; /* wait time during violence */ sh_int speaking; /* what language is the char speaking ROA */ struct song_affect *songs; /* dynamic list of song affects and by who */ int charvector; // for redirected, stuntouched, is_mounted etc // for affects on the regeneration of these three stats sh_int hit_regen; sh_int mana_regen; sh_int move_regen; int traplevel; // what level traps does thie imm set when building // 4/26/98 -jtrhone }; /* NPC SPECIAL DATA */ struct npc_special_data { struct char_data *hunting; /* Hunting person.. */ memory_rec *memory; /* List of attackers to remember */ long spc_bits; /* for SPC_*** flags */ long mob_bits; /* for MOB_*** flags */ int mob2_bits; /* for MOB2_*** flags 3/1/98 -jtrhone*/ sh_int mob_wait; int mounter_id; /* who is mounting this NPC RoA*/ byte default_pos; /* Default position for NPC */ byte damnodice; /* The number of damage dice's */ byte damsizedice; /* The size of the damage dice's */ byte last_direction; /* The last direction the monster went */ int max_existing; // how many max loaded at one time? struct shop_data_type *shop_data; /* only allocated for SHOPKEEPS */ struct mtrig_type *trigs; // mobproc mobs list of triggers/reactions BOOL trig_waiting; // this mob awaiting trigger? BOOL trig_ignore; // this mob ignoring triggers? char *strs[6]; // 6 strings, rather than 6 seperate, make array char *walkIn; /* mob walkin */ char *walkOut; /* mob walkOut */ char *target_char; /* name of the mobs target character */ char *target_obj; /* the name of the mobs target object */ sh_int saving_throws[5]; /* Saving throw (Bonuses) */ int alignment; /* +-1000 for alignments */ sh_int max_train_level; /* for gmasters, max/min trainin levels */ sh_int min_train_level; // mob dice data for mana/hit/movement int mob_num_hit; int mob_num_mana; int mob_num_move; int mob_size_hit; int mob_size_mana; int mob_size_move; int mob_add_hit; int mob_add_mana; int mob_add_move; int mob_size; long mob_class; // this is now a BITVECTOR for up to 32 mob // classes which can be intermixed, such as // undead pixie int summoner; // IDNUM of character who summoned this mob int qnum; // the qslot this mob executed int hunt_quest; // mob will hunt chars on this quest char *sound_file; // the sound file associated with this mob... int music_timer; // how long til resend }; /* CHAR SPECIAL2 DATA !!SAVED!! DO NOT ALTER UNLESS CONVERT */ struct pc_saved_data { long idnum; /* player's idnum */ sh_int load_room; /* Which room to place char in */ byte spells_to_learn; /* How many can you learn yet this level*/ int alignment; /* +-1000 for alignments */ long player_flags; /* player flagfor PC's */ long pref_flags; /* preference flags for PC's.*/ int wimp_level; /* Below this # of hit points, flee! */ byte freeze_level; /* Level of god who froze char, if any */ ubyte bad_pws; /* number of bad password attemps */ sh_int saving_throws[5]; /* Saving throw (Bonuses) */ sbyte conditions[3]; /* Drunk full etc. */ byte race; // olc perms ubyte olc_min_zone; ubyte olc_max_zone; // RoA VT100 vars for character and vt100 display!! -jtrhone roa ubyte vtsplit; // top screen size ubyte psize; // number of prompt lines perhaps ubyte crow; // current cursor row ubyte ccol; // current cursor column ubyte page_length; // characters can choose their page length now -roa // make this signed since they can go negative... 2/12/98 -jtrhone byte rites; // save the rites now :) -roa ubyte zone_locked; ubyte changed_password; ubyte in_clan; /* treated as a BOOLean */ ubyte clanleader; /* " " " " " " */ ubyte clan_num; /* id num of the clan */ ubyte arena_wins; /* how many arena wins does this character have? */ ubyte spare13; ubyte spare14; ubyte snooptell; /* for implementors */ ubyte vt100; /* vt100 term emulation? */ ubyte warlock_level; /* what level spell can a warlock cast so far? */ ubyte bars; /* use graphic bars in prompt / vt100 ? */ long grants; long quest_pts; // how many quest pts character has long pref2_flags; /* OK, new bitvector, second prefs */ long plr2_flags; /* OK, new bitvector, second plrs */ char poofIn[MAX_POOFIN_LENGTH]; char poofOut[MAX_POOFIN_LENGTH]; char walkIn[MAX_POOFIN_LENGTH]; char walkOut[MAX_POOFIN_LENGTH]; char clan[MAX_CLAN_LENGTH]; char prename[MAX_CLAN_LENGTH]; char saved_prompt[MAX_POOFIN_LENGTH]; }; struct player_quest_info { int in_progress; int days_left; int vnum_to_getslay; int num_gottenslain; int num_times_completed; }; /* PC SPECIAL DATA, contains pc_saved_data */ struct pc_special_data { sh_int whirlwind; /* for ranger skill */ sh_int cyclone; /* for ranger skill */ sh_int singing; /* what song they playing || singing */ sh_int song_time; /* how long they singin for */ sh_int playing; sh_int play_time; /* how long they playin for */ sh_int delay_type; /* for ritual / spell conjuring delays ROA */ sh_int invis_level; /* level of invisibility */ sh_int tell_level; /* level of no tell */ long tell_who; /* idnum of person to reply to */ BOOL needs_update; /* need to update vt100 bar? */ char rite_arg[MAX_CLAN_LENGTH]; /* argument sent to do_ritual */ // arena saved data, snapshot, restored after arena int prehit; int premana; int premove; int preroom; // player quest data struct player_quest_info pqinfo[NUM_QUESTS]; int on_quest; // which quest they working on int days_left; // how many days left to complete? int vnum_to_getslay; // obj or mob to get or slay int num_gottenslain; // how many theyve gotten sofar /* player OLC data (could be one void *, will update sometime) */ struct char_data *mob_editted; /* ptr to the mob they editting */ struct obj_data *obj_editted; /* ptr to the obj they editting */ struct room_data *room_editted; /* ptr to the room they editting */ struct zone_data *zone_editted; /* ptr to the zone they editting */ struct roa_social_struct *soc_editted; /* ptr to the social they editting */ struct wspell_type *war_editted; /* ptr to the warlock spell editting */ struct finger_type *finger_editted; // for finger info struct struct message_type *msg_editted; // a ptr to a combat msg struct quest_slot *q_editted; // ptr to quest slot struct plshop_data *pl_editted; // ptr to player shop struct struct htown_data *htown_editted; // ptr to htown slot int index; int index2; BOOL field_changed; // for player owned shops... struct plshop_data *plshops; /* saved structure needs conversion before editting -roa*/ struct pc_saved_data saved; }; typedef struct char_data { sh_int nr; /* monster nr (pos in file) */ sh_int in_room; /* Location */ struct char_player_data player; /* Normal data */ struct char_ability_data real_abils; /* natural abilities */ struct char_ability_data aff_abils; /* abils with affects */ struct char_point_data points; /* Points */ struct char_special_data specials; struct npc_special_data npc_specials; struct pc_special_data *pc_specials; /* note, only allocated for PC */ skl_info *skills; /* dynam. alloc. array of skills */ skl_info *gskills; /* dynam. alloc. array of gskills */ skl_info *tmp_skills; /* dynam. alloc. array of skills */ struct affected_type *affected; /* affected by what spells */ struct alias *aliases; /* aliases */ struct obj_data *equipment[MAX_WEAR]; /* Equipment array */ int wvector; // what slots are used by wvectored eq 5/28/98 -jtrhone struct obj_data *carrying; /* Head of list */ struct descriptor_data *desc; /* NULL for mobiles */ struct char_data *next_in_room; /* For room->people - list */ struct char_data *next; /* For either monster or ppl-list */ struct char_data *next_fighting; /* For fighting list */ struct follow_type *followers; /* List of chars followers */ struct char_data *master; /* Who is char following? */ // Added 03/16/98 for reveal/conceal/ignore - callahan IdList *gagged; IdList *revealed; IdList *concealed; // for recording and playtback FILE *fp; } chdata; /* *********************************************************************** * file element for player file. MAX_SKILLS: Changing it will ruin the file * *********************************************************************** */ // new structure does not have skill array in it 6/20/98 -jtrhone struct char_file_u { byte sex; byte cls; byte level; time_t birth; /* Time of birth of character */ int played; /* Number of secs played in total */ ubyte weight; ubyte height; char title[TITLE_LENGTH]; sh_int hometown; char description[EXDESC_LENGTH]; struct char_ability_data real_abils; struct char_point_data points; struct affected_type affected[MAX_AFFECT]; struct pc_saved_data saved; time_t last_logon; /* Time (in secs) of last logon */ char host[HOST_LEN+1]; /* host of last logon */ char name[NAME_LENGTH]; char pwd[MAX_PWD_LENGTH+1]; }; /* ======================== Descriptor Structures ========================= */ struct txt_block { char *text; int aliased; struct txt_block *next; }; struct txt_q { struct txt_block *head; struct txt_block *tail; }; typedef struct descriptor_data { int descriptor; /* file descriptor for socket */ BOOL rerouted; int child_pid; /* we NEED this is rerouted to check to see if the child still exists with a kill(child_pid, SIGIO) call to it */ char host[50]; /* hostname */ char pwd[MAX_PWD_LENGTH+1]; /* password */ byte bad_pws; /* number of bad pw attemps this login */ byte idle_tics; int pos; /* position in player-file */ int connected; /* mode of 'connectedness' */ int wait; /* wait for how many loops */ int desc_num; /* unique num assigned to desc */ long login_time; /* when the person connected */ char *showstr_head; /* for keeping track of an internal str */ char **showstr_vector; /* for paging through texts */ int showstr_count; /* number of pages to page through */ int showstr_page; /* which page are we currently showing? */ char *page_str; char **str; /* for the modify-str system */ int max_str; /* - */ long mail_to; // descmenu ptrs void (*descmenu)(struct descriptor_data *ch, char *input_str); void *descmenu_handler_arg; void *descmenu_stack[10]; void *descmenu_args[10]; int descmenu_depth; long descmenu_return; char *descmenu_prompt; char descmenu_prompt_buf[TITLE_LENGTH]; // roaolc ptrs void (*roaolc_menu)(struct char_data *ch, char *input_str); void *menu_handler_arg; void *menu_stack[10]; void *menu_args[10]; int menu_depth; long menu_return; char *menu_prompt; char menu_prompt_buf[TITLE_LENGTH]; int prompt_mode; /* control of prompt-printing */ char buf[MAX_STRING_LENGTH]; /* buffer for raw input */ char last_input[MAX_INPUT_LENGTH];/* the last input */ char small_outbuf[SMALL_BUFSIZE]; /* standard output bufer */ char *output; /* ptr to the current output buffer */ int bufptr; /* ptr to end of current output */ int bufspace; /* space left in the output buffer */ struct txt_block *large_outbuf; /* ptr to large buffer, if we need it */ struct txt_q input; /* q of unprocessed input */ struct char_data *character; /* linked to char */ struct char_data *original; /* original char if switched */ struct descriptor_data *next; /* link to next descriptor */ struct descriptor_data *snooping; struct descriptor_data *snoop_by; sh_int room_snooping; struct descriptor_data *next_rsnooper; // Time-related stuff... 03/21/98 -callahan time_t lasttime; /* when the person last connected */ time_t last_time; /* time of last command executed */ // RoAClient stuff... struct descriptor_data *next_client; int cdesc; int zone_stimer; int room_stimer; int mob_stimer; int music_zone; int music_room; int music_mob; } dsdata; /* ======================== Room/World Structures ========================= */ typedef struct room_direction_data { char *exit_descr; /* When look DIR. */ char *keyword; /* for open/close */ // 3/24/98 for exit walkins/outs -jtrhone/callahan char *enter; char *oenter; char *drop; char *odrop; int exinfo; /* bitvector for exit flags */ int key; /* Key's number (-1 for no key) */ int to_room; /* Where direction leeds (NOWHERE) */ int to_room_virtual; // the vnum of the room it goes to int exit_type; // exit type... trap *traps; // ptr to list of traps... } rmdirdata; typedef struct room_affect_type { sh_int duration; // how long will this last (in ticks) struct char_data *caster; // who put it here (needed for assassin checks) int spell; // the spell number thats affecting this room long bitvector; // the flags that this spell sets on room struct room_affect_type *next; } rmafftype; typedef struct room_data { char *name; /* Rooms name 'You are ...' */ char *description; /* Shown when entered */ char *randoms[5]; // 5 room randoms / strings for each room obdata *contents; /* List of items in room */ struct char_data *people; /* List of NPC / PC in room */ struct room_direction_data *dir_option[NUM_OF_DIRS]; /* Directions */ struct extra_descr_data *exdesc; /* for examine/look */ struct room_affect_type *room_affects; int (*funct)(); /* special procedure */ sh_int number; /* Rooms number */ sh_int zone; /* Room zone (for resetting) */ byte terrain_type; /* what type of terrain is it */ int room_flags; /* DEATH,DARK ... etc */ int room_flags2; /* DEATH,DARK ... etc */ byte light; /* Number of lightsources in room */ int drop_to; /* where to drop if a flight or uwater room */ int float_to; /* where to float to if a uwater room */ int drift_to; /* where to drift to if current or wind */ sh_int max_contains; /* num of people that can fi tin it */ sh_int num_present; /* num in it currently */ sh_int numdice; /* for room alterations RoA*/ sh_int sizedice; sh_int alter_type; int portals[4]; /* 4 locations to be portalled to if room PORTAL */ /* ALSO used for ports for TRANSPORTS see below */ /* portal[0] is start_location */ /* these numbers and whatnot correspond to OLC_TRANSPORTS of RoA */ int trans_present; /* vnum of transport in this room */ int location; /* if this is a trans, which room vnum is it in now? */ byte to_port; /* what port number are we currently going to? */ byte wait_time; /* current quarter ticks to wait left (wait_count)*/ /* the following MUST be saved in .wld to set up transport on resets*/ byte dock_wait; /* how long to wait at dock (in quarter ticks) */ byte travel_wait; /* how long to wait per room while moving */ int ticket_num; /* vnum of boarding pass if any */ // for house addons, owner ID of this room, -1 if none int owner; // for room/zone weather correspondance... int room_temp; struct descriptor_data *snooper; // whos snooping this room char *sound_file; int music_timer; // how long til resend trap *traps; // ptr to list of traps... // for roomprocs 6/5/98 -jtrhone int rproc_wait; // how long to wait/pause here BOOL trig_waiting; // this mob awaiting trigger? BOOL trig_ignore; // this mob ignoring triggers? struct rtrig_type *trigs; // mobproc mobs list of triggers/reactions char *rproc; // ptr to actual rproc char *rproc_cur; // ptr to rproc position char *target_char; char *target_obj; struct room_data *remote; // for remote execution of some rproc commands } rmdata; /* ======================== Zone Structures ========================= */ #endif /* ROA_STRUCTURES_H */