]>
jfr.im git - irc/gameservirc.git/blob - gameserv/extern.h
6 #define LEVELS 12 // Levels in the game
7 #define REALLEVELS 6 // Levels to load from monsters.dat
8 #define MONSTERS 12 // Monsters per level
15 #if TIME_WITH_SYS_TIME
16 # include <sys/time.h>
20 # include <sys/time.h>
27 // The timestamp from load time to be compared against the current midnight time.
29 E
void save_timestamp();
30 E
void load_timestamp();
31 E
long int midnight(long int offset
= 8);
37 // Random configuration stuff
38 E
void load_config_file(char *config
= "gameserv.conf");
39 E
void unload_config_file();
42 E
char *c_ForestTopic
;
60 E List
<aClient
> clients
;
61 E List
<aClient
> players
;
63 /** List search functions **/
64 E aClient
*find(char *nick
);
65 E aClient
*find(const char *nick
);
66 E aClient
*findbynick(char *nick
);
67 E aClient
*findbynick(const char *nick
);
68 E aClient
*findplayer(const char *name
);
70 /** Sock writing functions **/
71 E
void notice(const char *source
, const char *dest
, const char *fmt
, ...);
72 E
void raw(const char *fmt
, ...);
75 E
void gameserv(char *source
, char *buf
);
76 E Monster
*monsters
[LEVELS
][MONSTERS
];
79 E
void forest(char *source
, char *buf
);
83 E
bool is_playing(char *u
);
84 E
bool is_playing(aClient
*user
);
86 E
bool is_fighting(char *u
);
87 E
bool is_fighting(aClient
*user
);
89 E
bool player_fight(char *u
);
90 E
bool player_fight(aClient
*user
);
92 E
bool master_fight(char *u
);
93 E
bool master_fight(aClient
*user
);
95 E
bool is_alive(char *u
);
96 E
bool is_alive(aClient
*user
);
99 E
char *strtok(char *str
, const char *delim
);
102 E
char *spaces(int len
, char *seperator
);
103 E
void display_monster(char *u
);
104 E
void display_players(char *u
);
105 E
int stricmp(const char *s1
, const char *s2
);
106 E
int strnicmp(const char *s1
, const char *s2
, size_t len
);
107 E
long int chartoint(char ch
);
108 E
int isstringnum(char *num
);
109 E
long int pow (int x
, int y
);
110 E
long int stringtoint(char *number
);
111 E
void init_masters();
112 E
void init_monsters();
113 E
bool load_monsters();
114 E
void delete_monsters();
115 E
void delete_masters();
116 E Monster
*getNewMonster(Monster
*m
);
117 E
void deleteMonster(Monster
*m
);
118 E
void refresh(Player
*p
);
120 E
void reset(aClient
*ni
);
122 E
void do_attack(char *u
);
123 E
void do_bank(char *u
);
124 E
void do_fight(char *u
);
125 E
void do_forest(char *u
);
126 E
void do_heal(char *u
);
127 E
void do_identify(char *u
);
128 E
void do_invenory(char *u
);
129 E
void do_list(char *u
);
130 E
void do_play(char *u
);
131 E
void do_quitg(char *u
);
132 E
void do_refresh(char *u
);
133 E
void do_register(char *u
);
134 E
void do_reset(char *u
);
135 E
void do_run(char *u
);
136 E
void do_stats(char *u
);
137 E
void do_store(char *u
);
138 E
void do_tavern(char *u
);
139 E
void do_use(char *u
);
140 E
void see_mystic(char *u
);
142 E
void showstats(const char *u
, const char *nick
);
143 E
void showinventory(aClient
*from
, aClient
*to
= NULL
);
144 /* Database saving stuff */
146 E
int save_gs_dbase();
147 E
int load_gs_dbase();