Ok well, I give up. The germans and canadians control everything and I can't get a leg up.
Code:
#include <windows.h>
int* Screen = (int *)0x011DF3C8; //Current Screen(2 server select, 3 login, 4 char select, 5 Loading map, 6 in-game)
int* SystemMenu = (int *)0x134B918; // The menu in-game when you hit Escape for logging out.
int* ServerCheck = (int *)0x11E5688; // If servers are red or green bar
DWORD* Socket = (DWORD *)0x59ABE8; // Check to see if you are connected or not, will be 0xFFFFFFFF if disconnected
bool Disconnected() //Check if you are connected or not
{
if(*Screen == 6 && *Socket == 0xFFFFFFFF)
{
return true;
}
else
{
return false;
}
}
bool Connected()
{
if(*Screen == 6 && *Socket != 0xFFFFFFFF)
{
return true;
}
else
{
return false;
}
}
void LeftMouseDown(int ScreenX, int ScreenY)
{
UINT_PTR adr = 0x45B140;
__asm
{
PUSHAD
PUSH ScreenY
PUSH ScreenX
MOV ECX,0x011BABC0
CALL adr
POPAD
}
}
void LeftMouseUp(int ScreenX, int ScreenY)
{
UINT_PTR adr = 0x0045B1E0;
__asm
{
PUSHAD
PUSH ScreenY
PUSH ScreenX
MOV ECX,0x011BABC0
CALL adr
POPAD
}
}
void Logout()
{
*SystemMenu = 1; // Bring up system menu
LeftMouseDown(0x2D0, 0x29E); // Screen coords for logout button
Sleep(25);
LeftMouseUp(0x2D0, 0x29E);
}
void Login()
{
char Name[15] = "accntname";
char Pass[21] = "accntpw";
HWND *accbox = (HWND *)0x11BAC34;
HWND *pwbox = (HWND *)0x11BAC38;
Sleep(500);
//Server select for Redemption server
if(*Screen == 2 && *ServerCheck > 0)
{
LeftMouseDown(0x2A7, 0x111);
Sleep(25);
LeftMouseUp(0x2A7, 0x111);
}
Sleep(500);
//Set account info into text boxes
if(*Screen == 3)
{
SetWindowTextA(*accbox, Name);
SetWindowTextA(*pwbox, Pass);
Sleep(500);
//Click OK button to login
LeftMouseDown(0x308, 0x1AD);
Sleep(25);
LeftMouseUp(0x308, 0x1AD);
}
Sleep(500);
//Click GameStart, only have 1 character, no need to select a character
if(*Screen == 4)
{
//LeftMouseDown(0x4B3, 0x0A0);
//LeftMouseUp(0x4B3, 0x0A0);
//Sleep(100);
LeftMouseDown(0x4FA, 0x1DF);
LeftMouseUp(0x4FA, 0x1DF);
}
}
DWORD HackThread()
{
while(1)
{
if(Disconnected() == true)
{
Sleep(8000);
Sleep(5);
Logout();
Sleep(8000);
}
if(Connected() == false && *Screen != 6 && *Screen != 5)
{
Sleep(10000);
Login();
Sleep(50);
}
}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL,(LPTHREAD_START_ROUTINE) HackThread , NULL, NULL, NULL);
}
if (dwReason == DLL_PROCESS_DETACH)
{
}
return TRUE;
}
Make an empty .dll project in Visual studio. Make an empty C++ file and paste that in, set to release mode and build. It should compile just fine.
It works on 2d Screen coords with a res of 1366x768, just adjust the coords where you need to.