Jump to content

HOW DO I GET DO UNTIL TO WORK WITH A PIXEL SEARCH?


JASON9
 Share

Recommended Posts

IM WRITEING A SCRPIT FOR A GAME AND I WANT IT TO TARGET NEAREST MOB (WITCH IS MY C KEY) THEN SEARCH FOR THE PORTRAIT AND IF IT SEE'S A PORTEAIT THEN ATTACK THE TARGET (WITCH IS 3 AND 4 UNTILL THE MOB DIES AND PORTRAIT DROPS THEN CONTINUE ON WITH MY SCRIPT BUT I CANT SEEM TO GET IT TO DO THE UNTIL IT JUST KEEPS RUNNING 3 AND 4 PART OF THE LOOP AND NEVER MOVES ON TO THE 8 PART HOW DO I WRITE THIS? I WOULD APPRICIATE ANY HELP THX

While 1

If $t = 1 Then

Sleep(1000)

Send("c")

Sleep(1000)

; Find a pure red pixel or a red pixel within 10 shades variations of pure red

$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )

Do

Sleep(1000)

Send("3")

Sleep(1000)

Send("4")

Sleep(1000)

Until $coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )

Sleep(1000)

EndIf

SLEEP(1000)

SEND("8")

SLEEP(1000)

Endif

WEndT IT TO DO

Link to comment
Share on other sites

IM WRITEING A SCRPIT FOR A GAME...

This thread probably belongs over in the AutoIt Gaming and Bots forum. But you probably need to replace the line:

Until $coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )

with this:

$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )
$err = @error
Until Not $err
Edited by Squirrely1

Das Häschen benutzt Radar

Link to comment
Share on other sites

  • Developers

THAT WORKED THANK'S ALOT FOR THE HELP

Your CAPS key stuck or something ? Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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