bvr Posted February 7, 2006 Share Posted February 7, 2006 this was a question over at edgeofnowhere that we want to confirm.Just took a look at the latest beta of AutoIt and noticed quite a few dll functions in the help file. Ummm....is it possible to use the .dll functions to hook any game .dll's, namley Diablo's, and therefore use AutoIt to control Diablo? Or, am I just stupid? Here are some of the .dll functions:Code:DllOpenOpens a dll file for use in DllCall.DllCallDynamically calls a function in a DLL.DllStructCreateCreates a C/C++ style structure to be used in DllCall.DllStructSetDataSets the data in an element of the struct.That is a just a few of them, there are a lot more. Link to comment Share on other sites More sharing options...
seandisanti Posted February 7, 2006 Share Posted February 7, 2006 this was a question over at edgeofnowhere that we want to confirm.assuming that you know how to structure requests to the specific functions in the diablo II dll's. The dll functions provided in autoit are just a means to communicate calls to specific functions inside dll's. if you call a non-existant function, it won't work, or if you call with incorrect arguments, etc etc. you typically can't just 'guess' what functions are in dll's... Link to comment Share on other sites More sharing options...
bvr Posted February 8, 2006 Author Share Posted February 8, 2006 GetPlayerID Code: DWORD __declspec(naked) GetPlayerID(VOID) { __asm { MOV EAX,DWORD PTR DS:[0x6FBCC1E0] MOV ECX,DWORD PTR DS:[EAX+0xC] mov eax, ecx ret } } GetPlayerArea Code: DWORD __declspec(naked) GetPlayerArea(void) { __asm { MOV EAX,DWORD PTR DS:[0x6FBCC1E0] push eax mov ebx, 0x6FABC0BC call ebx push eax mov ebx, 0x6FABC0B6 call ebx ret } } SendGamePacket Code: void SendGAMEPacket(BYTE* Packet,DWORD PacketSize) { DWORD size1 = PacketSize; __asm { mov eax, Packet push Packet mov ebx, size1 mov edx, 0x6FB0DE40 call edx } } GetCurrentLife Code: DWORD __declspec(naked) GetCurrentLife() { __asm { mov eax, 6 mov ebx, 0x6FB653A0 call ebx SAR eax,8 ret } } GetMaxLife Code: DWORD __declspec(naked) GetMaxLife() { __asm mov eax, 6 mov ebx, 0x6FB653A0 call ebx SAR edx,8 mov eax,edx ret } } GetCurrentMana Code: DWORD __declspec(naked) GetCurrentMana() { __asm { mov eax, 8 mov ebx, 0x6FB653A0 call ebx SAR eax,8 ret } } GetMaxMana Code: DWORD __declspec(naked) GetMaxMana() { __asm { mov eax, 8 mov ebx, 0x6FB653A0 call ebx SAR edx,8 mov eax,edx ret } } GamePrintMessage Code: enum { colWhite, colRed, codGreen, colBlue, colGold, colGrey, colBlack, colBrown, colOrange, colYellow }; typedef void (_stdcall *pPrint)(wchar_t* Text, BYTE Color); void GamePrintMessage(char *Message, BYTE color) { pPrint Print = (pPrint)0x6FAC6780; wchar_t Buffer[256]; MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, Message, sizeof(Message), Buffer, sizeof(Buffer)); Print(Buffer, color); } GetPlayerID Code: DWORD __declspec(naked) GetPlayerID(VOID) { __asm { MOV EAX,DWORD PTR DS:[0x6FBCC1E0] MOV ECX,DWORD PTR DS:[EAX+0xC] mov eax, ecx ret } } GetPlayerArea Code: DWORD __declspec(naked) GetPlayerArea(void) { __asm { MOV EAX,DWORD PTR DS:[0x6FBCC1E0] push eax mov ebx, 0x6FABC0BC call ebx push eax mov ebx, 0x6FABC0B6 call ebx ret } } SendGamePacket Code: void SendGAMEPacket(BYTE* Packet,DWORD PacketSize) { DWORD size1 = PacketSize; __asm { mov eax, Packet push Packet mov ebx, size1 mov edx, 0x6FB0DE40 call edx } } GetCurrentLife Code: DWORD __declspec(naked) GetCurrentLife() { __asm { mov eax, 6 mov ebx, 0x6FB653A0 call ebx SAR eax,8 ret } } GetMaxLife Code: DWORD __declspec(naked) GetMaxLife() { __asm mov eax, 6 mov ebx, 0x6FB653A0 call ebx SAR edx,8 mov eax,edx ret } } GetCurrentMana Code: DWORD __declspec(naked) GetCurrentMana() { __asm { mov eax, 8 mov ebx, 0x6FB653A0 call ebx SAR eax,8 ret } } GetMaxMana Code: DWORD __declspec(naked) GetMaxMana() { __asm { mov eax, 8 mov ebx, 0x6FB653A0 call ebx SAR edx,8 mov eax,edx ret } } GamePrintMessage Code: enum { colWhite, colRed, codGreen, colBlue, colGold, colGrey, colBlack, colBrown, colOrange, colYellow }; typedef void (_stdcall *pPrint)(wchar_t* Text, BYTE Color); void GamePrintMessage(char *Message, BYTE color) { pPrint Print = (pPrint)0x6FAC6780; wchar_t Buffer[256]; MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, Message, sizeof(Message), Buffer, sizeof(Buffer)); Print(Buffer, color); } Link to comment Share on other sites More sharing options...
Oxin8 Posted February 8, 2006 Share Posted February 8, 2006 I gave my answer over at the edgeofnowhere forums. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now