Sign in to follow this  
Followers 0
newbie01

I need help

3 posts in this topic

I want to write an auto games. In this games, 0 key is buff HP. when HP is full, press 0 to end buff:

while 1

Send("0")

while 2

sleep(1000)

PixelSearch( 205, 58, 208, 58, 0xA90205) ;kill den khi wai' chet

if not @error then

ExitLoop

EndIf

WEnd

send("0")

sleep(1000)

Wend

But it's not run extractly (dont press 0 went HP if full).

I'm newbie so can anyone help me?

Thanks!!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

While 1
    If PixelSearch( 205, 58, 208, 58, 0xA90205) = @error Then
        Send("0")
        Do
            Sleep(1000)
        Until PixelSearch( 205, 58, 208, 58, 0xA90205) <> @error
        send("0")
    EndIf
    sleep(1000)
Wend

Edited by foster74

Share this post


Link to post
Share on other sites

Thanks Foster74! But it dont press 0 when HP is full

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