Coordinates

05/23/2007 00:30 a51ts4#1
I was able to find with cheat engine 3 memory allocations of the x coordinate (same for y). I was wondering if anyone could help me out, or point me into the right directin.

I want to read the memory address (found in CE) for x and y. How could I go about this with VB or Autoitv3?

Thanks for help in adv.
05/23/2007 04:40 rookiehacker#2
im the guy to ask about that, i thought it was 4 addresses for character cordinates. i use visual basic. wait for me to release logbot code and you can find alot fo useful things or send me your email address and i'll send you some stuff
05/23/2007 23:11 a51ts4#3
Alright thats great. Thanks for responding! I'll email you.
05/23/2007 23:39 kevindai#4
Quote:
Originally posted by rookiehacker@May 23 2007, 04:40
im the guy to ask about that, i thought it was 4 addresses for character cordinates. i use visual basic. wait for me to release logbot code and you can find alot fo useful things or send me your email address and i'll send you some stuff
is logbot pixel based?
05/24/2007 01:50 rookiehacker#5
Quote:
Originally posted by kevindai@May 23 2007, 23:39
is logbot pixel based?
i sure hope its pixel based...i can go check the API's used i guess...why do you ask? does it not click correctly on your computer? do i need to start doing math involving twips per pixel?
05/24/2007 02:10 rookiehacker#6
ok for you VB programmers out there, heres what my code looks like. aparently a few people wanna see how to do some stuff. i hope this helps. if you guys wanna make a super great hack we need to force the exp chart open by any means...ive been looking through child windows and changing visibility but all i can do is bring up the log in screen and make the game look glitchy.....hmmmm i guess we will have to debug the game some to cancel the code that close exp chart?
05/25/2007 05:17 a51ts4#7
Whats vb code to get x,y in vb.net 5? I read your code and searched everywhere, but I cant seem to get it to work :(. Im more familiar with autoit. So I need to learn the functions in vb.
05/25/2007 06:55 rookiehacker#8
im using Visual Basic Express Edition 2005. you can DL it for free from microsoft. it is a trial version but if you change
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft&#0 92;VBExpress\8.0\Registration\0500. 0x0002\Params to be 1 then it will be registered
you should be able to get all my functions to work in your version of VB but you need to change a few things...like change Structure to Type and Integer to Long i thought i mention in that code my integers are 32 bit...
anyways to get your X and Y cordinates you need to get Process ID first
Then get a handle for that process using the process ID
Then use ReadProcessMemory with that handle (make sure you know the correct number of bytes to copy into any data type you define this function to use)
Then close the handle to the process
maybe if you tell me more about your problem i can help you out, but i would need specific details...im not certain what syntax your VB uses

<hr>Append on May 25 2007, 07:27<hr> ohh hey it occoured to me youre probably having a hard tiem with UIntPtr variables because they probably dont exist on your VB or something...for the address in the ReadProcessMemory function use a 32 bit unsigned integer
ByVal lpBaseAddress As Integer <- this one is signed so it bugs out if you try to big of an address, other than that it works great
or if you have the data type
ByVal lpBaseAddress As UInt32 <--thats the one i need to make my code use still cause UIntPtr sucks

I hope that was your problem. otherwise give me details cause im not familure with your version of VB
05/25/2007 09:18 a51ts4#9
I was able to figure out how to get x,y of the mouse in general after i looked over the exp hack code.

What im trying to figure out next is how to move the mouse to a specified point.

Once I get that down, I will try reading the processs handle (from cheat engine? as a hex code?) of the characters position, then compare it to where I want him to be on the map.

Say hes at 300,200 and I want him to go to 320,210. I'd have it click to get him to 320,210 and stop when the handle is = to 320,210.

Do you get what i mean?

Thanks
05/26/2007 03:05 rookiehacker#10
Quote:
Originally posted by a51ts4@May 25 2007, 09:18
I was able to figure out how to get x,y of the mouse in general after i looked over the exp hack code.

What im trying to figure out next is how to move the mouse to a specified point.

Once I get that down, I will try reading the processs handle (from cheat engine? as a hex code?) of the characters position, then compare it to where I want him to be on the map.

Say hes at 300,200 and I want him to go to 320,210. I'd have it click to get him to 320,210 and stop when the handle is = to 320,210.

Do you get what i mean?

Thanks
if you want x and y of mouse use GetCursorPos
to move the mouse use SetCursorPos
to click the mouse you need to use SendInput
If you look at my ClickDaMouse sub you will see i click kinda funny by using SetCursorPos after i call SendInput to click.

*to read the game memory you use ReadProcessMemory i recommend you copy my GetProcess sub, you dont have to do this to make a clicker for the exp hack thing. This is the thing that requires a process handle, if you find your character cordinates. you dont need cheat engine for this, but it would help you to find the address.

anyways to try reading memory just copy my code as much as you can, send me a code of sample fo what your trying to do and i should be able to clear things up and maybe give you some comments for what each line of code does.
05/26/2007 07:49 a51ts4#11
Alright, I'm reviewing your code for the Exphack as much as I can, trying to understand most of it. Some of the functions I don't understand yet because I've never used them.

I figured I needed to use SetCursorPos, and SendInput, but what I didn't understand was this part of the code for the SendInput:
inputEvents(0).xi.dx = xyC.X
inputEvents(0).xi.dy = xyC.Y
inputEvents(0).xi.mouseData = 0
inputEvents(0).xi.dwFlags = iMF
inputEvents(0).xi.dwtime = 0
inputEvents(0).xi.dwExtraInfo = 0
inputEvents(0).dwType = INPUT_MOUSE


Anyway, those parts aren't really big issues (i think) at the moment. I can easily figure those out as I go along.

As I have been working on this project of mine, i've also been trying it in autoit.

What I was stumbled upon was what algorithm should be used to calculate where the mouse needs to click to arrive at the destination.
I'm having a hard time following this part with your vb code just becuase I haven't dealt with vb in a while.
05/27/2007 08:25 rookiehacker#12
inputEvents(0).xi.dx = xyC.X 'xyC.X the X cordinate we want to click
inputEvents(0).xi.dy = xyC.Y 'xyC.Y the Y cordinate
inputEvents(0).xi.mouseData = 0 'Not used for basic clicking
inputEvents(0).xi.dwFlags = iMF 'This is LeftDown LeftUp MouseMove or anythign else you wanna do, add everything together
inputEvents(0).xi.dwtime = 0 'DO NOT make this bigger than 0
inputEvents(0).xi.dwExtraInfo = 0 'Not used for basic clicking
inputEvents(0).dwType = INPUT_MOUSE 'We are doing a mouse event not keyboard or other device

ok SendInput takes an array of input events...you can use a bigger array of stuff if you want but its not needed for anything we are doing because LeftDown and LeftUp can be added together and stuck in the same call to SendInput, this is because they are BitFlags, binary we are writing in normal decimal form but you can see the bits if you know what you are looking for, MouseMove is 1 (1) LeftDown is 10 (2) LeftUp is 100 (4), you can add them all together and get 111 for a full mouse click...i dont use MouseMove because its kinda screwy i instead use MouseAbsolute 10000000 (128) (i think that was MouseAbsolute)

go to [Only registered and activated users can see links. Click Here To Register...] for more info

You notice i do NOT set dwtime because it turns off the monitor for x seconds...extrainfo and mousedata i think are for mousewheel stuff.

My variables xyC and iMF are stuff i pass into my sub to decide where on the screen to click the mouse and what mouse flags i want to use. You will have to DL WinUser.H and Windows.H to find the values for constants if you wanna use the API's

You may also notice i often call SetCursorPos after i actaully make my click...i dont get it either but the game seems to prefer this