Jump to content

Holy Beast Online bot error


Zemallo
 Share

Recommended Posts

I need help with this bot i have im getting an error on line 39 of it

i get an error saying i dont have a matching If statement with my Else statement

the error says Error: "Else" Statement with no matching "If" statement.

please help

ps The bot is for Holy Beast Online

;Made by Snow9
;thx to elitepvpers.com for learning me the basics of auto it
;
;move the enemys lifebar to the upper right corner
;of the screen and make sure its on top of your map
;your life bar should be in the upper left corner

Global $Paused
HotKeySet("{end}", "Pause")
HotKeySet("{home}", "Start")

While 1
    Sleep(100)
WEnd

Func Pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd
EndFunc

; keys (f1 f2 etc dont work for HBO)
; &     1
; é    2
; "     3
; '     4
; (     5
; §    6
; è    7
; !     8
; ç    9
; à    0

Func Start()
while 1
    Sleep(100)
    Send("{tab}")   ;i send tab here, and it does work, mob is selected
Else

        while $mob = NOT "72812c" ;last pixel of mobs lifebar, if this is not red(72812c is the hex code) then the mob is dead, but pixelsearch doesnt work in hbo
        Send("{ç}")
        $mm = PixelGetColor ( 1138,12 )
        $mob = Hex($mm, 6)
        wend
        Send("{à}")
        Sleep(500)
        Send("{à}")
        Sleep(300)
        Send("{à}")
    EndIf
endif

Wend

endfunc
Link to comment
Share on other sites

Your IF statements lack the IF part:

This is the proper IF statement structure:

If (condition) Then
    ;code goes here
EndIf

If (condition) Then
    ;code goes here
Else
    ;code goes here
EndIf

Obviously, (condition) would be replaced by the logical condition used by your IF statement. Check the help file for more information.

Edited by omikron48
Link to comment
Share on other sites

Your IF statements lack the IF part:

This is the proper IF statement structure:

If (condition) Then
    ;code goes here
EndIf

If (condition) Then
    ;code goes here
Else
    ;code goes here
EndIf

Obviously, (condition) would be replaced by the logical condition used by your IF statement. Check the help file for more information.

im still real fuzzy i see that if goes before else but im unsure of where to place the if x.x
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...