Jump to content
pureacoustix

Trying to learn basic script writing. Help please

Recommended Posts

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
Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...