Jump to content

Return to line ....


Recommended Posts

Hello has all, I am French, and I use a translator, I made a script with autoit, but I would want that if the program does not find certain pixel, as it returns has the previous action(share), or, a predefined line...

Is there a code for that?

My code :

While 1 
    $coord=PixelSearch( 0, 0 , 1024 , 768 ,"0xF4F4FD")
If Not @error Then
;Rejoignons le combat....
Mouseclick("left", $coord[0] , $coord[1] , 1, 0)
Mouseclick("left", $coord[0] + 10, $coord[1] + 10 , 1, 0)
;sortie de boucle...
ExitLoop
EndIf
wend

While 2
    sleep("2000")
    $pret=Pixelsearch(661, 446, 719, 463, "0xFF6600")
    If @error Then
[u][b]; I want that he(it) returns has the first line...[/b][/u]
        EndIf
        If Not @error Then
Mouseclick("left", $pret[0], $pret[1], 1, 10)           
ExitLoop
EndIf
wend
Link to comment
Share on other sites

Bonjour (mais mon francais est nul ^_^ )

Put your entire script in another loop, and read the helpfile - look at continue loop. The rest of the script seems fairly good though. What game is it for?

I do not know exactly what you are attempting to do, so this will not be 100% accurate. But it is the general idea.

CODE
While 1

While 1

$coord=PixelSearch( 0, 0 , 1024 , 768 ,"0xF4F4FD")

If Not @error Then

;Rejoignons le combat....

Mouseclick("left", $coord[0] , $coord[1] , 1, 0)

Mouseclick("left", $coord[0] + 10, $coord[1] + 10 , 1, 0)

;sortie de boucle...

ExitLoop

EndIf

wend

While 2

sleep("2000")

$pret=Pixelsearch(661, 446, 719, 463, "0xFF6600")

If @error Then

ContinueLoop[2]

Else

Mouseclick("left", $pret[0], $pret[1], 1, 10)

ExitLoop

EndIf

wend

WEnd

Edit: added level to continue loop.

Edited by mdiesel
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...