Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Global $g_bPaused = True
- HotKeySet("{ESC}", "Terminate")
- HotKeySet("{p}", "TogglePause")
- main()
- Func main()
- While 1
- While $g_bPaused
- Sleep(100)
- WEnd
- ; Kontroller
- If Not HourBetween(00, 05) Then ContinueLoop
- If Not hasInternetConnection() Then Return ConsoleWrite("! No internetz by3z" & @LF)
- ; Allt som körs om alla kontroller är OK
- Local $aCoord = PixelSearch(742, 822, 920, 889, 0x00BAF5, 2, 2) ;Color of "Okay"-button after death
- If Not @error Then
- MouseUp("left") ; Set the left mouse button state as up.
- ;"Okay" button @death
- MouseMove($aCoord[0], $aCoord[1], 0)
- Sleep(400)
- MouseClick("left")
- ;Location for starting
- MouseMove(952, 761, 2)
- Sleep(400)
- MouseDown("left") ; Set the left mouse button state as down.
- Else
- ;Leftmost side
- MouseMove(720, 843, 30)
- Sleep(100)
- ;Rightmost side
- MouseMove(1183, 843, 30)
- Sleep(100)
- EndIf
- WEnd
- EndFunc ;==>main
- Func HourBetween($hh1, $hh2)
- Return @HOUR >= $hh1 And @HOUR <= $hh2
- EndFunc ;==>HourBetween
- Func hasInternetConnection()
- Ping("google.se")
- Return Not @error
- EndFunc ;==>hasInternetConnection
- Func TogglePause()
- $g_bPaused = Not $g_bPaused
- TrayTip("STATUS", $g_bPaused ? 'PAUS' : 'KÖR', 5, 1)
- EndFunc ;==>TogglePause
- Func Terminate()
- Exit
- EndFunc ;==>Terminate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement