Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C/C++] Auto move in MapleStory
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
4ng3licDew
Cheater
Reputation: 0

Joined: 14 Feb 2008
Posts: 28

PostPosted: Thu Sep 04, 2008 10:07 pm    Post subject: [C/C++] Auto move in MapleStory Reply with quote

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
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Sep 04, 2008 10:57 pm    Post subject: Reply with quote

Haven't read it thoroughly yet, but looks very helpful! This will be my next project so much thanks!
_________________
Back to top
View user's profile Send private message
Virus
How do I cheat?
Reputation: 0

Joined: 18 Jul 2008
Posts: 0
Location: Transylvania

PostPosted: Fri Sep 05, 2008 4:53 am    Post subject: Reply with quote

You're a C++/Maple god

Jr.Kiki

_________________
Back to top
View user's profile Send private message
sphere90
Grandmaster Cheater
Reputation: 0

Joined: 24 Jun 2006
Posts: 912

PostPosted: Fri Sep 05, 2008 7:18 am    Post subject: Reply with quote

Transperancy wrote:
You're a C++/Maple god

Jr.Kiki


Is he?
Back to top
View user's profile Send private message
Virus
How do I cheat?
Reputation: 0

Joined: 18 Jul 2008
Posts: 0
Location: Transylvania

PostPosted: Fri Sep 05, 2008 8:33 am    Post subject: Reply with quote

sphere90 wrote:
Transperancy wrote:
You're a C++/Maple god

Jr.Kiki


Is he?


Yes he is :)

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Sep 05, 2008 1:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Fri Sep 05, 2008 1:36 pm    Post subject: Reply with quote

Why not just use a hook hopped PostMessage..?
Back to top
View user's profile Send private message AIM Address MSN Messenger
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Fri Sep 05, 2008 1:49 pm    Post subject: Reply with quote

jackyyll wrote:
Why not just use a hook hopped PostMessage..?

You can't move your char w/ PostMessage in MS.

_________________
Gone
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Sep 05, 2008 1:53 pm    Post subject: Reply with quote

jackyyll wrote:
Why not just use a hook hopped PostMessage..?


MapleStory doesn't handle directional keys in its window procedure.

_________________
Back to top
View user's profile Send private message
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Fri Sep 05, 2008 3:58 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Fri Sep 05, 2008 4:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hieroglyphics
I post too much
Reputation: 0

Joined: 06 Dec 2007
Posts: 2007
Location: Your bedroom

PostPosted: Fri Sep 05, 2008 5:24 pm    Post subject: Reply with quote

Transperancy wrote:
You're a C++/Maple god

Jr.Kiki


No, not even close to KiKi

_________________

Back to top
View user's profile Send private message AIM Address MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Sep 05, 2008 6:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
sloppy
Expert Cheater
Reputation: 0

Joined: 17 Aug 2008
Posts: 123

PostPosted: Fri Sep 05, 2008 6:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Virus
How do I cheat?
Reputation: 0

Joined: 18 Jul 2008
Posts: 0
Location: Transylvania

PostPosted: Fri Sep 05, 2008 8:02 pm    Post subject: Reply with quote

Hieroglyphics wrote:
Transperancy wrote:
You're a C++/Maple god

Jr.Kiki


No, not even close to KiKi


i know Wink

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites