Advertisement
Guest User

asd

a guest
Feb 16th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.62 KB | None | 0 0
  1. #include <TrayConstants.au3>
  2.  
  3. HotKeySet("{F3}", "ChangePaused")
  4. HotKeySet("{F4}", "Terminate")
  5.  
  6. Global $botEnabled = False
  7. Global $isWinActive = False
  8.  
  9.  
  10. while (True)
  11.    if $botEnabled == True Then
  12.       If (WinGetTitle("[ACTIVE]") == "FFR The Game - FlashFlashRevolution.com - Google Chrome") Then
  13.          If ($isWinActive == False) Then
  14.             GeneralTraytip("Game window is focused!", 1000)
  15.             $isWinActive = True
  16.          EndIf
  17.  
  18.          If (Not(PixelGetColor(1252, 406) == 0x000000)) Then
  19.             ;Sleep(50)
  20.             Send("{LEFT}")
  21.             ;ShowKeyEvent("KEY_DOWN")
  22.          EndIf
  23.  
  24.          If (Not(PixelGetColor(1330, 406) == 0x000000)) Then
  25.             ;Sleep(50)
  26.             Send("{DOWN}")
  27.             ;ShowKeyEvent("KEY_DOWN")
  28.          EndIf
  29.  
  30.          If (Not(PixelGetColor(1409, 406) == 0x000000)) Then
  31.             ;Sleep(50)
  32.             Send("{UP}")
  33.             ;ShowKeyEvent("KEY_UP")
  34.          EndIf
  35.  
  36.          If (Not(PixelGetColor(1486, 406) == 0x000000)) Then
  37.             ;Sleep(50)
  38.             Send("{RIGHT}")
  39.             ;ShowKeyEvent("KEY_RIGHT")
  40.          EndIf
  41.  
  42.       Else
  43.          $isWinActive = False
  44.       EndIf
  45.    EndIf
  46. WEnd
  47.  
  48. Func ChangePaused()
  49.    $botEnabled = Not $botEnabled
  50.    TrayTip("Bot State Changed!", "Bot Enabled: " & $botEnabled, 0, $TIP_ICONASTERISK)
  51.    Sleep(1000)
  52.    TrayTip("clears any tray tip", "", 0)
  53. EndFunc
  54.  
  55. Func Terminate()
  56.    GeneralTraytip("Terminating bot ...", 1000)
  57.    Exit
  58. EndFunc
  59.  
  60. Func ShowKeyEvent($message)
  61.    TrayTip("Key Event", "Sent Key: " & $message, 0, $TIP_ICONASTERISK)
  62.    Sleep(800)
  63.    TrayTip("clears any tray tip", "", 0)
  64. EndFunc
  65.  
  66. Func GeneralTraytip($message, $showtimems)
  67.    TrayTip("Bot Message!", $message, 0, $TIP_ICONASTERISK)
  68.    Sleep($showtimems)
  69.    TrayTip("clears any tray tip", "", 0)
  70. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement