;used for hunting mobs with this you can browse other windows and it will continue only in background window.
#RequireAdmin
WinActivate("Talisman Online")
WinMove("Talisman Online", "", 0, 0)
HotKeySet("{esc}", "myExit")
Global $hWnd = WinWait("Talisman Online", "", 10)
Global $needRest = False ;
Global $needRest2 = False ;
Global $hpBar = False ;
Global $hpBar2 = False ;
Global $Attack1 = False ;
Global $stamina1 = False ;
Global $Attack2 = False ;
Global $stamina2 = False ;
Global $Attack3 = False ;
Global $stamina3 = False ;
Global $Ehplow = False ;
Global $Ehplowest = False ;
Global $Ehplowest2 = False ;
Global $REDCooldown1 = 1800000
Global $REDCooldown1Temp = TimerInit()
Global $redx = False ;
Global $redx1 = False ;
While (1)
checkEhp()
startrest1()
Attack1()
Attack2()
Attack3()
Checkfullinv()
TimerDispatch()
WEnd
Func checkEhp()
$Ehplowest = PixelSearch(473, 79, 473, 79, 0xB90000)
If @

hen
ControlSend($hWnd, "", "", "{TAB}")
Sleep(500)
;$Ehplow = True
EndIf
$Ehplowest2 = PixelSearch(632, 196, 632, 196, 0xEEF329)
If Not @

hen
ControlSend($hWnd, "", "", "{TAB}")
Sleep(500)
EndIf
EndFunc ;==>checkEhp
Func Attack1()
$stamina1 = PixelSearch(228, 85, 228, 85, 0x00AF00)
If Not @

hen
ControlSend($hWnd, "", "", "2")
Sleep(500)
$Attack1 = True
EndIf
EndFunc ;==>Attack1
Func Attack2()
$stamina2 = PixelSearch(167, 85, 167, 85, 0x00AF00)
If Not @

hen
ControlSend($hWnd, "", "", "2")
Sleep(500)
$Attack2 = True
EndIf
EndFunc ;==>Attack2
Func Attack3()
$stamina3 = PixelSearch(118, 85, 118, 85, 0x00A700)
If Not @

hen
ControlSend($hWnd, "", "", "1")
Sleep(500)
$Attack3 = True
EndIf
EndFunc ;==>Attack3
Func Checkfullinv()
$redx = 0xAF1F1F
$redx1 = PixelSearch(581, 337, 581, 337, $redx, 1)
If Not @

hen
MouseClick("left", $redx1[0], $redx1[1])
sleep(500)
EndIf
EndFunc ;==>Checkfullinv
Func startrest1()
;are we healthy enough to continue attacking?
$needRest = True
$hpBar = PixelSearch(154, 73, 154, 73, 0xAD0002)
If @

hen
ControlSend($hWnd, "", "", "1")
Sleep(1000)
ControlSend($hWnd, "", "", "1")
Sleep(1000)
ControlSend($hWnd, "", "", "1")
Sleep(1000)
ControlSend($hWnd, "", "", "1")
Sleep(1000)
ControlSend($hWnd, "", "", "1")
Sleep(1000)
ControlSend($hWnd, "", "", "7")
Sleep(11000)
EndIf
$needRest2 = False
$hpBar2 = PixelSearch(227, 74, 227, 74, 0xAB0100)
If Not @

hen
$needRest2 = False
EndIf
EndFunc ;==>startrest1
; Function to perform timed operations
Func TimerDispatch()
If $REDCooldown1 <= TimerDiff($REDCooldown1Temp) Then
ControlSend($hWnd, "", "", "0")
$REDCooldown1Temp = TimerInit()
EndIf
EndFunc ;==>TimerDispatch
Func myExit()
MsgBox(0, "Ending", "Bot has Exited", 1)
Exit
EndFunc ;==>myExit