pureacoustix Posted May 19, 2018 Posted May 19, 2018 (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 May 19, 2018 by pureacoustix
Tommm39 Posted May 19, 2018 Posted May 19, 2018 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?
pureacoustix Posted May 19, 2018 Author Posted May 19, 2018 9 minutes ago, Tommm39 said: What language is this? program im using is autoit