Jump to content

Code need some help


BluhBlah
 Share

Recommended Posts

Gives error:

Line 9

WEnd

Error: "Wend" statement with no matching "While" statement.

It gave error when i added

If $coord = PixelSearch(512, 392, 512, 392, 0x9B9992) Then

But really need this so.. Help please

Dim $stop = 0

HotKeySet("{F4}", "toggel")
HotKeySet("{F5}", "off")

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then
             $coord = PixelSearch(146, 85, 146, 85, 0xD6593B)
            If Not @error Then
                Send ("B")
                Sleep (5000) Then
                $coord = PixelSearch(512, 392, 512, 392, 0x9B9992)
                If Not @error Then
                Send ("1y7")
                Send ("{ENTER}")
            EndIf
        EndIf
    EndIf
WEnd
                
                
Func toggel()
    If $stop = 0 Then
        $stop = 1
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0 
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit
EndFunc
Edited by Xoriaz
Link to comment
Share on other sites

You missed the ENDIF for the last statement you added.

Dim $stop = 0

HotKeySet("{F4}", "toggel")
HotKeySet("{F5}", "off")

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then
             $coord = PixelSearch(146, 85, 146, 85, 0xD6593B)
            If Not @error Then
                Send ("B")
                Sleep (5000)
                If $coord = PixelSearch(512, 392, 512, 392, 0x9B9992) Then
                Send ("123")
                Send ("{ENTER}")
                EndIf ;missed this one
            EndIf
        EndIf
    EndIf
WEnd


Func toggel()
    If $stop = 0 Then
        $stop = 1
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit
EndFunc
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...