merc.h
legend/src/merc.h · 211.2 KB
From the archive LoCRelease.tgz
Download the archive « Back to the archive contents
/**************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
* *
* Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* *
* In order to use any part of this Merc Diku Mud, you must comply with *
* both the original Diku license in 'license.doc' as well the Merc *
* license in 'license.txt'. In particular, you may not remove either of *
* these copyright notices. *
* *
* Much time and thought has gone into this software and you are *
* benefitting. We hope that you share your changes too. What goes *
* around, comes around. *
***************************************************************************/
/***************************************************************************
* God Wars Mud copyright (C) 1994, 1995, 1996 by Richard Woolcock *
* *
* Legend of Chrystancia copyright (C) 1999, 2000, 2001 by Matthew Little *
* This mud is NOT to be copied in whole or in part, or to be run without *
* the permission of Matthew Little. Nobody else has permission to *
* authorise the use of this code. *
***************************************************************************/
#include <signal.h>
#include <setjmp.h>
#include <string.h>
#include <zlib.h> /* MCCP */
#include <sys/types.h>
#include <arpa/telnet.h> /* MCCP */
#include "warlock.h"
#include "clans.h"
#include "arena.h"
#include "monk.h"
#include "garou.h"
#include "wraith.h"
#include "fae.h"
#include "vote.h"
#include "kav_soundex.h"
#include "mxp.h"
#include "bastet.h"
/*
* Accommodate old non-Ansi compilers.
*/
#if defined(TRADITIONAL)
#define const
#define args( list ) ( )
#define DECLARE_DO_FUN( fun ) void fun( )
#define DECLARE_SPEC_FUN( fun ) bool fun( )
#define DECLARE_SPELL_FUN( fun ) void fun( )
#define DECLARE_GAME_FUN( fun ) void fun( )
#else
#define args( list ) list
#define DECLARE_DO_FUN( fun ) DO_FUN fun
#define DECLARE_SPEC_FUN( fun ) SPEC_FUN fun
#define DECLARE_SPELL_FUN( fun ) SPELL_FUN fun
#define DECLARE_GAME_FUN(fun) GAME_FUN fun
#endif
/*
* Short scalar types.
* Diavolo reports AIX compiler has bugs with short types.
*/
#if !defined(FALSE)
#define FALSE 0
#endif
#if !defined(TRUE)
#define TRUE 1
#endif
#if defined(_AIX)
#if !defined(const)
#define const
#endif
typedef int sh_int;
typedef int bool;
#define unix
#else
typedef int sh_int;
typedef unsigned char bool;
#endif
#include "player.h"
#include "old.h"
#include "extrastructs.h"
extern bool MAKE_WARNED;
/*
* Structure types.
*/
typedef struct xsocial_type XSOCIAL_DATA;
typedef struct hour_min_sec HOUR_MIN_SEC;
typedef struct email_data EMAIL_DATA;
typedef struct trivia_data TRIVIA_DATA;
typedef struct map_type MAP_TYPE;
typedef struct event_data EVENT_DATA; /* timed events */
typedef struct clans_data CLAN_DATA;
typedef struct affect_data AFFECT_DATA;
typedef struct area_data AREA_DATA;
typedef struct char_data CHAR_DATA;
typedef struct config_data CONFIG_DATA;
typedef struct wizconfig_data WIZCONFIG_DATA;
typedef struct descriptor_data DESCRIPTOR_DATA;
typedef struct exit_data EXIT_DATA;
typedef struct extra_descr_data EXTRA_DESCR_DATA;
typedef struct help_data HELP_DATA;
typedef struct kill_data KILL_DATA;
typedef struct mob_index_data MOB_INDEX_DATA;
typedef struct member_data MEMBER_DATA;
typedef struct diplomacy_data DIPLOMACY_DATA;
typedef struct kingdom_data KINGDOM_DATA;
typedef struct note_data NOTE_DATA;
typedef struct obj_data OBJ_DATA;
typedef struct obj_index_data OBJ_INDEX_DATA;
typedef struct pc_data PC_DATA;
typedef struct reset_data RESET_DATA;
typedef struct room_index_data ROOM_INDEX_DATA;
typedef struct shop_data SHOP_DATA;
typedef struct time_info_data TIME_INFO_DATA;
typedef struct weather_data WEATHER_DATA;
typedef struct editing_data EDITING_DATA; /* OLC */
typedef struct command_data COMMAND_DATA;
typedef struct disabled_data DISABLED_DATA;
typedef struct trust_data TRUST_DATA;
typedef struct auction_data AUCTION_DATA;
typedef struct l_board LEADER_BOARD;
typedef struct wiz_data WIZ_DATA;
typedef struct buf_type BUFFER;
/* NEW ONLINE COMBAT BALANCING SYSTEM
*/
#define COMBAT_CONFIG_MAXCLASS 32
#define COMBAT_CONFIG_CLASS_NONE 0
#define COMBAT_CONFIG_CLASS_VAMPIRE 1
#define COMBAT_CONFIG_CLASS_WEREWOLF 2
#define COMBAT_CONFIG_CLASS_DEMON 3
#define COMBAT_CONFIG_CLASS_NINJA 4
#define COMBAT_CONFIG_CLASS_DROW 5
#define COMBAT_CONFIG_CLASS_MONK 6
#define COMBAT_CONFIG_CLASS_MAGE 7
#define COMBAT_CONFIG_CLASS_HIGHLANDER 8
#define COMBAT_CONFIG_CLASS_FAE 9
#define COMBAT_CONFIG_CLASS_DRAGON 10
#define COMBAT_CONFIG_CLASS_WRAITH 11
#define COMBAT_CONFIG_CLASS_BASTET 12
#define COMBAT_CONFIG_CLASS_PRIEST 13
#define COMBAT_CONFIG_CLASS_FINISH 13
typedef struct combat_config_data COMBAT_CONFIG_DATA;
/* PHASE A - THIS IS ALL BASE VALUES WHICH ARE TO BE USED BEFORE ANY
ADDITIONAL CALCULATIONS IS DONE
PHASE B - THIS IS PERCENTILE MODIFIERS, IE: 100% MEANS THAT THEY
GET 100% OF THEIR ATTACKS, THIS IS THE FINAL CALCULATOR
AFTER ALL EXTRA'S HAS BEEN ADDED.
*/
struct combat_config_data
{
int phase_a_number_attacks[COMBAT_CONFIG_MAXCLASS];
int phase_a_minimum_damage[COMBAT_CONFIG_MAXCLASS];
int phase_a_maximum_damage[COMBAT_CONFIG_MAXCLASS];
int phase_b_number_attacks[COMBAT_CONFIG_MAXCLASS];
int phase_b_minimum_damage[COMBAT_CONFIG_MAXCLASS];
int phase_b_maximum_damage[COMBAT_CONFIG_MAXCLASS];
};
extern COMBAT_CONFIG_DATA *CombatConfigData;
#include "artifact.h"
#include "leader.h"
struct buf_type
{
BUFFER * next;
bool valid;
sh_int state; /* error state of the buffer */
sh_int size; /* size in k */
char * string; /* buffer's string */
};
struct wiz_data
{
WIZ_DATA * next;
bool valid;
sh_int level;
char * name;
};
struct auction_data
{
OBJ_DATA * item;
CHAR_DATA * owner;
CHAR_DATA * high_bidder;
sh_int status;
long current_bid;
long qps_held;
long minbid;
};
struct l_board
{
char *pk_name;
int pk_number;
char *pd_name;
int pd_number;
char *tt_name;
int tt_number;
char *qc_name;
int qc_number;
char *qp_name;
int qp_number;
char *mk_name;
int mk_number;
char *md_name;
int md_number;
char *bestpk_name;
long long int bestpk_number;
char *xp_name;
long long int xp_number;
//Unique additions 2 lines
char *tl_name;
int tl_number;
char *aw_name;
int aw_number;
char *al_name;
int al_number;
char *st_name;
int st_number;
};
bool jope_load_char args (( CHAR_DATA *ch, char *arg ));
void jope_free_char args (( CHAR_DATA *ch ));
void jope_interp args (( CHAR_DATA *ch, char *argument ));
char * newtime args( ( time_t time ) );
char *ncurrent_time ();
void increase_total_output args ((int clenght));
void update_mudinfo args ((void));
void load_mudinfo args ((void));
struct bit_type
{
char *const name;
int bit_value;
};
/* Stuff For Threaded DNS LOOKUPS code Originally by Jobo of Dystopia */
void recycle_descriptors(void);
void recycle_dummys(void);
#define STATUS_LOOKUP 0 // New Descriptor, in lookup by default.
#define STATUS_DONE 1 // The lookup is done.
#define STATUS_WAIT 2 // Closed while in thread.
#define STATUS_CLOSED 3 // Closed, ready to be recycled.
typedef struct dummy_arg DUMMY_ARG;
#define TELOPT_COMPRESS 85 /* MCCP */
#define TELOPT_COMPRESS2 86 /* MCCP */
#define COMPRESS_BUF_SIZE 8192 /* MCCP */
struct dummy_arg
{
DUMMY_ARG *next;
DESCRIPTOR_DATA *d;
char *buf;
sh_int status;
};
extern DUMMY_ARG * dummy_free;
extern DUMMY_ARG * dummy_list;
#define MINIMUM_BID 10
#define AUCTION_LENGTH 5
/* one disabled command */
struct disabled_data
{
DISABLED_DATA *next; /* pointer to next node */
struct cmd_type const *command; /* pointer to the command struct*/
char *disabled_by; /* name of disabler */
sh_int level;
char *reason;
};
extern DISABLED_DATA *disabled_first;
//extern BAN_DATA *ban_first;
extern TRUST_DATA * login_free;
typedef struct assist_list
{
char *name;
char *problem;
struct assist_list *next;
struct assist_list *prev;
} ASSIST_DATA;
extern ASSIST_DATA *global_assist;
extern int is_allocated_assist;
struct shit_list {
char name[32];
char msg[320];
};
// ONLINE RELEVEL ADDING
void load_immortals();
extern const char *imm_ranks[];
struct immortal_list {
char name[32];
int level;
int trust;
int security;
int rank;
};
typedef enum
{
IMMRANK_OWNER, IMMRANK_IMPLEMENTOR, IMMRANK_HIGHJUDGE,
IMMRANK_JUDGE, IMMRANK_ENFORCER, IMMRANK_BUILDER, IMMRANK_NEWBIEHELPER, IMMRANK_TOP
} immranks;
typedef enum
{
ARTIFACTS_OFF, ARTIFACTS_STATIC, ARTIFACTS_OAKA, ARTIFACTS_HUNT,
ARTIFACTS_RANDOM, ARTIFACTS_DONATION
} artifact_type;
struct trivia_data
{
int qps;
int timer;
char *question;
char *answer;
bool questing;
};
extern TRIVIA_DATA trivia_info;
/* Structure defines for kingdoms */
#define MAT_GOLD 0
#define MAT_STONE 1
#define MAT_WOOD 2
#define MAT_STEEL 3
#define MAT_QUEST 4
/* Diplomacy defines */
#define DIPL_WAR -1
#define DIPL_NEUTRAL 0
#define DIPL_ALLIANCE 1
/* Command positions */
#define KCMD_INDUCT 0
#define KCMD_OUTCAST 1
#define KCMD_PROMOTE 2
#define KCMD_DEMOTE 3
#define KCMD_DECLARE 4
#define KCMD_MAX 5
struct kcommand_data
{
char * command;
sh_int pos;
};
struct diplomacy_data
{
DIPLOMACY_DATA * next;
DIPLOMACY_DATA * prev;
KINGDOM_DATA * kingdom;
int diplomacy;
};
struct member_data
{
MEMBER_DATA * next;
MEMBER_DATA * prev;
KINGDOM_DATA * kingdom;
char * name;
int rank;
int sex;
};
struct kingdom_data
{
KINGDOM_DATA * next;
KINGDOM_DATA * prev;
MEMBER_DATA * members;
DIPLOMACY_DATA * diplomacy;
DIPLOMACY_DATA * diplomacy_last;
sh_int cmd[KCMD_MAX];
sh_int pk_pd[2];
int vnum[2];
sh_int materials[10];
int krecall;
int helper;
char * descr;
char * open;
char * close;
char * name;
char * ranks[10];
sh_int memnum;
};
/*
* Function types.
*/
typedef void DO_FUN args( ( CHAR_DATA *ch, char *argument ) );
typedef bool SPEC_FUN args( ( CHAR_DATA *ch ) );
typedef void SPELL_FUN args( ( int sn, int level, CHAR_DATA *ch, void *vo ));
typedef void GAME_FUN args( ( CHAR_DATA *ch,
CHAR_DATA *croupier,
char *argument ) );
#define DO_COM( function ) void ( function )( CHAR_DATA *ch, char *argument )
/*
* String and memory management parameters.
*/
#define MAX_KEY_HASH 1024
#define MAX_STRING_LENGTH 8192
#define MAX_INPUT_LENGTH 400
#define MSL (MAX_STRING_LENGTH)
#define MIL (MAX_INPUT_LENGTH)
char str_boot_time[MSL];
#define SCREEN_WIDTH 79
#define MAX_BACKUPS 10
bool fexist args( (char *c_file) );
/*
* Local game functions.
*/
DECLARE_GAME_FUN( game_u_l_t );
DECLARE_GAME_FUN( game_high_dice );
DECLARE_GAME_FUN( game_seven );
/*
* Rotains Gobal Procedures
*/
void strip_obj args(( CHAR_DATA *ch ));
void clear_stats args( (CHAR_DATA *ch) );
void room_is_total_darkness args( (ROOM_INDEX_DATA *pRoomIndex) );
void improve_wpn args( (CHAR_DATA *ch,int dtype, bool right_hand) );
void improve_stance args( (CHAR_DATA *ch) );
void skillstance args( (CHAR_DATA *ch, CHAR_DATA *victim) );
void show_spell args( (CHAR_DATA *ch, int dtype) );
void fightaction args( (CHAR_DATA *ch, CHAR_DATA *victim, int actype , \
int dtype, int wpntype) );
void crack_head args( (CHAR_DATA *ch, OBJ_DATA *obj, char *argument) );
void critical_hit args( (CHAR_DATA *ch, CHAR_DATA *victim, int dt, int dam) );
void take_item args( (CHAR_DATA *ch, OBJ_DATA *obj) );
void raw_kill args( (CHAR_DATA *victim, CHAR_DATA *ch) );
void trip args( (CHAR_DATA *ch, CHAR_DATA *victim) );
void disarm args( (CHAR_DATA *ch, CHAR_DATA *victim) );
void one_hit args( (CHAR_DATA *ch, CHAR_DATA *victim, int dt, \
int handtype) );
void make_part args( (CHAR_DATA *ch, char *argument) );
void load_members args( (void) );
void save_members args( (void) );
void add_member args( (CHAR_DATA *ch) );
void remove_member args( (CHAR_DATA *ch) );
/*
* Malstars bag of fun.
*/
DECLARE_DO_FUN( do_mdonate );
/*
* legend_clan.c - Malstars clancode and other crap
*/
//Bits
#define CLANBIT_DELETION 1
//Functions
DECLARE_DO_FUN( do_clanstatus );
DECLARE_DO_FUN( do_clantable );
DECLARE_DO_FUN( do_addclan );
DECLARE_DO_FUN( do_clanlistimm );
DECLARE_DO_FUN( do_clanset );
DECLARE_DO_FUN( do_clanindex );
DECLARE_DO_FUN( do_clanedit );
DECLARE_DO_FUN( do_induct );
DECLARE_DO_FUN( do_nclantalk );
DECLARE_DO_FUN( do_claninfo );
DECLARE_DO_FUN( do_withdraw );
DECLARE_DO_FUN( do_deposit );
//Tables and defines
#define NULLSTR( str ) ( str == NULL || str[0] == '\0' )
typedef struct nclan_data NCLANS_DATA;
void clancheck args( (CHAR_DATA *ch) );
void delete_clan args( (int num) );
void load_clans args( (void) );
void save_clans args( (void) );
void clan_talk_imm args( (CHAR_DATA *ch, char *argument) );
bool nclan_exists args( ( char *argument ) );
int fetch_clannum args( ( char *argument ) );
int fetch_clanstatic args( ( char *argument ) );
bool is_clanleader args( (CHAR_DATA *ch) );
struct nclan_data
{
char * name;
char * display;
char * leader;
char * prince;
char * retalclan;
int qps;
int members;
int bits;
int hpreq;
int manareq;
int movereq;
int class;
int pks;
int pds;
int pdx;
int magic;
int merc;
};
extern struct nclan_data * nclan_table;
//malstar.c
typedef struct retired_data RETIRED_DATA;
void load_retired args( (void) );
void save_retired args( (void) );
void delete_retirement args( (int iArg) );
struct retired_data
{
char * name;
char * title;
int class;
int pks;
int pds;
int mks;
int mds;
int als;
int aws;
int played;
char * creation;
char * retired;
char * clan;
int generation;
int status;
int displayed;
};
extern struct retired_data * retired_table;
int fetch_dudenr args( (char *argument) );
bool dude_exists args( (char *argument) );
DECLARE_DO_FUN( do_retire );
DECLARE_DO_FUN( do_showretired );
DECLARE_DO_FUN( do_retireset );
DECLARE_DO_FUN( do_halloffame );
//End Malstar
// more remote functions -- Serenity
void raw_kill_remote args( (CHAR_DATA * victim, CHAR_DATA * ch) );
#include "dns.h"
#include "board.h"
void artifact_table_read args( ( ) );
void artifact_table_write args( ( ) );
void behead args( (CHAR_DATA *victim) );
void paradox args( (CHAR_DATA *ch) );
/* */
bool check_ban();
bool check_newbieban();
#define BAN_NEWBIE 1
#define BAN_PREFIX 1<<1
#define BAN_SUFFIX 1<<2
#define BAN_MATCH 1<<3
#define BAN_NOPERM 1<<4
#define BAN_ALLOW 1<<5
#define SYSTEM_DIR "../db/"
#define EMAIL_DB "../db/email.dat"
#define BAN_FILE "../db/bans.db"
#define OAKA_FILE "../db/oaka.db"
#define WIZ_FILE "../db/wizlist.db"
#define ILLUSION_FILE "../db/illusions.dat" // Location of illusionary exits.
#define IMMORTAL_FILE "../db/immortals.dat" /* List of Relevel Imms */
#define CRASH_FILE "../db/shutdown.db"
typedef struct ban_data BAN_DATA;
BAN_DATA *ban_list;
extern const char compress_will[]; /* MCCP support */
extern const char compress_will2[]; /* MCCP support */
struct ban_data
{
BAN_DATA *next;
char *address;
char *banner;
char *message;
char *date;
short int level;
int bits;
};
struct ban_bits
{
char *name;
char *desc;
int val;
};
void load_todo(void);
void load_todo2(void);
void read_shitlist();
int check_shitlist(DESCRIPTOR_DATA *d, char *argument);
void save_bans();
void load_bans();
void free_ban();
#define D_LOGIN_TIME 20
#define D_TOTAL_LOGIN_TIME (D_LOGIN_TIME * 5)
/*
* Godwars Game Parameters
* By Rotain
*/
#define TELL_HISTORY_SIZE 10
#define AGE_NEWBIE 6 // This age = no longer a newbie
#define NUM_EMPOWERMENTS 35
#define SKILL_ADEPT 100
#define SKILL_THAC0_32 18
#define SKILL_THAC0_00 6
#define VERSION_NUMBER 4
#define PVERSION 28
#define DONATION_ROOM_WEAPON 6641
#define DONATION_ROOM_ARMOR 6643
#define DONATION_ROOM_REST 6644
#define MAX_VAMPIRE_POWER 3
#define MAX_CLAN 12
#define MAX_ART 46
#define MAX_WAR 45
#define MAX_FORGET 10
/*CLAN LIST STUFF FROM KaVIr! Once again he comes through :)*/
#define CLAN_NONE 0
#define CLAN_CAITIFF 0
#define CLAN_LASOMBRA 1
#define CLAN_TZIMISCE 2
#define CLAN_GANGREL 3
#define CLAN_VENTRUE 4
#define CLAN_TREMERE 5
#define CLAN_ASSAMITE 6
#define CLAN_MALKAVIAN 7
#define CLAN_CAPPADOCIAN 8
#define CLAN_TOREADOR 9
#define CLAN_NOSFERATU 10
#define CLAN_UNBOUND 11
/*
* Game parameters.
* Increase the max'es if you add more of something.
* Adjust the pulse numbers to suit yourself.
*/
#define PARADOX_TICK 30
#define MAX_SKILL 207
#define MAX_SPELL 60
#define MAX_LEVEL 12
#define NO_WATCH 0
#define NO_GODLESS (MAX_LEVEL - 2)
#define DAILYCOUNT (2*24 * 60 * 60)
/* Size of the map and depth of recursion to undertake */
#define MAPX 10
#define MAPY 8
#define MAXDEPTH 2
#define LEVEL_HERO (MAX_LEVEL - 9)
#define LEVEL_IMMORTAL (MAX_LEVEL - 5)
#define L_ANG MAX_LEVEL - 3
#define LEVEL_MORTAL (MAX_LEVEL - 10)
#define LEVEL_AVATAR (MAX_LEVEL - 9)
#define LEVEL_APPRENTICE (MAX_LEVEL - 8)
#define LEVEL_MAGE (MAX_LEVEL - 7)
#define LEVEL_ARCHMAGE (MAX_LEVEL - 6)
#define LEVEL_NINJA (MAX_LEVEL - 6)
#define LEVEL_MONK (MAX_LEVEL - 6)
#define LEVEL_NEWBIEHELPER (MAX_LEVEL - 5)
#define LEVEL_BUILDER (MAX_LEVEL - 4)
#define LEVEL_ENFORCER (MAX_LEVEL - 3)
#define LEVEL_JUDGE (MAX_LEVEL - 2)
#define LEVEL_HIGHJUDGE (MAX_LEVEL - 1)
#define LEVEL_IMPLEMENTOR (MAX_LEVEL)
#define LEVEL_OWNER (MAX_LEVEL + 1)
#define L_UNK 0
#define L_SAV 1
#define L_CIT 2
#define L_MYT 3
#define L_LEG 4
#define L_TIT 5
#define L_IMM 6
#define L_ORA 7
#define L_DEM 8
#define L_DEI 9
#define L_ALM 10
#define PULSE_PER_SECOND 4 /* was 4*/
#define PULSE_GAIN_EXP ( 1 * PULSE_PER_SECOND)
#define PULSE_VIOLENCE ( 3 * PULSE_PER_SECOND)
#define PULSE_MOBILE ( 4 * PULSE_PER_SECOND)
#define PULSE_EMBRACE ( 4 * PULSE_PER_SECOND)
#define PULSE_TICK (30 * PULSE_PER_SECOND)
#define PULSE_AREA (60 * PULSE_PER_SECOND)
#define PULSE_WEATHER (150 * PULSE_PER_SECOND)
#define PULSE_WW ( 4 * PULSE_PER_SECOND)
#define PULSE_EVENT ( 2 * PULSE_PER_SECOND) /* timed events */
#define PULSE_HINT (60 * PULSE_PER_SECOND)
#define PULSE_ARENA 120 /* 180 minutes */
#define PULSE_MODIFIER 300 /* 5 Hours */
#define PULSE_REGEN ( 7 * PULSE_PER_SECOND)
#define PULSE_AUCTION (10 * PULSE_PER_SECOND)
#define A 1
#define B 2
#define C 4
#define D 8
#define E 16
#define F 32
#define G 64
#define H 128
#define I 256
#define J 512
#define K 1024
#define L 2048
#define M 4096
#define N 8192
#define O 16384
#define P 32768
#define Q 65536
#define R 131072
#define S 262144
#define T 524288
#define U 1048576
#define V 2097152
#define W 4194304
#define X 8388608
#define Y 16777216
#define Z 33554432
#define aa 67108864
#define bb 134217728
#define cc 268435456
#define dd 536870912
#define ee 1073741824
#define ff 2147483648
/*
* Clan structure.
*/
struct clans_data
{
int members; /* Number of members */
char * clan_head; /* Name of clan head */
char * primogen; /* Name of primogen */
};
/*
* Rotains Clan Table Structure
*
struct clan_table_type
{
char * clan_name;
char * clan_leader;
char * clan_powers_1;
char * clan_powers_2;
char * clan_powers_3;
int clan_kills [MAX_CLAN];
int lvnum;
int uvnum;
int clan_recall;
};
*/
struct artifact_type
{
char * player_name;
int object_vnum;
};
#define OPAS_HOST "localhost"
#define OPAS_PORT 6501
/*
* Site ban structure.
*/
#define ED EVENT_DATA
ED *new_event args( (void) );
void free_event args( (ED *ev) );
#undef ED
/*
struct ban_data
{
BAN_DATA *next;
char *name;
char *by_who;
sh_int level;
bool newbie_banned;
};
*/
struct wizconfig_data
{
char * prompt; /* Prompt if no prompt set */
char * cprompt; /* Cprompt if no cprompt set */
bool wizlock; /* Can non-Gods log on? */
bool newplayers; /* Can new players log on? */
bool logall; /* Is everything logged? */
int catchmode;
int xptimer;
int xpbonus;
int qptimer;
int qpbonus;
int decaps;
int totaldecaps;
int totalplayers;
int paradoxlimit;
char * boot_time; /* Saves the boot time if a hard boot */
bool nslookup;
int modtimer;
int maxplayers;
char * max_time;
bool n00bgroup;
int n00bhours;
sh_int artifacts;
bool classless;
};
struct trust_data
{
TRUST_DATA * next;
char * name;
sh_int level;
};
#define COMPILE_TIME __DATE__ " " __TIME__
/*
* Store types of char logged in.
*/
#define LOGIN_NONE 0
#define LOGIN_NEWBIE 1
#define LOGIN_MORTAL 2
#define LOGIN_GOD 4
#define LOGIN_VAMPIRE 8
#define LOGIN_WEREWOLF 16
#define LOGIN_MAGE 32
#define LOGIN_DEMON 64
#define LOGIN_HIGHLANDER 128
#define LOGIN_DROW 256
#define LOGIN_MONK 512
#define LOGIN_NINJA 1024
#define LOGIN_WRAITH 2048
#define LOGIN_BASTET 4096
//#define LOGIN_GARGOYLE 4096
#define LOGIN_DRAGON 8192
#define LOGIN_FAE 16384
int souls_needed(CHAR_DATA *ch);
/*
* Time and weather stuff.
*/
#define SUN_DARK 0
#define SUN_RISE 1
#define SUN_LIGHT 2
#define SUN_SET 3
#define MOON_RISE 0
#define MOON_UP 1
#define MOON_SET 2
#define MOON_DOWN 3
#define MORNING 0
#define DAY 1
#define EVENING 2
#define NIGHT 3
#define SPRING 0
#define SUMMER 1
#define AUTUMN 2
#define WINTER 3
#define SKY_CLOUDLESS 0
#define SKY_CLOUDY 1
#define SKY_RAINING 2
#define SKY_LIGHTNING 3
#define MOON_NEW 0
#define MOON_CRESCENT 1
#define MOON_HALF 2
#define MOON_GIBBOUS 3
#define MOON_FULL 4
#define MOON_WANING 5
struct time_info_data
{
int hour;
int day;
int month;
int year;
int full700;
int part182;
int part018;
int full400;
int daylist;
int minutelist;
};
struct weather_data
{
int mmhg;
int change;
int sky;
int sunlight;
int moonlight;
int moonphase;
int time_of_day;
int season;
};
struct hour_min_sec
{
int hour;
int min;
int sec;
int manual;
};
// Item Versions
#define IV_OLD 0 // Old Style Items
#define IV_NORMAL 1 // Base Item Classes
#define IV_MAGIC 2
#define IV_RARE 3
// Range for New Item Class Objects
#define MIN_OBJ_VNUM 26000
#define MAX_OBJ_VNUM 26017
/*
* Connected state for a channel.
*/
#define CON_PLAYING 0
#define CON_GET_NAME 1
#define CON_GET_OLD_PASSWORD 2
#define CON_CONFIRM_NEW_NAME 3
#define CON_GET_NEW_PASSWORD 4
#define CON_CONFIRM_NEW_PASSWORD 5
#define CON_GET_NEW_EMAIL 6
#define CON_GET_NEW_SEX 7
#define CON_GET_NEW_CLASS 8
#define CON_READ_MOTD 9
#define CON_NOT_PLAYING 10
#define CON_GET_NEW_ANSI 11
#define CON_COPYOVER_RECOVER 12
#define CON_NOTE_TO 13
#define CON_NOTE_SUBJECT 14
#define CON_NOTE_EXPIRE 15
#define CON_NOTE_TEXT 16
#define CON_NOTE_FINISH 17
#define CON_PFILE 20
#define CON_CONTINUE_PLAYING -7
#define CON_REASON -8
/*
* Timers
*/
#define MAX_TIMER 10
#define TIMER(ch, tmr) ((ch)->pcdata->tick_timer[(tmr)])
#define SET_TIMER(ch, tmr, tm) ((ch)->pcdata->tick_timer[(tmr)] = (tm))
#define ADD_TIMER(ch, tmr, tm) ((ch)->pcdata->tick_timer[(tmr)] += (tm))
#define SUB_TIMER(ch, tmr, tm) ((ch)->pcdata->tick_timer[(tmr)] -= (tm))
#define TIME_UP(ch, tmr) ((ch)->pcdata->tick_timer[(tmr)] == 0 ? TRUE : FALSE )
// add timers here.. #define TIMER_WHATEVER 0...
#define TIMER_THIRD_ARM_GOING 0
#define TIMER_FOURTH_ARM_GOING 1
#define TIMER_DSLEEP 2
/*
* Connected states for OLC.
*/
#define CON_AEDITOR -1
#define CON_REDITOR -2
#define CON_MEDITOR -3
#define CON_OEDITOR -4
#define CON_HEDITOR -5
#define CON_KEDITOR -6
/*
Extra global's done by KaVir
*/
extern int world_affects;
extern char first_place [];
extern char second_place [];
extern char third_place [];
extern long long int score_1;
extern long long int score_2;
extern long long int score_3;
extern int pulse_weather;
extern WIZCONFIG_DATA * WizConfig;
extern int top_playerid;
extern bool cmd_done;
extern char *last_command;
extern bool fCopyOver;
extern AUCTION_DATA auction_info;
extern int arena;
extern int TOTAL_BID;
extern long long int mobs_killed;
/*
* Online editing structure.
*/
struct editing_data /* OLC */
{
void * pIndex;
int vnum;
int type;
int command;
char * text;
char ** destination;
};
/*
* Area flags. OLC
*/
#define AREA_NONE 0
#define AREA_CHANGED 1 /* Area has been modified. */
#define AREA_ADDED 2 /* Area has been added to. */
#define AREA_LOADING 4 /* Used for counting in db.c */
#define AREA_UNLINKED 8 // Sage- unlinked zone
#define AREA_NO_NOMADS 16 // Q. Serenity says 'Nomadic Exists will Not Link to Areas marked NO_NOMADS
#define AFLAG_HQ 1 /* Area is an HQ */
#define AFLAG_ARENA 2
#define AFLAG_NOAREA 4
#define AFLAG_NO_RECALL 8
#define AFLAG_NOBOMB 16
#define AFLAG_ALWAYSBOMB 32
/*
* Descriptor (channel) structure.
*/
struct descriptor_data
{
DESCRIPTOR_DATA * next;
DESCRIPTOR_DATA * prev;
DESCRIPTOR_DATA * snoop_by;
CHAR_DATA * character;
CHAR_DATA * original;
char * host;
char * resolved;
sh_int descriptor;
sh_int connected;
bool fcommand;
char inbuf [4 * MAX_INPUT_LENGTH];
char incomm [MAX_INPUT_LENGTH];
char inlast [MAX_INPUT_LENGTH];
int repeat;
char * showstr_head;
char * showstr_point;
char * outbuf;
int outsize;
int outtop;
EDITING_DATA editing; /* OLC */
void * pEdit; /* OLC */
char ** pString; /* OLC */
int login;
int total_login;
sh_int lookup_status;
z_stream * out_compress; /* MCCP */
unsigned char * out_compress_buf; /* MCCP */
unsigned char compressing; /* MCCP */
bool mxp;
bool displayed;//By Serenity
int ifd;
pid_t ipid;
};
/*
* Attribute bonus structures.
*/
struct str_app_type
{
sh_int tohit;
sh_int todam;
sh_int carry;
sh_int wield;
};
struct int_app_type
{
sh_int learn;
};
struct wis_app_type
{
sh_int practice;
};
struct dex_app_type
{
sh_int defensive;
};
struct con_app_type
{
sh_int hitp;
sh_int shock;
};
/*
* TO types for act.
*/
#define TO_ROOM 0
#define TO_NOTVICT 1
#define TO_VICT 2
#define TO_CHAR 3
/*
* Help table types.
*/
struct help_data
{
HELP_DATA * next;
sh_int level;
char * keyword;
char * text;
bool delete;
};
/*
* Shop types.
*/
#define MAX_TRADE 5
struct shop_data
{
SHOP_DATA * next; /* Next shop in list */
sh_int keeper; /* Vnum of shop keeper mob */
sh_int buy_type [MAX_TRADE]; /* Item types shop will buy */
sh_int profit_buy; /* Cost multiplier for buying */
sh_int profit_sell; /* Cost multiplier for selling */
sh_int open_hour; /* First opening hour */
sh_int close_hour; /* First closing hour */
};
/*
* Data structure for notes.
*/
struct note_data
{
NOTE_DATA * next;
char * sender;
char * date;
char * to_list;
char * subject;
char * text;
time_t date_stamp;
time_t expire;
};
/*
* An affect.
*/
struct affect_data
{
AFFECT_DATA * next;
sh_int type;
sh_int duration;
sh_int location;
sh_int modifier;
int bitvector;
};
/* Structure for the map itself */
struct map_type
{
char tegn; /* Character to print at this map coord */
int vnum; /* Room this coord represents */
int depth; /* Recursive depth this coord was found at */
int info;
bool can_see;
};
/*
* A kill structure (indexed by level).
*/
struct kill_data
{
sh_int number;
sh_int killed;
};
/***************************************************************************
* *
* VALUES OF INTEREST TO AREA BUILDERS *
* (Start of section ... start here) *
* *
***************************************************************************/
/*
* Well known mob virtual numbers.
* Defined in #MOBILES.
*/
#define MOB_VNUM_EXECUTIONER 3011
#define MOB_VNUM_CITYGUARD 3060
#define MOB_VNUM_VAMPIRE 3404
#define MOB_VNUM_CANNIBAL 30069
#define MOB_VNUM_HEALER 3012
#define MOB_GAME_VNUM_ULT 3160
#define MOB_GAME_VNUM_SEVEN 3162
#define MOB_GAME_VNUM_HIGHDICE 3161
/*
* Immunities, for players. KaVir.
*/
#define IMM_SLASH 1 /* Resistance to slash, slice. */
#define IMM_STAB 2 /* Resistance to stab, pierce. */
#define IMM_SMASH 4 /* Resistance to blast, pound, crush. */
#define IMM_ANIMAL 8 /* Resistance to bite, claw. */
#define IMM_MISC 16 /* Resistance to grep, suck, whip. */
#define IMM_CHARM 32 /* Immune to charm spell. */
#define IMM_HEAT 64 /* Immune to fire/heat spells. */
#define IMM_COLD 128 /* Immune to frost/cold spells. */
#define IMM_LIGHTNING 256 /* Immune to lightning spells. */
#define IMM_ACID 512 /* Immune to acid spells. */
#define IMM_SUMMON 1024 /* Immune to being summoned. */
#define IMM_VOODOO 2048 /* Immune to voodoo magic. */
#define IMM_VAMPIRE 4096 /* Allow yourself to become a vampire. */
#define IMM_STAKE 8192 /* Immune to being staked (vamps only). */
#define IMM_SUNLIGHT 16384 /* Immune to sunlight (vamps only). */
#define IMM_SHIELDED 32768 /* For Obfuscate. Block scry, etc. */
#define IMM_HURL 65536 /* Cannot be hurled. */
#define IMM_BACKSTAB 131072 /* Cannot be backstabbed. */
#define IMM_KICK 262144 /* Cannot be kicked. */
#define IMM_DISARM 524288 /* Cannot be disarmed. */
#define IMM_STEAL 1048576 /* Cannot have stuff stolen. */
#define IMM_SLEEP 2097152 /* Immune to sleep spell. */
#define IMM_DRAIN 4194304 /* Immune to energy drain. */
#define IMM_DEMON 8388608 /* Allow yourself to become a demon. */
#define IMM_TRANSPORT 16777216 /* Objects can't be transported to you. */
#define IMM_TRAVEL 33554432 /*so demons can turn travel off*/
#define IMM_GOTO 67100864
#define IMM_WRAITH 134217728 /* Allow yourself to become a Wraith */
/*
* ACT bits for mobs.
* Used in #MOBILES.
*/
#define ACT_IS_NPC 1 /* Auto set for mobs */
#define ACT_SENTINEL 2 /* Stays in one room */
#define ACT_SCAVENGER 4 /* Picks up objects */
#define ACT_AGGRESSIVE 32 /* Attacks PC's */
#define ACT_STAY_AREA 64 /* Won't leave area */
#define ACT_WIMPY 128 /* Flees when hurt */
#define ACT_PET 256 /* Auto set for pets */
#define ACT_TRAIN 512 /* Can train PC's */
#define ACT_PRACTICE 1024 /* Can practice PC's */
#define ACT_MOUNT 2048 /* Can be mounted */
#define ACT_NOPARTS 4096 /* Dead = no body parts */
#define ACT_NOEXP 8192 /* No exp for killing */
#define ACT_NOAUTOKILL 16384
#define ACT_SKILLED 32768
#define ACT_GAMBLE 65536 /* Runs a gambling game */
#define ACT_SUPER_NPC 131072 /* IS Super NPC */
#define ACT_NO_KILL 262144
#define ACT_NOTRAVEL 524288
#define ACT_NOSUMMON 1048576
/*
* Thingers for Demon Warps
*/
#define WARP_CBODY 1
#define WARP_SBODY 2
#define WARP_STRONGARMS 4
#define WARP_STRONGLEGS 8
#define WARP_VENOMTONG 16
#define WARP_SPIKETAIL 32
#define WARP_BADBREATH 64
#define WARP_QUICKNESS 128
#define WARP_STAMINA 256
#define WARP_HUNT 512
#define WARP_DAMCAP 1024
#define WARP_TERROR 2048
#define WARP_REGEN 4096
#define WARP_STEED 8192
#define WARP_WEAPON 16384
#define WARP_INFIRMITY 32768
#define WARP_GBODY 65536
#define WARP_SCARED 131072
#define WARP_MAGMA 262144
#define WARP_WEAK 524288
#define WARP_SLOW 1048576
#define WARP_VULNER 2097152
#define WARP_SHARDS 4194304
#define WARP_WINGS 8388608
#define WARP_CLUMSY 16777216
#define WARP_STUPID 33554432
#define WARP_SPOON 67108864
#define WARP_FORK 134217728
#define WARP_KNIFE 268435456
#define WARP_SALADBOWL 536870912
/*
* Bits for 'affected_by'.
* Used in #MOBILES.
*/
#define AFF_BLIND 1
#define AFF_INVISIBLE 2
#define AFF_DETECT_EVIL 4
#define AFF_DETECT_INVIS 8
#define AFF_DETECT_MAGIC 16
#define AFF_DETECT_HIDDEN 32
#define AFF_SHADOWPLANE 64 /* Creatures in shadow plane - KaVir */
#define AFF_SANCTUARY 128
#define AFF_FAERIE_FIRE 256
#define AFF_INFRARED 512
#define AFF_CURSE 1024
#define AFF_FLAMING 2048 /* For burning creatures - KaVir */
#define AFF_POISON 4096
#define AFF_PROTECT 8192
#define AFF_ETHEREAL 16384 /* For ethereal creatures - KaVir */
#define AFF_SNEAK 32768
#define AFF_HIDE 65536
#define AFF_SLEEP 131072
#define AFF_CHARM 262144
#define AFF_FLYING 524288
#define AFF_PASS_DOOR 1048576
#define AFF_POLYMORPH 2097152 /* For polymorphed creatures - KaVir */
#define AFF_SHADOWSIGHT 4194304 /* Can see between planes - KaVir */
#define AFF_WEBBED 8388608 /* Cannot move - KaVir */
#define AFF_TOTALBLIND 16777216 /* Cannot get pregnant - KaVir */
#define AFF_DARKNESS 33554432 /* Drow Darkness - Rotain */
#define AFF_DROWFIRE 67108864
#define AFF_SAFE 134217728
#define AFF_ENTRAILS 268435456
#define AFF_INFIRMITY 536870912 /* Monk and Paladin Bless */
#define AFF_STEELSHIELD 1073741824
/*
* The Affs Strike Back
* 'flag2'
*/
#define AFF2_BLINK_1ST_RD (A)
#define AFF2_BLINK_2ND_RD (B)
#define AFF2_SPIRITGUARD (C)
#define VAMP_ASHES (D)
#define VAMP_CLONE (E)
#define VAMP_OBJMASK (F)
#define AFF2_ROT (G)
#define AFF2_CONTRACEPTION (H)
#define AFF2_TENDRILS (I)
#define EXTRA_AFK (J)
#define AFF2_AFK (K)
#define AFF2_REIMB (L)
#define AFF2_CHALLENGED (M)
#define AFF2_CHALLENGER (N)
#define AFF2_INARENA (O)
#define EXTRA_CODING (P)
#define AFF2_SHIFT (Q)
#define AFF2_FROZEN (R)
#define AFF_SHADOWREALM (S)
#define AFF2_BALOR (T)
#define AFF2_TICKINFO (U)
#define AFF2_SAFE (V)
#define BUSY (W)
#define NOCHAN (Y)
#define NOBEEP (Z)
#define LOOKINCORPSE (aa)
#define AFF2_STATUSFIGHT (bb)
#define AFF_SEVERED (cc)
#define AFF2_LEADERFIGHT (dd)
#define AFF2_RANKFIGHT (ee)
//#define AFF2_LEADERFIGHT (ff)
/*
* Bits for 'itemaffect'.
* Used in #MOBILES.
*/
#define ITEMA_SHOCKSHIELD 1
#define ITEMA_FIRESHIELD 2
#define ITEMA_ICESHIELD 4
#define ITEMA_ACIDSHIELD 8
#define ITEMA_DBPASS 16
#define ITEMA_CHAOSSHIELD 32
#define ITEMA_ARTIFACT 64
#define ITEMA_REGENERATE 128
#define ITEMA_SPEED 256
#define ITEMA_VORPAL 512
#define ITEMA_PEACE 1024
#define ITEMA_RIGHT_SILVER 2048
#define ITEMA_LEFT_SILVER 4096
#define ITEMA_REFLECT 8192
#define ITEMA_RESISTANCE 16384
#define ITEMA_VISION 32768
#define ITEMA_STALKER 65536
#define ITEMA_VANISH 131072
#define ITEMA_RAGER 262144
#define ITEMA_HIGHLANDER 524288
#define ITEMA_PALADIN 1048576
#define ITEMA_SUNSHIELD 2097152
#define ITEMA_SOLARSHIELD 4194304
#define ITEMA_RAREREGEN 8388608
// Found in mage.h now
#include "mage.h"
#define VT_SAVECURSOR "\e7" /* Save cursor and attrib */
#define VT_RESTORECURSOR "\e8" /* Restore cursor pos and attribs */
#define VT_SETWIN_CLEAR "\e[r" /* Clear scrollable window size */
#define VT_CLEAR_SCREEN "\e[2J" /* Clear screen */
#define VT_CLEAR_LINE "\e[2K" /* Clear this whole line */
#define VT_RESET_TERMINAL "\ec"
/* Colour scale macros - added 12th Aug 1995 by Calamar */
//#define NO_COLOUR "\e[0;37m" // Resets Colour
#define NO_COLOUR "\e[0m"
#define GREY "\e[1;30m"
#define D_WHITE "\e[0;37m"
#define WHITE "\e[1;37m"
#define D_RED "\e[0;31m"
#define L_RED "\e[1;31m"
#define D_GREEN "\e[0;32m"
#define L_GREEN "\e[1;32m"
#define D_BLUE "\e[0;34m"
#define L_BLUE "\e[1;34m"
#define BROWN "\e[0;33m"
#define YELLOW "\e[1;33m"
#define MAGENTA "\e[0;35m"
#define PINK "\e[1;35m"
#define D_CYAN "\e[0;36m"
#define L_CYAN "\e[1;36m"
#define NORMAL "\e[0;37m"
#define UNDERLINE "\e[4m"
#define INVERTED "\e[7m"
#define FLASHING "\e[5m"
// BG Colors
#define BG_RED "\e[1;41m"
#define BG_GREEN "\e[1;42m"
#define BG_BROWN "\e[1;43m"
#define BG_BLUE "\e[1;44m"
#define BG_PURPLE "\e[1;45m"
#define BG_CYAN "\e[1;46m"
#define BG_WHITE "\e[1;47m"
#define BG_CLEAR "\e[1;47m\e[0;32m"
#define ADD_COLOUR(_player,_str,_col) {char swh_temp[255]; \
if (!IS_NPC(_player) && IS_SET(_player->act, PLR_ANSI)) {swh_temp[0] = '\0'; \
strcpy(swh_temp, _col); strcat(swh_temp, _str); strcat(swh_temp, NORMAL); \
strcpy(_str, swh_temp);}}
#define SCALE_COLS 4
#define COL_SCALE(_swh_str,_swh_ch,_swh_curr,_swh_max) \
ADD_COLOUR(_swh_ch, _swh_str, \
(_swh_curr < 1) ? L_RED : \
(_swh_curr < _swh_max) ? \
scale[(SCALE_COLS * _swh_curr) / ((_swh_max > 0) \
? _swh_max : 1)] : L_CYAN)
extern char *scale[SCALE_COLS];
/*
* Bits for 'vampire'.
* Used for player vampires.
*/
#define VAM_FANGS 1
#define VAM_CLAWS 2
#define VAM_NIGHTSIGHT 4
#define VAM_FLYING 8 /* For flying creatures */
#define VAM_SONIC 16 /* For creatures with full detect */
#define VAM_CHANGED 32 /* Changed using a vampire power */
#define VAM_PROTEAN 64 /* Claws, nightsight, and change */
#define VAM_CELERITY 128 /* 66%/33% chance 1/2 extra attacks */
#define VAM_FORTITUDE 256 /* 5 hp less per hit taken */
#define VAM_POTENCE 512 /* Deal out 1.5 times normal damage */
#define VAM_OBFUSCATE 1024 /* Disguise and invis */
#define VAM_AUSPEX 2048 /* Truesight, etc */
#define VAM_OBTENEBRATION 4096 /* Shadowplane/sight and shadowbody */
#define VAM_SERPENTIS 8192 /* Eyes/serpent, heart/darkness, etc */
#define VAM_DISGUISED 16384 /* For the Obfuscate disguise ability */
#define VAM_MORTAL 32768 /* For Obfuscate mortal ability. */
#define VAM_DOMINATE 65536 /* Evileye, command */
#define VAM_EVILEYE 131072 /* Evileye, command */
#define VAM_PRESENCE 262144 /* Presence discipline */
#define VAM_VICISSITUDE 524288
/* New vamp defines*/
#define VAM_ANIM 0
#define VAM_AUSP 1
#define VAM_DAIM 2
#define VAM_DOMI 3
#define VAM_FORT 4
#define VAM_OBFU 5
#define VAM_OBTE 6
#define VAM_PRES 7
#define VAM_PROT 8
#define VAM_QUIE 9
#define VAM_SERP 10
#define VAM_THAU 11
#define VAM_VICI 12
#define VAM_CELE 13
#define VAM_CHIM 14
#define VAM_POTE 15
#define VAM_OBEA 16
#define VAM_MELP 17
#define VAM_THAN 18
#define VAM_NECR 19
#define DISC_MAX 19
/*end new vamp section*/
/*Define new vamp powers*/
/* Defines for Wraith Powers */
#define WRA_ARGO 0
#define WRA_EMBO 2
#define WRA_INHA 3
#define WRA_KEEN 4
#define WRA_MOLI 5
#define WRA_OUTR 6
#define WRA_PAND 7
#define WRA_PHAN 8
#define WRA_PUPP 9
#define WRA_USUR 10
#define WRA_CAST 11
/*
* Bits for Gargoyles (C) Macademus 2000
*/
#define GAR_SOL 0
#define GAR_FIDEL 1
#define GAR_POT 2
#define GAR_FOR 3
#define GAR_VIS 4
//More when i get them :)
/*
* Bits for 'polymorph'.
* Used for players.
*/
#define POLY_BAT 1
#define POLY_WOLF 2
#define POLY_MIST 4
#define POLY_SERPENT 8
#define POLY_RAVEN 16
#define POLY_FISH 32
#define POLY_FROG 64
#define POLY_ZULO 128
#define POLY_SPIDERFORM 256
#define POLY_DRAGON 512
#define POLY_PFORM 1024
/*
* Languages.
*/
#define LANG_COMMON 0
#define DIA_OLDE 1
#define DIA_BAD 2
#define LANG_DARK 4
/*
* Score.
*/
#define SCORE_TOTAL_XP 0
#define SCORE_HIGH_XP 1
#define SCORE_TOTAL_LEVEL 2
#define SCORE_HIGH_LEVEL 3
#define SCORE_QUEST 4
#define SCORE_NUM_QUEST 5
#define SCORE_TTOTAL_XP 6
/*
* Zombie Lord.
*/
#define ZOMBIE_NOTHING 0
#define ZOMBIE_TRACKING 1
#define ZOMBIE_ANIMATE 2
#define ZOMBIE_CAST 3
#define ZOMBIE_REST 4
/*
* Damcap values.
*/
#define DAM_CAP 0
#define DAM_CHANGE 1
/*
* Bits for Demonic Champions.
*
* new demon fields in player.h and old ones in old.h
*/
/*
* Mounts
*/
#define IS_ON_FOOT 0
#define IS_MOUNT 1
#define IS_RIDING 2
#define IS_CARRIED 4
#define IS_CARRYING 8
/*
* Sex.
* Used in #MOBILES.
*/
#define SEX_NEUTRAL 0
#define SEX_MALE 1
#define SEX_FEMALE 2
/*
* Well known object virtual numbers.
* Defined in #OBJECTS.
*/
#define OBJ_VNUM_MONEY_ONE 2
#define OBJ_VNUM_MONEY_SOME 3
#define OBJ_VNUM_ASHES 30042
#define OBJ_VNUM_CORPSE_NPC 10
#define OBJ_VNUM_CORPSE_PC 11
#define OBJ_VNUM_SEVERED_HEAD 12
#define OBJ_VNUM_TORN_HEART 13
#define OBJ_VNUM_SLICED_ARM 14
#define OBJ_VNUM_SLICED_LEG 15
#define OBJ_VNUM_FINAL_TURD 16
#define OBJ_VNUM_STAKE 18
#define OBJ_VNUM_MUSHROOM 20
#define OBJ_VNUM_LIGHT_BALL 21
#define OBJ_VNUM_SPRING 22
#define OBJ_VNUM_BLOOD_SPRING 23
#define OBJ_VNUM_SCHOOL_MACE 3700
#define OBJ_VNUM_SCHOOL_DAGGER 3701
#define OBJ_VNUM_SCHOOL_SWORD 3702
#define OBJ_VNUM_SCHOOL_VEST 3703
#define OBJ_VNUM_SCHOOL_SHIELD 3704
#define OBJ_VNUM_SCHOOL_BANNER 3716
#define OBJ_VNUM_KHORNE 30050
/* For KaVir's stuff */
#define OBJ_VNUM_SOULBLADE 30000
#define OBJ_VNUM_PORTAL 30001
#define OBJ_VNUM_EGG 30002
#define OBJ_VNUM_EMPTY_EGG 30003
#define OBJ_VNUM_SPILLED_ENTRAILS 30004
#define OBJ_VNUM_QUIVERING_BRAIN 30005
#define OBJ_VNUM_SQUIDGY_EYEBALL 30006
#define OBJ_VNUM_SPILT_BLOOD 30007
#define OBJ_VNUM_VOODOO_DOLL 30010
#define OBJ_VNUM_RIPPED_FACE 30012
#define OBJ_VNUM_TORN_WINDPIPE 30013
#define OBJ_VNUM_CRACKED_HEAD 30014
#define OBJ_VNUM_SLICED_EAR 30025
#define OBJ_VNUM_SLICED_NOSE 30026
#define OBJ_VNUM_KNOCKED_TOOTH 30027
#define OBJ_VNUM_TORN_TONGUE 30028
#define OBJ_VNUM_SEVERED_HAND 30029
#define OBJ_VNUM_SEVERED_FOOT 30030
#define OBJ_VNUM_SEVERED_THUMB 30031
#define OBJ_VNUM_SEVERED_INDEX 30032
#define OBJ_VNUM_SEVERED_MIDDLE 30033
#define OBJ_VNUM_SEVERED_RING 30034
#define OBJ_VNUM_SEVERED_LITTLE 30035
#define OBJ_VNUM_SEVERED_TOE 30036
#define OBJ_VNUM_PROTOPLASM 30037
#define OBJ_VNUM_QUESTCARD 30039
#define OBJ_VNUM_QUESTMACHINE 30040
#define OBJ_VNUM_GATE 30051
#define OBJ_VNUM_MOONGATE 30052
#define OBJ_VNUM_LEGS 30055
#define OBJ_VNUM_QUEST_MIN 30057
#define OBJ_VNUM_QUEST_MAX 30067
#define MOB_VNUM_GUARDIAN 30001
#define MOB_VNUM_MOUNT 30006
#define MOB_VNUM_FROG 30007
#define MOB_VNUM_RAVEN 30008
#define MOB_VNUM_CAT 30009
#define MOB_VNUM_DOG 30010
#define MOB_VNUM_EYE 30012
#define MOB_VNUM_STEED 30040
/*
* 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
#define ITEM_PORTAL 27
#define ITEM_EGG 28
#define ITEM_VOODOO 29
#define ITEM_STAKE 30
#define ITEM_MISSILE 31 /* Ammo vnum, cur, max, type */
#define ITEM_AMMO 32 /* ???, dam min, dam max, type */
#define ITEM_QUEST 33
#define ITEM_QUESTCARD 34
#define ITEM_QUESTMACHINE 35
#define ITEM_SYMBOL 36
#define ITEM_BOOK 37
#define ITEM_PAGE 38
#define ITEM_TOOL 39
#define ITEM_ETOKEN 40
#define ITEM_WALL 41
#define ITEM_WGATE 42
#define ITEM_WARD 43
#define ITEM_RESOURCE 44
#define ITEM_CREATURE 45
#define ITEM_PIECE 46
#define ITEM_WRAGATE 47
#define ITEM_STOKEN 48
#define ITEM_DRAGONGEM 49
#define ITEM_QPRIZE 50
#define ITEM_AQUEST 51
#define ITEM_NEWTOKEN 52
/*
* Weapon flags
* field = 'weapflags'
* For Flaming\Icing\Shitty weapons
*/
#define WEAPON_FLAMING 1
#define WEAPON_POISON 2
#define WEAPON_FROST 4
/*
* Extra flags.
* Used in #OBJECTS.
*/
#define ITEM_GLOW (A)
#define ITEM_HUM (B)
#define ITEM_THROWN (C)
#define ITEM_KEEP (D)
#define ITEM_VANISH (E)
#define ITEM_INVIS (F)
#define ITEM_MAGIC (G)
#define ITEM_NODROP (H)
#define ITEM_BLESS (I)
#define ITEM_ANTI_GOOD (J)
#define ITEM_ANTI_EVIL (K)
#define ITEM_ANTI_NEUTRAL (L)
#define ITEM_NOREMOVE (M)
#define ITEM_INVENTORY (N)
#define ITEM_LOYAL (O)
#define ITEM_SHADOWPLANE (P)
#define ITEM_ARM (Q)
#define ITEM_MENCHANT (R)
#define ITEM_VAMPCLONE (S)
#define ITEM_IMMONLY (T)
#define ITEM_APPLYT (U)
/*
* 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
#define ITEM_WEAR_FACE 32768
#define ITEM_SHEATHED 65536
#define ITEM_DUAL 131072
/*
* Special types.
* Used in #OBJECTS for special items - KaVir.
*/
#define SITEM_ACTIVATE 1
#define SITEM_TWIST 2
#define SITEM_PRESS 4
#define SITEM_PULL 8
#define SITEM_TARGET 16
#define SITEM_SPELL 32
#define SITEM_TRANSPORTER 64
#define SITEM_TELEPORTER 128
#define SITEM_DELAY1 256
#define SITEM_DELAY2 512
#define SITEM_OBJECT 1024
#define SITEM_MOBILE 2048
#define SITEM_ACTION 4096
#define SITEM_MORPH 8192
#define SITEM_SILVER 16384
#define SITEM_WOLFWEAPON 32768
#define SITEM_DROWWEAPON 65536
#define SITEM_CHAMPWEAPON 131072
#define SITEM_DEMONIC 262144
#define SITEM_HIGHLANDER 524288
#define SITEM_NINJA 1048576
#define SITEM_MAGE 2097152
#define SITEM_DROW 4194304
#define SITEM_MONK 8388608
#define SITEM_NEW_DEMONIC 16777216
#define SITEM_WOLF (Z)
#define SITEM_FAE (aa)
#define SITEM_COLOUR_ROOM (bb)
#define SITEM_DRAGON (cc)
#define SITEM_LIONSMANE (dd)
/* New Quest Items */
#define XITEM_DEFAULT 0
#define XITEM_AOP 1
#define XITEM_AOA 2
#define XITEM_ROTL 3
#define XITEM_ROA 4
#define XITEM_POR 5
/*
* Apply types (for quest affects).
* Used in #OBJECTS.
*/
#define QUEST_STR 1
#define QUEST_DEX 2
#define QUEST_INT 4
#define QUEST_WIS 8
#define QUEST_CON 16
#define QUEST_HITROLL 32
#define QUEST_DAMROLL 64
#define QUEST_HIT 128
#define QUEST_MANA 256
#define QUEST_MOVE 512
#define QUEST_AC 1024
#define QUEST_NAME 2048
#define QUEST_SHORT 4096
#define QUEST_LONG 8192
#define QUEST_FREENAME 16384
#define QUEST_ENCHANTED 32768
#define QUEST_SPELLPROOF 65536
#define QUEST_ARTIFACT 131072
#define QUEST_IMPROVED 262144
#define QUEST_MASTER_RUNE 524288
#define QUEST_RELIC 1048576
#define QUEST_ZOMBIE 2097152
#define QUEST_CLONED 4194304
#define QUEST_BLOODA 8388608
#define ITEM_EQUEST 16777216
#define QUEST_MAGEENCHANT (Z)
#define QUEST_MALLEABLE (aa)
#define QUEST_GLAMOUR (bb)
#define QUEST_NOGIFT (cc)
#define QUEST_NOGATE (dd)
#define QUEST_DAEMONSEED (ee)
#define QUEST2_INDEST (A)
#define QUEST2_COLOR (B)
#define QUEST2_OWNERSHIP (C)
/*
* Tool types.
*/
#define TOOL_PEN 1
#define TOOL_PLIERS 2
#define TOOL_SCALPEL 4
/*
* 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
#define APPLY_POLY 25
#define APPLY_BLOOD_MAX 26
#define APPLY_BLOOD_POT 27
#define APPLY_GENERATION 28
#define APPLY_POTENCE 29
#define APPLY_CELERITY 30
#define APPLY_FORTITUDE 31
#define APPLY_ANIMALISM 32
#define APPLY_AUSPEX 33
#define APPLY_CHIMERSTRY 34
#define APPLY_DAIMOINON 35
#define APPLY_DOMINATE 36
#define APPLY_MELPOMINEE 37
#define APPLY_NECROMANCY 38
#define APPLY_OBEAH 39
#define APPLY_OBFUSCATE 40
#define APPLY_OBTENEBRATION 41
#define APPLY_PRESENCE 42
#define APPLY_PROTEAN 43
#define APPLY_QUIETUS 44
#define APPLY_SERPENTIS 45
#define APPLY_THANATOSIS 46
#define APPLY_THAUMATURGY 47
#define APPLY_VICISSITUDE 48
#define APPLY_SET_ANIMALISM 49 /* SET_ are set rather than added */
#define APPLY_SET_AUSPEX 50
#define APPLY_SET_CELERITY 51
#define APPLY_SET_CHIMERSTRY 52
#define APPLY_SET_DAIMOINON 53
#define APPLY_SET_DOMINATE 54
#define APPLY_SET_FORTITUDE 55
#define APPLY_SET_MELPOMINEE 56
#define APPLY_SET_NECROMANCY 57
#define APPLY_SET_OBEAH 58
#define APPLY_SET_OBFUSCATE 59
#define APPLY_SET_OBTENEBRATION 60
#define APPLY_SET_POTENCE 61
#define APPLY_SET_PRESENCE 62
#define APPLY_SET_PROTEAN 63
#define APPLY_SET_QUIETUS 64
#define APPLY_SET_SERPENTIS 65
#define APPLY_SET_THANATOSIS 66
#define APPLY_SET_THAUMATURGY 67
#define APPLY_SET_VICISSITUDE 68
/*
* 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_JAIL 3
#define ROOM_VNUM_CHAT 1200
#define ROOM_VNUM_TEMPLE 3001
#define ROOM_VNUM_ALTAR 3054
#define ROOM_VNUM_LOUNGE 3055
#define ROOM_VNUM_DONATION 3208
#define ROOM_VNUM_LFOUND 3373
#define ROOM_VNUM_SCHOOL 3700
#define ROOM_VNUM_PLANAR_G 29500
#define ROOM_VNUM_PLANAR_B 29501
#define ROOM_VNUM_PLANAR_R 29502
#define ROOM_VNUM_CRYSTAL_G 47
#define ROOM_VNUM_CRYSTAL_B 39
#define ROOM_VNUM_CRYSTAL_R 40
#define ROOM_VNUM_HELL 30000
#define ROOM_VNUM_CRYPT 30001
#define ROOM_VNUM_DISCONNECTION 30002
#define ROOM_VNUM_IN_OBJECT 30008
#define ROOM_VNUM_TEMPEST 30009
/*
* Room flags.
* Used in #ROOMS.
*/
#define ROOM_DARK 1
//#define ROOM_BLADE_BARRIER 2
#define ROOM_NO_MOB 4
#define ROOM_INDOORS 8
#define ROOM_SEX 16
#define ROOM_SAFE 32
#define ROOM_NO_TRAIN 64
#define ROOM_FLAG_ILLUSIONARY_EXIT 128
//#define ROOM_FLAG_UNUSED 256
#define ROOM_NO_AREA 256 /* added to limit area bombs to areas */
#define ROOM_PRIVATE 512
//#define ROOM_FLAG_UNUSED 1024
#define ROOM_SOLITARY 2048
#define ROOM_PET_SHOP 4096
#define ROOM_NO_RECALL 8192
#define ROOM_NO_TELEPORT 16384
#define ROOM_TOTAL_DARKNESS 32768
#define ROOM_NODECAP 65536
#define ROOM_GOD 131072
#define ROOM_KINGDOM 262144
#define ROOM_BLADE_BARRIER 524288
#define ROOM_CCHAMBER 1048576
#define ROOM_COLOUR_ROOM 2097152
//#define ROOM_FLAG_UNUSED 8388608
//#define ROOM_FLAG_UNUSED 16777216
//#define ROOM_FLAG_UNUSED 33554432
//#define ROOM_FLAG_UNUSED 67108864
//#define ROOM_FLAG_UNUSED 134217728
//#define ROOM_FLAG_UNUSED 268435456
//#define ROOM_FLAG_UNUSED 536870912
//#define ROOM_FLAG_UNUSED 1073741824
//#define ROOM_FLAG_UNUSED 2147483648
#define ROOM2_SILENCE 1
#define ROOM2_FLAMING 2
/*
* Room text flags (KaVir).
* Used in #ROOMS.
*/
#define RT_LIGHTS 1 /* Toggles lights on/off */
#define RT_SAY 2 /* Use this if no others powers */
#define RT_ENTER 4
#define RT_CAST 8
#define RT_THROWOUT 16 /* Erm...can't remember ;) */
#define RT_OBJECT 32 /* Creates an object */
#define RT_MOBILE 64 /* Creates a mobile */
#define RT_LIGHT 128 /* Lights on ONLY */
#define RT_DARK 256 /* Lights off ONLY */
#define RT_OPEN_LIFT 512 /* Open lift */
#define RT_CLOSE_LIFT 1024 /* Close lift */
#define RT_MOVE_LIFT 2048 /* Move lift */
#define RT_SPELL 4096 /* Cast a spell */
#define RT_PORTAL 8192 /* Creates a one-way portal */
#define RT_TELEPORT 16384 /* Teleport player to room */
#define RT_ACTION 32768
#define RT_BLANK_1 65536
#define RT_BLANK_2 131072
#define RT_RETURN 1048576 /* Perform once */
#define RT_PERSONAL 2097152 /* Only shows message to char */
#define RT_TIMER 4194304 /* Sets object timer to 1 tick */
/*
* 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
#define MAX_DIR 6 /* OLC */
/*
* Exit flags.
* Used in #ROOMS.
*/
#define EX_ISDOOR 1
#define EX_CLOSED 2
#define EX_LOCKED 4
#define EX_PICKPROOF 8
#define EX_BASHPROOF 16 /* KaVir*/
#define EX_BASHED 32 /* KaVir */
#define EX_PASSPROOF 64 /* KaVir */
#define EX_NOMADIC 128 // Q. Serenity, for Nomadic (ie Moving ) Exits set this to make a migratory exit
#define EX_MIGRATORY 256 // Q. Serenity, for Nomadic (ie Moving ) Exits, Migratory exits do NOT save
/*
* 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_UNDERWATER 8
#define SECT_AIR 9
#define SECT_DESERT 10
#define SECT_MAX 11
/*
* Equipment 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 WEAR_THIRD 18
#define WEAR_FOURTH 19
#define WEAR_FACE 20
#define WEAR_SCABBARD_L 21
#define WEAR_SCABBARD_R 22
#define WEAR_CLOAK 23
#define WEAR_DUAL 24
#define MAX_WEAR 25
/*
* Locations for damage.
*/
#define LOC_HEAD 0
#define LOC_BODY 1
#define LOC_ARM_L 2
#define LOC_ARM_R 3
#define LOC_LEG_L 4
#define LOC_LEG_R 5
/*
* For Head
*/
#define LOST_EYE_L 1
#define LOST_EYE_R 2
#define LOST_EAR_L 4
#define LOST_EAR_R 8
#define LOST_NOSE 16
#define BROKEN_NOSE 32
#define BROKEN_JAW 64
#define BROKEN_SKULL 128
#define LOST_HEAD 256
#define LOST_TOOTH_1 512 /* These should be added..... */
#define LOST_TOOTH_2 1024 /* ...together to caculate... */
#define LOST_TOOTH_4 2048 /* ...the total number of.... */
#define LOST_TOOTH_8 4096 /* ...teeth lost. Total..... */
#define LOST_TOOTH_16 8192 /* ...possible is 31 teeth. */
#define LOST_TONGUE 16384
/*
* For Body
*/
#define BROKEN_RIBS_1 1 /* Remember there are a total */
#define BROKEN_RIBS_2 2 /* of 12 pairs of ribs in the */
#define BROKEN_RIBS_4 4 /* human body, so not all of */
#define BROKEN_RIBS_8 8 /* these bits should be set */
#define BROKEN_RIBS_16 16 /* at the same time. */
#define BROKEN_SPINE 32
#define BROKEN_NECK 64
#define CUT_THROAT 128
#define CUT_STOMACH 256
#define CUT_CHEST 512
/*
* For Arms
*/
#define BROKEN_ARM 1
#define LOST_ARM 2
#define LOST_HAND 4
#define LOST_FINGER_I 8 /* Index finger */
#define LOST_FINGER_M 16 /* Middle finger */
#define LOST_FINGER_R 32 /* Ring finger */
#define LOST_FINGER_L 64 /* Little finger */
#define LOST_THUMB 128
#define BROKEN_FINGER_I 256 /* Index finger */
#define BROKEN_FINGER_M 512 /* Middle finger */
#define BROKEN_FINGER_R 1024 /* Ring finger */
#define BROKEN_FINGER_L 2048 /* Little finger */
#define BROKEN_THUMB 4096
#define SLIT_WRIST 8192
/*
* For Legs
*/
#define BROKEN_LEG 1
#define LOST_LEG 2
#define LOST_FOOT 4
#define LOST_TOE_A 8
#define LOST_TOE_B 16
#define LOST_TOE_C 32
#define LOST_TOE_D 64 /* Smallest toe */
#define LOST_TOE_BIG 128
#define BROKEN_TOE_A 256
#define BROKEN_TOE_B 512
#define BROKEN_TOE_C 1024
#define BROKEN_TOE_D 2048 /* Smallest toe */
#define BROKEN_TOE_BIG 4096
/*
* For Bleeding
*/
#define BLEEDING_HEAD 1
#define BLEEDING_THROAT 2
#define BLEEDING_ARM_L 4
#define BLEEDING_ARM_R 8
#define BLEEDING_HAND_L 16
#define BLEEDING_HAND_R 32
#define BLEEDING_LEG_L 64
#define BLEEDING_LEG_R 128
#define BLEEDING_FOOT_L 256
#define BLEEDING_FOOT_R 512
#define BLEEDING_WRIST_L 1024
#define BLEEDING_WRIST_R 2048
#define BLEEDING_STOMACH 4096
#define BLEEDING_CHEST 8192
/*
* For Spec powers on players
*/
#define EYE_SPELL 1 /* Spell when they look at you */
#define EYE_SELFACTION 2 /* You do action when they look */
#define EYE_ACTION 4 /* Others do action when they look */
/***************************************************************************
* *
* 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
/*
* Stats - KaVir.
*/
#define STAT_STR 0
#define STAT_END 1
#define STAT_REF 2
#define STAT_FLE 2
/*
* Positions.
*/
#define POS_DEAD 0
#define POS_MORTAL 1
#define POS_INCAP 2
#define POS_STUNNED 3
#define POS_SLEEPING 4
#define POS_MEDITATING 5
#define POS_SITTING 6
#define POS_RESTING 7
#define POS_FIGHTING 8
#define POS_STANDING 9
/*
* ACT bits for players.
*/
#define PLR_IS_NPC 1 // x0000 0001 /* Don't EVER set. */
#define PLR_LEFTHAND 2 // x0000 0002
#define PLR_RIGHTHAND 4 // x0000 0004
#define PLR_AUTOEXIT 8 // x0000 0008
#define PLR_AUTOLOOT 16 // x0000 0010
#define PLR_AUTOSAC 32 // x0000 0020
#define PLR_BLANK 64 // x0000 0040
#define PLR_BRIEF 128 // x0000 0080
//Unique additions
#define PLR_AUTOBACKUP 256 // x0000 0100
#define PLR_COMBINE 512 // x0000 0200
#define PLR_PROMPT 1024 // x0000 0400
#define PLR_TELNET_GA 2048 // x0000 0800
#define PLR_HOLYLIGHT 4096 // x0000 1000
#define PLR_WIZINVIS 8192 // x0000 2000
#define PLR_ANSI 16384 // x0000 4000
#define PLR_COLOUR 16384 // x0000 4000
#define PLR_SILENCE 32768 // x0000 8000
#define PLR_NO_EMOTE 65536 // x0001 0000
#define PLR_INCOG 131072 // x0002 0000
#define PLR_NO_TELL 262144 // x0004 0000
#define PLR_LOG 524288 // x0008 0000
#define PLR_AMBI 1048576 // x0010 0000
#define PLR_FREEZE 2097152 // x0020 0000
#define PLR_GODLESS 16777216 // x0040 0000
#define PLR_WATCHER 33554432 // x0080 0000
#define PLR_DROWSIGHT 67108864 // x0100 0000
#define PLR_EMBRACING 134217728 // x0200 0000
#define PLR_EMBRACED 268435456 // x0400 0000
#define PLR_ACID 536870912 // x0800 0000
#define PLR_AUTOTICK 1073741824 // x1000 0000
#define PLR_AQUESTOR 2147483648 // x4000 0000
// x8000 0000
/* WIZnet flags */
#define WIZ_ON 1 /* On / Off switch */
#define WIZ_TICKS 2 /* Tick's */
#define WIZ_LOGINS 4 /* Login / Logoff */
#define WIZ_DEATHS 8 /* Plr death's */
#define WIZ_RESETS 16 /* Area reset's */
#define WIZ_SACCING 32 /* Item saccing ??? */
#define WIZ_SECURE 64 /* log -> screen */
#define WIZ_SWITCHES 128 /* Switch */
#define WIZ_SNOOPS 256 /* Snoops */
#define WIZ_RESTORE 512 /* Restores */
#define WIZ_LOAD 1024 /* Loading of mobs, obj's */
#define WIZ_NEWBIE 2048 /* Newbie's */
#define WIZ_SPAM 4096 /* Spamming ??? */
#define WIZ_DEBUG 8192 /* Nice way to get debug info */
#define WIZ_HELPS 16384
#define WIZ_TRANS 32768
#define WIZ_ADVER WIZ_TRANS*2
#define INVIS_EMAIL 1
#define INVIS_AIM 2
#define INVIS_MSN 4
#define INVIS_ICQ 8
#define INVIS_YAHOO 16
#define INVIS_PROFILE 32
/*NEWBITS FOR PLAYERS..(added by sage)10/17/98*/
#define NEWBIE_PACK 1
#define THIRD_HAND 2
#define FOURTH_HAND 4
#define NEW_DROWHATE 8
#define NEW_DARKNESS 16
#define NEW_TIDE 32
#define NEW_COIL 64
#define NEW_MONKFLAME 128
#define NEW_MONKCLOAK 256
#define NEW_MONKADAM 512
#define NEW_MONKSKIN 1024
#define NEW_MONKFAVOR 2048
#define NEW_POWER 4096
#define NEW_CLANNABLE 8192
#define NEW_NATURAL 16384
#define NEW_QUILLS (P)
#define NEW_FTALK (Q)
#define NEW_PFX (R)
#define NEW_OBEAH (S)
#define NEW_NOPAIN (T)
#define WANTED (U)
#define NEW_CALM (V)
/* Clan Wipe bit */
#define NEW_CLANWIPE (W)
#define NEW_CLANLEADER (X)
#define NEW_ZULO (Y)
#define WRA_INVIS (Z)
#define WRA_SKINRIDE (aa)
#define RSILENCE (bb)
#define NEW_NOTEWRITE (cc)
#define NEW_NOREPLY (dd)
#define NEW_SILENCE (ee)
#define NEW_AQUEST (ff)
/*
* Ftag Bits
*/
#define TAG_PLAYING (A)
#define TAG_FROZEN (B)
#define TAG_RED (C)
#define TAG_BLUE (D)
/*
* More Bits ( Macademus 25/3/00 )
*/
#define MORE_PRINCE (A)
#define MORE_FTALK (B)
#define MORE_FTALK2 (C)
// New Ninja Defines
#define MORE_STEELFISTS (D)
#define MORE_MESSAGE (E)
#define MORE_NODESC (F)
#define MORE_TAG (G)
#define MORE_NOTAG (H)
#define MORE_NOHINT (I)
#define MORE_TEST (J)
#define MORE_SHIELDS (K)
#define MORE_JAIL (L)
#define MORE_ROOMFLAGS (M)
//Garoyle Defines
#define MORE_DARKNESS (N)
#define MORE_FLESH (0)
#define MORE_NOKING (P)
#define MORE_QUESTOR (Q)
#define EXTRA_PSAY (R)
#define PLR_AUTOGOLD (S)
#define GOT_GOLCONDA (T)
#define CANCHAN (U)
#define PLR_COMB_EXP (V)
#define PLR_SEE_REGEN (W)
#define PLR_SEE_DAMAGE (X)
#define SHORT_COMBAT (Z)
#define MORE_AQUEST (aa)
#define MORE_LIONSMANE (bb)
#define MORE_CCHANNELS (cc)
/*
* World affect bits.
*/
#define WORLD_FOG 1
#define WORLD_RAIN 2
#define WORLD_ECLIPSE 4
#define WORLD_NICE 8 // No swearing while frenzied
#define WORLD_SNOW 16
/*
* EXTRA bits for players. (KaVir)
*/
/* 1 */
#define EXTRA_CAN_SEE 2
#define EXTRA_TRUSTED 4
#define EXTRA_NEWPASS 8
#define EXTRA_OSWITCH 16
#define EXTRA_SWITCH 32
#define EXTRA_FAKE_CON 64
#define TIED_UP 128
#define GAGGED 256
#define BLINDFOLDED 512
#define EXTRA_NO_ACTION 1024
#define EXTRA_DONE 2048
#define EXTRA_EXP 4096
#define EXTRA_PREGNANT 8192
#define EXTRA_LABOUR 16384
#define EXTRA_BORN 32768
#define EXTRA_PROMPT 65536
#define EXTRA_MARRIED 131072
#define EXTRA_DISTRO 262144
#define EXTRA_NOARTI 524288
#define EXTRA_CALL_ALL 1048576
#define EXTRA_ASH 2097152
#define EXTRA_SUMMONED 4194304
#define EXTRA_STANCE 8388608
#define EXTRA_ANTI_GODLESS 16777216
#define EXTRA_ZOMBIE 33554432
#define EXTRA_POTENCY 67108864
#define EXTRA_AWE 134217728
#define EXTRA_DRAGON 268435456
#define EXTRA_PLASMA 536870912
#define EXTRA_EARTHMELD 1073741824
#define EXTRA_ROT 2147483648
#define EXTRA_AXE 4294967296
/* Imm Job Bits */
#define CODING 1
#define PLAYERRELATIONS 2
#define ENFORCING 3
#define BULDING 4
/*Temp*/
void init_vt100(DESCRIPTOR_DATA *d, char *xbuf);
#define TEMP_VT100 1
/* Bits that are set but do not save pfile*/
#define GOT_MORTED 1
/* EXTRA2 bits */
#define EXTRA2_WYRM 1 //1
#define EXTRA2_FAEMIGHT 1<<1 //2
#define EXTRA2_FAETOUGH 1<<2 //4
#define EXTRA2_FAESPEED 1<<3 //8
#define EXTRA2_DREAMING 1<<4 //16
#define EXTRA2_NEUTRAL 1<<5 //32
#define EXTRA2_INFECTED 1<<6 //64
#define EXTRA2_VACCINATED 1<<7 //128
#define MINIFLAGS 1<<8 //256
#define NEW_REND 1<<9 //512
#define WHINER 1<<10 //1024
#define EXTRA2_COLOUR_ROOM 1<<11 //2048
#define DROW_FIGHTDANCE 1<<12 //4096
#define DROW_DARKTENDRILS 1<<13 //8182
#define AURA_NO_MAGIC 1<<14 //16384
#define PRACCEDALL 1<<15 //32768
#define NINJADONE 1<<16 //65536
#define MAP 1<<17 //131072
#define AUTOCONSUME 1<<18 //262144
#define AGREED 1<<19 //524288
#define WITHDRAW 1<<20 //1048576
#define PLR_MXP 1<<21 //2097152
#define PKREADY 1<<22 //4184304
#define PSYCHO 1<<23 //8388608
#define SOUND 1<<24 //16777216
#define NHELPER 1<<25 //33554432
#define DEAF_ROAR 1<<26
#define DEAF_DREAMT 1<<27
#define NO_BANNER 1<<28
#define DEMENTED 1<<29
/*
* AGE Bits.
*/
#define AGE_CHILDE 0
#define AGE_NEONATE 1
#define AGE_ANCILLA 2
#define AGE_ELDER 3
#define AGE_METHUSELAH 4
/*
* Stances for combat
*/
#define STANCE_NONE -1
#define STANCE_NORMAL 0
#define STANCE_VIPER 1
#define STANCE_CRANE 2
#define STANCE_CRAB 3
#define STANCE_MONGOOSE 4
#define STANCE_BULL 5
#define STANCE_MANTIS 6
#define STANCE_DRAGON 7
#define STANCE_TIGER 8
#define STANCE_MONKEY 9
#define STANCE_SWALLOW 10
/*
* 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_NEWBIE (A)
#define CHANNEL_CHAT (B)
#define CHANNEL_FLAME (C)
#define CHANNEL_IMMTALK (D)
#define CHANNEL_MUSIC (E)
#define CHANNEL_QUESTION (F)
#define CHANNEL_SHOUT (G)
#define CHANNEL_YELL (H)
#define CHANNEL_VAMPTALK (I)
#define CHANNEL_HOWL (J)
#define CHANNEL_LOG (K)
#define CHANNEL_PRAY (L)
#define CHANNEL_INFO (M)
#define CHANNEL_FTALK (N)
#define CHANNEL_TELL (O)
#define CHANNEL_BUILD (P)
#define CHANNEL_MAGETALK (Q)
#define CHANNEL_MONK (R)
#define CHANNEL_MIKTALK (S)
#define CHANNEL_PTALK (T)
#define CHANNEL_SIGN (U)
#define CHANNEL_HIGHTALK (V)
#define CHANNEL_PURR (X)
#define CHANNEL_CLANTALK (W)
#define CHANNEL_PLOG (X)
#define CHANNEL_BTALK (Y)
#define COMM_NOAUCTION (Z)
#define CHANNEL_KTALK (aa)
#define CHANNEL_WRAITH (bb)
#define CHANNEL_ALL (cc)
#define CHANNEL_FOUNDERTALK (dd)
#define CHANNEL_SPOUSETALK (ee)
struct clan_type
{
int members; /* Number of members */
char * clan_head; /* Name of clan head */
char * primogen; /* Name of primogen */
};
/*
* Prototype for a mob.
* This is the in-memory version of #MOBILES.
*/
struct mob_index_data
{
MOB_INDEX_DATA * next;
SPEC_FUN * spec_fun;
char * spec_name; /* OLC */
SHOP_DATA * pShop;
AREA_DATA * area; /* OLC */
CHAR_DATA * mount;
CHAR_DATA * wizard;
char * hunting;
char * player_name;
char * short_descr;
char * long_descr;
char * description;
char * lord;
char * clan;
char * morph;
char * createtime;
char * pload;
char * lasttime;
char * powertype;
char * poweraction;
char * prompt;
char * cprompt;
char * prefix;
sh_int spectype;
sh_int specpower;
int specxtype;
int loc_hp [7];
int vnum;
sh_int count;
sh_int killed;
sh_int sex;
sh_int mounted;
int home;
int home2;
int level;
int immune;
int polyaff;
int vampaff;
int itemaffect;
int form;
int body;
int act;
int extra;
int extra2;
int affected_by;
sh_int alignment;
/* All* below is unused */
sh_int hitroll;
sh_int ac;
sh_int hitnodice;
sh_int hitsizedice;
sh_int hitplus;
sh_int damnodice;
sh_int damsizedice;
sh_int damplus;
int gold;
};
struct clan_data
{
int kills[6];
int deaths[6];
};
struct form_type
{
char * desc;
char * name;
bool claws;
bool fangs;
bool tail;
bool wings;
int hitplus;
int damplus;
};
/*
* One character (PC or NPC).
*/
struct jope_type
{
char * const name;
DO_FUN *do_fun;
sh_int level;
};
struct event_data
{
int delay;
CHAR_DATA *to;
int action;
DO_FUN *do_fun;
char *args[5];
void *argv[5];
int argi[5];
EVENT_DATA *next;
bool valid;
};
extern EVENT_DATA *events;
struct char_data
{
CHAR_DATA * next;
CHAR_DATA * next_in_room;
CHAR_DATA * master;
CHAR_DATA * leader;
CHAR_DATA * fighting;
CHAR_DATA * reply;
CHAR_DATA * mount;
CHAR_DATA * wizard;
SPEC_FUN * spec_fun;
MOB_INDEX_DATA * pIndexData;
DESCRIPTOR_DATA * desc;
AFFECT_DATA * affected;
OBJ_DATA * carrying;
ROOM_INDEX_DATA * in_room;
ROOM_INDEX_DATA * was_in_room;
PC_DATA * pcdata;
char * hunting;
char * name;
char * pload;
char * short_descr;
char * long_descr;
char * long_descr_orig;
char * description;
char * profile;
char * lord;
char * clan;
char * kingdom;
CHAR_DATA * unveil;
char * objdesc;
char * morph;
char * createtime;
char * lasttime;
char * lasthost;
char * prevhost; // By Serenity stores previous lasthost
char * resolved;
char * poweraction;
char * powertype;
char * prompt;
char * cprompt;
char * prefix;
sh_int sex;
sh_int race;
sh_int class;
int clannum; // By Malstar (for the clancode)
int amount_damage_received;
int amount_damage_dealt;
sh_int amount_attacks_received;
sh_int amount_attacks_dealt;
int immune;
int polyaff;
int warp;
sh_int warpcount;
int fight_timer;
int dirgetimer;
int chat_timer;
int beast_timer;
int arena_timer;
CHAR_DATA * embraced;
CHAR_DATA * embracing;
int itemaffect;
int safe_timer;
int stimer;
int vamppass_a;
int form;
int body;
sh_int vampgen_a;
sh_int spectype;
sh_int specpower;
int specxtype;
sh_int loc_hp [7];
sh_int wpn [13];
sh_int spl [5];
sh_int cmbt [8];
sh_int stance [12];
sh_int beast;
sh_int mounted;
int home;
int home2;
sh_int level;
sh_int trust;
sh_int version;
int played;
time_t logon;
time_t save_time;
sh_int timer;
sh_int wait;
int cleregen;
int pkill;
int pdeath;
int mkill;
int mdeath;
int hit;
int max_hit;
int mana;
int max_mana;
int move;
int max_move;
int gold;
long long int exp;
int act;
int extra;
int extra2;
int newbits;
int special;
int affected_by;
int wbits;
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;
int wimpy;
int deaf;
int room;
sh_int paradox [3];
sh_int damcap [2];
int monkstuff;
int monkcrap;
int monkab [4];
sh_int chi [2];
CHAR_DATA * blinkykill;
int flag2;
sh_int spheres[9];
sh_int arcanoi[11];
int mflags;
sh_int quint[3];
sh_int imms[3];
CHAR_DATA * challenged;
CHAR_DATA * gladiator;
int awins;
int alosses;
sh_int monkblock;
sh_int focus[2];
int gifts[21];
int powerd[21];
int bgifts[12];
int garou1;
int tokens[12];
int garou2;
sh_int gnosis[2];
sh_int lstatus;
ROOM_INDEX_DATA *last_room;
int war;
char * empowered;
int more;
sh_int quickening[2];
sh_int hempower;
long tag_flags;
sh_int game_bits;
sh_int kith;
int last_mort;
/* New Quest Code Stuff */
CHAR_DATA * questgiver; /* Vassago */
int questpoints; /* Vassago */
sh_int nextquest; /* Vassago */
sh_int countdown; /* Vassago */
sh_int questobj; /* Vassago */
sh_int questmob; /* Vassago */
int questfail;
int questcomp;
sh_int mort_count;
sh_int disquiet_counter;
sh_int wgrasp;
sh_int dconfuse_counter;
sh_int materialize;
char * lastchat;
sh_int captimer;
/*Tiers (c) Matthew 2001 */
int tier;
int tpoints;
long long int tierxp;
int xhitroll;
int xdamroll;
int xac;
int xdamcap;
int xhit;
int xmana;
int xmove;
/* E N D */
int combined_exp; // by Serenity
int combined_cp; // by Serenity for class points
int qtimer;
bool displayed; // by Serenity
int registration_key;
int registration_logins;
int email_set;
int registerred;
sh_int confusion;
float mult;
float reduct;
};
/*
* Data which only PC's have.
*/
struct pc_data
{
PC_DATA * next;
CHAR_DATA * evilchat;
CHAR_DATA * familiar;
CHAR_DATA * partner;
CHAR_DATA * propose;
OBJ_DATA * chobj;
OBJ_DATA * memorised;
BOARD_DATA * board; /* The current board */
time_t last_note[MAX_BOARD]; /* last note for the boards */
NOTE_DATA * in_progress;
char * pwd;
char * bamfin;
char * bamfout;
char * smite;
char speedchar;
char * title;
char * tell_history [TELL_HISTORY_SIZE];
sh_int tell_history_pos;
int wizinvis;
int pagelen;
char * conception;
char * parents;
char * cparents;
char * marriage;
char * email;
char * soulpacted;
int cinvis;
char * aim;
char * msn;
int icq;
char * forget[MAX_FORGET];
sh_int curr_backup;
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;
int denydate;
int quest;
int kingdom;
int bounty;
int powers[20]; // Discipline Storage
int powers_mod[20];
int powers_set[20];
int powers_set_wear;
int shadow_powers[20]; // Discipline Backup
int stats[12];
int obeah;
int login_timer;
int pkill_timer;
int majesty;
int wiznet;
sh_int wolf;
sh_int rank;
sh_int demonic_a;
int language[2];
int stage[3];
sh_int wolfform[2];
long long int score[7];
sh_int runes[4];
sh_int disc_a[11];
int genes[10];
sh_int fake_skill;
sh_int fake_stance;
sh_int fake_hit;
sh_int fake_dam;
sh_int fake_hp;
sh_int fake_mana;
sh_int fake_move;
int fake_ac;
sh_int obj_vnum;
sh_int condition [3];
sh_int learned [MAX_SKILL];
sh_int stat_ability [4];
sh_int stat_amount [4];
sh_int stat_duration [4];
sh_int exhaustion;
sh_int followers;
sh_int tick_timer[MAX_TIMER];
int security; /* OLC */
char * ice_listen; /* ICE channels */
char * mdecap;
char * ienter;
char * iexit;
int kingrank; /*rank in kingdom*/
int inducted; /*Amount inducted into kingdom*/
int wyld; /* Wyld Timer */
int dragonaff; /*dragons*/
int dragonage; /*dragons*/
int hatch; /*dragons*/
int dragon_sleep; /*dragons*/
int dcolor;
char * breath[5]; /* dragons */
int online; /* Time Online */
int silenced;
int frozen;
int jailed;
int plr_wager; /* ARENA amount wagered */
char * decapped; /*Last Person they Decapped */
char * decappedby; /* Last Person who decapped them */
CHAR_DATA * pfile;
int absorb[6];
int vt100_size;
int tempflag;
int souls;
int get_exp;
int gpoints;
int voted;
int whotype;
int tempbits;
int schallenge;
int outcast;
long changeplace;
long quoteplace;
int playerid;
int questsrun;
int questtotal;
int onlinetime;
int timezone;
};
/*
* Absorbed things
*/
#define ABS_MOB_VNUM 0 /* Vnum of Flesh Bonded mob */
#define ABS_MOB_HP 1 /* Hp of Flesh Bonded mob */
#define ABS_MOB_MAX_HP 2 /* Vnum of Object 1 */
#define ABS_CORPSE_HP 3 /* Hp of Consumed corpse */
#define ABS_OBJ_1 4 /* Vnum of Object 2 */
#define ABS_OBJ_2 5 /* Vnum of Object 3 */
/*
* 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.
*/
struct obj_index_data
{
OBJ_INDEX_DATA * next;
EXTRA_DESCR_DATA * extra_descr;
AFFECT_DATA * affected;
AREA_DATA * area; /* OLC */
char * name;
char * short_descr;
char * description;
char * chpoweron;
char * chpoweroff;
char * chpoweruse;
char * victpoweron;
char * victpoweroff;
char * victpoweruse;
char * questmaker;
char * questowner;
int vnum;
int item_type;
int extra_flags;
int wear_flags;
sh_int count;
sh_int weight;
int spectype;
int specpower;
int specxtype;
sh_int condition;
sh_int toughness;
sh_int resistance;
int quest;
sh_int points;
int cost; /* Unused */
int value [4];
sh_int item_ver;
};
/*
* One object.
*/
struct obj_data
{
OBJ_DATA * next;
OBJ_DATA * next_content;
OBJ_DATA * contains;
OBJ_DATA * in_obj;
CHAR_DATA * carried_by;
CHAR_DATA * chobj;
EXTRA_DESCR_DATA * extra_descr;
AFFECT_DATA * affected;
OBJ_INDEX_DATA * pIndexData;
ROOM_INDEX_DATA * in_room;
char * name;
char * short_descr;
char * description;
char * chpoweron;
char * chpoweroff;
char * chpoweruse;
char * victpoweron;
char * victpoweroff;
char * victpoweruse;
char * questmaker;
char * questowner;
sh_int item_type;
int extra_flags;
int wear_flags;
int wear_loc;
sh_int weight;
int spectype;
int specpower;
int specxtype;
sh_int condition;
sh_int toughness;
sh_int resistance;
int quest;
sh_int points;
int cost;
sh_int level;
sh_int timer;
int value [4];
int weapflags;
int quest2;
sh_int item_ver;
};
/*
* Exit data.
*/
struct exit_data
{
ROOM_INDEX_DATA * to_room;
EXIT_DATA * next; /* OLC */
int vnum;
sh_int exit_info;
sh_int key;
char * keyword;
char * description;
int rs_flags; /* OLC */
};
/*
* Room text checking data.
*/
typedef struct roomtext_data
{
int type;
int power;
int mob;
char * input;
char * output;
char * choutput;
char * name;
struct roomtext_data *next;
} ROOMTEXT_DATA;
/*
* Reset commands:
* '*': comment
* 'M': read a mobile
* 'O': read an object
* 'P': put object in object
* 'G': give object to mobile
* 'E': equip object to mobile
* 'D': set state of door
* 'R': randomize room exits
* 'S': stop (end of list)
*/
/*
* Area-reset definition.
*/
struct reset_data
{
RESET_DATA * next;
char command;
int arg1;
int arg2;
int arg3;
};
/*
* Area definition.
*/
struct area_data
{
AREA_DATA * next;
RESET_DATA * reset_first;
RESET_DATA * reset_last;
char * name;
sh_int age;
sh_int x;
sh_int y;
sh_int start;
sh_int nplayer;
sh_int nimmortal;
char * filename; /* OLC */
char * builders; /* OLC */ /* Listing of */
int security; /* OLC */ /* Value 1-9 */
int lvnum; /* OLC */ /* Lower vnum */
int uvnum; /* OLC */ /* Upper vnum */
int vnum; /* OLC */ /* Area vnum */
int area_flags; /* OLC */
// Tijer
int aflags;
int owned;
char * creator;
};
/*
* Room type.
*/
struct room_index_data
{
ROOM_INDEX_DATA * next;
CHAR_DATA * people;
OBJ_DATA * contents;
OBJ_DATA * to_obj;
EXTRA_DESCR_DATA * extra_descr;
AREA_DATA * area;
EXIT_DATA * exit [6];
ROOMTEXT_DATA * roomtext;
char * track [6];
char * name;
char * description;
int vnum;
int room_flags;
int added_flags;
sh_int light;
sh_int blood;
sh_int passed;
sh_int track_dir [6];
sh_int sector_type;
sh_int wood;
sh_int build;
sh_int ground;
sh_int x;
sh_int y;
sh_int room;
};
/*
* Types of attacks.
* Must be non-overlapping with spell/skill types,
* but may be arbitrary beyond that.
*/
#define TYPE_UNDEFINED -1
#define TYPE_HIT 1000
/*
* Target types.
*/
#define TAR_IGNORE 0
#define TAR_CHAR_OFFENSIVE 1
#define TAR_CHAR_DEFENSIVE 2
#define TAR_CHAR_SELF 3
#define TAR_OBJ_INV 4
#define TARGET_CHAR 0
#define TARGET_OBJ 1
#define TARGET_ROOM 2
#define TARGET_NONE 3
#define PURPLE_MAGIC 0
#define RED_MAGIC 1
#define BLUE_MAGIC 2
#define GREEN_MAGIC 3
#define YELLOW_MAGIC 4
/*
* Skills include spells as a particular case.
*/
struct skill_type
{
char * name; /* Name of skill */
sh_int skill_level; /* Level needed by class */
SPELL_FUN * spell_fun; /* Spell pointer (for spells) */
sh_int target; /* Legal targets */
sh_int minimum_position; /* Position for caster / user */
sh_int * pgsn; /* Pointer to associated gsn */
sh_int slot; /* Slot for #OBJECT loading */
sh_int min_mana; /* Minimum mana used */
sh_int beats; /* Waiting time after use */
char * noun_damage; /* Damage message */
char * msg_off; /* Wear off message */
};
struct email_data
{
char * address;
EMAIL_DATA * next;
};
/*
* These are skill_lookup return values for common skills and spells.
*/
extern sh_int gsn_backstab;
extern sh_int gsn_hide;
extern sh_int gsn_peek;
extern sh_int gsn_pick_lock;
extern sh_int gsn_sneak;
extern sh_int gsn_steal;
extern sh_int gsn_inferno;
extern sh_int gsn_blinky;
extern sh_int gsn_fastdraw;
extern sh_int gsn_berserk;
extern sh_int gsn_punch;
extern sh_int gsn_elbow;
extern sh_int gsn_fangs;
extern sh_int gsn_rfangs;
extern sh_int gsn_spiket;
extern sh_int gsn_venomt;
extern sh_int gsn_magma;
extern sh_int gsn_shards;
extern sh_int gsn_headbutt;
extern sh_int gsn_quills;
extern sh_int gsn_buffet;
extern sh_int gsn_phenom;
extern sh_int gsn_tail;
extern sh_int gsn_shiroken;
extern sh_int gsn_joust;
extern sh_int gsn_sweep;
extern sh_int gsn_knee;
extern sh_int gsn_spinkick;
extern sh_int gsn_backfist;
extern sh_int gsn_jumpkick;
extern sh_int gsn_monksweep;
extern sh_int gsn_thrustkick;
extern sh_int gsn_elbow;
extern sh_int gsn_palmstrike;
extern sh_int gsn_shinkick;
extern sh_int gsn_lightningkick;
extern sh_int gsn_tornadokick;
extern sh_int gsn_spiderform;
extern sh_int gsn_garotte;
extern sh_int gsn_disarm;
extern sh_int gsn_hurl;
extern sh_int gsn_kick;
extern sh_int gsn_circle;
extern sh_int gsn_talon;
extern sh_int gsn_rescue;
extern sh_int gsn_track;
extern sh_int gsn_polymorph;
extern sh_int gsn_web;
extern sh_int gsn_drowfire;
extern sh_int gsn_godbless; /* Vic - Monks */
extern sh_int gsn_llothbless;
extern sh_int gsn_totalblind; /* Vic - Monks */
extern sh_int gsn_blindness;
extern sh_int gsn_charm_person;
extern sh_int gsn_curse;
extern sh_int gsn_invis;
extern sh_int gsn_mass_invis;
extern sh_int gsn_poison;
extern sh_int gsn_sleep;
extern sh_int gsn_paradox;
extern sh_int gsn_darkness;
extern sh_int gsn_dart_shiroken;
extern sh_int gsn_spit;
extern sh_int gsn_waspt;
extern sh_int gsn_entrails;
extern sh_int gsn_gbreath;
extern sh_int gsn_bodyspikes;
extern sh_int gsn_shred;
extern sh_int gsn_darktendrils;
extern sh_int gsn_tendrils;
extern sh_int gsn_bladespin;
/* Ensure coord is on the map */
#define BOUNDARY(x, y) (((x) < 0) || ((y) < 0) || ((x) > MAPX) || ((y) > MAPY))
/*
* Utility macros.
*/
#define PUNC_OTHER(c,v,d) hurt_person(c, v, d); // used in highlander.c -- Serenity
#define WCHAN(ch, chan) ( IS_SET(ch->pcdata->wiznet, chan) )
#define UMIN(a, b) ((a) < (b) ? (a) : (b))
#define UMAX(a, b) ((a) > (b) ? (a) : (b))
#define URANGE(a, b, c) ((b) < (a) ? (a) : ((b) > (c) ? (c) : (b)))
#define LOWER(c) ((c) >= 'A' && (c) <= 'Z' ? (c)+'a'-'A' : (c))
#define UPPER(c) ((c) >= 'a' && (c) <= 'z' ? (c)+'A'-'a' : (c))
#define IS_SET(flag, bit) ((flag) & (bit))
#define SET_BIT(var, bit) ((var) |= (bit))
#define REMOVE_BIT(var, bit) ((var) &= ~(bit))
#define TOGGLE_BIT(var, bit) ((var) ^= (bit)) /* OLC */
#define STR(dat, field) (( (dat)->field != NULL \
? (dat)->field \
: (dat)->pIndexData->field )) /* OLC */
#define IS_LEADER(ch) (!str_cmp((ch)->name, leader[0]->name) || !str_cmp((ch)->name, leader[1]->name) || !str_cmp((ch)->name, leader[2]->name) )
#define IS_FODDER(ch) (!str_cmp((ch)->name, leader[3]->name) || !str_cmp((ch)->name, leader[4]->name) || !str_cmp((ch)->name, leader[5]->name) )
#define IS_WEAP(obj,stat) (IS_SET((obj)->weapflags, (stat)))
#define KEY( literal, field, value ) \
if ( !str_cmp( word, literal ) ) \
{ \
field = value; \
fMatch = TRUE; \
break; \
}
#define SKEY( string, field ) \
if ( !str_cmp( word, string ) ) \
{ \
free_string( field ); \
field = fread_string( fp ); \
fMatch = TRUE; \
break; \
}
#define FILL_STRING( string, text ) \
if ( text != NULL ) \
{ \
smash_tilde( text ); \
free_string( string ); \
string = str_dup( text ); \
} \
else \
{ \
free_string( string ); \
string = str_dup("(NULL_BUGGED)" ); \
}
/*
* Character macros.
*/
#define IS_SUPER_NPC(ch) (IS_NPC(ch) && IS_SET((ch)->act,ACT_SUPER_NPC))
#define IS_NEWBIE(ch) (get_hours(ch) < 6 && !IS_NPC(ch) && !IS_SET(ch->war,WARRING)&& !IS_SET(ch->extra2, PKREADY))
#define IS_CREATOR(ch) ((!str_cmp((ch)->name, "Tijer")))
#define IS_TIJER(ch) ((!str_cmp((ch)->name, "Tijer")))
#define NAME(ch) ( IS_NPC(ch) ? (ch)->short_descr : (ch)->name )
#define IS_COMB(ch, sn) (IS_SET((ch)->monkcrap, (sn)))
#define IS_FS(ch, sn) (IS_SET((ch)->monkstuff, (sn)))
#define IS_NEWFLAG(ch, sn) (IS_SET((ch)->flag2, (sn)))
#define IS_NPC(ch) (IS_SET((ch)->act, ACT_IS_NPC))
#define IS_IMPLEMENTOR(ch) (get_trust(ch) >= LEVEL_IMPLEMENTOR)
#define IS_HIGHJUDGE(ch) (get_trust(ch) >= LEVEL_HIGHJUDGE)
#define IS_JUDGE(ch) (get_trust(ch) >= LEVEL_JUDGE)
#define IS_LBUILDER(ch) (get_trust(ch) == LEVEL_BUILDER)
#define IS_IMMORTAL(ch) (get_trust(ch) >= LEVEL_IMMORTAL)
#define IS_HERO(ch) (get_trust(ch) >= LEVEL_HERO)
#define CAN_PK(ch) (get_trust(ch) >= 3 && get_trust(ch) <= 6)
#define IS_AFFECTED(ch, sn) (IS_SET((ch)->affected_by, (sn)))
#define IS_SPEAKING(ch, sn) (IS_SET((ch)->pcdata->language[0], (sn)))
#define IS_QUESTOR(ch) (IS_SET((ch)->newbits, NEW_AQUEST))
#define CAN_SPEAK(ch, sn) (IS_SET((ch)->pcdata->language[1], (sn)))
#define CAN_DANCE(ch, sn) (IS_SET((ch)->pcdata->powers[1], (sn)))
#define IS_ITEMAFF(ch, sn) (IS_SET((ch)->itemaffect, (sn)))
#define IS_IMMUNE(ch, sn) (IS_SET((ch)->immune, (sn)))
#define IS_VAMPAFF(ch, sn) (IS_SET((ch)->pcdata->stats[UNI_AFF], (sn)))
#define IS_VAMPPASS(ch, sn) (IS_SET((ch)->pcdata->stats[UNI_CURRENT], (sn)))
#define IS_FORM(ch, sn) (IS_SET((ch)->body, (sn)))
#define IS_POLYAFF(ch, sn) (IS_SET((ch)->polyaff, (sn)))
#define IS_EXTRA(ch, sn) (IS_SET((ch)->extra, (sn)))
#define IS_CINVIS(ch, sn) (IS_SET((ch)->pcdata->cinvis, (sn)))
#define IS_EXTRA2(ch,bit) (IS_SET((ch)->extra2,(bit)))
#define IS_STANCE(ch, sn) (ch->stance[0] == sn)
#define IS_DEMPOWER(ch, sn) (IS_SET((ch)->pcdata->powers[DPOWER_FLAGS], (sn)))
#define IS_NDEMPOWER(ch, sn) (IS_SET((ch)->pcdata->powers[DPOWER_FLAGS2], (sn)))
#define IS_DEMAFF(ch, sn) (IS_SET((ch)->pcdata->powers[DPOWER_CURRENT], (sn)))
#define IS_MPOWER(ch, sn) (IS_SET((ch)->pcdata->powers[MPOWER_POWER], (sn)))
#define IS_PPOWER(ch, sn) (IS_SET((ch)->pcdata->powers[PPOWER_FLAGS], (sn))) /* Paladin - Loki */
#define IS_CLASS(ch, CLASS) (!WizConfig->classless && ((ch)->level > 2) && IS_SET((ch)->class, CLASS))
#define IS_KITH(ch,KITH) (IS_SET((ch)->kith,KITH))
#define IS_HEAD(ch, sn) (IS_SET((ch)->loc_hp[0], (sn)))
#define IS_BODY(ch, sn) (IS_SET((ch)->loc_hp[1], (sn)))
#define IS_ARM_L(ch, sn) (IS_SET((ch)->loc_hp[2], (sn)))
#define IS_ARM_R(ch, sn) (IS_SET((ch)->loc_hp[3], (sn)))
#define IS_LEG_L(ch, sn) (IS_SET((ch)->loc_hp[4], (sn)))
#define IS_LEG_R(ch, sn) (IS_SET((ch)->loc_hp[5], (sn)))
#define IS_BLEEDING(ch, sn) (IS_SET((ch)->loc_hp[6], (sn)))
#define IN_CLAN( ch ) (IS_NPC(ch)?0:ch->clan)
#define IS_PLAYING( d ) (d->connected==CON_PLAYING)
#define IS_GOOD(ch) (ch->alignment >= 350)
#define IS_EVIL(ch) (ch->alignment <= -350)
#define IS_NEUTRAL(ch) (!IS_GOOD(ch) && !IS_EVIL(ch))
#define IS_AWAKE(ch) (ch->position > POS_SLEEPING)
#define PC(ch,field) ((ch)->pcdata->field) /* OLC */
#define GET_PC(ch,field,nopc) ((ch->pcdata != NULL ? ch->pcdata->field \
: (nopc)) ) /* OLC */
#define GET_AGE(ch) (ch->pcdata->dragonage > \
((14-ch->pcdata->stats[UNI_GEN])*2)-1 ? \
((14-ch->pcdata->stats[UNI_GEN])*2)-1 : \
ch->pcdata->dragonage)
#define GET_AC(ch) ((ch)->armor \
+ ( IS_AWAKE(ch) \
? dex_app[get_curr_dex(ch)].defensive \
: 0 ))
#define GET_HITROLL(ch) ((ch)->hitroll+str_app[get_curr_str(ch)].tohit)
#define GET_DAMROLL(ch) ((ch)->damroll+str_app[get_curr_str(ch)].todam)
#define IS_OUTSIDE(ch) (!IS_SET( \
(ch)->in_room->room_flags, \
ROOM_INDOORS))
#define WAIT_STATE(ch, npulse) ((ch)->wait = UMAX((ch)->wait, (((ch->confusion > 0) ? (npulse * 2) : npulse))))
#define CH(descriptor) ((descriptor)->original ? \
(descriptor)->original : (descriptor)->character)
#define CREATE(result, type, number) \
do \
{ \
if (!((result) = (type *) calloc ((number), sizeof(type)))) \
{ \
perror("malloc failure"); \
fprintf(stderr, "Malloc failure @ %s:%d\n", __FILE__, __LINE__ ); \
abort(); \
} \
} while(0)
#define RECREATE(result,type,number) \
do \
{ \
if (!((result) = (type *) realloc ((result), sizeof(type) * (number))))\
{ \
perror("realloc failure"); \
fprintf(stderr, "Realloc failure @ %s:%d\n", __FILE__, __LINE__ ); \
abort(); \
} Showing the first 100 KB of 211.2 KB. Download the archive for the full file.