So for all of you who don't know how to use FindPattern() to auto get addresses, this is how:
---------------------------------------------------------------------------------------------------------
1. Add this above the function you create in step 2:
Code:
bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask) return 0;
return (*szMask) == NULL;
}
DWORD Pattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
for(DWORD i=0; i<dwLen; i++)
if (Compare((BYTE*)(dwAddress+i),bMask,szMask)) return (DWORD)(dwAddress+i);
return 0;
}
---------------------------------------------------------------------------------------------------------
2. Make a function that calls your FindPatterns, and a global bool, and a global DWORD:
Code:
bool Finished = false;
DWORD Status;
void GetAddresses (void)
{
Status = Pattern((DWORD)GetModuleHandleA("CShell.dll"), 0x97D000, (PBYTE)"\x71\x37\x50\x94\x71\x37", "xxxxxx");
if(Status)
{
Status -= 0xA;
}
}
---------------------------------------------------------------------------------------------------------
3. In your main hack thread, add this before anything:
Code:
if(Finished == false)
{
GetAddresses();
Finished = true;
Sleep(300);
}
---------------------------------------------------------------------------------------------------------
4. Now you may use your DWORD Status as an address:
Code:
if(Status == 1)
{
/*
Do whatever you want to do. When (Status == 1), It means you are ingame. You can use this method for ANY FindPatterns to get addresses.
*/
}
Credits to Crash and mmbob.
Also i WILL NOT be giving more FindPatterns for different addresses. I used this as an example, you will have to make your own patterns.