Results 1 to 13 of 13
  1. #1
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,477
    My Mood
    Aggressive

    [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 ...

  2. The Following 5 Users Say Thank You to Solify For This Useful Post:

    HaX4LiFe! (07-25-2010),MissRandomSpam (07-24-2010),noammn (07-26-2010),TheJoku (07-24-2010),~GodLike~ (07-24-2010)

  3. #2
    MissRandomSpam's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    @ Barbie's House
    Posts
    2,342
    Reputation
    50
    Thanks
    584
    ty for sharing

  4. #3
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    Still this wont be neccesary if you folow me into the darkside of menu programming

  5. #4
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,477
    My Mood
    Aggressive
    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

  6. #5
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    Quote Originally Posted by Cristyboy 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

  7. #6
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,477
    My Mood
    Aggressive
    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 >.>

  8. #7
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    Quote Originally Posted by Cristyboy 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

  9. #8
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,477
    My Mood
    Aggressive
    Quote Originally Posted by Mr.Magicman View Post


    Time for some nice detouring then
    hehe true^^

  10. #9
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    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
    -Rest in peace leechers-

    Your PM box is 100% full.

  11. #10
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    Quote Originally Posted by Zoom View Post


    Well, then leave a comment on my next release

    Sprintf ftw
    Your just C/P

  12. #11
    Kuro Tenshi's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    Where arth thou be
    Posts
    3,635
    Reputation
    70
    Thanks
    746
    My Mood
    Blah
    ah i had done this in C for programming a object for industrial programming
    nice putting it up here...
    DigiDrawing|+ ( (Elfen Archer) )
    Link:
    https://www.mpgh.net/forum/148-showro...en-archer.html


    @ 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

  13. The Following User Says Thank You to Kuro Tenshi For This Useful Post:

    Solify (07-25-2010)

  14. #12
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,477
    My Mood
    Aggressive
    Quote Originally Posted by pspiso 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

  15. #13
    Kuro Tenshi's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    Where arth thou be
    Posts
    3,635
    Reputation
    70
    Thanks
    746
    My Mood
    Blah
    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
    DigiDrawing|+ ( (Elfen Archer) )
    Link:
    https://www.mpgh.net/forum/148-showro...en-archer.html


    @ 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