[TUTORIAL]How to make a counterfunction

Posts 1–13 of 13 · Page 1 of 1
[TUTORIAL]How to make a counterfunction
I thought that it would be cool if i show some coders how to make a counterfunction (i know that some people dont know how to do it )

OK i show it to you in a simple fog modifier hack!
I dont need to explain everything because its not hard to understand ^^

Code:
#include <windows.h>
#define LTClient 0x377CB7F8

void __cdecl PushToConsole( const char* szCommand ){
DWORD *Ltclient = ( DWORD* )( LTClient );
void* CONoff = ( void* )*( DWORD* )( *Ltclient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool Hook()
{
if(GetModuleHandleA("ClientFX.fxd") != NULL 
&&GetModuleHandleA("CShell.dll") != NULL )
return true;
return false;
}

void counterfunction(){
while (!Hook()){
Sleep(20);
}
int counter=0;
while(true){
PushToConsole("ShowFps 1");
if(GetAsyncKeyState(VK_F8)<0){ //Fog Modifier
Sleep(200);
counter++;
        if(counter>10){
           counter=0;
}
        if(counter==0){ //original
           PushToConsole("FogR 80.000000");
           PushToConsole("FogG 80.000000");
           PushToConsole("FogB 65.000000");
}
        if(counter==1){ //white
           PushToConsole("FogR 255.000000");
           PushToConsole("FogG 255.000000");
           PushToConsole("FogB 255.000000");
}
        if(counter==2){ //yellow
           PushToConsole("FogR 255.000000");
           PushToConsole("FogG 255.000000");
           PushToConsole("FogB 0.000000");
}
        if(counter==3){ //orange
           PushToConsole("FogR 255.000000");
           PushToConsole("FogG 135.000000");
           PushToConsole("FogB 0.000000");
}
        if(counter==4){ //red
           PushToConsole("FogR 255.000000");
           PushToConsole("FogG 0.000000");
           PushToConsole("FogB 0.000000");
}
        if(counter==5){ //pink
           PushToConsole("FogR 255.000000");
           PushToConsole("FogG 0.000000");
           PushToConsole("FogB 255.000000");
}
        if(counter==6){ //purple
           PushToConsole("FogR 186.000000");
           PushToConsole("FogG 0.000000");
           PushToConsole("FogB 255.000000");
}
        if(counter==7){ //blue
           PushToConsole("FogR 0.000000");
           PushToConsole("FogG 0.000000");
           PushToConsole("FogB 255.000000");
}
        if(counter==8){ //cyan
           PushToConsole("FogR 0.000000");
           PushToConsole("FogG 255.000000");
           PushToConsole("FogB 255.000000");
}
        if(counter==9){ //green
           PushToConsole("FogR 0.000000");
           PushToConsole("FogG 255.000000");
           PushToConsole("FogB 0.000000");
}
        if(counter==10){ //black
           PushToConsole("FogR 0.000000");
           PushToConsole("FogG 0.000000");
           PushToConsole("FogB 0.000000");
}
}
Sleep(20);
}
}
BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, 
LPVOID lpReserved){
switch (ul_reason_for_call){
case DLL_PROCESS_ATTACH:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&counterfunction, NULL, 0,NULL);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
This should help some people ...
Still this wont be neccesary if you folow me into the darkside of menu programming
Quote Originally Posted by Mr.Magicman View Post
Still this wont be neccesary if you folow me into the darkside of menu programming
haha i just wanted to help some people which started to hack
Quote Originally Posted by Solify View Post
haha i just wanted to help some people which started to hack
I understood that but after you made a sucsessfull hotkey hack from scratch then come into menu's
Quote Originally Posted by Mr.Magicman View Post


I understood that but after you made a sucsessfull hotkey hack from scratch then come into menu's
yeee but i think hotkey hacks stand longer undetected because nexon thinks that they suck so ... i dont want to make hacks which are 2 days undetected and then detected >.>
Quote Originally Posted by Solify View Post
yeee but i think hotkey hacks stand longer undetected because nexon thinks that they suck so ... i dont want to make hacks which are 2 days undetected and then detected >.>
Time for some nice detouring then
Quote Originally Posted by Mr.Magicman View Post


Time for some nice detouring then
hehe true^^
Quote Originally Posted by Mr.Magicman View Post
Still this wont be neccesary if you folow me into the darkside of menu programming
Well, then leave a comment on my next release

Sprintf ftw
Quote Originally Posted by Zoom View Post


Well, then leave a comment on my next release

Sprintf ftw
Your just C/P
ah i had done this in C for programming a object for industrial programming
nice putting it up here...
Quote Originally Posted by Kuro Tenshi View Post
ah i had done this in C for programming a object for industrial programming
nice putting it up here...
hehe nice ...
no problem
this is how i use counters multiple times... but yeah added a little when im uploading ma hack to mpgh its the same as sendkeys only onkey stroke at the time D:
Code:
if(count == 300000)
					{
						keybd_event(VK_RETURN, 0, 0, 0);
						Sleep(5);
						keybd_event('J',0,0,0);
						keybd_event('O',0,0,0);
						keybd_event('I',0,0,0);
						keybd_event('N',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('U',0,0,0);
						keybd_event('S',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('O',0,0,0);
						keybd_event('N',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('M',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('P',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('G',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('H',0,0,0);
						keybd_event(VK_SPACE, 0, 0, 0);
						keybd_event('.',0,0,0);
						keybd_event('N',0,0,0);
						keybd_event('E',0,0,0);
						keybd_event('T',0,0,0);
						Sleep(5);
						keybd_event(VK_RETURN, 0, 0, 0);
						Sleep(5);
						count = 0;
						Sleep(5);
						count = 0;
					}
				count++;
				Sleep(1);
do mind that if you have a hack on one of these codes it will actived found that out with fly on space =_= ... and since mine kept dcing i tested it on each 300ms so each time i went flying skyhigh changed the key to f for now.


btw this my add for anti leech
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?