HaX4LiFe! (07-25-2010),MissRandomSpam (07-24-2010),noammn (07-26-2010),TheJoku (07-24-2010),~GodLike~ (07-24-2010)
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 ^^
This should help some people ...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; }
HaX4LiFe! (07-25-2010),MissRandomSpam (07-24-2010),noammn (07-26-2010),TheJoku (07-24-2010),~GodLike~ (07-24-2010)
ty for sharing
ah i had done this in C for programming a object for industrial programming
nice putting it up here...
@ Anime Section,Otaku/weeabo (orz.) @Graphics Section, Novice DigiArtist
neuest gift from Yura~Chan:
https://bakyurayuu.deviantar*****m/#/d372taw
2nd Place MOTM#9 Theme: CharMods - Combat Arms [No - Thanks] button
come on you know that don't want to push that ordinary button
Solify (07-25-2010)
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:
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.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);
btw this my add for anti leech
@ Anime Section,Otaku/weeabo (orz.) @Graphics Section, Novice DigiArtist
neuest gift from Yura~Chan:
https://bakyurayuu.deviantar*****m/#/d372taw
2nd Place MOTM#9 Theme: CharMods - Combat Arms [No - Thanks] button
come on you know that don't want to push that ordinary button