Script Editor

Hacking Maple Story

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo, Explicit

Script Editor

Postby GRB » Tue Jan 15, 2008 7:22 am

When i press the F3 Hotkey inside the game dont work, only when im outside the game, the mouse move to the correct position! also i have the code to tell me where the window are and it appears that the game are on 0,0 ; maybe couse its a full screen game? can some1 help plz?

Code: Select all
VOID On_HK_23( DWORD dw1, DWORD dw2 ) {
    ShowMapleStory();
}

VOID ShowMapleStory() {
    // “extern” only works if we are attached to the process.
    if ( StrICmp( GetCurProcessName(), "MapleStory.exe" ) != 0 ) {
        PrintF( "You must be attached to MapleStory to hack it!" );
        return;
    }


    HWND hWnd = FindWindow( "MapleStory" );
    if ( !hWnd ) { return; }

    // Put the MapleStory in front if possible.
    ShowWindowAsync( hWnd, SW_RESTORE );
    while ( GetForegroundWindow() != hWnd ) { SetForegroundWindow( hWnd ); Sleep( 10 ); }
   
    // Get its position.
    INT iX;
    INT iY;
    GetWindowPos( hWnd, &iX, &iY );
    PrintF( "MapleStory is located at %d %d.", iX, iY );
    if ( iX < 0 || iY < 0 ) {
        PrintF( "MapleStory is out of range!" );
        return;
    }

                // Move there.
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
                    30000, 54000,
                    0 );

                // Click there (down and up).
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN,
                    0, 0,                           
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP,
                    0, 0,
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN,
                    0, 0,                           
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP,
                    0, 0,
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN,
                    0, 0,                           
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP,
                    0, 0,
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN,
                    0, 0,                           
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP,
                    0, 0,
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN,
                    0, 0,                           
                    0 );
                MouseEvent( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP,
                    0, 0,
                    0 );
}
Never let your guard down!
Always be happy, to others be also happy!
Just do your best and keep trying!
User avatar
GRB
Acker
 
Posts: 88
Joined: Mon Dec 24, 2007 10:05 am
Location: 127.0.0.1 --> localhost

Postby kth_prkns » Tue Jan 15, 2008 7:40 am

is that C++? if so, why not use

Code: Select all
if(GetAsyncKeyState(VK_MENU) &0x8000 && GetAsyncKeyState('Z') &0x8000)
                                     {
kth_prkns
NULL
 
Posts: 101
Joined: Sun Jan 14, 2007 5:29 am

Postby L. Spiro » Tue Jan 15, 2008 9:49 am

is that C++?

No, it is L. Spiro Script.
The GetAsyncKeyState() function will appear in MHS’s L. Spiro Script in the next release.



When i press the F3 Hotkey inside the game dont work

MHS comes with 2 Hotkey methods for just this reason.
If you are using Polling, don’t. If you aren’t do.
One of them usually works.


But you also need to verify that the Hotkey is not being activated. It may be activated but Maple Story has hooks on MouseEvent to prevent the mouse from moving while it is active.
You should print a message upon success to be sure the Hotkey was activated. If not, switch methods.



As you have heard, the legendary “next release” can not be hooked, so if it is hooking the functions for moving the mouse it shouldn’t be a problem.



If the problem is only the Hotkey, you can press the Hotkey outside of the game and then go in. The script would have a timer to wait 3 seconds before working, allowing you to get into the game. This is a hassle, but works, especially if your bot does something that you can not humanly do.


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Maple Story

Who is online

Users browsing this forum: No registered users and 0 guests