00001
00002 #ifndef _NPC_H_
00003 #define _NPC_H_
00004
00005 #include "map.h"
00006
00007 #define START_NPC_NUM 110000000
00008
00009 #define WARP_CLASS 45
00010 #define WARP_DEBUG_CLASS 722
00011 #define INVISIBLE_CLASS 32767
00012
00013 int npc_event_dequeue(struct map_session_data *sd);
00014 TIMER_FUNC(npc_event_timer);
00015 int npc_event(struct map_session_data *sd, const char *npcname, int);
00016 int npc_timer_event(const char *eventname);
00017 int npc_command(struct map_session_data *sd, char *npcname, char *command);
00018 int npc_touch_areanpc(struct map_session_data *, int, int, int);
00019 void npc_click(struct map_session_data *, int);
00020 void npc_scriptcont(struct map_session_data *, int);
00021 int npc_checknear(struct map_session_data *, struct npc_data *nd);
00022 void npc_buysellsel(struct map_session_data *, int, int);
00023 int npc_buylist(struct map_session_data *, int, unsigned short *);
00024 int npc_selllist(struct map_session_data *, int, unsigned short *);
00025 int npc_parse_mob(char *w1, char *w3, char *w4);
00026 int npc_parse_mapflag(char *w1, char *w3, char *w4, int lines);
00027 int npc_parse_warp(char *w1, char *w3, char *w4, int lines);
00028 int npc_globalmessage(const char *name, char *mes);
00029
00030 int npc_enable(const char *name, int flag);
00031 struct npc_data* npc_name2id(const char *name);
00032
00033 int npc_walktoxy(struct npc_data *nd, int x, int y, int easy);
00034 int npc_stop_walking(struct npc_data *nd, int type);
00035 int npc_changestate(struct npc_data *nd, int state, int type);
00036
00037 int npc_get_new_npc_id(void);
00038
00039 void npc_addsrcfile(char *);
00040 void npc_delsrcfile(char *);
00041 int do_final_npc(void);
00042 int do_init_npc(void);
00043 int npc_event_do_oninit(void);
00044 int npc_do_ontimer(int, struct map_session_data *, int);
00045
00046 int npc_event_doall(const char *name);
00047 int npc_event_do(const char *name);
00048
00049 int npc_timerevent_start(struct npc_data *nd, int rid);
00050 int npc_timerevent_stop(struct npc_data *nd);
00051 int npc_gettimerevent_tick(struct npc_data *nd);
00052 int npc_settimerevent_tick(struct npc_data *nd, int newtimer);
00053 int npc_delete(struct npc_data *nd);
00054
00055 extern char *current_file;
00056
00057 #endif // _NPC_H_
00058