Sign in to follow this  
Followers 0
Splitz

Help with this small program

7 posts in this topic

i have only made probally 2-3 things with autoit, so i was wondering if anyone here could help me out with this, see what i want to do is:

see in the 1st image how the life bar is full

Posted Image

now when it goes down like this

Posted Image

i want autoit to preform an action to send a mouse click or (a packet into the game to click on that area without moving my mouse there?) on this area

Posted Image

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Read in Auto It about Pixel Search.

; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf


; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
   Send("1") ; 1 is to heal. 
EndIf
Edited by evilelf

Share this post


Link to post
Share on other sites

Use your info finder tool that comes with autoit and get pixel colors and locations. Write your code with statments like

If some pixel colors are persent then do this and if they are not, do something else.

you can look up some of my code I did for FFXI to see a ton of examples.


Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites

To answer your question... look at MouseClickPlus() (doesn't always work) or maybe ClickInControl() ... you'll need to search the forums for it.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

so confusing O_o

my thing looks like this but i keep getting error's

If WinActivate("Diablo II")

Then

$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )

If Not @error Then

MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])

EndIf

$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )

If Not @error Then

Send("1") ; 1 is to heal.

EndIf

Edited by Fenix`

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