| View previous topic :: View next topic |
| Author |
Message |
4ng3licDew Cheater
Reputation: 0
Joined: 14 Feb 2008 Posts: 28
|
Posted: Thu Sep 04, 2008 10:07 pm Post subject: [C/C++] Auto move in MapleStory |
|
|
Hi Everyone,
After a few weeks of trying different methods to try to move my character in Maplestory, I have succeeded!
Three methods that I have tried:
1) Direct Input Hooking;
http://forum.cheatengine.org/viewtopic.php?t=161045
http://www.gamedev.net/community/forums/topic.asp?topic_id=371104
http://www.directxtutorial.com/index.aspx
2) Accessing I/O Ports using PortTalk;
http://www.autohotkey.com/forum/topic829-120.html
http://www.beyondlogic.org/porttalk/porttalk.htm
3) Using windows API function keybd_event;
http://www.oneswitch.org.uk/2/I/JoyToKey/JoyToKey.htm
Today I am going to talk about using keybd_event. Before you girls and boys start jumping up and down and shout "But it is hooked by GameGuard. You can not use it". WRONG!WRONG!WRONG!
First I will talk about the basic syntax of using keybd_event then I will give some hints on how to bypass Game Guard hooks.
To start moving my character left, I send a keydown event to MapleStory:
Note: You need to have MapleStory window in focus.
| Code: |
#define VK_LEFT 0x25
#define DIK_LEFT 0xCB
.
.
.
// press key
keybd_event(VK_LEFT, DIK_LEFT, 0, 0);
|
To stop my character from moving left:
| Code: |
// release key
keybd_event(VK_LEFT, DIK_LEFT, KEYEVENTF_KEYUP, 0);
|
A basic code to have your character move left for 3 secs then right for 3 sec. Then repeat the whole process over and over again:
| Code: |
#include "stdafx.h"
#include <winuser.h>
#define DIK_LEFT 0xCB
#define DIK_RIGHT 0xCD
#define VK_LEFT 0x25
#define VK_RIGHT 0x27
bool bContinue = true;
.
.
.
void autoLeftRight(void)
{
DWORD starting_point;
BYTE virtual_key = VK_LEFT;
BYTE scan_key = DIK_LEFT;
while (bContinue)
{
// find out the starting time of each loop
starting_point = GetTickCount();
// press key
keybd_event(virtual_key, scan_key, 0, 0);
// wait until 3 second has passed
while ((GetTickCount() - starting_point) < 3000);
// release key
keybd_event(virtual_key, scan_key, KEYEVENTF_KEYUP, 0);
if (virtual_key == VK_LEFT)
{
virtual_key = VK_RIGHT;
scan_key = DIK_RIGHT;
}
else
{
virtual_key = VK_LEFT;
scan_key = DIK_LEFT;
}
}
}
|
Now how to bypass Game Guard hooks. I got the ideas from these web pages:
http://john0312.wordpress.com/category/gameguard-related/
http://www.mpcforum.com/archive/index.php/t-127559.html
http://www.oneswitch.org.uk/2/I/JoyToKey/JoyToKey.htm
Hint*; Basically (removing the hay to find a needle) if Game Guard think that you program is legitimate then it will allow you to use keybd_event normally.
"How do you make your program looks legitimate?" You asked. Excellent question. I will leave it to you boys and girls to work it out for your homework.
School bell is ringing...
Class dismiss.
| Quote: |
"Everyone think you are a bloody idiot. But Jesus loves you."
|
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Thu Sep 04, 2008 10:57 pm Post subject: |
|
|
Haven't read it thoroughly yet, but looks very helpful! This will be my next project so much thanks!
_________________
|
|
| Back to top |
|
 |
Virus How do I cheat?
Reputation: 0
Joined: 18 Jul 2008 Posts: 0 Location: Transylvania
|
Posted: Fri Sep 05, 2008 4:53 am Post subject: |
|
|
You're a C++/Maple god
Jr.Kiki
_________________
|
|
| Back to top |
|
 |
sphere90 Grandmaster Cheater
Reputation: 0
Joined: 24 Jun 2006 Posts: 912
|
Posted: Fri Sep 05, 2008 7:18 am Post subject: |
|
|
| Transperancy wrote: | You're a C++/Maple god
Jr.Kiki |
Is he?
|
|
| Back to top |
|
 |
