; scans for green values, if green, it holds the LMB ; scans for red values, if red, it lets go, if it doesn't see red, it holds the LMB ; scans for indicator, if indicator, it stops fishing ;greenINDI = green ! redINDI = red ! INDI = dock HotKeySet("{ESC}", "Terminate") HotKeySet("!g", "startBot"); Global $greenINDI[3] Global $redINDI[3] Global $INDI Global $seenGreen MsgBox(0, "BOT START", "Bot has started and is idling.") Func Terminate() Exit 1 EndFunc Func startBot() ;clicks to start charge --done ;waits 20-500 ms --done ;clicks --done MsgBox(0, "fishEZ", "Gone fishing!") ;;indicates bot has started Local $rng $rng = Random(50, 200, 0) MouseClick('Left') ;single click to start charge bar going up and down Sleep($rng) ;sleep allows the charge bar to rise MouseClick('Left') ;stops the charge from moving and throws the hook into the water Call("assignGreenINDI") ;puts colors into greenINDI Call("assignRedINDI") ; " " " redINDI Local $screenCoords = WinGetPos("[ACTIVE]") seenGreen = False While 1 While !seenGreen ;this while should search for green $rng = Random(0, 2, 0) ;searches for green $point = PixelSearch((screenCoords[2] * .25), (screenCoords[3] * .25), (screenCoords[2] * .75), (screenCoords[3] * .75), greenINDI[$rng]) if IsArray($point) Then MouseDown('Left') ;stop searching for green seenGreen = True EndIf Sleep(50) WEnd While seenGreen = True ;this while should search for red, and should only search when it has seen green $rng = Random(0, 2, 0) ;searches for red $point = PixelSearch((screenCoords[2] * .25), (screenCoords[3] * .25), (screenCoords[2] * .75), (screenCoords[3] * .75), redINDI[$rng]) if IsArray($point) Then MouseUp('Left') EndIf MouseDown('Left') ;with any luck, this should hold LMB down if at any time red was seen Sleep(50) WEnd Wend EndFunc Func assignGreenINDI() ;assigns 3 green colors to greenINDI $greenINDI[0] = "0x1ED72C" $greenINDI[1] = "0x1BCD1F" $greenINDI[2] = "0x1FDA26" EndFunc Func assignRedINDI() ;assigns 3 red colors to redINDI $redINDI[0] = "0xF40001" $redINDI[1] = "0xF30101" $redINDI[2] = "0xEE0101" EndFunc While 1 sleep(250) WEnd