Can't be arsed creating a full bot so I'll just release functions that I created, simple.
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Const $_color_health = 8650752
Const $_depth_health = 0.8
Func DetectHealthBar()
$i = 0
$match = PixelSearch(0,70, 1024, 768, $_color_health)
if not @error Then
$color = PixelGetColor($match[0], $match[1])
$i = $i +1
Do
$color = PixelGetColor($match[0]+$i, $match[1])
$i = $i +1
Until $color <> 8650752
;ConsoleWrite(($i-1)*$_depth_health & chr(10))
Return ($i)*$_depth_health
EndIf
EndFunc
Basically DetectHealthBar returns the exact % of your current health.
This should work aslong as you keep the healtbar in the northwest part of the program :p