Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- SetKeyDelay, 0
- SetMouseDelay, 0
- Setbatchlines, -1
- #SingleInstance, Force
- x1Pixel := "1855" ; Approx 95%
- x2Pixel := "1825" ;
- x3Pixel := "1825" ; Approx 35%
- x4Pixel := "1860" ;
- HealthY := "156" ;
- Loop,
- {
- If WinActive("Tibia")
- {
- ;Approx 35%
- PixelGetColor, Heal3, x3Pixel, HealthY, RGB
- If(Heal3 != 0xF16161)
- {
- SendInput {F10}
- Sleep, 200
- }
- ;90% - 80%
- PixelGetColor, Heal1, x1Pixel, HealthY, RGB
- PixelGetColor, Heal2, x2Pixel, HealthY, RGB
- If(Heal1 != 0xF16161 && Heal2 = 0xF16161)
- {
- SendInput {F11}
- Sleep, 200
- }
- ;100% - 90%
- PixelGetColor, Heal1, x1Pixel, HealthY, RGB
- PixelGetColor, Heal4, x4Pixel, HealthY, RGB
- If(Heal4 != 0xF16161 && Heal1 = 0xF16161)
- {
- SendInput {F2}
- Sleep, 200
- }
- PixelGetColor, Heal2, x2Pixel, HealthY, RGB
- PixelSearch, Px, Py, 1755, 328, 1855, 328, 0xFF0000, 1, Fast RGB
- If (ErrorLevel = 0 && Heal2 = 0xF16161)
- {
- SendInput {F2}
- Sleep, 200
- }
- }
- Sleep, 10
- }
- Return
- !+e::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement