Jump to content

This is supposed to loop...


Recommended Posts

It works well for awhile, but at some point, it ends up failing...

AutoItSetOption("SendKeyDelay", 200)
AutoItSetOption("SendKeyDownDelay", 200)
Sleep(8000)
Send("{ESCAPE}")
Sleep(100)
Send("{ESCAPE}")
Sleep(100)
Send("{ESCAPE}")
Sleep(100)
For $I = 1 To 100000 Step 1
    FIND()
Next

Func FIND()
    Send("{F1}")
    Sleep(2000)
    Send("{LEFT DOWN}")
    For $I = 1 To 1000 Step 1
        Send("{TAB}")
        If PixelGetColor(1181, 689) = 15262896 And PixelGetColor(1225, 689) = 15262896 Then
            $I = 1000
            Send("{LEFT UP}")
            PULL()
        EndIf
    Next
EndFunc


Func PULL()
    If PixelGetColor(1181, 689) = 15234280 And PixelGetColor(1225, 689) = 15234280 Then
        $I = 1000
        Return
    EndIf
    Sleep(500)
    Send("^3")
    Send("^3")
    Send("^3")
    Sleep(3000)
    If PixelGetColor(1181, 689) = 15234280 And PixelGetColor(1225, 689) = 15234280 Then
        $I = 1000
        Return
    EndIf
    If PixelGetColor(1181, 689) = 15262896 And PixelGetColor(1225, 689) = 15262896 Then
        Send("^1")
        Send("^1")
        Send("^1")
        $J = 0
        Do
            $J = ($J + 1)
        Until (PixelGetColor(1083, 25) = 16777215 And PixelGetColor(1083, 26) = 16777215 And PixelGetColor(1083, 27) = 16777215 And PixelGetColor(1083, 28) = 16777215 And PixelGetColor(1083, 29) = 16777215 And PixelGetColor(1083, 30) = 16777215 And PixelGetColor(1083, 31) = 16777215 And PixelGetColor(1083, 32) = 16777215 And PixelGetColor(1083, 33) = 16777215 And PixelGetColor(1083, 34) = 16777215 And PixelGetColor(1083, 35) = 16777215 And PixelGetColor(1083, 36) = 16777215 And PixelGetColor(1083, 37) = 16777215 And PixelGetColor(1083, 38) = 16777215) Or $J = 200
        Send("{NUMPAD2 DOWN}")
        Sleep(500)
        Send("{NUMPAD2 UP}")
        Sleep(200)
        Send("^3")
        Send("^3")
        Send("^3")
        Sleep(4000)
    EndIf
    If PixelGetColor(1181, 689) = 15234166 And PixelGetColor(1225, 689) = 15234166 Then
        $I = 1000
        Sleep(3000)
        ATTACK()
    EndIf
EndFunc


Func ATTACK()
    Send("^1")
    Send("^1")
    Send("^1")
    Sleep(1000)
    Send("^2")
    Send("^2")
    Send("^2")
    KILL()
EndFunc


Func KILL()
    For $I = 1 To 1000 Step 1
        Sleep(1000)
        If PixelGetColor(1165, 746) = 508167 Then
            Send("^6")
            Send("^6")
            Send("^6")
        EndIf
        If PixelGetColor(1181, 689) = 15234166 And PixelGetColor(1225, 689) = 15234166 Then
        Else
            Sleep(500)
            Send("{NUMPAD2 DOWN}")
            Sleep(500)
            Send("{NUMPAD2 UP}")
            Sleep(500)
            Send("{NUMPAD2 DOWN}")
            Sleep(500)
            Send("{NUMPAD2 UP}")
            Sleep(500)
            Send("{NUMPAD2 DOWN}")
            Sleep(500)
            Send("{NUMPAD2 UP}")
            $I = 1000
            CURE()
        EndIf
    Next
EndFunc


Func CURE()
    Sleep(1000)
    Send("^0")
    Send("^0")
    Send("^0")
    Sleep(4000)
EndFunc
Link to comment
Share on other sites

So, some questions: Where is it failing at, what do you want it to do, do you get an error message? what are you trying to control, etc.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Im not sure where its failing... its for a game... no errors...

The Find function finds what it needs, but sometimes, it doesnt continue to the Kill function... it skips it and manages to find another enemy... so the old enemy just sits there and whails away on me, and kills me...

Link to comment
Share on other sites

Its FFXI...

It finds a mob... then it continues to kill it... then cures myself, and its supposed to loop...

But sometimes it finds the mob and engages it... then just looks for another without killing it, or sometimes it turns around in the middle of the battle until the mob kills me.

Any idea?

Link to comment
Share on other sites

It doesnt actually go back to the beginning. Once all of the For loops have finished, and the values have reached the For limit, it calls the other functions and when it reaches Cure once all of the functions have reached the highest value nothing happens.

Is that right?!

Please correct me if I am wrong.

Hiyoal :)

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