/* ************************************************************************ * File: structs.h Part of CircleMUD * * Usage: header file for central structures and contstants * * * * All rights reserved. See license.doc for complete information. * * * * Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University * * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * ************************************************************************ */ /* preamble *************************************************************/ #include <sys/types.h> #define NOWHERE -1 /* nil reference for room-database */ #define NOTHING -1 /* nil reference for objects */ #define NOBODY -1 /* nil reference for mobiles */ #define ANYRACE -1 #define ANYALIGN -1 #define SPECIAL(name) \ int (name)(struct char_data *ch, void *me, int cmd, char *argument) /* room-related defines *************************************************/ /* The cardinal directions: used as index to room_data.dir_option[] */ #define NORTH 0 #define EAST 1 #define SOUTH 2 #define WEST 3 #define UP 4 #define DOWN 5 /* Room flags: used in room_data.room_flags */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ #define ROOM_DARK (1 << 0) /* Dark */ #define ROOM_DEATH (1 << 1) /* Death trap */ #define ROOM_NOMOB (1 << 2) /* MOBs not allowed */ #define ROOM_INDOORS (1 << 3) /* Indoors */ #define ROOM_PEACEFUL (1 << 4) /* Violence not allowed */ #define ROOM_SOUNDPROOF (1 << 5) /* Shouts, gossip blocked */ #define ROOM_NOTRACK (1 << 6) /* Track won't go through */ #define ROOM_NOMAGIC (1 << 7) /* Magic not allowed */ #define ROOM_TUNNEL (1 << 8) /* room for only 1 pers */ #define ROOM_PRIVATE (1 << 9) /* Can't teleport in */ #define ROOM_GODROOM (1 << 10) /* LVL_GOD+ only allowed */ #define ROOM_HOUSE (1 << 11) /* (R) Room is a house */ #define ROOM_HOUSE_CRASH (1 << 12) /* (R) House needs saving */ #define ROOM_ATRIUM (1 << 13) /* (R) The door to a house */ #define ROOM_OLC (1 << 14) /* (R) Modifyable/!compress */ #define ROOM_BFS_MARK (1 << 15) /* (R) breath-first srch mrk */ #define ROOM_MURKY (1 << 16) /* Room can't be looked into */ /* Exit info: used in room_data.dir_option.exit_info */ #define EX_ISDOOR (1 << 0) /* Exit is a door */ #define EX_CLOSED (1 << 1) /* The door is closed */ #define EX_LOCKED (1 << 2) /* The door is locked */ #define EX_PICKPROOF (1 << 3) /* Lock can't be picked */ #define EX_HIDDEN (1 << 4) /* door is hidden */ /* Sector types: used in room_data.sector_type */ #define SECT_INSIDE 0 /* Indoors */ #define SECT_CITY 1 /* In a city */ #define SECT_FIELD 2 /* In a field */ #define SECT_FOREST 3 /* In a forest */ #define SECT_HILLS 4 /* In the hills */ #define SECT_MOUNTAIN 5 /* On a mountain */ #define SECT_WATER_SWIM 6 /* Swimmable water */ #define SECT_WATER_NOSWIM 7 /* Water - need a boat */ #define SECT_UNDERWATER 8 /* Underwater */ #define SECT_FLYING 9 /* Wheee! */ #define SECT_QUICKSAND 10 /* Loses HP and costs mana */ #define SECT_LAVA 11 /* Loses HP and causes burn */ #define SECT_ARCTIC 12 /* Loses HP and causes freeze*/ /* char and mob-related defines *****************************************/ /* PC classes */ #define CLASS_UNDEFINED -1 #define CLASS_MAGIC_USER (1 << 0) /* 1 */ #define CLASS_CLERIC (1 << 1) /* 2 */ #define CLASS_THIEF (1 << 2) /* 4 */ #define CLASS_WARRIOR (1 << 3) /* 8 */ #define CLASS_BARBARIAN (1 << 4) /* 16 */ #define CLASS_SAMURAI (1 << 5) /* 32 */ #define CLASS_DRUID (1 << 6) /* 64 */ #define CLASS_WIZARD (1 << 7) /* 128 */ #define CLASS_MONK (1 << 8) #define CLASS_AVATAR (1 << 9) #define CLASS_NINJA (1 << 10) /* and more dual/triple definition */ #define CLASS_DUAL (1 << 14) /* 16384 */ #define CLASS_TRIPLE (1 << 15) /* 32768 */ #define ANYCLASS CLASS_MAGIC_USER+CLASS_CLERIC+CLASS_THIEF+CLASS_WARRIOR+CLASS_BARBARIAN+CLASS_DRUID+CLASS_WIZARD+CLASS_MONK+CLASS_AVATAR #define SKILL_TYPE_NONE 0 #define SKILL_TYPE_G_MAGIC (1 << 0) #define SKILL_TYPE_E_MAGIC (1 << 1) #define SKILL_TYPE_G_CLERIC (1 << 2) #define SKILL_TYPE_E_CLERIC (1 << 3) #define SKILL_TYPE_FIGHTER (1 << 4) #define SKILL_TYPE_THIEF (1 << 5) #define SKILL_TYPE_MAGIC SKILL_TYPE_G_MAGIC | SKILL_TYPE_E_MAGIC #define SKILL_TYPE_CLERIC SKILL_TYPE_G_CLERIC | SKILL_TYPE_E_CLERIC #define SKILL_TYPE_MUNDANE SKILL_TYPE_THIEF | SKILL_TYPE_FIGHTER #define SKILL_TYPE_ALL SKILL_TYPE_MAGIC | SKILL_TYPE_G_CLERIC | SKILL_TYPE_MUNDANE /* Fighters guild train in SKILL_TYPE_FIGHTER Thief guild train in SKILL_TYPE_THIEF Cleric guild train in SKILL_TYPE_G_CLERIC Mage guild train in SKILL_TYPE_MAGIC Druid, Wizard, Samurai, and Barbarian specific guild train in SKILL_TYPE_ALL Only Evil Clerics guild train in SKILL_TYPE_E_CLERIC. */ /* various multi-classes */ #define CLASS_MAG_CLE CLASS_MAGIC_USER + CLASS_CLERIC + CLASS_DUAL #define CLASS_MAG_THI CLASS_MAGIC_USER + CLASS_THIEF + CLASS_DUAL #define CLASS_MAG_FIG CLASS_MAGIC_USER + CLASS_WARRIOR + CLASS_DUAL #define CLASS_MAG_CLE_FIG CLASS_MAGIC_USER + CLASS_CLERIC + CLASS_WARRIOR + CLASS_TRIPLE #define CLASS_MAG_THI_FIG CLASS_MAGIC_USER + CLASS_THIEF + CLASS_WARRIOR + CLASS_TRIPLE #define CLASS_CLE_THI CLASS_CLERIC + CLASS_THIEF + CLASS_DUAL #define CLASS_CLE_FIG CLASS_CLERIC + CLASS_WARRIOR + CLASS_DUAL #define CLASS_FIG_THI CLASS_WARRIOR + CLASS_THIEF + CLASS_DUAL #define NUM_CLASSES 13 /* This must be the number of classes!! */ #define RACE_HUMAN 0 #define RACE_ELF 1 #define RACE_HALFELF 2 #define RACE_DWARF 3 #define RACE_HALFLING 4 #define RACE_GNOME 5 #define RACE_HEMNOV 6 #define RACE_LLYRA 7 #define RACE_MINOTAUR 8 #define RACE_PIXIE 9 #define NUM_RACES 10 #define RACE_DARKGNOME 11 /* NPC classes (currently unused - feel free to implement!) */ #define CLASS_OTHER 0 #define CLASS_UNDEAD 1 #define CLASS_HUMANOID 2 #define CLASS_ANIMAL 3 #define CLASS_DRAGON 4 #define CLASS_GIANT 5 /* Sex */ #define SEX_NEUTRAL 0 #define SEX_MALE 1 #define SEX_FEMALE 2 /* Positions */ #define POS_DEAD 0 /* dead */ #define POS_MORTALLYW 1 /* mortally wounded */ #define POS_INCAP 2 /* incapacitated */ #define POS_STUNNED 3 /* stunned */ #define POS_SLEEPING 4 /* sleeping */ #define POS_RESTING 5 /* resting */ #define POS_SITTING 6 /* sitting */ #define POS_FIGHTING 7 /* fighting */ #define POS_STANDING 8 /* standing */ /* Player flags: used by char_data.char_specials.act */ #define PLR_KILLER (1 << 0) /* Player is a player-killer */ #define PLR_THIEF (1 << 1) /* Player is a player-thief */ #define PLR_FROZEN (1 << 2) /* Player is frozen */ #define PLR_DONTSET (1 << 3) /* Don't EVER set (ISNPC bit) */ #define PLR_WRITING (1 << 4) /* Player writing (board/mail/olc) */ #define PLR_MAILING (1 << 5) /* Player is writing mail */ #define PLR_CRASH (1 << 6) /* Player needs to be crash-saved */ #define PLR_SITEOK (1 << 7) /* Player has been site-cleared */ #define PLR_NOSHOUT (1 << 8) /* Player not allowed to shout/goss */ #define PLR_NOTITLE (1 << 9) /* Player not allowed to set title */ #define PLR_DELETED (1 << 10) /* Player deleted - space reusable */ #define PLR_LOADROOM (1 << 11) /* Player uses nonstandard loadroom */ #define PLR_NOWIZLIST (1 << 12) /* Player shouldn't be on wizlist */ #define PLR_NODELETE (1 << 13) /* Player shouldn't be deleted */ #define PLR_INVSTART (1 << 14) /* Player should enter game wizinvis */ #define PLR_CRYO (1 << 15) /* Player is cryo-saved (purge prog) */ #define PLR_EDITING (1 << 16) /* Player is zone editing */ #define PLR_NOSETTITLE (1 << 17) /* Won't autoset title when leveled */ /* Mobile flags: used by char_data.char_specials.act */ #define MOB_SPEC (1 << 0) /* Mob has a callable spec-proc */ #define MOB_SENTINEL (1 << 1) /* Mob should not move */ #define MOB_SCAVENGER (1 << 2) /* Mob picks up stuff on the ground */ #define MOB_ISNPC (1 << 3) /* (R) Automatically set on all Mobs */ #define MOB_AWARE (1 << 4) /* Mob can't be backstabbed */ #define MOB_AGGRESSIVE (1 << 5) /* Mob hits players in the room */ #define MOB_STAY_ZONE (1 << 6) /* Mob shouldn't wander out of zone */ #define MOB_WIMPY (1 << 7) /* Mob flees if severely injured */ #define MOB_AGGR_EVIL (1 << 8) /* auto attack evil PC's */ #define MOB_AGGR_GOOD (1 << 9) /* auto attack good PC's */ #define MOB_AGGR_NEUTRAL (1 << 10) /* auto attack neutral PC's */ #define MOB_MEMORY (1 << 11) /* remember attackers if attacked */ #define MOB_HELPER (1 << 12) /* attack PCs fighting other NPCs */ #define MOB_NOCHARM (1 << 13) /* Mob can't be charmed */ #define MOB_NOSUMMON (1 << 14) /* Mob can't be summoned */ #define MOB_NOSLEEP (1 << 15) /* Mob can't be slept */ #define MOB_NOBASH (1 << 16) /* Mob can't be bashed (e.g. trees) */ #define MOB_NOBLIND (1 << 17) /* Mob can't be blinded */ #define MOB_NO_CORPSE (1 << 18) /* Doesn't leave a corpse */ #define MOB_PET (1 << 19) /* Mob is a pet */ #define MOB_ETHEREAL (1 << 20) /* Mob is invisible */ #define MOB_FASTREGEN (1 << 21) /* Mob regens hp faster than normal */ #define MOB_HUNT (1 << 22) /* Mob is hunting */ /* Mobile flags: used by char_data.char_specials.act2 */ #define MOB2_NOBURN (1 << 0) /* Mob can't be burned */ #define MOB2_MOREBURN (1 << 1) /* Mob more susceptable to burning */ #define MOB2_NOFREEZE (1 << 2) /* Mob can't be frozen */ #define MOB2_MOREFREEZE (1 << 3) /* Mob more susceptable to freezing */ #define MOB2_NOACID (1 << 4) /* Mob can't be acided */ #define MOB2_MOREACID (1 << 5) /* Mob more susceptable to acid */ #define MOB2_CANBURN (1 << 6) /* Mob's touch causes burning */ #define MOB2_CANFREEZE (1 << 7) /* Mob's touch causes freezing */ #define MOB2_CANACID (1 << 8) /* Mob's touch causes acidburning */ #define MOB2_GAZEPETRIFY (1 << 9) /* Mob's gaze can petrify */ /* Mobile flags: used by char_data.char_specials.act3 */ #define MOB3_CANTALK (1 << 0) /* Mob can speak */ #define MOB3_CANT_FLEE (1 << 1) /* Prevents attackers from fleeing */ /* Preference flags: used by char_data.player_specials.pref */ #define PRF_BRIEF (1 << 0) /* Room descs won't normally be shown */ #define PRF_COMPACT (1 << 1) /* No extra CRLF pair before prompts */ #define PRF_DEAF (1 << 2) /* Can't hear shouts */ #define PRF_NOTELL (1 << 3) /* Can't receive tells */ #define PRF_DISPHP (1 << 4) /* Display hit points in prompt */ #define PRF_DISPMANA (1 << 5) /* Display mana points in prompt */ #define PRF_DISPMOVE (1 << 6) /* Display move points in prompt */ #define PRF_AUTOEXIT (1 << 7) /* Display exits in a room */ #define PRF_NOHASSLE (1 << 8) /* Aggr mobs won't attack */ #define PRF_QUEST (1 << 9) /* On quest */ #define PRF_SUMMONABLE (1 << 10) /* Can be summoned */ #define PRF_NOREPEAT (1 << 11) /* No repetition of comm commands */ #define PRF_HOLYLIGHT (1 << 12) /* Can see in dark */ #define PRF_COLOR_1 (1 << 13) /* Color (low bit) */ #define PRF_COLOR_2 (1 << 14) /* Color (high bit) */ #define PRF_NOWIZ (1 << 15) /* Can't hear wizline */ #define PRF_LOG1 (1 << 16) /* On-line System Log (low bit) */ #define PRF_LOG2 (1 << 17) /* On-line System Log (high bit) */ #define PRF_NOAUCT (1 << 18) /* Can't hear auction channel */ #define PRF_NOGOSS (1 << 19) /* Can't hear gossip channel */ #define PRF_NOGRATZ (1 << 20) /* Can't hear grats channel */ #define PRF_ROOMFLAGS (1 << 21) /* Can see room flags (ROOM_x) */ #define PRF_NOQUIT (1 << 22) /* Can't accidentally quit the game */ #define PRF_BOUNTYHUNT (1 << 23) /* Registered Bounty Hunter */ #define PRF_NOWAR (1 << 24) /* Hears War channel */ #define PRF_ASSASSIN (1 << 25) /* Registered Assassin */ #define PRF_AUTODIR (1 << 26) /* auto directions */ #define PRF_AUTOSAC (1 << 27) /* auto sac corpses */ #define PRF_DISPGOLD (1 << 28) /* shows amount of gold */ #define PRF_DISPXP (1 << 29) /* shows amount of xp 'til next level */ #define PRF_DISPDAM (1 << 30) /* shows amount enemy is damaged */ /* Preference flags: used by char_data.player_specials.pref2 */ #define PRF2_REINCARN1 (1 << 0) /* Reincarned (low bit) */ #define PRF2_REINCARN2 (1 << 1) /* Reincarned (mid bit) */ #define PRF2_REINCARN3 (1 << 2) /* Reincarned (high bit) */ #define PRF2_WAR_DRUHARI (1 << 3) /* Registered to fight for Druhari */ #define PRF2_WAR_YLLANTRA (1 << 4)/* Registered to fight for Yllantra */ #define PRF2_RETIRED (1 << 5) /* No longer want to be in the war */ #define PRF2_ARENA_RED (1 << 6) /* Red side in Arena */ #define PRF2_ARENA_BLUE (1 << 7) /* Blue side in Arena */ /* Affect bits: used in char_data.char_specials.saved.affected_by */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ #define AFF_BLIND (1 << 0) /* (R) Char is blind */ #define AFF_INVISIBLE (1 << 1) /* Char is invisible */ #define AFF_DETECT_ALIGN (1 << 2) /* Char is sensitive to align*/ #define AFF_DETECT_INVIS (1 << 3) /* Char can see invis chars */ #define AFF_DETECT_MAGIC (1 << 4) /* Char is sensitive to magic*/ #define AFF_SENSE_LIFE (1 << 5) /* Char can sense hidden life*/ #define AFF_WATERWALK (1 << 6) /* Char can walk on water */ #define AFF_SANCTUARY (1 << 7) /* Char protected by sanct. */ #define AFF_GROUP (1 << 8) /* (R) Char is grouped */ #define AFF_CURSE (1 << 9) /* Char is cursed */ #define AFF_INFRAVISION (1 << 10) /* Char can see in dark */ #define AFF_POISON (1 << 11) /* (R) Char is poisoned */ #define AFF_PROTECT_EVIL (1 << 12) /* Char protected from evil */ #define AFF_PROTECT_GOOD (1 << 13) /* Char protected from good */ #define AFF_SLEEP (1 << 14) /* (R) Char magically asleep */ #define AFF_NOTRACK (1 << 15) /* Char can't be tracked */ #define AFF_UNUSED16 (1 << 16) /* Room for future expansion */ #define AFF_SHIELD (1 << 17) /* Char has shield spell */ #define AFF_SNEAK (1 << 18) /* Char can move quietly */ #define AFF_HIDE (1 << 19) /* Char is hidden */ #define AFF_DEATHDANCE (1 << 20) /* Char is Death Dancing */ #define AFF_CHARM (1 << 21) /* Char is charmed */ #define AFF_FLYING (1 << 22) /* Char is Flying */ #define AFF_WATERBREATH (1 << 23) /* Char can breath water */ #define AFF_PROT_FIRE (1 << 24) /* Char protected from fire */ #define AFF_PLUSONE (1 << 25) /* Char needs +1 to damage */ #define AFF_PLUSTWO (1 << 26) /* Char needs +2 to damage */ #define AFF_PLUSTHREE (1 << 27) /* Char needs +3 to damage */ #define AFF_PLUSFOUR (1 << 28) /* Char needs +4 to damage */ #define AFF_PLUSFIVE (1 << 29) /* Char needs +5 to damage */ #define AFF_SILVER (1 << 30) /* Char needs silver to dam */ /* Affect bits: used in char_data.char_specials.saved.affected_by2 */ #define AFF2_MIRRORIMAGE (1 << 0) /* Char affected by mirImg */ #define AFF2_STONESKIN (1 << 1) /* Char affected by StnSkin */ #define AFF2_FARSEE (1 << 2) /* Char affected by Farsee */ #define AFF2_ENH_HEAL (1 << 3) /* Char affected by Enh Heal */ #define AFF2_ENH_MANA (1 << 4) /* Char affected by Enh Mana */ #define AFF2_ENH_MOVE (1 << 5) /* Char affected by Enh Move */ #define AFF2_HOLDPERSON (1 << 6) /* Char affected by Hold Per */ #define AFF2_CRIT_HIT (1 << 7) /* Char was crit hit */ #define AFF2_BURNING (1 << 8) /* Char is on fire */ #define AFF2_FREEZING (1 << 9) /* Char is freezing */ #define AFF2_ACIDED (1 << 10) /* Char is covered with acid */ #define AFF2_PROT_COLD (1 << 11) /* Char is prot. from cold */ #define AFF2_BLINK (1 << 12) /* Char is displaced */ /* Affect bits: used in char_data.char_specials.saved.affected_by3 */ #define AFF3_PASSDOOR (1 << 0) /* Char walks through doors */ /* Modes of connectedness: used by descriptor_data.state */ #define CON_PLAYING 0 /* Playing - Nominal state */ #define CON_CLOSE 1 /* Disconnecting */ #define CON_GET_NAME 2 /* By what name ..? */ #define CON_NAME_CNFRM 3 /* Did I get that right, x? */ #define CON_PASSWORD 4 /* Password: */ #define CON_NEWPASSWD 5 /* Give me a password for x */ #define CON_CNFPASSWD 6 /* Please retype password: */ #define CON_QSEX 7 /* Sex? */ #define CON_QCLASS 8 /* Class? */ #define CON_RMOTD 9 /* PRESS RETURN after MOTD */ #define CON_MENU 10 /* Your choice: (main menu) */ #define CON_EXDESC 11 /* Enter a new description: */ #define CON_CHPWD_GETOLD 12 /* Changing passwd: get old */ #define CON_CHPWD_GETNEW 13 /* Changing passwd: get new */ #define CON_CHPWD_VRFY 14 /* Verify new password */ #define CON_DELCNF1 15 /* Delete confirmation 1 */ #define CON_DELCNF2 16 /* Delete confirmation 2 */ #define CON_QATTRIB 17 /* query attributes */ #define CON_QRACE 18 /* query race */ #define CON_IEDIT 19 /* OLC modes */ #define CON_REDIT 20 /* Submodes of IEDIT connectedness */ #define IEDIT_CONFIRM_EDIT 0 #define IEDIT_MAIN_MENU 1 #define IEDIT_EDIT_NAMELIST 2 #define IEDIT_SHORTDESC 3 #define IEDIT_LONGDESC 4 #define IEDIT_ACTDESC 5 #define IEDIT_TYPE 6 #define IEDIT_EXTRAS 7 #define IEDIT_WEAR 8 #define IEDIT_WEIGHT 9 #define IEDIT_COST 10 #define IEDIT_COSTPERDAY 11 #define IEDIT_TIMER 12 #define IEDIT_VALUE_1 13 #define IEDIT_VALUE_2 14 #define IEDIT_VALUE_3 15 #define IEDIT_VALUE_4 16 #define IEDIT_APPLY 17 #define IEDIT_APPLYMOD 18 #define IEDIT_EXTRADESC_KEY 19 #define IEDIT_CONFIRM_SAVEDB 20 #define IEDIT_CONFIRM_SAVESTRING 21 #define IEDIT_PROMPT_APPLY 22 #define IEDIT_EXTRADESC_DESCRIPTION 23 #define IEDIT_EXTRADESC_MENU 24 #define IEDIT_AFFECTED1 25 #define IEDIT_AFFECTED2 26 #define IEDIT_AFFECTED3 27 /* Submodes of REDIT connectedness */ #define REDIT_CONFIRM_EDIT 0 #define REDIT_MAIN_MENU 1 #define REDIT_NAME 2 #define REDIT_DESC 3 #define REDIT_FLAGS 4 #define REDIT_SECTOR 5 #define REDIT_EXIT_MENU 6 #define REDIT_CONFIRM_SAVEDB 7 #define REDIT_CONFIRM_SAVESTRING 8 #define REDIT_EXIT_NUMBER 9 #define REDIT_EXIT_DESCRIPTION 10 #define REDIT_EXIT_KEYWORD 11 #define REDIT_EXIT_KEY 12 #define REDIT_EXIT_DOORFLAGS 13 #define REDIT_EXTRADESC_MENU 14 #define REDIT_EXTRADESC_KEY 15 #define REDIT_EXTRADESC_DESCRIPTION 16 /* Character equipment positions: used as index for char_data.equipment[] */ /* NOTE: Don't confuse these constants with the ITEM_ bitvectors which control the valid places you can wear a piece of equipment */ #define WEAR_LIGHT 0 #define WEAR_FINGER_R 1 #define WEAR_FINGER_L 2 #define WEAR_NECK_1 3 #define WEAR_NECK_2 4 #define WEAR_BODY 5 #define WEAR_HEAD 6 #define WEAR_LEGS 7 #define WEAR_FEET 8 #define WEAR_HANDS 9 #define WEAR_ARMS 10 #define WEAR_SHIELD 11 #define WEAR_ABOUT 12 #define WEAR_WAIST 13 #define WEAR_WRIST_R 14 #define WEAR_WRIST_L 15 #define WEAR_WIELD 16 #define WEAR_HOLD 17 #define WEAR_BACKPACK 18 #define WEAR_FACE 19 #define NUM_WEARS 20 /* This must be the # of eq positions!! */ /* object-related defines ********************************************/ /* Item types: used by obj_data.obj_flags.type_flag */ #define ITEM_LIGHT 1 /* Item is a light source */ #define ITEM_SCROLL 2 /* Item is a scroll */ #define ITEM_WAND 3 /* Item is a wand */ #define ITEM_STAFF 4 /* Item is a staff */ #define ITEM_WEAPON 5 /* Item is a weapon */ #define ITEM_FIREWEAPON 6 /* Unimplemented */ #define ITEM_MISSILE 7 /* Unimplemented */ #define ITEM_TREASURE 8 /* Item is a treasure, not gold */ #define ITEM_ARMOR 9 /* Item is armor */ #define ITEM_POTION 10 /* Item is a potion */ #define ITEM_WORN 11 /* Unimplemented */ #define ITEM_OTHER 12 /* Misc object */ #define ITEM_TRASH 13 /* Trash - shopkeeps won't buy */ #define ITEM_TRAP 14 /* Unimplemented */ #define ITEM_CONTAINER 15 /* Item is a container */ #define ITEM_NOTE 16 /* Item is note */ #define ITEM_DRINKCON 17 /* Item is a drink container */ #define ITEM_KEY 18 /* Item is a key */ #define ITEM_FOOD 19 /* Item is food */ #define ITEM_MONEY 20 /* Item is money (gold) */ #define ITEM_PEN 21 /* Item is a pen */ #define ITEM_BOAT 22 /* Item is a boat */ #define ITEM_FOUNTAIN 23 /* Item is a fountain */ #define ITEM_FLIGHT 24 /* Item provides flight */ /* Take/Wear flags: used by obj_data.obj_flags.wear_flags */ #define ITEM_WEAR_TAKE (1 << 0) /* Item can be takes */ #define ITEM_WEAR_FINGER (1 << 1) /* Can be worn on finger */ #define ITEM_WEAR_NECK (1 << 2) /* Can be worn around neck */ #define ITEM_WEAR_BODY (1 << 3) /* Can be worn on body */ #define ITEM_WEAR_HEAD (1 << 4) /* Can be worn on head */ #define ITEM_WEAR_LEGS (1 << 5) /* Can be worn on legs */ #define ITEM_WEAR_FEET (1 << 6) /* Can be worn on feet */ #define ITEM_WEAR_HANDS (1 << 7) /* Can be worn on hands */ #define ITEM_WEAR_ARMS (1 << 8) /* Can be worn on arms */ #define ITEM_WEAR_SHIELD (1 << 9) /* Can be used as a shield */ #define ITEM_WEAR_ABOUT (1 << 10) /* Can be worn about body */ #define ITEM_WEAR_WAIST (1 << 11) /* Can be worn around waist */ #define ITEM_WEAR_WRIST (1 << 12) /* Can be worn on wrist */ #define ITEM_WEAR_WIELD (1 << 13) /* Can be wielded */ #define ITEM_WEAR_HOLD (1 << 14) /* Can be held */ #define ITEM_WEAR_BACK (1 << 15) /* Can be backpack */ #define ITEM_WEAR_FACE (1 << 16) /* Can be worn on face */ /* Extra object flags: used by obj_data.obj_flags.extra_flags */ #define ITEM_GLOW (1 << 0) /* Item is glowing */ #define ITEM_HUM (1 << 1) /* Item is humming */ #define ITEM_NORENT (1 << 2) /* Item cannot be rented */ #define ITEM_NODONATE (1 << 3) /* Item cannot be donated */ #define ITEM_NOINVIS (1 << 4) /* Item cannot be made invis */ #define ITEM_INVISIBLE (1 << 5) /* Item is invisible */ #define ITEM_MAGIC (1 << 6) /* Item is magical */ #define ITEM_NODROP (1 << 7) /* Item is cursed: can't drop */ #define ITEM_BLESS (1 << 8) /* Item is blessed */ #define ITEM_ANTI_GOOD (1 << 9) /* Not usable by good people */ #define ITEM_ANTI_EVIL (1 << 10) /* Not usable by evil people */ #define ITEM_ANTI_NEUTRAL (1 << 11) /* Not usable by neutral people */ #define ITEM_ANTI_MAGIC_USER (1 << 12) /* Not usable by mages */ #define ITEM_ANTI_CLERIC (1 << 13) /* Not usable by clerics */ #define ITEM_ANTI_THIEF (1 << 14) /* Not usable by thieves */ #define ITEM_ANTI_WARRIOR (1 << 15) /* Not usable by warriors */ #define ITEM_NOSELL (1 << 16) /* Shopkeepers won't touch it */ #define ITEM_ANTI_HUMAN (1 << 17) /* Not usable by Humans */ #define ITEM_ANTI_ELF (1 << 18) /* Not usable by elves */ #define ITEM_ANTI_DWARF (1 << 19) /* Not usable by dwarves */ #define ITEM_ANTI_GNOME (1 << 20) /* Not usable by gnomes */ #define ITEM_ANTI_HALFLING (1 << 21) /* Not usable by halflings */ #define ITEM_ANTI_MINOTAUR (1 << 22) /* Not usable by minotaurs */ #define ITEM_ANTI_PIXIE (1 << 23) /* Not usable by pixies */ #define ITEM_PLUSONE (1 << 24) /* Item harm upto AFF_PLUSONE */ #define ITEM_PLUSTWO (1 << 25) /* Item harm upto AFF_PLUSTWO */ #define ITEM_PLUSTHREE (1 << 26) /* Item harm upto AFF_PLUSTHREE */ #define ITEM_PLUSFOUR (1 << 27) /* Item harm upto AFF_PLUSFOUR */ #define ITEM_PLUSFIVE (1 << 28) /* Item harm upto AFF_PLUSFIVE */ #define ITEM_SILVER (1 << 29) /* Item harm AFF_SILVER */ #define ITEM_NOBREAK (1 << 30) /* Item can't be broken */ /* Extra object flags: used by obj_data.obj_flags.extra_flags2 */ #define ITEM2_RETURNING (1 << 0) /* Boomerang item, returns */ #define ITEM2_NOREMOVE (1 << 1) /* Can't be removed */ #define ITEM2_ENGRAVED (1 << 2) /* Engraved */ #define ITEM2_2HANDED (1 << 3) /* Needs two hands to wield */ #define ITEM2_AUTOENGRAVE (1 << 4) /* AutoEngrave to first owner */ /* Modifier constants used with obj affects ('A' fields) */ #define APPLY_NONE 0 /* No effect */ #define APPLY_STR 1 /* Apply to strength */ #define APPLY_DEX 2 /* Apply to dexterity */ #define APPLY_INT 3 /* Apply to constitution */ #define APPLY_WIS 4 /* Apply to wisdom */ #define APPLY_CON 5 /* Apply to constitution */ #define APPLY_CHA 6 /* Apply to charisma */ #define APPLY_CLASS 7 /* Reserved */ #define APPLY_LEVEL 8 /* Reserved */ #define APPLY_AGE 9 /* Apply to age */ #define APPLY_CHAR_WEIGHT 10 /* Apply to weight */ #define APPLY_CHAR_HEIGHT 11 /* Apply to height */ #define APPLY_MANA 12 /* Apply to max mana */ #define APPLY_HIT 13 /* Apply to max hit points */ #define APPLY_MOVE 14 /* Apply to max move points */ #define APPLY_GOLD 15 /* Reserved */ #define APPLY_EXP 16 /* Reserved */ #define APPLY_AC 17 /* Apply to Armor Class */ #define APPLY_HITROLL 18 /* Apply to hitroll */ #define APPLY_DAMROLL 19 /* Apply to damage roll */ #define APPLY_SAVING_PARA 20 /* Apply to save throw: paralz */ #define APPLY_SAVING_ROD 21 /* Apply to save throw: rods */ #define APPLY_SAVING_PETRI 22 /* Apply to save throw: petrif */ #define APPLY_SAVING_BREATH 23 /* Apply to save throw: breath */ #define APPLY_SAVING_SPELL 24 /* Apply to save throw: spells */ /* Container flags - value[1] */ #define CONT_CLOSEABLE (1 << 0) /* Container can be closed */ #define CONT_PICKPROOF (1 << 1) /* Container is pickproof */ #define CONT_CLOSED (1 << 2) /* Container is closed */ #define CONT_LOCKED (1 << 3) /* Container is locked */ /* Some different kind of liquids for use in values of drink containers */ #define LIQ_WATER 0 #define LIQ_BEER 1 #define LIQ_WINE 2 #define LIQ_ALE 3 #define LIQ_DARKALE 4 #define LIQ_WHISKY 5 #define LIQ_LEMONADE 6 #define LIQ_FIREBRT 7 #define LIQ_LOCALSPC 8 #define LIQ_SLIME 9 #define LIQ_MILK 10 #define LIQ_TEA 11 #define LIQ_COFFE 12 #define LIQ_BLOOD 13 #define LIQ_SALTWATER 14 #define LIQ_CLEARWATER 15 /* other miscellaneous defines *******************************************/ /* Player conditions */ #define DRUNK 0 #define FULL 1 #define THIRST 2 /* Sun state for weather_data */ #define SUN_DARK 0 #define SUN_RISE 1 #define SUN_LIGHT 2 #define SUN_SET 3 /* Sky conditions for weather_data */ #define SKY_CLOUDLESS 0 #define SKY_CLOUDY 1 #define SKY_RAINING 2 #define SKY_LIGHTNING 3 /* Rent codes */ #define RENT_UNDEF 0 #define RENT_CRASH 1 #define RENT_RENTED 2 #define RENT_CRYO 3 #define RENT_FORCED 4 #define RENT_TIMEDOUT 5 /* other #defined constants **********************************************/ #define RENT_COST 200 /* flat rate for rent */ #define LAVA_DAMAGE 15 /* damage for going in Lava */ #define UNWAT_DAMAGE 10 /* damage for going underwater */ #define CRIT_DAMAGE 5 /* damage for being crit hit */ #define LVL_IMPL 34 #define LVL_GRGOD 33 #define LVL_GOD 32 #define LVL_IMMORT 31 #define LVL_FREEZE LVL_GRGOD #define NUM_OF_DIRS 6 /* number of directions in a room (nsewud) */ #define OPT_USEC 100000 /* 10 passes per second */ #define PASSES_PER_SEC (1000000 / OPT_USEC) #define RL_SEC * PASSES_PER_SEC #define PULSE_ZONE (10 RL_SEC) #define PULSE_MOBILE (10 RL_SEC) #define PULSE_VIOLENCE (2 RL_SEC) #define SMALL_BUFSIZE 2048 #define LARGE_BUFSIZE (12 * 2048) #define GARBAGE_SPACE 32 #define MAX_STRING_LENGTH 8192 #define MAX_INPUT_LENGTH 256 /* Max length per *line* of input */ #define MAX_RAW_INPUT_LENGTH 512 /* Max size of *raw* input */ #define MAX_MESSAGES 60 #define MAX_NAME_LENGTH 20 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_PWD_LENGTH 10 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_TITLE_LENGTH 80 /* Used in char_file_u *DO*NOT*CHANGE* */ #define HOST_LENGTH 30 /* Used in char_file_u *DO*NOT*CHANGE* */ #define EXDSCR_LENGTH 240 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_TONGUE 3 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_SKILLS 200 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_AFFECT 32 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_AFFECT2 32 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_AFFECT3 32 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_OBJ_AFFECT 6 /* Used in obj_file_elem *DO*NOT*CHANGE* */ /*********************************************************************** * Structures * **********************************************************************/ 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; /* Extra description: used in objects, mobiles, and rooms */ struct extra_descr_data { char *keyword; /* Keyword in look/examine */ char *description; /* What to see */ struct extra_descr_data *next; /* Next in list */ }; /* object-related structures ******************************************/ /* object flags; used in obj_data */ struct obj_flag_data { int value[4]; /* Values of the item (see list) */ byte type_flag; /* Type of item */ long wear_flags; /* Where you can wear it */ long extra_flags; /* If it hums, glows, etc. */ long extra_flags2; /* If it hums, glows, etc. */ int weight; /* Weigt what else */ int cost; /* Value when sold (gp.) */ int cost_per_day; /* Cost to keep pr. real day */ int timer; /* Timer for object */ long bitvector; /* To set chars bits */ long bitvector2; /* To set chars bits */ long bitvector3; /* To set chars bits */ }; /* Used in obj_file_elem *DO*NOT*CHANGE* */ struct obj_affected_type { byte location; /* Which ability to change (APPLY_XXX) */ sbyte modifier; /* How much it changes by */ }; /* ================== Memory Structure for Objects ================== */ struct obj_data { obj_num item_number; /* Where in data-base */ room_num in_room; /* In what room -1 when conta/carr */ struct obj_flag_data obj_flags;/* Object information */ struct obj_affected_type affected[MAX_OBJ_AFFECT]; /* affects */ char *name; /* Title of object :get etc. */ char *description; /* When in room */ char *short_description; /* when worn/carry/in cont. */ char *action_description; /* What to write when used */ struct extra_descr_data *ex_description; /* extra descriptions */ struct char_data *carried_by; /* Carried by :NULL in room/conta */ struct char_data *worn_by; /* Worn by? */ char owner_name[20]; /* for Engraved items */ sh_int worn_on; /* Worn where? */ 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 */ }; /* ======================================================================= */ /* ====================== File Element for Objects ======================= */ /* BEWARE: Changing it will ruin rent files */ struct obj_file_elem { obj_num item_number; int value[4]; long extra_flags; long extra_flags2; int weight; int timer; long bitvector; long bitvector2; long bitvector3; struct obj_affected_type affected[MAX_OBJ_AFFECT]; char owner_name[20]; }; /* header block for rent files. BEWARE: Changing it will ruin rent files */ struct rent_info { int time; int rentcode; int net_cost_per_diem; int gold; int account; int nitems; int spare0; int spare1; int spare2; int spare3; int spare4; int spare5; int spare6; int spare7; }; /* ======================================================================= */ /* room-related structures ************************************************/ struct room_direction_data { char *general_description; /* When look DIR. */ char *keyword; /* for open/close */ sh_int exit_info; /* Exit info */ obj_num key; /* Key's number (-1 for no key) */ room_num to_room; /* Where direction leads (NOWHERE) */ room_num to_room_vnum; /* the vnum of the room. Used for OLC */ }; /* ================== Memory Structure for room ======================= */ struct room_data { room_num number; /* Rooms number (vnum) */ sh_int zone; /* Room zone (for resetting) */ int sector_type; /* sector type (move/hide) */ char *name; /* Rooms name 'You are ...' */ char *description; /* Shown when entered */ struct extra_descr_data *ex_description; /* for examine/look */ struct room_direction_data *dir_option[NUM_OF_DIRS]; /* Directions */ int room_flags; /* DEATH,DARK ... etc */ byte light; /* Number of lightsources in room */ SPECIAL(*func); struct obj_data *contents; /* List of items in room */ struct char_data *people; /* List of NPC / PC in room */ }; /* ====================================================================== */ /* char-related structures ************************************************/ /* memory structure for characters */ struct memory_rec_struct { long id; struct memory_rec_struct *next; }; typedef struct memory_rec_struct memory_rec; /* MOBProgram foo */ struct mob_prog_act_list { struct mob_prog_act_list *next; char *buf; struct char_data *ch; struct obj_data *obj; void *vo; }; typedef struct mob_prog_act_list MPROG_ACT_LIST; struct mob_prog_data { struct mob_prog_data *next; int type; char *arglist; char *comlist; }; typedef struct mob_prog_data MPROG_DATA; extern bool MOBTrigger; #define ERROR_PROG -1 #define IN_FILE_PROG 0 #define ACT_PROG 1 #define SPEECH_PROG 2 #define RAND_PROG 4 #define FIGHT_PROG 8 #define DEATH_PROG 16 #define HITPRCNT_PROG 32 #define ENTRY_PROG 64 #define GREET_PROG 128 #define ALL_GREET_PROG 256 #define GIVE_PROG 512 #define BRIBE_PROG 1024 /* end of MOBProg foo */ /* This structure is purely intended to be an easy way to transfer */ /* and return information about time (real or mudwise). */ struct time_info_data { byte hours, day, month; sh_int 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 */ }; /* general player-related info, usually PC's and NPC's */ struct char_player_data { char passwd[MAX_PWD_LENGTH+1]; /* character's password */ char *name; /* PC / NPC s name (kill ... ) */ char *short_descr; /* for NPC 'actions' */ char *long_descr; /* for 'look' */ char *description; /* Extra descriptions */ char *title; /* PC / NPC's title */ byte sex; /* PC / NPC's sex */ int class; /* PC / NPC's class */ byte level; /* PC / NPC's level */ byte race; /* PC / NPC's race */ int hometown; /* PC s Hometown (zone) */ struct time_data time; /* PC's AGE in days */ ubyte weight; /* PC / NPC's weight */ ubyte height; /* PC / NPC's height */ }; /* Char's abilities. 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; }; /* Char's points. 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; /* Internal -100..100, external -10..10 AC */ 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 */ }; /* * char_special_data_saved: specials which both a PC and an NPC have in * common, but which must be saved to the playerfile for PC's. * * WARNING: Do not change this structure. Doing so will ruin the * playerfile. If you want to add to the playerfile, use the spares * in player_special_data. */ struct char_special_data_saved { int alignment; /* +-3000 for alignments */ long idnum; /* player's idnum; -1 for mobiles */ long act; /* act flag for NPC's; player flag for PC's */ long act2; /* act flag for NPC's; player flag for PC's */ long act3; /* act flag for NPC's; player flag for PC's */ long affected_by; /* Bitvector for spells/skills affected by */ long affected_by2; /* Bitvector for spells/skills affected by */ long affected_by3; /* Bitvector for spells/skills affected by */ sh_int apply_saving_throw[5]; /* Saving throw (Bonuses) */ }; /* Special playing constants shared by PCs and NPCs which aren't in pfile */ struct char_special_data { struct char_data *fighting; /* Opponent */ struct char_data *hunting; /* Char hunted by this char */ byte position; /* Standing, fighting, sleeping, etc. */ int carry_weight; /* Carried weight */ byte carry_items; /* Number of items carried */ int timer; /* Timer for update */ struct char_special_data_saved saved; /* constants saved in plrfile */ }; /* * If you want to add new values to the playerfile, do it here. DO NOT * ADD, DELETE OR MOVE ANY OF THE VARIABLES - doing so will change the * size of the structure and ruin the playerfile. However, you can change * the names of the spares to something more meaningful, and then use them * in your new code. They will automatically be transferred from the * playerfile into memory when players log in. */ struct player_special_data_saved { byte skills[MAX_SKILLS+1]; /* array of skills plus skill 0 */ byte PADDING0; /* used to be spells_to_learn */ bool talks[MAX_TONGUE]; /* PC s Tongues 0 for NPC */ int wimp_level; /* Below this # of hit points, flee! */ byte freeze_level; /* Level of god who froze char, if any */ sh_int invis_level; /* level of invisibility */ room_num load_room; /* Which room to place char in */ long pref; /* preference flags for PC's. */ long pref2; /* preference flags for PC's. */ ubyte bad_pws; /* number of bad password attemps */ sbyte conditions[3]; /* Drunk, full, thirsty */ /* spares below for future expansion. You can change the names from 'sparen' to something meaningful, but don't change the order. */ ubyte spare0; ubyte spare1; ubyte spare2; ubyte spare3; ubyte spare4; ubyte spare5; int spells_to_learn; /* How many can you learn yet this level*/ int spare7; int spare8; int spare9; int spare10; int spare11; int spare12; int killed_player; int killed_by_player; int killed_by_mob; int inn_num; /* room vnum of the inn */ long spare17; long spare18; long spare19; long spare20; long spare21; }; /* * Specials needed only by PCs, not NPCs. Space for this structure is * not allocated in memory for NPCs, but it is for PCs and the portion * of it labelled 'saved' is saved in the playerfile. This structure can * be changed freely; beware, though, that changing the contents of * player_special_data_saved will corrupt the playerfile. */ struct player_special_data { struct player_special_data_saved saved; char *poofin; /* Description on arrival of a god. */ char *poofout; /* Description upon a god's exit. */ struct alias *aliases; /* Character's aliases */ struct quest *quests; /* Character's questbits */ long last_tell; /* idnum of last tell from */ void *last_olc_targ; /* olc control */ int last_olc_mode; /* olc control */ }; /* Specials used by NPCs, not PCs */ struct mob_special_data { byte last_direction; /* The last direction the monster went */ int attack_type; /* The Attack Type Bitvector for NPC's */ byte default_pos; /* Default position for NPC */ memory_rec *memory; /* List of attackers to remember */ byte damnodice; /* The number of damage dice's */ byte damsizedice; /* The size of the damage dice's */ byte attack_num; /* The number of attacks */ int wait_state; /* Wait state for bashed mobs */ }; /* An affect structure. Used in char_file_u *DO*NOT*CHANGE* */ struct affected_type { sh_int type; /* The type of spell that caused this */ sh_int duration; /* For how long its effects will last */ sbyte modifier; /* This is added to apropriate ability */ 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 (AFF2_XXX) */ long bitvector3; /* Tells which bits to set (AFF3_XXX) */ struct affected_type *next; }; /* Structure used for chars following other chars */ struct follow_type { struct char_data *follower; struct follow_type *next; }; /* ================== Structure for player/non-player ===================== */ struct char_data { int pfilepos; /* playerfile pos */ sh_int nr; /* Mob's rnum */ room_num in_room; /* Location (real room number) */ room_num was_in_room; /* location for linkdead people */ struct char_player_data player; /* Normal data */ struct char_ability_data real_abils; /* Abilities without modifiers */ struct char_ability_data aff_abils; /* Abils with spells/stones/etc */ struct char_point_data points; /* Points */ struct char_special_data char_specials; /* PC/NPC specials */ struct player_special_data *player_specials; /* PC specials */ struct mob_special_data mob_specials; /* NPC specials */ struct affected_type *affected; /* affected by what spells */ struct obj_data *equipment[NUM_WEARS];/* Equipment array */ 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? */ MPROG_ACT_LIST *mpact; int mpactnum; }; /* ====================================================================== */ /* ==================== File Structure for Player ======================= */ /* BEWARE: Changing it will ruin the playerfile */ struct char_file_u { /* char_player_data */ char name[MAX_NAME_LENGTH+1]; char description[EXDSCR_LENGTH]; char title[MAX_TITLE_LENGTH+1]; byte sex; int class; byte level; byte race; sh_int hometown; time_t birth; /* Time of birth of character */ int played; /* Number of secs played in total */ ubyte weight; ubyte height; char pwd[MAX_PWD_LENGTH+1]; /* character's password */ struct char_special_data_saved char_specials_saved; struct player_special_data_saved player_specials_saved; struct char_ability_data abilities; struct char_point_data points; struct affected_type affected[MAX_AFFECT]; time_t last_logon; /* Time (in secs) of last logon */ char host[HOST_LENGTH+1]; /* host of last logon */ }; /* ====================================================================== */ /* descriptor-related structures ******************************************/ struct txt_block { char *text; int aliased; struct txt_block *next; }; struct txt_q { struct txt_block *head; struct txt_block *tail; }; struct descriptor_data { int descriptor; /* file descriptor for socket */ char host[HOST_LENGTH+1]; /* hostname */ byte bad_pws; /* number of bad pw attemps this login */ int connected; /* mode of 'connectedness' */ int wait; /* wait for how many loops */ int desc_num; /* unique num assigned to desc */ time_t login_time; /* when the person connected */ char *showstr_head; /* for paging through texts */ char *showstr_point; /* - */ char **str; /* for the modify-str system */ int max_str; /* - */ long mail_to; /* name for mail system */ int prompt_mode; /* control of prompt-printing */ char inbuf[MAX_RAW_INPUT_LENGTH]; /* buffer for raw input */ char last_input[MAX_INPUT_LENGTH]; /* the last input */ char small_outbuf[SMALL_BUFSIZE]; /* standard output buffer */ 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 *snooping; /* Who is this char snooping */ struct descriptor_data *snoop_by; /* And who is snooping this char */ struct descriptor_data *next; /* link to next descriptor */ int edit_mode; /* editing sub mode */ int edit_number; /* virtual num of thing being edited */ int edit_number2; /* misc number for editing */ int edit_zone; /* which zone object is part of */ void **misc_data; /* misc data, usually for extra data crap */ struct obj_data *edit_obj; /* iedit */ struct room_data *edit_room; /* redit */ }; /* other miscellaneous structures ***************************************/ struct msg_type { char *attacker_msg; /* message to attacker */ char *victim_msg; /* message to victim */ char *room_msg; /* message to room */ }; struct message_type { 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 number_of_attacks; /* 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 practices player gains per lev */ }; struct int_app_type { byte learn; /* how many % a player learns a spell/skill */ }; struct con_app_type { sh_int hitp; sh_int shock; }; struct weather_data { int pressure; /* How is the pressure ( Mb ) */ int change; /* How fast and what way does it change. */ int sky; /* How is the sky. */ int sunlight; /* And how much sun. */ }; struct title_type { char *title; int exp; }; /* element in monster and object index-tables */ struct index_data { int virtual; /* virtual number of this mob/obj */ int number; /* number of existing units of this mob/obj */ int progtypes; /* program types for MOBProg */ MPROG_DATA *mobprogs; /* programs for MOBProg */ SPECIAL(*func); };