/* ************************************************************************ * File: structs.h EmpireMUD AD 1.0 * * Usage: header file for central structures and contstants * * * * All rights reserved. See license.doc for complete information. * * * * Code base by Paul Clarke. EmpireMUD Project, a tbgMUD Production. * * Based upon CircleMUD 3.0, beta patch level 17, by Jeremy Elson. * * * * Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University * * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * ************************************************************************ */ /* * EmpireMUD now features an expandable world, though you WILL have to * delete and recreate your map and zone files to change the size. A * standard 500 x 500 creates a map of 250000 rooms. If you don't have * a lot of memory, you might consider less. It need not be square, you * could use 200 x 400 or 300 x 350. The world IS round, you know. * * SIZE_MAP_ZONES is the number of rooms to store in each .wld file * NUM_MAP_ZONES is the total number of map zones, and is equal to the * building zone. */ #define MAP_HEIGHT 350 #define MAP_WIDTH 350 #define MAP_SIZE (MAP_WIDTH * MAP_HEIGHT) #define SIZE_MAP_ZONES (MAP_WIDTH * 5) #define NUM_MAP_ZONES ((MAP_WIDTH * MAP_HEIGHT) / SIZE_MAP_ZONES) /* So years don't always start at 1: */ #define YEAR_ADD 1150 /* preamble *************************************************************/ #define SPECIAL(name) void (name)(void *me) #define LOOK_SPECIAL(name) int (name)(Creature ch, void *me, int mode) /* * Eventually we want to be able to redefine the below to any arbitrary * value. This will allow us to use unsigned data types to get more * room and also remove the '< 0' checks all over that implicitly * assume these values. -gg 12/17/99 */ #define NOWHERE -1 /* nil reference for room-database */ #define NOTHING -1 /* nil reference for objects */ #define NOBODY -1 /* nil reference for mobiles */ /* room-related defines *************************************************/ /* The cardinal directions */ #define NORTH 0 #define EAST 1 #define SOUTH 2 #define WEST 3 #define NUM_SIMPLE_DIRS 4 /* number of dirs n,e,s,w */ #define NORTHWEST 4 #define NORTHEAST 5 #define SOUTHWEST 6 #define SOUTHEAST 7 #define NUM_2D_DIRS 8 /* number of dirs - up/down */ #define UP 8 #define DOWN 9 #define NUM_OF_DIRS 10 /* number of directions in a room */ /* Crops */ #define CROP_FRUIT 0 #define CROP_WHEAT 1 #define CROP_CORN 2 #define NUM_CROPS 3 /* Total number of crops */ /* Exit info */ #define EX_ISDOOR (1 << 0) /* Exit is a door */ #define EX_CLOSED (1 << 1) /* The door is closed */ /* Sector types */ #define SECT_FIELD 0 /* .... */ #define SECT_FOREST_1 1 /* .^.. */ #define SECT_FOREST_2 2 /* ^.^. */ #define SECT_FOREST_3 3 /* ^^.^ */ #define SECT_FOREST_4 4 /* ^^^^ */ #define SECT_RIVER 5 /* ~~~~ */ #define SECT_OCEAN 6 /* ~~~~ */ #define SECT_CROP 7 /* :::: ;;;; ^^^^ */ #define SECT_MOUNTAIN 8 /* /\/\ */ #define SECT_ROAD 9 /* ---- */ #define SECT_BUILDING 10 /* For buildings */ #define SECT_INSIDE 11 /* Inside a building */ #define SECT_SHRINE 12 /* .{}. */ #define SECT_SEEDED 13 /* .... */ #define SECT_WELL 14 /* (~~) */ #define SECT_FOUNTAIN 15 /* {~~} */ #define SECT_MULTI 16 /* For castles and forts */ #define SECT_TRENCH 17 /* \__/ */ #define SECT_TOWER_OF_SOULS 18 /* /\ */ #define SECT_WASTELAND 19 /* .... */ #define SECT_DESERT 20 /* .... */ #define SECT_OASIS 21 /* .~~. */ #define SECT_BARRIER 22 /* VVVV or vvvv */ #define SECT_MONUMENT_OPEN 23 /* for monuments */ #define SECT_MONUMENT_CLOSED 24 /* for monuments */ #define NUM_SECTS 25 /* Total number of room sectors */ /* Castle/fort parts */ #define MULTI_UL 0 /* /=== */ #define MULTI_UR 1 /* ===\ */ #define MULTI_LL 2 /* \=== */ #define MULTI_LR 3 /* ===/ */ #define MULTI_HORIZ 4 /* ==== */ #define MULTI_VERT_L 5 /* | */ #define MULTI_VERT_R 6 /* | */ #define MULTI_VERT_DOOR_R 7 /* = */ #define MULTI_VERT_DOOR_L 8 /* = */ #define MULTI_HORIZ_DOOR 9 /* =||= */ #define MULTI_UL_DOOR 10 /* /=|| */ #define MULTI_LR_DOOR 11 /* ||=/ */ #define MULTI_CENTER 12 /* */ /* Building types */ #define BUILDING_HUT 0 /* .(). */ #define BUILDING_CABIN 1 /* (--) */ #define BUILDING_HOUSE 2 /* (==) */ #define BUILDING_STONE_HOUSE 3 /* [--] */ #define BUILDING_LARGE_HOUSE 4 /* [==] */ #define BUILDING_GUARD_TOWER 5 /* ./\. */ #define BUILDING_TUNNEL 6 /* /OO\ */ #define BUILDING_MINE 7 /* /[]\ */ #define BUILDING_MILL 8 /* (MM) */ #define BUILDING_POTTER 9 /* (PP) */ #define BUILDING_FORGE 10 /* (FF) */ #define BUILDING_STABLE 11 /* (SS) */ #define BUILDING_BAKER 12 /* (BB) */ #define BUILDING_GLASS 13 /* (GG) */ #define BUILDING_GUARD_TOWER2 14 /* '/\' */ #define BUILDING_GUARD_TOWER3 15 /* "/\" */ #define BUILDING_SHIPYARD 16 /* ???? */ #define BUILDING_SHIPYARD2 17 /* ???? */ #define BUILDING_DOCKS 18 /* ???? */ #define BUILDING_CARPENTER 19 /* (CC) */ #define BUILDING_GATEHOUSE 20 /* ???? */ #define BUILDING_TREE_HOUSE 21 /* ^()^ */ #define BUILDING_WATCH_TOWER 22 /* ^TT^ */ #define BUILDING_TREE_COMPLEX 23 /* ^[]^ */ #define BUILDING_MUD_HUT 24 /* .(). */ #define BUILDING_PUEBLO 25 /* .[]. */ #define BUILDING_UNDERGROUND_COMPLEX 26 /* .(). */ #define BUILDING_CLIFF_DWELLING 27 /* [==] */ #define BUILDING_MOUNTAIN_OUTPOST 28 /* ./\. */ #define BUILDING_MINE_COMPLEX 29 /* /[]\ */ #define BUILDING_LUMBER_YARD 30 /* {LL} */ #define BUILDING_GRAVEL_PIT 31 /* {PP} */ #define BUILDING_GRANARY 32 /* {GG} */ #define BUILDING_CANNERY 33 /* {CC} */ #define BUILDING_FOUNDRY 34 /* {FF} */ #define BUILDING_HAVEN_HOUSE 35 /* .[]. */ #define BUILDING_HAVEN_BURROW 36 /* ^[]^ */ #define BUILDING_HAVEN_PUEBLO 37 /* .[]. */ #define BUILDING_HAVEN_CAVE 38 /* /()\ */ #define BUILDING_ARSENAL 39 /* {AA} */ #define BUILDING_TUNNEL2 40 /* /OO\ */ #define BUILDING_TANNERY 41 /* {TT} */ #define BUILDING_APIARY 42 /* {AA} */ #define BUILDING_BATHS 43 /* [~~] */ #define BUILDING_TOOLS 44 /* {UU} */ /* Room types */ #define RTYPE_NONE 0 #define RTYPE_ARMORY 1 #define RTYPE_BEDROOM 2 #define RTYPE_DINING 3 #define RTYPE_FORGE 4 #define RTYPE_GREATHALL 5 #define RTYPE_HALL 6 #define RTYPE_KITCHEN 7 #define RTYPE_SITTING 8 #define RTYPE_STUDY 9 #define RTYPE_THRONE 10 #define RTYPE_STORAGE 11 #define RTYPE_VAULT 12 #define RTYPE_B_HELM 13 /* boat */ #define RTYPE_B_ONDECK 14 /* boat */ #define RTYPE_B_STORAGE 15 /* boat */ #define RTYPE_B_BELOWDECK 16 /* boat */ #define RTYPE_TUNNEL 17 /* for mine complex */ #define RTYPE_SKY_BRIDGE 18 /* for sky places */ #define RTYPE_BATHS 19 /* for castles */ #define RTYPE_SHIELD_RACKS 20 #define RTYPE_ARMOR_STORAGE 21 #define RTYPE_CLOSET 22 #define NUM_RTYPES 23 /* Total number of room types */ /* Designate flags */ #define DES_NEVER (1 << 0) #define DES_VAULT (1 << 1) #define DES_FORGE (1 << 2) #define DES_TUNNEL (1 << 3) #define DES_NO_HALL (1 << 4) #define DES_SKYBRIDGE (1 << 5) #define DES_THRONE (1 << 6) #define DES_ARMORY (1 << 7) #define DES_GREATHALL (1 << 8) #define DES_BATHS (1 << 9) /* Open Monument types */ #define MONUMENT_O_STATUE 0 #define MONUMENT_O_HENGE_UL 1 #define MONUMENT_O_HENGE_UR 2 #define MONUMENT_O_HENGE_LL 3 #define MONUMENT_O_HENGE_LR 4 #define MONUMENT_O_MEGALITH 5 #define MONUMENT_O_CEMETARY 6 #define MONUMENT_O_PARK 7 #define NUM_OPEN_MONUMENTS 8 /* Total number of open monuments */ /* Closed Monument types */ #define MONUMENT_C_TOMB 0 #define MONUMENT_C_SHRINE 1 #define MONUMENT_C_TEMPLE_UL 2 #define MONUMENT_C_TEMPLE_UR 3 #define MONUMENT_C_TEMPLE_LL 4 #define MONUMENT_C_TEMPLE_LR 5 #define MONUMENT_C_HIGHTEMPLE_UL 6 #define MONUMENT_C_HIGHTEMPLE_UC 7 #define MONUMENT_C_HIGHTEMPLE_UR 8 #define MONUMENT_C_HIGHTEMPLE_CL 9 #define MONUMENT_C_HIGHTEMPLE_CC 10 #define MONUMENT_C_HIGHTEMPLE_CR 11 #define MONUMENT_C_HIGHTEMPLE_LL 12 #define MONUMENT_C_HIGHTEMPLE_LC 13 #define MONUMENT_C_HIGHTEMPLE_LR 14 #define MONUMENT_C_PYRAMID_CORNER_L 15 #define MONUMENT_C_PYRAMID_CORNER_R 16 #define MONUMENT_C_PYRAMID_HORIZ 17 #define MONUMENT_C_PYRAMID_VERT_L 18 #define MONUMENT_C_PYRAMID_VERT_R 19 #define MONUMENT_C_PYRAMID_HORIZ_DOOR 20 #define MONUMENT_C_PYRAMID_VERT_DOOR_L 21 #define MONUMENT_C_PYRAMID_VERT_DOOR_R 22 #define MONUMENT_C_PYRAMID_CENTER_UL 23 #define MONUMENT_C_PYRAMID_CENTER_UR 24 #define MONUMENT_C_PYRAMID_CENTER_LL 25 #define MONUMENT_C_PYRAMID_CENTER_LR 26 #define NUM_CLOSED_MONUMENTS 27 /* Total number of closed monuments */ /* Room affects */ #define ROOM_AFF_DARK (1 << 0) /* Torches don't work */ #define ROOM_AFF_SILENT (1 << 1) /* Can't speak/hear */ #define ROOM_AFF_CHAMELEON_FOREST (1 << 2) /* Appears to be forest */ #define ROOM_AFF_CHAMELEON_DESERT (1 << 3) /* Appears to be desert */ #define ROOM_AFF_CHAMELEON_MOUNTAIN (1 << 4) /* Appears to be mountain */ #define ROOM_AFF_NO_GROW (1 << 5) /* Trees won't grow here */ #define NUM_ROOM_AFFS 6 /* char and mob-related defines *****************************************/ /* Experience costs */ #define DISC_COST_NEW 10 #define DISC_COST_HAVE 5 #define ABILITY_COST 2 #define ABILITY_COST_NEW 3 #define ATTRIBUTE_COST 4 #define PATH_COST_SECONDARY 6 #define PATH_COST_NEW 7 /* Sex */ #define SEX_NEUTRAL 0 #define SEX_MALE 1 #define SEX_FEMALE 2 #define NUM_GENDERS 3 /* Total number of genders. Redundant, I know */ /* Positions */ #define POS_DEAD 0 /* dead */ #define POS_MORTALLYW 1 /* mortally wounded */ #define POS_INCAP 2 /* incapacitated */ #define POS_STUNNED 3 /* stunned/bashed */ #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_FROZEN (1 << 0) /* Player is frozen */ #define PLR_WRITING (1 << 1) /* Player writing (board/mail) */ #define PLR_MAILING (1 << 2) /* Player is writing mail */ #define PLR_DONTSET (1 << 3) /* Don't EVER set (ISNPC bit) */ #define PLR_SITEOK (1 << 4) /* Player has been site-cleared */ #define PLR_MUTED (1 << 5) /* Player not allowed to use pub_comm */ #define PLR_NOTITLE (1 << 6) /* Player not allowed to set title */ #define PLR_DELETED (1 << 7) /* Player deleted - space reusable */ #define PLR_LOADROOM (1 << 8) /* Player uses nonstandard loadroom */ #define PLR_NOWIZLIST (1 << 9) /* Player shouldn't be on wizlist */ #define PLR_NODELETE (1 << 10) /* Player shouldn't be deleted */ #define PLR_INVSTART (1 << 11) /* Player should enter game wizinvis */ #define PLR_IPMASK (1 << 12) /* Player is IP-masked */ #define PLR_GHOUL (1 << 13) /* Player is a ghoul */ #define PLR_VAMPIRE (1 << 14) /* Player is a vampire */ #define PLR_MULTIOK (1 << 15) /* Player can multiplay */ #define PLR_SLAIN (1 << 16) /* HC player has been killed */ #define PLR_UNRESTRICT (1 << 17) /* !walls, !buildings */ #define PLR_NOSLEEP (1 << 18) /* Does not fall asleep in the sun */ #define PLR_WEREWOLF (1 << 19) /* Player is a werewolf */ #define PLR_HARDCORE (1 << 20) /* Is hardcore */ #define PLR_PIRATE (1 << 21) /* Player is a pirate */ /* Injury flags */ #define INJ_TIED (1 << 0) /* Bound and gagged */ #define INJ_STAKED (1 << 1) /* Stake thru heart */ #define INJ_TORPOR (1 << 2) /* In torpor */ #define NUM_INJURIES 3 /* Skin colors */ #define SKIN_FAIR 0 #define SKIN_REDDENED 1 #define SKIN_YELLOWISH 2 #define SKIN_TAN_LIGHT 3 #define SKIN_TAN_DARK 4 #define SKIN_LIGHT_BROWN 5 #define SKIN_DARK_BROWN 6 #define NUM_SKINS 7 /* Hair colors */ #define HAIR_BLACK 0 #define HAIR_BROWN 1 #define HAIR_BLONDE 2 #define HAIR_RED 3 #define HAIR_WHITE 4 #define HAIR_GREEN 5 #define HAIR_BLUE 6 #define NUM_HAIRS 7 /* Eye colors */ #define EYES_BLACK 0 #define EYES_BROWN 1 #define EYES_BLUE 2 #define EYES_GREEN 3 #define EYES_VIOLET 4 #define EYES_RED 5 #define NUM_EYES 6 /* Languages */ #define LANG_ENGLISH 0 #define LANG_SPANISH 1 #define LANG_FRENCH 2 #define LANG_ITALIAN 3 #define LANG_LATIN 4 /* unchoosable */ #define LANG_GERMAN 5 #define LANG_RUSSIAN 6 #define LANG_ARABIC 7 #define LANG_INDIAN 8 #define LANG_FERAL_SPEECH 9 /* unchoosable */ #define LANG_HIGH_TONGUE 10 /* unchoosable */ #define NUM_LANGS 11 /* technically a util, but.. this needs to be done somewhere! */ #define LANGUAGE_BIT(bit) (1 << ((int) (bit))) /* Mobile flags */ #define MOB_SPEC (1 << 0) /* a. Mob has a callable spec-proc */ #define MOB_SENTINEL (1 << 1) /* b. Mob should not move */ #define MOB_AGGRESSIVE (1 << 2) /* c. Mob hits players in the room */ #define MOB_ISNPC (1 << 3) /* d. (R) Auto-set on all mobs */ #define MOB_MOUNTABLE (1 << 4) /* e. Can be ridden */ #define MOB_MILKABLE (1 << 5) /* f. May be milked */ #define MOB_SCAVENGER (1 << 6) /* g. Eats corpses */ #define MOB_UNDEAD (1 << 7) /* h. Undead :) */ #define MOB_TIED (1 << 8) /* i. (R) Mob is tied up */ #define MOB_FLYING (1 << 9) /* j. Mob flies */ #define MOB_MOUNTAINWALK (1 << 10) /* k. Walks on mountains */ #define MOB_AQUATIC (1 << 11) /* l. Mob lives in the water only */ #define MOB_PLURAL (1 << 12) /* m. Mob represents 2+ creatures */ #define MOB_RANDOM_ENCOUNTER (1 << 13) /* n. Mob which doesn't normally exist */ #define NUM_MOB_FLAGS 14 /* Total number of MOB_flags */ /* Mobile types */ #define MTYPE_ANIMAL 0 /* Mob is an animal */ #define MTYPE_HUMAN 1 /* Mob is human */ /* Preference flags */ #define PRF_HIDEEMAIL (1 << 0) /* Hides an e-mail address */ #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_POLITICAL (1 << 4) /* Changes map to political colors */ #define PRF_RP (1 << 5) /* RP-only */ #define PRF_MORTLOG (1 << 6) /* Views mortlogs, default: ON */ #define PRF_NOREPEAT (1 << 7) /* No repetition of comm commands */ #define PRF_HOLYLIGHT (1 << 8) /* Can see in dark */ #define PRF_COLOR (1 << 9) /* Color */ #define PRF_NOWIZ (1 << 10) /* Can't hear wizline */ #define PRF_NOMAPCOL (1 << 11) /* Map is not colored */ #define PRF_NOGOSS (1 << 12) /* Can't hear gossip channel */ #define PRF_NOOOC (1 << 13) /* Can't hear ooc channel */ #define PRF_MAPPC (1 << 14) /* Can see players on the map */ #define PRF_NOCLEAR (1 << 15) /* Map does not clear */ #define PRF_AUTOKILL (1 << 16) /* Stops from knocking players out */ #define PRF_SCROLLING (1 << 17) /* Turns off page_string */ #define PRF_BRIEF (1 << 18) /* Cuts map size, removes room descs */ #define PRF_BITEABLE (1 << 19) /* May be drunk from */ #define PRF_FEEDABLE (1 << 20) /* May be fed blood */ #define PRF_TEACHABLE (1 << 21) /* May be taught */ #define PRF_NOGODNET (1 << 22) /* Can't hear godnet */ /* Affect bits */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ #define AFF_BLIND (1 << 0) /* a. (R) Char is blind */ #define AFF_PARTY (1 << 1) /* b. (R) Char is in a party */ #define AFF_INFRAVISION (1 << 2) /* c. Char can see full in dark */ #define AFF_SNEAK (1 << 3) /* d. Char can move quietly */ #define AFF_HIDE (1 << 4) /* e. Char is hidden */ #define AFF_CHARM (1 << 5) /* f. Char is charmed */ #define AFF_INVISIBLE (1 << 6) /* g. Char is invisible */ #define AFF_IMMUNE_BASH (1 << 7) /* h. Immunity to bash */ #define AFF_SENSE_HIDE (1 << 8) /* i. See hidden people */ #define AFF_IMMUNE_PHYSICAL (1 << 9) /* j. Immune to physical damage */ #define AFF_NO_TARGET_IN_ROOM (1 << 10) /* k. no-target */ #define AFF_NO_SEE_IN_ROOM (1 << 11) /* l. don't see on look */ #define AFF_FLY (1 << 12) /* m. person can fly */ #define AFF_NO_ATTACK (1 << 13) /* n. can't be attacked */ #define NUM_AFF_FLAGS 14 /* Total number of AFF_flags */ /* Discipline bits, aff-type flags for vampire powers */ #define DSC_HEIGHTENED_SENSES (1 << 0) /* a. see in dark */ #define DSC_UNSEEN_PRESENCE (1 << 1) /* b. unseen presence */ #define DSC_CANT_SPEND_WILLPOWER (1 << 2) /* c. cowing beast, etc */ #define DSC_WITNESS_OF_DARKNESS (1 << 3) /* d. perfect nightvis */ #define DSC_TALONS_OF_THE_BEAST (1 << 4) /* e. claws */ #define DSC_EARTHMELD (1 << 5) /* f. interred in the earth */ #define DSC_AWE (1 << 6) /* g. awe */ #define DSC_ENTRANCEMENT (1 << 7) /* h. entranced */ #define DSC_MAJESTY (1 << 8) /* i. majesty */ #define DSC_ARMS_OF_AHRIMAN (1 << 9) /* j. arms counter */ #define DSC_TONGUE_OF_THE_ASP (1 << 10) /* k. snake tongue */ #define DSC_BITUMENOUS_FLESH (1 << 11) /* l. mummified */ #define DSC_MASQUE_OF_DEATH (1 << 12) /* m. masqued */ #define DSC_BLIGHT (1 << 13) /* n. blight */ #define DSC_DEATHS_WHISPER (1 << 14) /* o. death's whisper */ #define DSC_ARMOR_OF_VITALITY (1 << 15) /* p. armor of vitality */ #define DSC_MASK (1 << 16) /* q. mask of 1000 faces */ #define DSC_SOUL_MASK (1 << 17) /* r. soul mask */ #define DSC_CANT_SPEND_BLOOD (1 << 18) /* s. hinder vitae */ /* Vampire Clans */ #define CLAN_ASSAMITE 0 /* To add a clan */ #define CLAN_BRUJAH 1 /* 1. add a #define here */ #define CLAN_CAPPADOCIAN 2 /* 2. add a line in the clan struct */ #define CLAN_FOLLOWER_OF_SET 3 /* in vampire.c */ #define CLAN_GANGEL 4 /* 3. add a discipline(s) */ #define CLAN_LASOMBRA 5 #define CLAN_MALKAVIAN 6 #define CLAN_NOSFERATU 7 #define CLAN_RAVNOS 8 #define CLAN_TOREADOR 9 #define CLAN_TREMERE 10 #define CLAN_TZIMISCE 11 #define CLAN_VENTRUE 12 #define CLAN_CAITIFF 13 #define NUM_CLANS 14 /* Total number of clans */ /* Vampire Disciplines */ #define DISC_ANIMALISM 0 /* To add a disc */ #define DISC_AUSPEX 1 /* 1. add a #define here */ #define DISC_CELERITY 2 /* 2. add a line in the disc struct */ #define DISC_CHIMERSTRY 3 /* in vampire.c */ #define DISC_DEMENTATION 4 /* 3. code powers */ #define DISC_DOMINATE 5 /* 4. wipe/convert player file */ #define DISC_FORTITUDE 6 #define DISC_MORTIS 7 #define DISC_OBFUSCATE 8 #define DISC_OBTENEBRATION 9 #define DISC_POTENCE 10 #define DISC_PRESENCE 11 #define DISC_PROTEAN 12 #define DISC_QUIETUS 13 #define DISC_SERPENTIS 14 #define DISC_THAUMATURGY 15 #define DISC_VICISSITUDE 16 #define NUM_DISCS 17 /* Total number of disciplines */ /* Thaumaturgical Paths */ #define PATH_REGO_VITAE 0 #define PATH_CREO_IGNEM 1 #define PATH_REGO_MOTUS 2 #define PATH_REGO_TEMPESTAS 3 #define PATH_REGO_AQUAM 4 #define PATH_REGO_ELEMENTUM 5 #define PATH_WAY_OF_LEVINBOLT 6 #define PATH_PATH_OF_WARDING 7 #define NUM_PATHS 8 /* The total number of paths */ /* Werewolf tribes */ #define TRIBE_BLACK_FURIES 0 #define TRIBE_BONE_GNAWERS 1 #define TRIBE_CHILDREN_OF_GAIA 2 #define TRIBE_FENRIR 3 #define TRIBE_FIANNA 4 #define TRIBE_RED_TALONS 5 #define TRIBE_SHADOW_LORDS 6 #define TRIBE_SILENT_STRIDERS 7 #define TRIBE_SILVER_FANGS 8 #define TRIBE_WARDERS 9 #define NUM_TRIBES 10 /* Werewolf auspices */ #define AUSPICE_RAGABASH 0 #define AUSPICE_THEURGE 1 #define AUSPICE_PHILODOX 2 #define AUSPICE_GALLIARD 3 #define AUSPICE_AHROUN 4 /* Werewolf breed forms */ #define BREED_HOMID 0 #define BREED_METIS 1 #define BREED_LUPUS 2 /* Morph forms */ #define MORPH_NONE 0 #define MORPH_PROTEAN_BAT 1 #define MORPH_PROTEAN_WOLF 2 #define MORPH_ZULO_SHAPE 3 #define MORPH_CHIROPTERAN_MARAUDER 4 #define MORPH_PROTEAN_MIST 5 #define MORPH_PLASMA_FORM 6 #define MORPH_FORM_OF_THE_COBRA 7 #define MORPH_GLABRO 8 #define MORPH_CRINOS 9 #define MORPH_HISPO 10 #define MORPH_LUPUS 11 #define NUM_MORPHS 12 /* flags for morphs */ #define MORPH_FLAG_NO_TALONS (1 << 0) /* can't use talons */ #define MORPH_FLAG_NPC (1 << 1) /* treated like an npc */ #define MORPH_STRING_NAME 0 #define MORPH_STRING_DESC 1 /* Damage types */ #define DAM_BASHING 0 /* Blunt damage */ #define DAM_LETHAL 1 /* Sharp damage */ #define DAM_AGGRAVATED 2 /* Super damage */ /* Modes of connectedness */ #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_QCOLOR 8 /* Color, anyone? */ #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_DISCONNECT 17 /* In-game disconnection */ #define CON_QHAIR 18 /* Hair color, please? */ #define CON_QEYES 19 /* My, what lovely eyes.. */ #define CON_QWEIGHT 20 /* Never ask a woman.. */ #define CON_QHEIGHT 21 /* How tall are you? */ #define CON_QLAST_NAME 22 /* Do you have a last.. */ #define CON_SLAST_NAME 23 /* And what is it? */ #define CON_CLAST_NAME 24 /* Did I get that right? */ #define CON_CHOOSE_ATTRIBUTES 25 /* Assigning Attributes */ #define CON_TEDIT 26 /* Text editing */ #define CON_ADVANTAGES_V 27 /* Vampire Advantages */ #define CON_CHOOSE_ABILITIES 28 /* Assigning Abilities */ #define CON_QHARDCORE 29 /* Hardcore player? */ #define CON_EDIT_DESCRIPTION 30 /* Edit a description with OLC */ #define CON_CHOOSE_VIRTUES 31 /* Choose Virtues */ #define CON_CHOOSE_STATUS 32 /* Pick a "race" */ #define CON_CHOOSE_DISCIPLINES 33 /* Choose Disciplines */ #define CON_QCLAN 34 /* Get Clan */ #define CON_AUTOAUTH 35 /* Autoauth? */ #define CON_QEMAIL 36 /* Email? */ #define CON_FINISH_CREATION 37 /* Done! */ #define CON_APPEARANCE 38 /* hair/eyes/etc? */ #define CON_QEQUIPMENT 39 /* Choose eq set */ #define CON_QPREV_HARDCORE 40 /* Have you ever... */ #define CON_LOAD_HARDCORE_NAME 41 /* Name of hc: */ #define CON_LOAD_HARDCORE_PWORD 42 /* Pword of hc: */ #define CON_PROMPT_STATUS 43 /* break from hc filter */ #define CON_LANGUAGE 44 /* Choose language(s) */ #define CON_GOODBYE 45 /* Close on <enter> */ #define CON_LANGUAGE_MENU 46 /* Buy discipline */ #define CON_CUSTOMIZE 47 /* Want to customize? */ #define CON_CHOOSE_AGE 48 /* What age (vampire) */ #define CON_BREED_FORM 49 /* Choose breed form */ #define CON_AUSPICE 50 /* Choose auspice */ #define CON_TRIBE 51 /* Choose tribe */ #define CON_ADVANTAGES_W 52 /* Choose advantages */ #define CON_QSKIN 53 /* Choose skin tone */ #define CON_EMPIRE_EDIT 54 /* Editing an empire */ #define CON_PATH 55 /* Choose path */ /* Corpse flags */ #define CORPSE_EATEN (1 << 0) /* The corpse is part-eaten */ #define CORPSE_SKINNED (1 << 1) /* The corpse has been skinned */ #define CORPSE_FLAGS 2 /* Total number of CORPSE_flags */ /* Automatic Actions */ #define ACT_NONE 0 #define ACT_DIGGING 1 #define ACT_GATHERING 2 #define ACT_CHOPPING 3 #define ACT_BUILDING 4 #define ACT_DISMANTLING 5 #define ACT_HARVESTING 6 #define ACT_PLANTING 7 #define ACT_MINING 8 #define ACT_MILLING 9 #define ACT_BAKING 10 #define ACT_FORGING 11 #define ACT_FISHING 12 #define ACT_MELTING 13 #define ACT_GLASS 14 #define ACT_CRAFTING 15 #define ACT_MANUFACTURING 16 #define ACT_CHIPPING 17 #define ACT_PANNING 18 #define ACT_MUSIC 19 #define ACT_EXCAVATING 20 #define ACT_EMBRACE 21 #define ACT_PICKING 22 #define ACT_MORPHING 23 #define ACT_SCRAPING 24 #define ACT_BATHING 25 /* Fight modes */ #define FMODE_MELEE 0 /* Hand-to-hand combat */ #define FMODE_MISSILE 1 /* Ranged combat */ #define FMODE_WAITING 2 /* Fighting someone in ranged combat */ /* Lore types */ #define LORE_JOIN_EMPIRE 0 #define LORE_DEFECT_EMPIRE 1 #define LORE_KICKED_EMPIRE 2 #define LORE_PLAYER_KILL 3 #define LORE_PLAYER_DEATH 4 #define LORE_TOWER_DEATH 5 #define LORE_FOUND_EMPIRE 6 #define LORE_START_VAMPIRE 7 #define LORE_EMBRACE_VAMPIRE 8 #define LORE_MAKE_GHOUL 9 #define LORE_DEATH 10 #define LORE_MAKE_VAMPIRE 11 #define LORE_TORPOR 12 /* object-related defines ********************************************/ /* Item types */ #define ITEM_UNDEFINED 0 #define ITEM_WEAPON 1 /* item is a weapon */ #define ITEM_WORN 2 /* wearable equipment */ #define ITEM_OTHER 3 /* misc object */ #define ITEM_CONTAINER 4 /* item is a container */ #define ITEM_DRINKCON 5 /* item is a drink container */ #define ITEM_FOOD 6 /* item is food */ #define ITEM_BOAT 7 /* a boat */ #define ITEM_TREE 8 /* a tree */ #define ITEM_BOARD 9 /* message board */ #define ITEM_CORPSE 10 /* a corpse, pc or npc */ #define ITEM_ORE 11 /* ore: iron, gold, silver */ #define ITEM_CLAY 12 /* clay, for molding */ #define ITEM_SKIN 13 /* animal skin, for sewing */ #define ITEM_MAIL 14 /* mail */ #define ITEM_MONEY 15 /* item counts as money */ #define ITEM_CART 16 /* item is a cart/wagon */ #define ITEM_SHIP 17 /* large ship */ #define ITEM_HELM 18 /* helm of a ship */ #define ITEM_WINDOW 19 /* window of a ship */ #define ITEM_MISSILE_WEAPON 20 /* bow/crossbow/etc */ #define ITEM_ARROW 21 /* for missile weapons */ #define ITEM_INSTRUMENT 22 /* item is a musical instrument */ #define NUM_ITEM_TYPES 23 /* total number of ITEM_types */ /* Item materials: Changing the number of these will corrupt your pfile */ #define ITEM_MAT_WOOD 0 /* Made from wood */ #define ITEM_MAT_ROCK 1 /* ...rock */ #define ITEM_MAT_IRON 2 /* ...iron */ #define ITEM_MAT_SILVER 3 /* ...sparkly stuff */ #define ITEM_MAT_GOLD 4 /* ...gold */ #define ITEM_MAT_FLINT 5 /* ...flint */ #define ITEM_MAT_CLAY 6 /* ...clay */ #define ITEM_MAT_FLESH 7 /* ...skin, corpse, etc */ #define ITEM_MAT_GLASS 8 /* ...glass */ #define ITEM_MAT_WAX 9 /* ...wax */ #define NUM_ITEM_MATS 10 /* Total number of matierals */ /* Character equipment positions */ /* NOTE: Don't confuse these constants with the ITEM_ bitvectors which control the valid places you can wear a piece of equipment */ #define WEAR_HEAD 0 #define WEAR_EARS 1 #define WEAR_NECK 2 #define WEAR_BODY 3 #define WEAR_ARMOR 4 #define WEAR_ABOUT 5 #define WEAR_QUIVER 6 #define WEAR_ARMS 7 #define WEAR_HANDS 8 #define WEAR_FINGER_R 9 #define WEAR_FINGER_L 10 #define WEAR_WAIST 11 #define WEAR_SHEATH_1 12 #define WEAR_IN_SHEATH_1 13 #define WEAR_SHEATH_2 14 #define WEAR_IN_SHEATH_2 15 #define WEAR_SHEATH_3 16 #define WEAR_IN_SHEATH_3 17 #define WEAR_LEGS 18 #define WEAR_FEET 19 #define WEAR_WIELD 20 #define WEAR_HOLD 21 #define NUM_WEARS 22 /* This must be the # of eq positions!! */ /* Take/Wear flags */ #define ITEM_WEAR_TAKE (1 << 0) /* a. Item can be taken */ #define ITEM_WEAR_FINGER (1 << 1) /* b. Can be worn on finger */ #define ITEM_WEAR_NECK (1 << 2) /* c. Can be worn around neck */ #define ITEM_WEAR_BODY (1 << 3) /* d. Can be worn on body */ #define ITEM_WEAR_HEAD (1 << 4) /* e. Can be worn on head */ #define ITEM_WEAR_LEGS (1 << 5) /* f. Can be worn on legs */ #define ITEM_WEAR_FEET (1 << 6) /* g. Can be worn on feet */ #define ITEM_WEAR_HANDS (1 << 7) /* h. Can be worn on hands */ #define ITEM_WEAR_ARMS (1 << 8) /* i. Can be worn on arms */ #define ITEM_WEAR_QUIVER (1 << 9) /* j. Can be used as a quiver */ #define ITEM_WEAR_ABOUT (1 << 10) /* k. Can be worn about body */ #define ITEM_WEAR_WAIST (1 << 11) /* l. Can be worn around waist */ #define ITEM_WEAR_EARS (1 << 12) /* m. Worn on ears */ #define ITEM_WEAR_WIELD (1 << 13) /* n. Can be wielded */ #define ITEM_WEAR_HOLD (1 << 14) /* o. Can be held */ #define ITEM_WEAR_SHEATH (1 << 15) /* p. Can be worn as a sheath */ #define ITEM_WEAR_ARMOR (1 << 16) /* q. Can be worn as armor */ #define NUM_ITEM_WEARS 17 /* Total number of ITEM_WEAR_flags */ /* Extra object flags */ #define ITEM_CHAIR (1 << 0) /* a. Item can be sat upon */ #define ITEM_PLANTABLE (1 << 1) /* b. Uses val 3 to set a crop type */ #define ITEM_LIGHT (1 << 2) /* c. Lights until timer pops */ #define ITEM_SUPERIOR (1 << 3) /* d. Item is of superior quality */ #define ITEM_LARGE (1 << 4) /* e. Item can't be put in bags */ #define ITEM_CREATED (1 << 5) /* f. Was created by a god */ #define NUM_ITEM_FLAGS 6 /* Total number of ITEM_flags */ /* Instrument types */ #define INSTR_LYRE 0 #define INSTR_FLUTE 1 /* Modifier constants used with obj affects ('A' fields) */ #define APPLY_NONE 0 /* No effect */ #define APPLY_STRENGTH 1 /* Apply to strength */ #define APPLY_DEXTERITY 2 /* Apply to dexterity */ #define APPLY_STAMINA 3 /* Apply to stamina */ #define APPLY_CHARISMA 4 /* Apply to charisma */ #define APPLY_MANIPULATION 5 /* Apply to manipulation */ #define APPLY_APPEARANCE 6 /* Apply to appearance */ #define APPLY_PERCEPTION 7 /* Apply to perception */ #define APPLY_INTELLIGENCE 8 /* Apply to intelligence */ #define APPLY_WITS 9 /* Apply to wits */ #define APPLY_AGE 10 /* Apply to age */ #define APPLY_MOVE 11 /* Apply to max move points */ #define APPLY_SOAK 12 /* Apply to soak pool */ #define APPLY_BLOCK 13 /* Apply to chance to block */ #define APPLY_ATTACKS 14 /* Apply to attacks */ #define APPLY_FORTITUDE 15 /* Apply to Fortitude */ #define NUM_APPLIES 16 /* Total number of applies */ /* Container flags - value[1] */ #define CONT_CLOSEABLE (1 << 0) /* Container can be closed */ #define CONT_CLOSED (1 << 1) /* Container is closed */ #define NUM_CONT_FLAGS (1 << 2) /* Total number of container flags */ /* 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_WHISKY 4 #define LIQ_MILK 5 #define LIQ_BLOOD 6 #define LIQ_HONEY 7 #define NUM_LIQUIDS 8 /* Total number of liquids */ /* other miscellaneous defines *******************************************/ /* Player conditions */ #define DRUNK 0 #define FULL 1 #define THIRST 2 #define TIRED 3 #define NUM_CONDS 4 /* 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 /* Seasons */ #define SEASON_WINTER 0 #define SEASON_SPRING 1 #define SEASON_SUMMER 2 #define SEASON_AUTUMN 3 /* Rent codes */ #define RENT_UNDEF 0 #define RENT_CRASH 1 #define RENT_RENTED 2 /* Player killing */ #define PK_NONE 0 #define PK_WAR (1 << 0) #define PK_FULL (1 << 1) #define PK_REVENGE (1 << 2) /* Level constants ******************************************************* * * How to add immortal levels to your mud: * - Change the level defines here, adding more levels between GOD and IMPL * - Make sure that the levels for commands in interpreter.c are okay * - Unless you have more than three immortal levels, the mud will auto- * magically set the command levels for you. * - Make sure LVL_TOP is no less than 3! * - If LVL_TOP is 3, LVL_APPROVED *MUST* be 1 * - If you want more levels than those listed in the chart, you'll have to * make necessary adjustments yourself: * = Add a clause in utils/autowiz.c: level_params[] * = Add a clause in constants.c: level_names[][2] * = Change interpreter.c command levels * * = Future plans: An option to turn on mortal levels * * Quick Reference: * Levels You'll Have * ------ ----------- * 4 Unapproved, Approved, God, Implementor * 5 Unapproved, Approved, God, Immortal, Implementor * 6 Unapproved, Approved, God, Immortal, Assistant, Implementor * 7 Unapproved, Approved, God, Immortal, Assistant, Co-Implementor, Implementor * If LVL_APPROVED is 1, ignore "Unapproved" and all the level numbers * are 1 less */ #define LVL_TOP 7 /* Highest possible level */ #define LVL_APPROVED 2 /* Level when players can use commands */ #define LVL_IMPL LVL_TOP #define LVL_CIMPL (LVL_ASST < LVL_TOP ? LVL_ASST + 1 : LVL_ASST) #define LVL_ASST (LVL_START_IMM < LVL_TOP ? LVL_START_IMM + 1 : LVL_START_IMM) #define LVL_START_IMM (LVL_GOD+1) #define LVL_GOD (LVL_APPROVED+1) #define LVL_FREEZE LVL_CIMPL /* Level which can freeze */ #define LVL_MUTE LVL_ASST /* Level which can mute */ /* other #defined constants **********************************************/ #define MAGIC_NUMBER (0x06) /* Arbitrary number that won't be in a string */ #define OPT_USEC 100000 /* 10 passes per second */ #define PASSES_PER_SEC (1000000 / OPT_USEC) #define RL_SEC * PASSES_PER_SEC #define PULSE_ZONE (30 RL_SEC) #define PULSE_MOBILE (10 RL_SEC) #define PULSE_OBJ_SPECIALS (SECS_PER_MUD_HOUR) #define PULSE_VIOLENCE (2 RL_SEC) /* Variables for the output buffering system */ #define MAX_SOCK_BUF (12 * 1024) /* Size of kernel's sock buf */ #define MAX_PROMPT_LENGTH 128 /* Max length of prompt */ #define MAX_POOF_LENGTH 80 #define GARBAGE_SPACE 32 /* Space for **OVERFLOW** etc */ #define SMALL_BUFSIZE 4096 /* Static output buffer size */ /* Max amount of output that can be buffered */ #define LARGE_BUFSIZE (MAX_SOCK_BUF - GARBAGE_SPACE - MAX_PROMPT_LENGTH) #define HISTORY_SIZE 5 /* Keep last 5 commands. */ #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_ROOM_DESCRIPTION 4000 #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_AFFECT 32 /* Used in char_file_u DO-NOT-CHANGE */ #define MAX_OBJ_AFFECT 6 /* Used in obj_file_elem DO-NOT-CHANGE */ #define NUM_ABILITIES 11 /* Used in char_file_u DO-NOT-CHANGE */ #define EXP_CAP 250 /* because of ubyte */ #define MAX_RANKS 20 /* Max levels in an empire */ #define NUM_PRIVILEGES 9 /* Total number of all privileges */ /* * A MAX_PWD_LENGTH of 10 will cause BSD-derived systems with MD5 passwords * and GNU libc 2 passwords to be truncated. On BSD this will enable anyone * with a name longer than 5 character to log in with any password. If you * have such a system, it is suggested you change the limit to 20. * * Please note that this will erase your player files. If you are not * prepared to do so, simply erase these lines but heed the above warning. */ #if defined(HAVE_UNSAFE_CRYPT) && MAX_PWD_LENGTH == 10 #error You need to increase MAX_PWD_LENGTH to at least 20. #error See the comment near these errors for more explanation. #endif /********************************************************************** * Structures * **********************************************************************/ typedef char byte; typedef signed char sbyte; typedef unsigned char ubyte; typedef signed short int sh_int; typedef unsigned short int ush_int; #if !defined(__cplusplus) /* Anyone know a portable method? */ typedef char bool; #endif typedef int room_vnum; /* A room's vnum type */ typedef int obj_vnum; /* An object's vnum type */ typedef int mob_vnum; /* A mob's vnum type */ typedef int zone_vnum; /* A virtual zone number. */ typedef int room_rnum; /* A room's real (internal) number type */ typedef int obj_rnum; /* An object's real (internal) num type */ typedef int mob_rnum; /* A mobile's real (internal) num type */ typedef int zone_rnum; /* A zone's real (array index) number. */ /* For standardization and simplicity.. */ typedef struct char_data *Creature; typedef struct obj_data *Object; typedef struct room_data *Room; typedef struct descriptor_data *Descr; /* * Bitvector type for 32 bit unsigned long bitvectors. * 'unsigned long long' will give you at least 64 bits if you have GCC. * * Since we don't want to break the pfiles, you'll have to search throughout * the code for "bitvector_t" and change them yourself if you'd like this * extra flexibility. */ typedef unsigned long long bitvector_t; /* Extra description */ 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 */ struct obj_flag_data { int value[3]; /* Values of the item (see list) */ byte type_flag; /* Type of item */ int wear_flags; /* Where you can wear it */ int extra_flags; /* 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 */ int material; /* Material this is made out of */ }; /* 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_vnum item_number; /* Where in data-base */ room_rnum 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 */ Creature carried_by; /* Carried by NULL in room/conta */ Creature worn_by; /* Worn by? */ sh_int worn_on; /* Worn where? */ Creature sitting; /* Person in the chair */ Creature pulled_by1; /* Animal pulling this obj */ Creature pulled_by2; /* Up to two animals may be needed */ Object in_obj; /* In what object NULL when none */ Object contains; /* Contains objects */ Object next_content; /* For 'contains' lists */ Object next; /* For the object list */ }; /* ======================================================================= */ /* ====================== File Element for Objects ======================= */ /* BEWARE: Changing it will ruin rent files */ struct obj_file_elem { obj_vnum item_number; sh_int location; int value[3]; int extra_flags; int weight; int timer; long bitvector; struct obj_affected_type affected[MAX_OBJ_AFFECT]; }; /* header block for rent files. BEWARE: Changing it will ruin rent files */ struct rent_info { int time; int rentcode; int nitems; }; /* ======================================================================= */ /* room-related structures ************************************************/ struct room_direction_data { char *keyword; /* for open/close */ sh_int exit_info; /* Exit info */ room_rnum to_room; /* Where direction leads (NOWHERE) */ }; struct resource_data { ubyte logs; ubyte sticks; ubyte rocks; ubyte iron; }; /* 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 */ sh_int modifier; /* This is added to apropriate ability */ byte location; /* Tells which ability to change(APPLY_XXX) */ bitvector_t bitvector; /* Tells which bits to set (AFF_XXX) */ bitvector_t disc_bit; /* Tells which bits to set (DSC_XXX) */ struct affected_type *next; }; /* ================== Memory Structure for room ======================= */ struct room_data { room_vnum number; /* Rooms number (vnum) */ zone_rnum zone; /* Room zone (for resetting) */ int sector_type; /* sector type (move/hide) */ struct room_direction_data *dir_option[NUM_OF_DIRS]; /* Directions */ char *name; /* Room name may be set */ char *description; /* So may a description */ char *icon; /* Same with map icon */ byte type; /* For growing and building */ byte type2; /* Additional type flag, for mines */ sh_int build_value; /* For actions */ byte building_entrance; /* Dir from which a building is be entered */ int spare; /* Shrine id/mine content */ long owner; /* Whose empire owns me? */ int home_room; /* For multiroom buildings */ byte inside_rooms; /* Total rooms inside */ bool dismantling; /* A small flag, to prevent problems */ byte burning; /* It's on FIRE! (remapped to home_room)*/ byte damage; /* Damage to the building */ sh_int weight; /* Current weight */ struct resource_data res; /* Resources for building */ byte light; /* Number of lightsources in room */ Object boat; /* A pointer to this room's boat */ struct affected_type *af; /* Room's affects */ sh_int affects; /* The room's effect vector */ sh_int base_affects; /* Standard effects */ Object contents; /* List of items in room */ Creature 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; /* 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; 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 */ }; /* For a person's lore */ struct lore_data { int type; long value; long date; struct lore_data *next; }; /* 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 *lastname; /* Last name */ char *short_descr; /* for NPC 'actions' */ char *long_descr; /* for 'look' */ char *title; /* PC / NPC's title */ char *prompt; /* Prompt */ char *poofin; /* Description on arrival of a god */ char *poofout; /* Description upon a god's exit */ char *email; /* Character's e-mail address */ byte sex; /* PC / NPC's sex */ byte level; /* PC / NPC's level */ struct time_data time; /* PC's age in days */ ubyte weight; /* PC / NPC's weight */ ubyte height; /* PC / NPC's height */ struct lore_data *lore; /* Fame */ }; /* Char's abilities. Used in char_file_u *DO*NOT*CHANGE* */ struct char_ability_data { /* Physical */ sbyte strength; sbyte dexterity; sbyte stamina; /* Social */ sbyte charisma; sbyte manipulation; sbyte appearance; /* Mental */ sbyte perception; sbyte intelligence; sbyte wits; }; /* Char's points. Used in char_file_u *DO*NOT*CHANGE* */ struct char_point_data { sbyte damage; sbyte agg_damage; /* Aggravated damage */ sh_int move; sh_int max_move; /* Max move for PC/NPC */ ubyte experience; /* Character's experience */ /* Virtues */ sbyte conscience; sbyte self_control; sbyte courage; /* Advantages */ sbyte humanity; sbyte willpower; sbyte max_willpower; /* Werewolf stuff */ sbyte rage; sbyte max_rage; sbyte gnosis; sbyte max_gnosis; byte blood; /* Blood pool */ byte vamp_blood; /* For ghouls */ byte soak; /* Bonus to soak */ byte block; /* Bonus to block */ }; /* * 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 { long idnum; /* player's idnum; -1 for mobiles */ long act; /* act flag for NPC's; player flag for PC's */ bitvector_t injuries; /* Bitvectors including damage to the player*/ long affected_by; /* Bitvector for spells/skills affected by */ bitvector_t dsc_flags; /* Bitvector for discipline affects */ }; struct fight_data { Creature victim; /* Actual victim */ byte mode; /* Fight mode, FMODE_x */ byte wait; /* Time to intercept */ byte attack_bonus; /* Number of attacks to add */ }; /* Special playing constants shared by PCs and NPCs which aren't in pfile */ struct char_special_data { Object chair; /* Object that this char's sitting in */ struct fight_data fighting; /* Opponent */ Creature hunting; /* Char hunted by this char */ Creature feeding_from; /* Who person is biting */ Creature fed_on_by; /* Who is biting person */ Creature riding; /* Person upon whom char is mounted */ Creature ridden_by; /* Person riding this char */ Creature led_by; /* A person may lead a mob */ Creature leading; /* A mob may lead a person */ Object pulling; /* The mob may be pulling something */ 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 { sh_int invis_level; /* level of invisibility */ room_vnum load_room; /* Which room to place char in */ room_vnum spare_room; /* Used for systems which store rooms */ long pref; /* preference flags for PC's. */ ubyte bad_pws; /* number of bad password attemps */ sh_int conditions[4]; /* Drunk, full, thirsty */ sh_int languages; /* Languages spoken */ byte speaking; /* Language currently speaking */ int res[NUM_ITEM_MATS]; /* God resources */ long loyalty; /* The empire this player follows */ byte rank; /* Rank in the empire */ long pledge; /* Empire he's applying to */ int defect_timer; /* To prevent quick re-entry */ byte hair; byte eyes; byte skin; byte exp_today; byte days_since_bathing; ubyte apparent_age; byte talents[NUM_ABILITIES]; /* Talent Abilities */ byte skills[NUM_ABILITIES]; /* Skill Abilities */ byte knowledges[NUM_ABILITIES]; /* Knowledge Abilities */ byte mort_skills[25]; /* holder space */ byte imm_lev; ubyte morph; int last_direction; int exp_cycle; /* Last update cycle registered */ int action; int action_timer; int action_room; int action_vnum[2]; int action_rotation; /* Vampires */ byte clan; /* Vampire's clan */ byte generation; /* Vampire's Generation */ byte discs[NUM_DISCS]; /* Discipline ratings */ byte paths[NUM_PATHS]; /* Thaumaturgy ratings */ byte primary_path; /* Which path is primary */ /* Werewolves */ byte tribe; /* Werewolf's tribe */ byte auspice; /* Werewolf's auspice */ byte breed; /* Werewolf's breed form */ byte deformity; /* Werewolf's deformity */ /* spares below for future expansion. You can change the names from 'sparen' to something meaningful, but don't change the order. */ byte spare0; ubyte spare1; int spare2; int spare3; long spare4; long spare5; }; /* * 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; struct alias_data *aliases; /* Character's aliases */ long last_tell; /* idnum of last tell from */ bool isafk; /* A character is AFK */ char *afk_msg; /* Message to send */ char *afk_msgs; /* Messages received */ byte reboot_conf; /* Reboot confirmation */ byte hit_regen; /* Hit regeneration add */ byte move_regen; /* Move regeneration add */ byte quit_timer; /* Stops players from quitting */ bool slit_wrist; /* Vampire has slit wrist */ byte create_points; /* Used in character creation */ byte eq_set; /* Used for starter eq */ long vc; /* The VC this user belongs to */ char *vc_name; /* The name of the VC */ }; /* Specials used by NPCs, not PCs */ struct mob_special_data { byte last_direction; /* The last direction the monster went */ byte to_hit; /* Mob's attack dice */ byte to_dodge; /* Mob's dodge dice */ byte damage; /* The number of damage dice's */ int attack_type; /* The Attack Type Bitvector for NPC's */ byte type; /* Mob's type */ int sects; /* Sects that this mob will move through */ byte milk_timer; /* Ticks since last milking */ ubyte skin; /* Skin size */ }; /* Structure used for chars following other chars */ struct follow_type { Creature follower; struct follow_type *next; }; /* ===================== Structure for a character ======================= */ struct char_data { int pfilepos; /* playerfile pos */ mob_rnum nr; /* mob's rnum */ room_rnum in_room; /* location (real room number) */ room_rnum was_in_room; /* location for linkdead people */ int wait; /* wait for how many loops */ 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 */ Object equipment[NUM_WEARS]; /* Equipment array */ Object carrying; /* head of list */ Descr desc; /* NULL for mobiles */ Creature next_in_room; /* For room->people - list */ Creature next; /* For either monster or ppl-list */ Creature next_fighting; /* For fighting list */ struct follow_type *followers; /* List of chars followers */ Creature master; /* Who is char following? */ char prev_host[HOST_LENGTH+1]; /* Previous host (they're Trills) */ time_t prev_logon; /* Time (in secs) of prev logon */ }; /* ====================================================================== */ /* ==================== File Structure for Player ======================= */ /* BEWARE: Changing it will ruin the playerfile */ struct char_file_u { char name[MAX_NAME_LENGTH+1]; /* first name */ char lastname[MAX_NAME_LENGTH+1]; /* last name */ char title[MAX_TITLE_LENGTH+1]; /* character's title */ char prompt[121]; /* character's prompt */ char poofin[81]; /* message when appearing */ char poofout[81]; /* message when disappearing */ char email[81]; /* e-mail for a character */ byte sex; /* sex (yes, please) */ byte level; /* character's level */ time_t birth; /* time of birth of character */ int played; /* number of secs played in total */ ubyte weight; /* character's weight */ ubyte height; /* character's 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; }; /* for the empire editor */ struct empire_edit_data { byte mode; /* editor mode */ int submode; /* editor sub-mode */ bool changed; /* has anything been changed? */ long leader; char *name; sh_int banner_color; sh_int banner_flags; byte num_ranks; char *rank[MAX_RANKS]; sh_int rank_colors[MAX_RANKS]; sh_int rank_color_flags[MAX_RANKS]; byte priv[NUM_PRIVILEGES]; }; struct descriptor_data { socket_t descriptor; /* file descriptor for socket */ char host[HOST_LENGTH+1]; /* hostname */ byte bad_pws; /* number of bad pw attemps this login */ byte idle_tics; /* tics idle at password prompt */ int connected; /* mode of 'connectedness' */ int desc_num; /* unique num assigned to desc */ time_t 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 **str; /* for the modify-str system */ char *backstr; /* for the modify-str aborts */ char *storage; /* name of where to save a file */ size_t max_str; /* - */ long mail_to; /* name for mail system */ int has_prompt; /* is the user at a prompt? */ 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 */ char **history; /* History of commands, for ! mostly. */ int history_pos; /* Circular array position. */ 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 */ Creature character; /* linked to char */ Creature original; /* original char if switched */ Creature temp_char; /* for char creation */ Descr snooping; /* Who is this char snooping */ Descr snoop_by; /* And who is snooping this char */ struct empire_edit_data *empire; /* for empire editing */ Descr next; /* link to next descriptor */ }; /* 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 str_app_type { sh_int carry_w; /* Maximum weight that can be carrried */ sh_int wield_w; /* Maximum weight that can be wielded */ }; 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 */ }; /* element in monster and object index-tables */ struct index_data { int vnum; /* virtual number of this mob/obj */ int number; /* number of existing units of this mob/obj */ SPECIAL(*spec_proc); /* special procedue */ LOOK_SPECIAL(*look_spec);/* spec proc for looking */ }; /* Vampire Clan Data */ struct clan_data { char *name; bool hardcore; bool can_pick; byte disc[3]; }; /* Vampire Power Data */ struct discipline_data { char *name; bool hardcore; }; struct discipline_power_data { char *name; byte disc; byte level; byte min_pos; int subcmd; void (*command_pointer) (Creature ch, char *argument, int subcmd); }; /* Werewolf tribe Data */ struct tribe_data { char *name; }; /* For new players */ struct new_eq_set_data { char *name; obj_vnum head; obj_vnum body; obj_vnum armor; obj_vnum legs; obj_vnum feet; obj_vnum wield; obj_vnum hold; obj_vnum quiver; }; /* For reboots/shutdowns */ struct reboot_data { byte type; int time; byte pause; byte die; }; /* special procedure main table */ struct special_procedure_table { int number; char *name; SPECIAL(*spec_proc); LOOK_SPECIAL(*look_spec); }; /* resource data */ struct resource_data_struct { int vnum; int amount; }; typedef struct resource_data_struct Resource; #define END_RESOURCE_LIST { -1, -1 }