Results 1 to 3 of 3
  1. #1
    Micheltjuh's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    Holland
    Posts
    643
    Reputation
    10
    Thanks
    59
    My Mood
    Cynical

    [Delphi-Tut] Autoclicker for games with GameGuard.

    Fairly simple, you don't need a lot of knowlegde to be able to use this.

    Gameguard puts a 5 byte hook on the Postmessage API, that's why you are unable to send messages to the game with Postmessage if you don't bypass the hook.
    But since there is a public method for that, there is no problem.

    Download PMX.dll from the attachement. (it also includes a list of virtual keys)
    The source for it is public too, but that's not of any importance for now.

    Okay, first we are going to 'load' the .dll so we can use PostMessageX instead of PostMessage.
    They both do exactly the same thing, the only difference is that you can send messages to games with GameGuard with PostMessageX.

    Add this under
    {$R *.dfm}:
    Code:
    function PostMessageX( 
    hWnd:HWND; 
    MSG:UINT; 
    WPARAM:wParam; 
    LPARAM:lParam):BOOL;stdcall; 
    external 'PMX.dll' name 'PostMessageX'
    .

    Now add a timer to your project. (under the system tab)
    We are going to use this one for the hotkeys.
    You can choose to use 1 hotkey for enabling the timer (we're going to add that after this) and 1 for disabling it, or you can use 1 to enable and disable.
    Now let's say you want to use F1 to enable the timer, and F2 to disable it, then add this part of code to the timer:
    Code:
    begin
    if odd(GetAsyncKeyState(VK_F1)) then
    Timer2.Enabled:=true;
    if odd(GetAsyncKeyState(VK_F2)) then
    Timer2.Enabled:=false;
    end;
    This timer is timer1, timer2 will be the timer we add the code for sending the message to.

    If you want to use 1 timer to enable and disable timer2, then add this code to the timer:
    Code:
    begin
    if odd (GetAsyncKeyState(VK_F1)
    then
    if timer2.enabled := false then
    timer2.enabled := true
    else
    timer1.enabled := false;
    end;
    Now add another timer, that will be timer2.
    Also add an edit box.

    First add the following variables:
    Code:
    var
    h:hwnd;
    Point:TPoint;
    x,y:integer;
    Then add the following code:
    Code:
    begin
    GetCursorPos(Point);
    x:=Point.X;
    y:=Point.Y;
    A:=FindWindowA('MapleStoryClass',0);
    if A<>0 then
    begin
    PostMessageX(A,WM_LBUTTONDBLCLK,0,MakeLong(X,Y)) ;
    PostMessageX(A,WM_LBUTTONUP,0,MakeLong(X,Y));
    Application.ProcessMessages;
    end;
    end;
    Now this is what the source should look like:
    Code:
    unit Unit1;
    
    interface
    
    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ExtCtrls;
    
    type
    TForm1 = class(TForm)
    Timer1: TTimer;
    Timer2: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;
    
    var
    Form1: TForm1;
    
    implementation
    
    {$R *.dfm}
    
    function PostMessageX( 
    hWnd:HWND; 
    MSG:UINT; 
    WPARAM:wParam; 
    LPARAM:lParam):BOOL;stdcall; 
    external 'PMX.dll' name 'PostMessageX'
    
    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
    if odd (GetAsyncKeyState(VK_F1)
    then
    if timer2.enabled := false then
    timer2.enabled := true
    else
    timer1.enabled := false;
    end;
    
    procedure TForm1.Timer2Timer(Sender: TObject);
    begin
    GetCursorPos(Point);
    x:=Point.X;
    y:=Point.Y;
    A:=FindWindowA('MapleStoryClass',0);
    if A<>0 then
    begin
    PostMessageX(A,WM_LBUTTONDBLCLK,0,MakeLong(X,Y)) ;
    PostMessageX(A,WM_LBUTTONUP,0,MakeLong(X,Y));
    Application.ProcessMessages;
    end;
    end;
    
    end.

    Now press F9 to compile, and use the autoclicker on, in this case, MapleStory.
    This will only click in MapleStory, not outside it.


    Credits go to me.

  2. The Following 27 Users Say Thank You to Micheltjuh For This Useful Post:

    AlNDaf1 (05-23-2015),asterixs87 (08-01-2016),bidin (10-16-2018),bjorn1213 (03-20-2009),chiqchui (01-04-2016),dedeernet (10-17-2013),Demonico69 (11-09-2012),fooztt (01-12-2014),gobn01 (03-30-2016),hksgcorp (07-01-2019),htk2002 (08-03-2012),JieAki (09-29-2020),kevinvalia (04-18-2013),ktphuc1994 (11-05-2015),lonepro (01-08-2014),Loras (05-12-2012),Matoka (03-22-2013),ngthtg735252 (06-10-2014),nur11 (06-29-2014),pimpom88 (03-30-2014),PVPMike (09-16-2012),redryan (03-06-2013),renanpequeno (03-05-2016),rockstarjin (06-16-2013),skykpt (08-03-2012),T0ybanead00 (11-02-2014),yottos (12-20-2014)

  3. #2
    bjorn1213's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    GFX at mpgh
    Posts
    154
    Reputation
    12
    Thanks
    6
    My Mood
    Bored
    Nice one i was searching for a ac (auto click) tutorial thanksalot



  4. #3
    DiegoO.'s Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    That's wonderful, thank you very much!!

Similar Threads

  1. *glitch for cusing* works for any game with chat
    By Reckless in forum Combat Arms Hacks & Cheats
    Replies: 66
    Last Post: 02-06-2009, 04:31 PM
  2. a trade for my call duty 4 game with cd key! and download link!
    By jckilla200 in forum Trade Accounts/Keys/Items
    Replies: 0
    Last Post: 12-01-2007, 10:36 PM
  3. Trade my hacks for uce with trainer maker
    By poisoner in forum WarRock - International Hacks
    Replies: 11
    Last Post: 04-25-2007, 12:32 PM
  4. Getting Kicked by Punkbuster for "GameHack" with no Cheat running
    By wafflele in forum WarRock - International Hacks
    Replies: 31
    Last Post: 08-09-2006, 08:23 AM
  5. Hack for BlackHwakDown with TeamSabre and Argus
    By Megamann in forum General Game Hacking
    Replies: 0
    Last Post: 02-03-2006, 03:33 AM

Tags for this Thread