Virus How do I cheat?
Reputation: 0
Joined: 18 Jul 2008 Posts: 0 Location: Transylvania
|
Posted: Fri Sep 05, 2008 8:33 am Post subject: |
|
|
| sphere90 wrote: | | Transperancy wrote: | You're a C++/Maple god
Jr.Kiki |
Is he? |
Yes he is :)
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Sep 05, 2008 1:20 pm Post subject: |
|
|
Not really...
I would guess that it would work because GameGuard stopped hooking NtUserSendInput in the kernel, (went to hooking NtUserPostMessage instead) so user-mode bypasses for NtUserSendInput (the SYSCALL function in user32.dll) should work fine. (Other then key crypt being there)
and he is no Jr KiKi -_-
_________________
|
|
| Back to top |
|
 |
jackyyll Expert Cheater
Reputation: 0
Joined: 28 Jan 2008 Posts: 143 Location: here
|
Posted: Fri Sep 05, 2008 1:36 pm Post subject: |
|
|
| Why not just use a hook hopped PostMessage..?
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Fri Sep 05, 2008 1:49 pm Post subject: |
|
|
| jackyyll wrote: | | Why not just use a hook hopped PostMessage..? |
You can't move your char w/ PostMessage in MS.
_________________
Gone |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Sep 05, 2008 1:53 pm Post subject: |
|
|
| jackyyll wrote: | | Why not just use a hook hopped PostMessage..? |
MapleStory doesn't handle directional keys in its window procedure.
_________________
|
|
| Back to top |
|
 |
jackyyll Expert Cheater
Reputation: 0
Joined: 28 Jan 2008 Posts: 143 Location: here
|
Posted: Fri Sep 05, 2008 3:58 pm Post subject: |
|
|
| lurc wrote: | | jackyyll wrote: | | Why not just use a hook hopped PostMessage..? |
MapleStory doesn't handle directional keys in its window procedure. |
Ah i see. This brings me to another question that i never really got.. Why all the fuss with hacking maplestory..? It's so crappy u.u
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Fri Sep 05, 2008 4:10 pm Post subject: |
|
|
| jackyyll wrote: | | lurc wrote: | | jackyyll wrote: | | Why not just use a hook hopped PostMessage..? |
MapleStory doesn't handle directional keys in its window procedure. |
Ah i see. This brings me to another question that i never really got.. Why all the fuss with hacking maplestory..? It's so crappy u.u |
Because is free and we can =D?
lol idk i guess its because its a cool game to hack. At least IMO.
_________________
Gone |
|
| Back to top |
|
 |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Fri Sep 05, 2008 5:24 pm Post subject: |
|
|
| Transperancy wrote: | You're a C++/Maple god
Jr.Kiki |
No, not even close to KiKi
_________________
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Fri Sep 05, 2008 6:28 pm Post subject: |
|
|
| GameGaurd blocks inputs from all programs even if it's legitimate. You said keybd_event is not hooked than at the end of the thread you give links on how to bypass GameGuard's hooks? Lol'd
|
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
Posted: Fri Sep 05, 2008 6:35 pm Post subject: |
|
|
Cool. I always wondered if you could masquerade as a white-listed program, would be appreciated if you shared your method for doing so..
I've been using the port method for awhile now, for those interested I use OpenLibSys (google it), here's a lil c# code snippet of mine for sending a key down/up message..
| Code: | public void Write(byte makeCode, byte breakCode) {
this.WriteIoPortByte(0x64, 0xD2);
Thread.Sleep(1);
this.WriteIoPortByte(0x60, makeCode);
Thread.Sleep(1);
this.WriteIoPortByte(0x64, 0xD2);
Thread.Sleep(1);
this.WriteIoPortByte(0x60, breakCode);
Thread.Sleep(1);
} |
If you favour reliability over speed I recommend increasing the delay a little. Look up the make/break codes for each key and you're all set.
|
|
| Back to top |
|
 |
Virus How do I cheat?
Reputation: 0
Joined: 18 Jul 2008 Posts: 0 Location: Transylvania
|
Posted: Fri Sep 05, 2008 8:02 pm Post subject: |
|
|
| Hieroglyphics wrote: | | Transperancy wrote: | You're a C++/Maple god
Jr.Kiki |
No, not even close to KiKi |
i know
_________________
|
|
| Back to top |
|
 |
|