Jump to content

Recommended Posts

Posted

If $result = 1 Then
    ;still looting
    Sleep(1000)
    If $result = 1 Then
        ;still looting
        Sleep(1000)
        If $result = 1 Then
            ;still looting
            Sleep(1000)
            If $result = 1 Then
                ;still looting
                Sleep(1000)
                If $result = 1 Then
                    ;still looting
                    Sleep(1000)
                    If $result = 1 Then
                        ;still looting
                        Sleep(1000)
                        If $result = 1 Then
                            ;still looting
                            Sleep(1000)
                            If $result = 1 Then
                                ;still looting
                                Sleep(1000)
                                If $result = 1 Then
                                    ;still looting
                                    Sleep(1000)
                                    If $result = 1 Then
                                        ;still looting
                                        Sleep(1000)
                                        If $result = 1 Then
                                            ;still looting
                                            Sleep(1000)
                                            If $result = 1 Then
                                                ;still looting
                                                Sleep(1000)
                                                If $result = 1 Then
                                                    ;still looting
                                                    Sleep(1000)
                                                    If $result = 1 Then
                                                        ;still looting
                                                        Sleep(1000)
                                                        If $result = 1 Then
                                                            ;still looting
                                                            Sleep(1000)
                                                        Else
                                                            Call("Logic")
                                                        EndIf
                                                    Else
                                                        Call("Logic")
                                                    EndIf
                                                Else
                                                    Call("Logic")
                                                EndIf
                                            Else
                                                Call("Logic")
                                            EndIf
                                        Else
                                            Call("Logic")
                                        EndIf
                                    Else
                                        Call("Logic")
                                    EndIf
                                Else
                                    Call("Logic")
                                EndIf
                            Else
                                Call("Logic")
                            EndIf
                        Else
                            Call("Logic")
                        EndIf
                    Else
                        Call("Logic")
                    EndIf
                Else
                    Call("Logic")
                EndIf
            Else
                Call("Logic")
            EndIf
        Else
            Call("Logic")
        EndIf
    Else
        Call("Logic")
    EndIf
Else
    Call("Logic")
EndIf

Posted

Can you explain how does the $result variable's value is changed? Right now if it's 1 it'll sleep 15 seconds, otherwise Logic function will be invoked once. If you want it to be this way but in any arbitrary depth you can use recursion with a counter, or a loop inside a loop.

Posted

I'm assuming what you're doing here is testing whether you're still looting, waiting one second, testing again, and so on, until you're not looting anymore.

Do
Sleep(1000)
;Call your function
$result = Logic()
Until $result <> 1

That's the Do, Until version. You could also use While, Wend, and even a For, Next loop.

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
  • Recently Browsing   0 members

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