Jump to content

Trying to learn basic script writing. Help please


Recommended Posts

Posted (edited)

first while works but second while does not. please help i know this is easy for some of you. Also want it to loop constantly.

Spoiler

HotKeySet("{f1}", "ExitScript")

Global $money = False;
SetError(PixelSearch(520,708,930,712,0xBF5329))
While (1)
;win or loss
    PixelSearch(520,708,930,712,0xBF5329)
    If Not(@error) Then
; arrow on losing side
;click to double up
        MouseClick("main", 698, 464, 1)
        Sleep(1000) ;x2
        MouseClick("main", 854, 620, 1)
        Sleep(3000) ;reroll
        $money=False

        While Not($money=True)
            msgbox(0, "Ending Script", "Bot is Exiting")
            PixelSearch(520,711,930,709,0xBF5329)
            If(@error) Then
                MouseClick("main", 611, 464, 1)
                Sleep(1000)
;set to 1
                MouseClick("main", 738, 465, 1)
                Sleep(1000)
;x10
                MouseClick("main", 854, 620, 1)
                Sleep(3000)
;reroll
                $money=True
            EndIf
        WEnd
    EndIf
WEnd

Func ExitScript()
    Exit
EndFunc

 

Edited by pureacoustix
Posted
38 minutes ago, pureacoustix said:

first while works but second while does not. please help i know this is easy for some of you. Also want it to loop constantly.

  Hide contents

HotKeySet("{f1}", "ExitScript")

Global $money = False;
SetError(PixelSearch(520,708,930,712,0xBF5329))
While (1)
;win or loss
    PixelSearch(520,708,930,712,0xBF5329)
    If Not(@error) Then
; arrow on losing side
;click to double up
        MouseClick("main", 698, 464, 1)
        Sleep(1000) ;x2
        MouseClick("main", 854, 620, 1)
        Sleep(3000) ;reroll
        $money=False

        While Not($money=True)
            msgbox(0, "Ending Script", "Bot is Exiting")
            PixelSearch(520,711,930,709,0xBF5329)
            If(@error) Then
                MouseClick("main", 611, 464, 1)
                Sleep(1000)
;set to 1
                MouseClick("main", 738, 465, 1)
                Sleep(1000)
;x10
                MouseClick("main", 854, 620, 1)
                Sleep(3000)
;reroll
                $money=True
            EndIf
        WEnd
    EndIf
WEnd

Func ExitScript()
    Exit
EndFunc

 

What language is this? 

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