Advertisement
Guest User

Untitled

a guest
Dec 7th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ^h::
  2. WinTitle = ahk_exe client.exe
  3. HpYPosition = 43
  4. MpYPosition = 56
  5. 0PercentXPosition = 1775
  6. 10PercentXPosition = 1784
  7. 20PercentXPosition = 1793
  8. 30PercentXPosition = 1802
  9. 40PercentXPosition = 1811
  10. 50PercentXPosition = 1820
  11. 60PercentXPosition = 1830
  12. 70PercentXPosition = 1839
  13. 80PercentXPosition = 1848
  14. 90PercentXPosition = 1857
  15. 100PercentXPosition = 1866
  16. RedHpColor = 0xF16161
  17. BlueMpColor = 0x6562F0
  18.  
  19. Loop
  20. {
  21.     if (not WinActive(WinTitle))
  22.     {
  23.         Sleep, 100
  24.         Continue
  25.     }
  26.    
  27.     PixelGetColor, EmergencyHpColor, 40PercentXPosition, HpYPosition, RGB
  28.     if (EmergencyHpColor = RedHpColor)
  29.     {
  30.     }
  31.     else
  32.     {
  33.         ControlSend,, {Numpad3}, %WinTitle%
  34.         Sleep, 500 ; Simulate human-like delay
  35.         Continue
  36.     }
  37.    
  38.     PixelGetColor, NormalHpColor, 50PercentXPosition, HpYPosition, RGB
  39.     if (NormalHpColor = RedHpColor)
  40.     {
  41.         PixelGetColor, MpColor, 70PercentXPosition, MpYPosition, RGB
  42.         if (MpColor = BlueMpColor)
  43.         {
  44.         }
  45.         else
  46.         {
  47.             ControlSend,, {Numpad0}, %WinTitle%
  48.             Sleep, 500 ; Simulate human-like delay
  49.             Continue
  50.         }
  51.     }
  52.     else
  53.     {
  54.     }
  55.    
  56.     Sleep, 30
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement