bot.h
来自「This programm is proxy server for ragnar」· C头文件 代码 · 共 64 行
H
64 行
#ifndef _BOT__H
#define _BOT__H
#pragma once
#pragma warning(disable:4786) // anti-STL
#include <map>
#include <list>
#include "../win_and_sock.h"
#include "../data.h"
#define EVENT_LISTEN 0
#define EVENT_ONCE 1
// event IDs
#define EID_WALKDONE 1
typedef int (*EventFuncT)(ParsePoint * pp);
class stl_class_event
{
public:
DWORD id;
BYTE once;
EventFuncT ev_func;
// constructor
stl_class_event(DWORD tid=0, EventFuncT tfunc=NULL, BYTE tonce=0)
{
id = tid;
once = tonce;
ev_func = tfunc;
}
};
typedef std::list<stl_class_event> TEventFuncsList;
typedef std::map <WORD, TEventFuncsList > TEventMap;
//=====================
int bot_init();
void bot_finish();
void bot_parse_command(ParsePoint * pp, char * cmd);
int bot_on_STT_CharSelection(ParsePoint * pp);
int bot_on_CTT_GlobalMessage(ParsePoint * pp);
int register_event_listener(WORD id, EventFuncT ev_func);
int register_dispatcher(WORD id, EventFuncT disp_func);
int rise_event(WORD id, ParsePoint * pp);
int remove_event(DWORD id, EventFuncT ev_func);
//********************************
int bot_loot_here(ParsePoint * pp);
int bot_loot_here_on_walkdone(ParsePoint * pp);
DWORD bot_loot_here_timer(ParsePoint * pp, DWORD timestamp);
int bot_loot_all(ParsePoint * pp);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?