Sign in to follow this  
Followers 0
pixellegolas

Getting screen co-ordinates

11 posts in this topic

I'm trying to use pixelsearch but i need the coordinates of the area. How do i find these coordinates?

I'm right now using this code to get my mouse to the place i want to be but its only a X and Y coordinate

Hotkeyset("{END}","stop")

While 1

MouseMove(500, 1200)
WEnd

Func stop()
Exit
EndFunc

I cant screencapture the game where i want to see the coordinates so its really hard right now

Share this post


Link to post
Share on other sites



With this i get a good coordinate at MouseMove(850, 1120)

So the X=850 and Y=1120

I could basically go with this pixel that is red and wait for it to become black. I then want it to use "1" to buff.

Should i use pixelsearch or pixelgetcolor? Any hints?

Share this post


Link to post
Share on other sites

Ar you using the AU3Info tool to get the coords? Also, you might want to have a look at the PixelCoordMode option.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

With this i get a good coordinate at MouseMove(850, 1120)

So the X=850 and Y=1120

I could basically go with this pixel that is red and wait for it to become black. I then want it to use "1" to buff.

Should i use pixelsearch or pixelgetcolor? Any hints?

Check the helpfile for:

PixelGetColor()

Mouseclick()

Send()

Share this post


Link to post
Share on other sites

Ar you using the AU3Info tool to get the coords? Also, you might want to have a look at the PixelCoordMode option.

The game cant run in window mode so what i did was basically try different values and then the mouse moves in windows. Then i alt-tab in to the game and see if it is at the place i want. Not a good method :)

Share this post


Link to post
Share on other sites

I tried with

Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 1)

but when i am in game it tabs out to windows and get a messagebox saying 0. I changed the values to 0, 1 and 2 but nothing changed.

The code for box is:

Func pixel()
$var = PixelGetColor( 850 , 1120 )
MsgBox(0,"The decmial color is", $var)
MsgBox(0,"The hex color is", Hex($var, 6))
EndFunc

Both of them give me 0

Share this post


Link to post
Share on other sites

I still don't get the coordinates of pixelsearch.

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

Would:

PixelSearch ( 20, 20, 100, 100, 0xFFFFFF)

search for the color white in a straight line from left to right?

Wait a minute...i always thought that pixelsearch searches as a box? Where left, top, right, bottom is the corners? Is this correct? If so, shouldnt each corner contain a x and y value totalling 8 coordinates? I just don't get it :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

It makes a square

and if you have two adjacent corners of a square, then you have them all

Edited by danwilli

Share this post


Link to post
Share on other sites

Has anyone got screencapture to work in archlord? I get a 7mb black screen only. I can now get the screen coordinates in the game with script but the color is still printed 0. Any suggestions or theories to why? Why can it read coordinates but not the color?

Share this post


Link to post
Share on other sites

Ok guys, AutoIT can't seem to read screen colors from game so my next step is to use memory access pointes. Does anyone have any knowledge in DMA and that sort of stuff. I have seen it in some codes but not documented. I want to read HP and then use buffing with values.

Say that the HP is 50/100, then HP is 50%. When reaching 50% i want to press 1 for HP potion.

Any suggestions for this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0