00001 #ifndef __CPROTO__
00002
00003 int use_alchemy(object *op);
00004
00005
00006 void move_apply(object *trap, object *victim, object *originator, int flags);
00007 object *find_special_prayer_mark(object *op, int spell);
00008 void do_learn_spell(object *op, int spell, int special_prayer);
00009 void do_forget_spell(object *op, int spell);
00010 int manual_apply(object *op, object *tmp, int aflag);
00011 int player_apply(object *pl, object *op, int aflag, int quiet);
00012 void player_apply_below(object *pl);
00013 int apply_special(object *who, object *op, int aflags);
00014 int monster_apply_special(object *who, object *op, int aflags);
00015
00016
00017 int attack_ob(object *op, object *hitter);
00018 int hit_player(object *op, int dam, object *hitter, int type);
00019 int hit_map(object *op, int dir);
00020 int kill_object(object *op, int dam, object *hitter, int type);
00021 object *hit_with_arrow(object *op, object *victim);
00022 void confuse_living(object *op);
00023 void paralyze_living(object *op, int dam);
00024 int is_melee_range(object *hitter, object *enemy);
00025
00026
00027 void load_bans_file();
00028 void save_bans_file();
00029 int checkbanned(const char *name, char *ip);
00030 int add_ban(char *input);
00031 int remove_ban(char *input);
00032 void list_bans(object *op);
00033
00034
00035 char *cleanup_chat_string(char *ustring);
00036 int command_say(object *op, char *params);
00037 int command_dmsay(object *op, char *params);
00038 int command_shout(object *op, char *params);
00039 int command_tell(object *op, char *params);
00040 int command_t_tell(object *op, char *params);
00041 int command_nod(object *op, char *params);
00042 int command_dance(object *op, char *params);
00043 int command_kiss(object *op, char *params);
00044 int command_bounce(object *op, char *params);
00045 int command_smile(object *op, char *params);
00046 int command_cackle(object *op, char *params);
00047 int command_laugh(object *op, char *params);
00048 int command_giggle(object *op, char *params);
00049 int command_shake(object *op, char *params);
00050 int command_puke(object *op, char *params);
00051 int command_growl(object *op, char *params);
00052 int command_scream(object *op, char *params);
00053 int command_sigh(object *op, char *params);
00054 int command_sulk(object *op, char *params);
00055 int command_hug(object *op, char *params);
00056 int command_cry(object *op, char *params);
00057 int command_poke(object *op, char *params);
00058 int command_accuse(object *op, char *params);
00059 int command_grin(object *op, char *params);
00060 int command_bow(object *op, char *params);
00061 int command_clap(object *op, char *params);
00062 int command_blush(object *op, char *params);
00063 int command_burp(object *op, char *params);
00064 int command_chuckle(object *op, char *params);
00065 int command_cough(object *op, char *params);
00066 int command_flip(object *op, char *params);
00067 int command_frown(object *op, char *params);
00068 int command_gasp(object *op, char *params);
00069 int command_glare(object *op, char *params);
00070 int command_groan(object *op, char *params);
00071 int command_hiccup(object *op, char *params);
00072 int command_lick(object *op, char *params);
00073 int command_pout(object *op, char *params);
00074 int command_shiver(object *op, char *params);
00075 int command_shrug(object *op, char *params);
00076 int command_slap(object *op, char *params);
00077 int command_smirk(object *op, char *params);
00078 int command_snap(object *op, char *params);
00079 int command_sneeze(object *op, char *params);
00080 int command_snicker(object *op, char *params);
00081 int command_sniff(object *op, char *params);
00082 int command_snore(object *op, char *params);
00083 int command_spit(object *op, char *params);
00084 int command_strut(object *op, char *params);
00085 int command_thank(object *op, char *params);
00086 int command_twiddle(object *op, char *params);
00087 int command_wave(object *op, char *params);
00088 int command_whistle(object *op, char *params);
00089 int command_wink(object *op, char *params);
00090 int command_yawn(object *op, char *params);
00091 int command_beg(object *op, char *params);
00092 int command_bleed(object *op, char *params);
00093 int command_cringe(object *op, char *params);
00094 int command_think(object *op, char *params);
00095 int command_me(object *op, char *params);
00096
00097
00098 void map_info(object *op);
00099 int command_motd(object *op, char *params);
00100 int command_roll(object *op, char *params);
00101 void malloc_info(object *op);
00102 int command_who(object *op, char *params);
00103 int command_mapinfo(object *op, char *params);
00104 int command_time(object *op, char *params);
00105 int command_hiscore(object *op, char *params);
00106 int command_version(object *op, char *params);
00107 int command_praying(object *op, char *params);
00108 int onoff_value(char *line);
00109 void receive_player_name(object *op);
00110 void receive_player_password(object *op);
00111 int command_save(object *op, char *params);
00112 int command_afk(object *op, char *params);
00113 int command_gsay(object *op, char *params);
00114 int command_party(object *op, char *params);
00115 int command_whereami(object *op, char *params);
00116 int command_ms_privacy(object *op, char *params);
00117
00118
00119 int command_east(object *op, char *params);
00120 int command_north(object *op, char *params);
00121 int command_northeast(object *op, char *params);
00122 int command_northwest(object *op, char *params);
00123 int command_south(object *op, char *params);
00124 int command_southeast(object *op, char *params);
00125 int command_southwest(object *op, char *params);
00126 int command_west(object *op, char *params);
00127 int command_stay(object *op, char *params);
00128 int command_turn_right(object *op, char *params);
00129 int command_turn_left(object *op, char *params);
00130 int command_push_object(object *op, char *params);
00131
00132
00133 int command_run(object *op, char *params);
00134 int command_run_stop(object *op, char *params);
00135 void send_target_command(player *pl);
00136 int command_combat(object *op, char *params);
00137 int command_target(object *op, char *params);
00138 void command_new_char(char *params, int len, player *pl);
00139 void command_face_request(char *params, int len, player *pl);
00140 void command_fire(char *params, int len, player *pl);
00141 void send_mapstats_cmd(object *op, struct mapdef *map);
00142 void send_spelllist_cmd(object *op, const char *spellname, int mode);
00143 void send_skilllist_cmd(object *op, object *skillp, int mode);
00144 void send_ready_skill(object *op, const char *skillname);
00145 void send_golem_control(object *golem, int mode);
00146 void generate_ext_title(player *pl);
00147
00148
00149 object *find_best_object_match(object *pl, char *params);
00150 int command_uskill(object *pl, char *params);
00151 int command_rskill(object *pl, char *params);
00152 int command_apply(object *op, char *params);
00153 int sack_can_hold(object *pl, object *sack, object *op, int nrof);
00154 void pick_up(object *op, object *alt);
00155 void put_object_in_sack(object *op, object *sack, object *tmp, long nrof);
00156 void drop_object(object *op, object *tmp, long nrof);
00157 void drop(object *op, object *tmp);
00158 int command_dropall(object *op, char *params);
00159 int command_drop(object *op, char *params);
00160 object *find_marked_object(object *op);
00161 void examine_living(object *op, object *tmp);
00162 char *long_desc(object *tmp, object *caller);
00163 void examine(object *op, object *tmp);
00164 void inventory(object *op, object *inv);
00165
00166
00167 int command_cast_spell(object *op, char *params);
00168 int fire_cast_spell(object *op, char *params);
00169 int legal_range(object *op, int r);
00170
00171
00172 int command_setgod(object *op, char *params);
00173 int command_kick(object *ob, char *params);
00174 int command_shutdown_now(object *op, char *params);
00175 int command_goto(object *op, char *params);
00176 int command_freeze(object *op, char *params);
00177 int command_summon(object *op, char *params);
00178 int command_teleport(object *op, char *params);
00179 int command_create(object *op, char *params);
00180 int command_inventory(object *op, char *params);
00181 int command_dump(object *op, char *params);
00182 int command_patch(object *op, char *params);
00183 int command_remove(object *op, char *params);
00184 int command_addexp(object *op, char *params);
00185 int command_speed(object *op, char *params);
00186 int command_stats(object *op, char *params);
00187 int command_resetmap(object *op, char *params);
00188 void remove_active_DM(object *op);
00189 int command_nowiz(object *op, char *params);
00190 int command_dm(object *op, char *params);
00191 int command_learn_spell(object *op, char *params);
00192 int command_learn_special_prayer(object *op, char *params);
00193 int command_forget_spell(object *op, char *params);
00194 int command_listplugins(object *op, char *params);
00195 int command_loadplugin(object *op, char *params);
00196 int command_unloadplugin(object *op, char *params);
00197 void shutdown_agent(int timer, char *reason);
00198 int command_motd_set(object *op, char *params);
00199 int command_ban(object *op, char *params);
00200 int command_debug(object *op, char *params);
00201 int command_dumpbelowfull(object *op, char *params);
00202 int command_dumpbelow(object *op, char *params);
00203 int command_wizpass(object *op, char *params);
00204 int command_dumpallarchetypes(object *op, char *params);
00205 int command_dm_stealth(object *op, char *params);
00206 int command_dm_light(object *op, char *params);
00207 int command_dm_password(object *op, char *params);
00208 int command_dumpactivelist(object *op, char *params);
00209 int command_shutdown(object *op, char *params);
00210 int command_setmaplight(object *op, char *params);
00211 int command_dumpmap(object *op, char *params);
00212 int command_dumpallmaps(object *op, char *params);
00213 int command_malloc(object *op, char *params);
00214 int command_maps(object *op, char *params);
00215 int command_strings(object *op, char *params);
00216 int command_ssdumptable(object *op, char *params);
00217 int command_follow(object *op, char *params);
00218 int command_insert_into(object *op, char *params);
00219 int command_arrest(object *op, char *params);
00220 int command_cmd_permission(object *op, char *params);
00221
00222
00223 void init_commands();
00224 CommArray_s *find_command_element(char *cmd, CommArray_s *commarray, int commsize);
00225 int execute_newserver_command(object *pl, char *command);
00226 emotes_array *find_emote(int emotion, emotes_array *emotes, int emotessize);
00227
00228
00229 void become_daemon(char *filename);
00230
00231
00232 void hiscore_init();
00233 void hiscore_check(object *op, int quiet);
00234 void hiscore_display(object *op, int max, const char *match);
00235
00236
00237 object *find_god(const char *name);
00238 void pray_at_altar(object *pl, object *altar);
00239 void become_follower(object *op, object *new_god);
00240 const char *determine_god(object *op);
00241 archetype *determine_holy_arch(object *god, const char *type);
00242
00243
00244 void free_strings();
00245 void init_library();
00246 void init_globals();
00247 void write_todclock();
00248 void init(int argc, char **argv);
00249 void compile_info();
00250 void free_racelist();
00251
00252
00253 void emergency_save(int flag);
00254 int check_name(player *pl, char *name);
00255 int save_player(object *op, int flag);
00256 void check_login(object *op);
00257
00258
00259 void fatal(int err);
00260 void version(object *op);
00261 char *crypt_string(char *str, char *salt);
00262 int check_password(char *typed, char *crypted);
00263 void enter_player_savebed(object *op);
00264 void leave_map(object *op);
00265 void set_map_timeout(mapstruct *oldmap);
00266 char *clean_path(const char *file);
00267 void enter_exit(object *op, object *exit_ob);
00268 void process_events(mapstruct *map);
00269 void clean_tmp_files();
00270 void cleanup();
00271 int swap_apartments(char *mapold, char *mapnew, int x, int y, object *op);
00272 int main(int argc, char **argv);
00273
00274
00275 int move_ob(object *op, int dir, object *originator);
00276 int transfer_ob(object *op, int x, int y, int randomly, object *originator, object *trap);
00277 int teleport(object *teleporter, uint8 tele_type, object *user);
00278 void recursive_roll(object *op, int dir, object *pusher);
00279 int try_fit(object *op, int x, int y);
00280 int roll_ob(object *op, int dir, object *pusher);
00281 int push_roll_object(object *op, int dir);
00282 int missile_reflection_adjust(object *op, int flag);
00283
00284
00285 void add_party_member(partylist_struct *party, object *op);
00286 void remove_party_member(partylist_struct *party, object *op);
00287 partylist_struct *make_party(char *name);
00288 void form_party(object *op, char *name);
00289 partylist_struct *find_party(char *name);
00290 void send_party_message(partylist_struct *party, char *msg, int flag, object *op);
00291 void remove_party(partylist_struct *party);
00292 void PartyCmd(char *buf, int len, player *pl);
00293
00294
00295 void player_shop_open(char *data, player *pl);
00296 void player_shop_close(player *pl);
00297 void player_shop_load(char *data, player *pl);
00298 void player_shop_examine(char *data, player *pl);
00299 void player_shop_buy(char *data, player *pl);
00300
00301
00302 object *get_event_object(object *op, int event_nr);
00303 CommArray_s *find_plugin_command(const char *cmd);
00304 void display_plugins_list(object *op);
00305 void init_plugins();
00306 void init_plugin(const char *pluginfile);
00307 void remove_plugin(const char *id);
00308 void remove_plugins();
00309 void trigger_global_event(int event_type, void *parm1, void *parm2);
00310 int trigger_event(int event_type, object *const activator, object *const me, object *const other, const char *msg, int parm1, int parm2, int parm3, int flags);
00311
00312
00313 void spring_trap(object *trap, object *victim);
00314 int trap_see(object *op, object *trap, int level);
00315 int trap_show(object *trap, object *where);
00316 int trap_disarm(object *disarmer, object *trap, int risk);
00317 void trap_adjust(object *trap, int difficulty);
00318
00319
00320 sint64 query_cost(object *tmp, object *who, int flag);
00321 char *cost_string_from_value(sint64 cost);
00322 char *query_cost_string(object *tmp, object *who, int flag);
00323 sint64 query_money(object *op);
00324 int pay_for_amount(sint64 to_pay, object *pl);
00325 int pay_for_item(object *op, object *pl);
00326 int get_payment(object *pl, object *op);
00327 void sell_item(object *op, object *pl, sint64 value);
00328 int get_money_from_string(char *text, struct _money_block *money);
00329 int query_money_type(object *op, int value);
00330 sint64 remove_money_type(object *who, object *op, sint64 value, sint64 amount);
00331 void insert_money_in_player(object *pl, object *money, uint32 nrof);
00332 int bank_deposit(object *op, object *bank, char *text);
00333 int bank_withdraw(object *op, object *bank, char *text);
00334 sint64 insert_coins(object *pl, sint64 value);
00335
00336
00337 int find_traps(object *pl, int level);
00338 int remove_trap(object *op);
00339 object *find_throw_tag(object *op, tag_t tag);
00340 void do_throw(object *op, object *toss_item, int dir);
00341
00342
00343 int find_skill_exp_level(object *pl, int item_skill);
00344 char *find_skill_exp_skillname(int item_skill);
00345 int do_skill(object *op, int dir);
00346 int calc_skill_exp(object *who, object *op, int level);
00347 void init_new_exp_system();
00348 void free_exp_objects();
00349 void dump_skills();
00350 int check_skill_known(object *op, int skillnr);
00351 int lookup_skill_by_name(char *string);
00352 int check_skill_to_fire(object *who);
00353 int check_skill_to_apply(object *who, object *item);
00354 int init_player_exp(object *pl);
00355 void unlink_skill(object *skillop);
00356 void link_player_skills(object *pl);
00357 int link_player_skill(object *pl, object *skillop);
00358 int learn_skill(object *pl, object *scroll, char *name, int skillnr, int scroll_flag);
00359 int use_skill(object *op, char *string);
00360 int change_skill(object *who, int sk_index);
00361 int skill_attack(object *tmp, object *pl, int dir, char *string);
00362 int SK_level(object *op);
00363 object *SK_skill(object *op);
00364 float get_skill_time(object *op, int skillnr);
00365 int check_skill_action_time(object *op, object *skill);
00366 int get_skill_stat1(object *op);
00367 int get_skill_stat2(object *op);
00368 int get_skill_stat3(object *op);
00369
00370
00371 void prayer_failure(object *op, int failure, int power);
00372 void cast_magic_storm(object *op, object *tmp, int lvl);
00373 int recharge(object *op);
00374 int cast_create_food(object *op, object *caster, int dir, char *stringarg);
00375 int probe(object *op);
00376 int cast_wor(object *op, object *caster);
00377 int cast_create_town_portal(object *op);
00378 int cast_destruction(object *op, object *caster, int dam, int attacktype);
00379 int cast_heal(object *op, int level, object *target, int spell_type);
00380 int cast_change_attr(object *op, object *caster, object *target, int spell_type);
00381 int create_bomb(object *op, object *caster, int dir, int spell_type);
00382 void animate_bomb(object *op);
00383 int remove_depletion(object *op, object *target);
00384 int remove_curse(object *op, object *target, int type, SpellTypeFrom src);
00385 int cast_identify(object *op, int level, object *single_ob, int mode);
00386 int cast_detection(object *op, object *target, int type);
00387 int cast_consecrate(object *op);
00388 int finger_of_death(object *op, object *target);
00389 int cast_cause_disease(object *op, object *caster, int dir, archetype *disease_arch, int type);
00390 void move_aura(object *aura);
00391
00392
00393 void init_spells();
00394 void dump_spells();
00395 int insert_spell_effect(char *archname, mapstruct *m, int x, int y);
00396 spell *find_spell(int spelltype);
00397 int check_spell_known(object *op, int spell_type);
00398 int cast_spell(object *op, object *caster, int dir, int type, int ability, SpellTypeFrom item, char *stringarg);
00399 int cast_create_obj(object *op, object *new_op, int dir);
00400 int fire_bolt(object *op, object *caster, int dir, int type);
00401 int fire_arch_from_position(object *op, object *caster, sint16 x, sint16 y, int dir, archetype *at, int type);
00402 int cast_cone(object *op, object *caster, int dir, int strength, int spell_type, archetype *spell_arch);
00403 void cone_drop(object *op);
00404 void move_cone(object *op);
00405 void fire_a_ball(object *op, int dir, int strength);
00406 void explosion(object *op);
00407 void forklightning(object *op, object *tmp);
00408 int reflwall(mapstruct *m, int x, int y, object *sp_op);
00409 void move_bolt(object *op);
00410 void move_golem(object *op);
00411 void control_golem(object *op, int dir);
00412 void move_missile(object *op);
00413 void explode_object(object *op);
00414 void check_fired_arch(object *op);
00415 void move_fired_arch(object *op);
00416 int find_target_for_spell(object *op, object **target, uint32 flags);
00417 void move_ball_lightning(object *op);
00418 int spell_find_dir(mapstruct *m, int x, int y, object *exclude);
00419 int SP_level_dam_adjust(object *caster, int spell_type, int base_dam);
00420 int SP_level_strength_adjust(object *caster, int spell_type);
00421 int SP_level_spellpoint_cost(object *caster, int spell_type, int caster_level);
00422 void move_swarm_spell(object *op);
00423 void fire_swarm(object *op, object *caster, int dir, archetype *swarm_type, int spell_type, int n, int magic);
00424 int look_up_spell_by_name(object *op, const char *spname);
00425 void put_a_monster(object *op, const char *monstername);
00426 int summon_hostile_monsters(object *op, int n, const char *monstername);
00427
00428
00429 void read_map_log();
00430 void swap_map(mapstruct *map, int force_flag);
00431 void check_active_maps();
00432 void flush_old_maps();
00433
00434
00435 object *stop_item(object *op);
00436 void fix_stopped_item(object *op, mapstruct *map, object *originator);
00437 void move_firewall(object *op);
00438 void process_object(object *op);
00439
00440
00441 void cftimer_process_timers();
00442 int cftimer_create(int id, long delay, object *ob, int mode);
00443 int cftimer_destroy(int id);
00444 int cftimer_find_free_id();
00445 void cftimer_init();
00446
00447
00448 void request_new_path(object *waypoint);
00449 object *get_next_requested_path();
00450 shstr *encode_path(path_node *path);
00451 int get_path_next(shstr *buf, sint16 *off, shstr **mappath, mapstruct **map, int *x, int *y);
00452 path_node *compress_path(path_node *path);
00453 path_node *find_path(object *op, mapstruct *map1, int x1, int y1, mapstruct *map2, int x2, int y2);
00454
00455
00456 void init_world_darkness();
00457 void tick_the_clock();
00458 #endif