AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Random Mouse move and click enemy pixel bar health

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
kampret



Joined: 24 Apr 2005
Posts: 1

PostPosted: Mon Apr 25, 2005 9:58 pm    Post subject: Random Mouse move and click enemy pixel bar health Reply with quote

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
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Mon Apr 25, 2005 10:19 pm    Post subject: Reply with quote

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
}

_________________

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group