[Delphi]Making an Auto-Clicker for MapleStory

Discuss about Programming here. You may release your source, post guide and even ask questions!

Moderator: wizme

Boredness
The Emperor
The Emperor
Posts: 2539
Joined: Wed Aug 26, 2009 9:50 pm
Location: Singapore
Contact:

[Delphi]Making an Auto-Clicker for MapleStory

Post 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.
You do not have the required permissions to view the files attached to this post.
Donate money to my paypal account @ danielongdequan1996@hotmail.com to keep this website alive!
ShiunYean
Headmaster of Darkness
Headmaster of Darkness
Posts: 648
Joined: Tue Sep 08, 2009 2:59 pm
Location: Brunei Darussalam
Contact:

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

Post by ShiunYean »

Where can i get delphi?
Boredness
The Emperor
The Emperor
Posts: 2539
Joined: Wed Aug 26, 2009 9:50 pm
Location: Singapore
Contact:

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

Post by Boredness »

Donate money to my paypal account @ danielongdequan1996@hotmail.com to keep this website alive!
darknessproz
Sacrificer
Sacrificer
Posts: 27
Joined: Wed Jan 20, 2010 7:17 pm

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

Post by darknessproz »

what does PMX.dll actually do?
wizme
Destiny General
Destiny General
Posts: 297
Joined: Sat Sep 05, 2009 1:40 pm

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

Post by wizme »

hackshield hook Postmessage API i think, thats y u nid use postmessagex.
Unlike science, love is like magic, there's no reason to it - wizme =)
Learn more of security, click here =)
Boredness
The Emperor
The Emperor
Posts: 2539
Joined: Wed Aug 26, 2009 9:50 pm
Location: Singapore
Contact:

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

Post by Boredness »

hackshield do not hook postmessage.
but gg hook postmessage so this is not necessary.
Donate money to my paypal account @ danielongdequan1996@hotmail.com to keep this website alive!
User avatar
RavenOfDeath
Headmaster of Darkness
Headmaster of Darkness
Posts: 725
Joined: Mon Feb 08, 2010 6:43 pm

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

Post by RavenOfDeath »

Why using PMX? I thought hackshield didn't hook PostMessage
Goals:
Top 10 poster in Xemectrum [V]
Top 5 poster in Xemectrum [X]
Top 3 poster in Xemectrum [X]
Top poster in Xemectrum [X]
Boredness
The Emperor
The Emperor
Posts: 2539
Joined: Wed Aug 26, 2009 9:50 pm
Location: Singapore
Contact:

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

Post by Boredness »

RavenOfDeath wrote:Why using PMX? I thought hackshield didn't hook PostMessage
yes i know
Donate money to my paypal account @ danielongdequan1996@hotmail.com to keep this website alive!
User avatar
RavenOfDeath
Headmaster of Darkness
Headmaster of Darkness
Posts: 725
Joined: Mon Feb 08, 2010 6:43 pm

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

Post 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
Goals:
Top 10 poster in Xemectrum [V]
Top 5 poster in Xemectrum [X]
Top 3 poster in Xemectrum [X]
Top poster in Xemectrum [X]
NoobHacker
Headmaster of Darkness
Headmaster of Darkness
Posts: 576
Joined: Tue Dec 29, 2009 12:31 pm

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

Post by NoobHacker »

btw i just need a api that wont detected by hs
thanks!
Alot Imageers in xemectrum!
Post Reply