📄 merc.h
字号:
/*
* Item types.
* Used in #OBJECTS.
*/
#define ITEM_LIGHT 1
#define ITEM_SCROLL 2
#define ITEM_WAND 3
#define ITEM_STAFF 4
#define ITEM_WEAPON 5
#define ITEM_TREASURE 8
#define ITEM_ARMOR 9
#define ITEM_POTION 10
#define ITEM_FURNITURE 12
#define ITEM_TRASH 13
#define ITEM_CONTAINER 15
#define ITEM_DRINK_CON 17
#define ITEM_KEY 18
#define ITEM_FOOD 19
#define ITEM_MONEY 20
#define ITEM_BOAT 22
#define ITEM_CORPSE_NPC 23
#define ITEM_CORPSE_PC 24
#define ITEM_FOUNTAIN 25
#define ITEM_PILL 26
/*
* Extra flags.
* Used in #OBJECTS.
*/
#define ITEM_GLOW 1
#define ITEM_HUM 2
#define ITEM_DARK 4
#define ITEM_LOCK 8
#define ITEM_EVIL 16
#define ITEM_INVIS 32
#define ITEM_MAGIC 64
#define ITEM_NODROP 128
#define ITEM_BLESS 256
#define ITEM_ANTI_GOOD 512
#define ITEM_ANTI_EVIL 1024
#define ITEM_ANTI_NEUTRAL 2048
#define ITEM_NOREMOVE 4096
#define ITEM_INVENTORY 8192
/*
* Wear flags.
* Used in #OBJECTS.
*/
#define ITEM_TAKE 1
#define ITEM_WEAR_FINGER 2
#define ITEM_WEAR_NECK 4
#define ITEM_WEAR_BODY 8
#define ITEM_WEAR_HEAD 16
#define ITEM_WEAR_LEGS 32
#define ITEM_WEAR_FEET 64
#define ITEM_WEAR_HANDS 128
#define ITEM_WEAR_ARMS 256
#define ITEM_WEAR_SHIELD 512
#define ITEM_WEAR_ABOUT 1024
#define ITEM_WEAR_WAIST 2048
#define ITEM_WEAR_WRIST 4096
#define ITEM_WIELD 8192
#define ITEM_HOLD 16384
/*
* Apply types (for affects).
* Used in #OBJECTS.
*/
#define APPLY_NONE 0
#define APPLY_STR 1
#define APPLY_DEX 2
#define APPLY_INT 3
#define APPLY_WIS 4
#define APPLY_CON 5
#define APPLY_SEX 6
#define APPLY_CLASS 7
#define APPLY_LEVEL 8
#define APPLY_AGE 9
#define APPLY_HEIGHT 10
#define APPLY_WEIGHT 11
#define APPLY_MANA 12
#define APPLY_HIT 13
#define APPLY_MOVE 14
#define APPLY_GOLD 15
#define APPLY_EXP 16
#define APPLY_AC 17
#define APPLY_HITROLL 18
#define APPLY_DAMROLL 19
#define APPLY_SAVING_PARA 20
#define APPLY_SAVING_ROD 21
#define APPLY_SAVING_PETRI 22
#define APPLY_SAVING_BREATH 23
#define APPLY_SAVING_SPELL 24
// TFC
#define APPLY_CHARISMA 25
#define APPLY_LUC 26 /* Luck */
#define APPLY_NOSTEAL 27
#define APPLY_NOSLEEP 28
#define APPLY_NOSUMMON 29 /* Also called blocking */
#define APPLY_NOCHARM 30 /* Also called steadfastness? */
#define APPLY_NOSEXCHANGE 31 /* Also called familiarity */
#define APPLY_TRUESEE 32
#define APPLY_NOINFO 33 /* Also called Obscurement */
/*
* Values for containers (value[1]).
* Used in #OBJECTS.
*/
#define CONT_CLOSEABLE 1
#define CONT_PICKPROOF 2
#define CONT_CLOSED 4
#define CONT_LOCKED 8
/*
* Well known room virtual numbers.
* Defined in #ROOMS.
*/
#define ROOM_VNUM_LIMBO 2
#define ROOM_VNUM_CHAT 1200
#define ROOM_VNUM_TEMPLE 3001
#define ROOM_VNUM_ALTAR 3054
#define ROOM_VNUM_SCHOOL 3700
/*
* Room flags.
* Used in #ROOMS.
*/
#define ROOM_DARK 1
#define ROOM_NO_MOB 4
#define ROOM_INDOORS 8
#define ROOM_PRIVATE 512
#define ROOM_SAFE 1024
#define ROOM_SOLITARY 2048
#define ROOM_PET_SHOP 4096
#define ROOM_NO_RECALL 8192
/*
* Directions.
* Used in #ROOMS.
*/
#define DIR_NORTH 0
#define DIR_EAST 1
#define DIR_SOUTH 2
#define DIR_WEST 3
#define DIR_UP 4
#define DIR_DOWN 5
/*
* Exit flags.
* Used in #ROOMS.
*/
#define EX_ISDOOR 1
#define EX_CLOSED 2
#define EX_LOCKED 4
#define EX_PICKPROOF 32
/*
* Sector types.
* Used in #ROOMS.
*/
#define SECT_INSIDE 0
#define SECT_CITY 1
#define SECT_FIELD 2
#define SECT_FOREST 3
#define SECT_HILLS 4
#define SECT_MOUNTAIN 5
#define SECT_WATER_SWIM 6
#define SECT_WATER_NOSWIM 7
#define SECT_UNUSED 8
#define SECT_AIR 9
#define SECT_DESERT 10
#define SECT_MAX 11
/*
* Equpiment wear locations.
* Used in #RESETS.
*/
#define WEAR_NONE -1
#define WEAR_LIGHT 0
#define WEAR_FINGER_L 1
#define WEAR_FINGER_R 2
#define WEAR_NECK_1 3
#define WEAR_NECK_2 4
#define WEAR_BODY 5
#define WEAR_HEAD 6
#define WEAR_LEGS 7
#define WEAR_FEET 8
#define WEAR_HANDS 9
#define WEAR_ARMS 10
#define WEAR_SHIELD 11
#define WEAR_ABOUT 12
#define WEAR_WAIST 13
#define WEAR_WRIST_L 14
#define WEAR_WRIST_R 15
#define WEAR_WIELD 16
#define WEAR_HOLD 17
#define MAX_WEAR 18
/***************************************************************************
* *
* VALUES OF INTEREST TO AREA BUILDERS *
* (End of this section ... stop here) *
* *
***************************************************************************/
/*
* Conditions.
*/
#define COND_DRUNK 0
#define COND_FULL 1
#define COND_THIRST 2
/*
* Positions.
*/
#define POS_DEAD 0
#define POS_MORTAL 1
#define POS_INCAP 2
#define POS_STUNNED 3
#define POS_SLEEPING 4
#define POS_RESTING 5
#define POS_FIGHTING 6
#define POS_STANDING 7
/*
* ACT bits for players.
*/
#define PLR_IS_NPC 1 /* Don't EVER set. */
#define PLR_BOUGHT_PET 2
#define PLR_AUTOEXIT 8
#define PLR_AUTOLOOT 16
#define PLR_AUTOSAC 32
#define PLR_BLANK 64
#define PLR_BRIEF 128
#define PLR_COMBINE 512
#define PLR_PROMPT 1024
#define PLR_TELNET_GA 2048
#define PLR_HOLYLIGHT 4096
#define PLR_WIZINVIS 8192
#define PLR_SILENCE 32768
#define PLR_NO_EMOTE 65536
#define PLR_NO_TELL 262144
#define PLR_LOG 524288
#define PLR_DENY 1048576
#define PLR_FREEZE 2097152
#define PLR_THIEF 4194304
#define PLR_KILLER 8388608
/*
* Obsolete bits.
*/
#if 0
#define PLR_AUCTION 4 /* Obsolete */
#define PLR_CHAT 256 /* Obsolete */
#define PLR_NO_SHOUT 131072 /* Obsolete */
#endif
/*
* Channel bits.
*/
#define CHANNEL_AUCTION 1
#define CHANNEL_CHAT 2
#define CHANNEL_HACKER 4
#define CHANNEL_IMMTALK 8
#define CHANNEL_MUSIC 16
#define CHANNEL_QUESTION 32
#define CHANNEL_SHOUT 64
#define CHANNEL_YELL 128
/*
* Prototype for a mob.
* This is the in-memory version of #MOBILES.
*/
struct mob_index_data
{
MOB_INDEX_DATA * next;
SPEC_FUN * spec_fun;
SHOP_DATA * pShop;
char * player_name;
char * short_descr;
char * long_descr;
char * description;
sh_int vnum;
sh_int count;
sh_int killed;
sh_int sex;
sh_int level;
int act;
int affected_by;
sh_int alignment;
sh_int hitroll; /* Unused */
sh_int ac; /* Unused */
sh_int hitnodice; /* Unused */
sh_int hitsizedice; /* Unused */
sh_int hitplus; /* Unused */
sh_int damnodice; /* Unused */
sh_int damsizedice; /* Unused */
sh_int damplus; /* Unused */
int gold; /* Unused */
MPROG_DATA * mobprogs; /* Used by MOBprogram */
int progtypes; /* Used by MOBprogram */
void *cargo; // @@@ ###
};
/*
* One character (PC or NPC).
*/
struct char_data
{
CHAR_DATA * next; /* Global chain of all char/mob */
CHAR_DATA * next_in_room; /* Chain set by char_to_room() */
CHAR_DATA * master; /* Who char follows or is charmed by */
CHAR_DATA * leader; /* Leader of a group */
CHAR_DATA * fighting; /* Who char is fighting */
CHAR_DATA * reply; /* Last person who talked to char */
SPEC_FUN * spec_fun; /* Mobile special function*/
MOB_INDEX_DATA * pIndexData; /* Mobile class info */
DESCRIPTOR_DATA * desc; /* Player socket info */
AFFECT_DATA * affected; /* List of stat affects on char */
NOTE_DATA * pnote; /* Note writing stuff */
OBJ_DATA * carrying; /* Chain of char's inventory/wielded */
ROOM_INDEX_DATA * in_room; /* Room char is in */
ROOM_INDEX_DATA * was_in_room; /* Room returned to after 'idle void' */
PC_DATA * pcdata; /* Data only PCs have */
char * name;
char * short_descr;
char * long_descr;
char * description;
char * prompt;
sh_int sex;
sh_int class;
sh_int race;
sh_int level;
sh_int trust;
bool wizbit;
int played;
time_t logon;
time_t save_time;
time_t last_note;
sh_int timer;
sh_int wait;
sh_int hit;
sh_int max_hit;
sh_int mana;
sh_int max_mana;
sh_int move;
sh_int max_move;
int gold;
int exp;
int act;
int affected_by;
sh_int position;
sh_int practice;
sh_int carry_weight;
sh_int carry_number;
sh_int saving_throw;
sh_int alignment;
sh_int hitroll;
sh_int damroll;
sh_int armor;
sh_int wimpy;
sh_int deaf;
MPROG_ACT_LIST * mpact; /* Used by MOBprogram */
int mpactnum; /* Used by MOBprogram */
void *cargo; // @@@ ###
};
/*
* Data which only PC's have.
*/
struct pc_data
{
PC_DATA * next;
char * pwd;
char * bamfin;
char * bamfout;
char * title;
sh_int perm_str;
sh_int perm_int;
sh_int perm_wis;
sh_int perm_dex;
sh_int perm_con;
sh_int mod_str;
sh_int mod_int;
sh_int mod_wis;
sh_int mod_dex;
sh_int mod_con;
sh_int condition [3];
sh_int pagelen;
sh_int learned [MAX_SKILL];
};
/*
* MOBprogram block
*/
struct mob_prog_act_list
{
MPROG_ACT_LIST * next;
char * buf;
CHAR_DATA * ch;
OBJ_DATA * obj;
void * vo;
};
struct mob_prog_data
{
MPROG_DATA *next;
int type;
char * arglist;
char * comlist;
};
bool MOBtrigger;
#define ERROR_PROG -1
#define IN_FILE_PROG 0
#define ACT_PROG 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
/*
* Liquids.
*/
#define LIQ_WATER 0
#define LIQ_MAX 16
struct liq_type
{
char * liq_name;
char * liq_color;
sh_int liq_affect[3];
};
/*
* Extra description data for a room or object.
*/
struct extra_descr_data
{
EXTRA_DESCR_DATA *next; /* Next in list */
char *keyword; /* Keyword in look/examine */
char *description; /* What to see */
};
/*
* Prototype for an object.
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -