Page 1 of 2

[Delphi]Making an Auto-Clicker for MapleStory

Posted: Tue Oct 20, 2009 8:38 pm
by Boredness
Hello peeps, here's a guide on how to make an auto-clicker for maplestory :lol:
Handwritten by me!

1)Download the file i attached below and extract it to the folder whereby you want to save the delphi project at.
2)Open your delphi.
3)Add 2 timers and 1 label to your project.

Your current code should be like this

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin

end;

end.
4)Add this to your code.

Code: Select all

function PostMessageX(
hWnd:HWND;
MSG:UINT;
WPARAM:wParam;
LPARAM:lParam):BOOL;stdcall;
external 'PMX.dll' name 'PostMessageX';
your code should be like this now

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(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.FormCreate(Sender: TObject);
begin

end;

end.
5)Now name 1 timer "AutoClickerTimer" while another timer "AutoClickHotkey".
6)Set "AutoClickTimer" enabled to false and interval to 1.
7)Set "AutoClickHotkey" enabled to true and interval to 10.
8)Set your "label1" caption to Disabled and set the font color to red.
9)Code this to your "AutoClickTimer"

Code: Select all

procedure TForm1.AutoClickTimerTimer(Sender: TObject);
var
  h:hwnd;
  Point:TPoint;
  x,y:integer;
begin
  GetCursorPos(Point);
  x:=Point.X;
  y:=Point.Y;
  h:=FindWindowA('MapleStoryClass',nil);
  if h<>0 then
  begin
    PostMessageX(h,WM_LBUTTONDBLCLK,0,MakeLong(X,Y));
    PostMessageX(h,WM_LBUTTONUP,0,MakeLong(X,Y));
    Application.ProcessMessages;
  end;
This is to postmessage and spam your left click.

10)Code this to your "AutoClickHotkey"

Code: Select all

procedure TForm1.AutoClickHotkeyTimer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_F1))
then
begin
if(AutoClickTimer.Enabled=false) then
begin
autoclicktimer.Enabled:=true;
label1.caption:='Enable';
Label1.Font.Color:=clLime;
end
else if(autoclicktimer.Enabled=true) then
begin
autoclicktimer.Enabled:=false;
Label1.caption:='Disable';
Label1.Font.Color:=clRed;
end;
end;
end;
Your final coding should be like this

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    AutoClickTimer: TTimer;
    AutoClickHotkey: TTimer;
    Label1: TLabel;
    procedure AutoClickTimerTimer(Sender: TObject);
    procedure AutoClickHotkeyTimer(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.AutoClickTimerTimer(Sender: TObject);
var
  h:hwnd;
  Point:TPoint;
  x,y:integer;
begin
  GetCursorPos(Point);
  x:=Point.X;
  y:=Point.Y;
  h:=FindWindowA('MapleStoryClass',nil);
  if h<>0 then
  begin
    PostMessageX(h,WM_LBUTTONDBLCLK,0,MakeLong(X,Y));
    PostMessageX(h,WM_LBUTTONUP,0,MakeLong(X,Y));
    Application.ProcessMessages;
  end;
end;

procedure TForm1.AutoClickHotkeyTimer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_F1))
then
begin
if(AutoClickTimer.Enabled=false) then
begin
autoclicktimer.Enabled:=true;
label1.caption:='Enable';
Label1.Font.Color:=clLime;
end
else if(autoclicktimer.Enabled=true) then
begin
autoclicktimer.Enabled:=false;
Label1.caption:='Disable';
Label1.Font.Color:=clRed;
end;
end;
end;


end.

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Fri Jan 15, 2010 7:03 pm
by ShiunYean
Where can i get delphi?

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Fri Jan 15, 2010 10:30 pm
by Boredness

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Sun Jan 31, 2010 4:41 pm
by darknessproz
what does PMX.dll actually do?

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Sun Jan 31, 2010 10:56 pm
by wizme
hackshield hook Postmessage API i think, thats y u nid use postmessagex.

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Mon Feb 01, 2010 7:20 am
by Boredness
hackshield do not hook postmessage.
but gg hook postmessage so this is not necessary.

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Sat Feb 20, 2010 11:42 am
by RavenOfDeath
Why using PMX? I thought hackshield didn't hook PostMessage

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Wed Feb 24, 2010 6:02 pm
by Boredness
RavenOfDeath wrote:Why using PMX? I thought hackshield didn't hook PostMessage
yes i know

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Thu Feb 25, 2010 10:18 pm
by RavenOfDeath
Boredness wrote:
RavenOfDeath wrote:Why using PMX? I thought hackshield didn't hook PostMessage
yes i know
Then you should edit your guide

Re: [Delphi]Making an Auto-Clicker for MapleStory

Posted: Wed Mar 24, 2010 8:43 pm
by NoobHacker
btw i just need a api that wont detected by hs
thanks!