| View previous topic :: View next topic |
| Author |
Message |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Feb 21, 2009 2:59 pm Post subject: Best API's to click in MapleStory? |
|
|
EDIT:
What can I use to find coords in MapleStory?
Kitterz just gives what your Char X/Y would be if you were at the spot of the mouse, so don't recommend it.
_________________
Last edited by manc on Sun Feb 22, 2009 12:50 am; edited 5 times in total |
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Feb 21, 2009 3:25 pm Post subject: |
|
|
| PostMessageX is the only one that works unless you use a driver.
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Feb 21, 2009 3:27 pm Post subject: |
|
|
| dnsi0 wrote: | | PostMessageX is the only one that works unless you use a driver. |
Im using the PostMessageX method..its just named PostMessage_Trampoline();
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Feb 21, 2009 3:52 pm Post subject: Re: Best API's to click in MapleStory? |
|
|
| manc wrote: | | WM_LBUTTONDOUBLECLICKDOWNNOW |
lolll
I have not the slightest clue why that would not work, the code looks absolutely flawless in every sense of the word. Pristine is an understatement; if anything was right in the world, it would be your code.
If only everything could be so perfect in life.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Sat Feb 21, 2009 6:35 pm Post subject: |
|
|
It wasn't fake. I just couldn't recall the real name. So I gave something close to it, hoping you would have enough intuition to figure it out.
_________________
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Feb 21, 2009 9:01 pm Post subject: |
|
|
| sponge wrote: | | It wasn't fake. I just couldn't recall the real name. So I gave something close to it, hoping you would have enough intuition to figure it out. |
Sorry about that.
Also, why wouldnt this work?
| Code: | #include "windows.h"
#include <iostream>
using namespace std;
ULONG ApiJump = (DWORD)GetProcAddress( LoadLibrary( "User32.dll" ), "PostMessageA" ) + 5;
_declspec(naked) BOOL WINAPI __stdcall PostMessage_Trampoline( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ) {
_asm {
mov edi, edi
push ebp
mov ebp, esp
jmp ApiJump
}
}
static const FARPROC SCP = (FARPROC)((DWORD)GetProcAddress(GetModuleHandle("user32.dll"), "SetCursorPos" )+5);
_declspec(naked) BOOL WINAPI SetCurPos(int x, int y)
{
_asm
{
mov edi,edi
push ebp
mov ebp,esp
jmp [SCP]
}
}
int main()
{
HWND hWnd = NULL;
hWnd = FindWindow( "MapleStoryClass", 0 );
Sleep(1000);
SetActiveWindow( hWnd );
Sleep(3000);
SetCurPos( -440, -70 );
PostMessage_Trampoline( hWnd, WM_LBUTTONDBLCLK, 0, MapVirtualKey( 0x1, 0 ) << 16 );
Sleep(3000);
SetCurPos( -550, -108);
PostMessage_Trampoline( hWnd, WM_LBUTTONDOWN, 0, MapVirtualKey( 0x1, 0 ) << 16 );
PostMessage_Trampoline( hWnd, WM_LBUTTONUP, 0, MapVirtualKey( 0x1, 0 ) << 16 );
system("PAUSE");
} |
The PostMessages work by themselves... but when I use SetCurPos my mouse just gets sucked to the top left corner of my entire screen, regardless of where maple is. I am using windowed mode. Advice?
_________________
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Feb 21, 2009 9:11 pm Post subject: |
|
|
Uh. What.
SetCurPos( -440, -70 );
SetCurPos( -550, -108);
Do you know how the screen is organized?
_________________
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Feb 21, 2009 9:16 pm Post subject: |
|
|
| samuri25404 wrote: | Uh. What.
SetCurPos( -440, -70 );
SetCurPos( -550, -108);
Do you know how the screen is organized? |
Yeah i just realized that lol. Isnt 0,0 at top left?
What can I use to get the coordinates I need?
I just noticed kitterz trainer is passing off MouseX?Y as what your CharX/Y would be if you were at that spot.
Like I said, what can I use to get the coords I need?
_________________
|
|
| Back to top |
|
 |
123qwe Newbie cheater
Reputation: 0
Joined: 26 Dec 2006 Posts: 21
|
Posted: Sat Feb 21, 2009 11:35 pm Post subject: |
|
|
| ur cursor pos shouldnt be negative >_>, no such thing as negative cursor pos i think >_>
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Sat Feb 21, 2009 11:42 pm Post subject: |
|
|
| 123qwe wrote: | | ur cursor pos shouldnt be negative >_>, no such thing as negative cursor pos i think >_> |
Yeah I realized that, I saw your thread also. What were you using to find your coords?
_________________
|
|
| Back to top |
|
 |
123qwe Newbie cheater
Reputation: 0
Joined: 26 Dec 2006 Posts: 21
|
Posted: Sun Feb 22, 2009 2:52 am Post subject: |
|
|
this does NOT go in ur 'main'
| Code: | int ywt = 0;
POINT ca;
void getcursa()
{
if(ywt == 0)
{
ywt = 1;
ca.x = 0; ca.y =0;
GetCursorPos(&ca);
std::cout << "X=" << ca.x << " Y=" << ca.y << "\n";
Sleep(1500);
ywt = 0;
}
} |
this goes in ur main
| Code: | while(1)
{
if(GetAsyncKeyState(VK_NUMPAD9))
{
getcursa();
}
Sleep(10);
} |
you just press numpad 9 and it'll print the coords for hte user to ur cmd window =]
i took it out of my project =p
and if you dont like that code this is the raw stuff u need. it just gets the cursor positon and then moves the cursor to that position(shouldnt actually do anything because ur mouse is already at the cursor positon lol).
| Code: | POINT ca;
GetCursorPos(&ca);
SetCurPos(ca.x,ca.y); |
|
|
| Back to top |
|
 |
|