-
Notifications
You must be signed in to change notification settings - Fork 1
/
D2Helpers.h
69 lines (65 loc) · 2.65 KB
/
D2Helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
BOOL SetSkill(WORD wSkillId, BOOL bLeft);
RosterUnit* FindPartyByName(LPSTR szName);
void AttackTo(DWORD PlayerStruct);
void FlashPlayer(DWORD ID);
void SQ(DWORD ID);
bool IsInventoryOpen();
void ToggleInventory(bool on);
void PrintLists(void);
void WelcomeBox(void);
char *ReplaceString(char *source, char *old, char *newtext);
void PrintChat(char* Message);
BOOL Speak(LPSTR lpMessage, ...);
DWORD GetExpLeft();
void SendBNMessage(char* lpMsg);
void WinampHook(INT xPos, INT yPos, DWORD dwColor, INT dwFont, INT dwCenter, LPSTR Text,...);
VOID DrawRectangle(INT x, INT y, INT x2, INT y2, DWORD dwColor, DWORD dwTrans);
VOID OverheadMessage(char *Message);
VOID OverheadMessage2(char *Message);
BOOL D2GetMapName(BYTE iMapID, LPSTR lpszBuffer, DWORD dwMaxChars);
GameStructInfo* GetGameInfo();
DWORD IsExpansion();
void Tele(WORD x,WORD y);
Level* GetLevel(DWORD dwLevelNo);
DWORD GetTileLevelNo(Room2* lpRoom2, DWORD dwTileNo);
void DrawBlob(int xpos, int ypos,int col);
DWORD GetDistance(DWORD x1, DWORD y1, DWORD x2, DWORD y2);
DWORD GetDistanceSquared(DWORD x1, DWORD y1, DWORD x2, DWORD y2);
VOID PrintDevilPKString(LPSTR lpFormat, ...);
VOID PrintString(LPSTR lpFormat, ...);
VOID PrintString2(LPSTR lpFormat, ...);
DWORD CheckSkill(DWORD Skill);
POINT GetPosition();
void GetD2MousePos(POINT &Pointer);
void HoldRightUp(long X, long Y);
int GetPercent(DWORD Current,DWORD Max);
WORD GetCurrentSkillLeft();
WORD GetCurrentSkillRight();
INT GetSkill(WORD wSkillId);
int GetLevelByN(char* Name);
int MakeParameter(char* szInput, char** argv, char splitchar, bool bSkipQuote);
char* GetNameByID(DWORD PID);
void Hostile(DWORD ID);
void HostileAll();
void PrintMessage(char *Message, char Color);
void PrintMessageBottomLeft(char *Message, char Color);
VOID DrawTextToScreen(char* szwText, int x, int y, int color, int font) ;
VOID DrawTextToScreenRight(char* szwText, int x, int y, int color, int font) ;
VOID DrawTextToScreenCenter(char* szwText, int x, int y, int color, int font) ;
void D2DrawRectFrame(int x,int y,int x2,int y2);
void MapToScreenCoords(POINT& rMapPosition);
extern void ScreenToAutomapRelative(POINT* pos, int x, int y);
typedef bool (_stdcall *fp)(UnitAny* pUnit);
void fpEnumUnits(fp EnumFunction,DWORD Type);
char* GetD2ClassName(DWORD ClassID);
char* GetD2ClassName2(DWORD ClassID);
char* GetD2LevelName(DWORD LevelID);
bool MakeTP();
UnitAny* FindItem(LPCSTR szCode, INT nLoc);
int GetItemLocation(UnitAny* pItem);
void UseItem(UnitAny* Unit);
bool GetItemCode(UnitAny* pItem, LPSTR szBuffer, DWORD dwMax);
int GetTPs();
DWORD GetPlayerArea(VOID);
char* mitoa(int integer);
BOOL IsTownLevel(INT nLevel);