SHARE
TWEET

Untitled

a guest Aug 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6.  
  7.  
  8. SetKeyDelay, 0
  9. SetMouseDelay, 0
  10. Setbatchlines, -1
  11. #SingleInstance, Force
  12. x1Pixel := "1855" ; Approx 95%
  13. x2Pixel := "1825" ;
  14. x3Pixel := "1825" ; Approx 35%
  15. x4Pixel := "1860" ;
  16. HealthY := "156"  ;
  17.  
  18. Loop,
  19. {      
  20.     If WinActive("Tibia")
  21.     {
  22.  
  23.  
  24.         ;Approx 35%
  25.         PixelGetColor, Heal3, x3Pixel, HealthY, RGB
  26.             If(Heal3 != 0xF16161)
  27.             {
  28.                 SendInput {F10}
  29.                 Sleep, 200
  30.             }
  31.  
  32.         ;90% - 80%
  33.         PixelGetColor, Heal1, x1Pixel, HealthY, RGB
  34.         PixelGetColor, Heal2, x2Pixel, HealthY, RGB
  35.             If(Heal1 != 0xF16161 && Heal2 = 0xF16161)
  36.             {
  37.                 SendInput {F11}
  38.                 Sleep, 200
  39.             }
  40.  
  41.         ;100% - 90%
  42.         PixelGetColor, Heal1, x1Pixel, HealthY, RGB
  43.         PixelGetColor, Heal4, x4Pixel, HealthY, RGB
  44.             If(Heal4 != 0xF16161 && Heal1 = 0xF16161)
  45.             {
  46.                 SendInput {F2}
  47.                 Sleep, 200
  48.             }
  49.  
  50.  
  51.  
  52.  
  53.    
  54.  
  55.             PixelGetColor, Heal2, x2Pixel, HealthY, RGB
  56.             PixelSearch, Px, Py, 1755, 328, 1855, 328, 0xFF0000, 1, Fast RGB
  57.                 If (ErrorLevel = 0 && Heal2 = 0xF16161)
  58.                 {
  59.                 SendInput {F2}
  60.                 Sleep, 200
  61.                 }
  62.     }
  63.     Sleep, 10
  64. }
  65. Return
  66.  
  67. !+e::ExitApp
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top