Jump to content

I need help


Recommended Posts

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!!

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...