kampret
Joined: 24 Apr 2005 Posts: 1
|
Posted: Mon Apr 25, 2005 9:58 pm Post subject: Random Mouse move and click enemy pixel bar health |
|
|
i play some rpg game ( ex Diablo 2 )
my problem is how to make mouse move randomly , and if the mouse point at enemy pixel bar health ex : 0xB50408 ( enemy colour / the enemy move random ) mouse can do auto click and search the enemy bar pixel again , pls help me |
|
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Mon Apr 25, 2005 10:19 pm Post subject: |
|
|
If not PixelSearch you could do something like: | Code: | Loop
{
; Make a random x value
Random, x, 1, %A_ScreenWidth%
; Make a random y value
Random, y, 1, %A_ScreenHeight%
; Move the mouse to the random coordinate
MouseMove, %x%, %y%
; Get's the pixel colour where the mouse is
PixelGetColor, colour, %x%, %y%
; If the colour is '0xB50408' it will click there
if colour = 0xB50408
MouseClick, Left, %x%, %y%
; ... and start the loop again
} |
_________________
 |
|