Simba Code:
function m_HPBar: Boolean;
var
tB, B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
HM, SM: Extended;
CTS, i, Dist: Integer;
begin
Result := False;
if not LoggedIn then Exit;
CTS := GetColorToleranceSpeed;
GetColorspeed2Modifiers(HM, SM);
B := IntToBox(227, 121, 293, 149);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(5.33, 1.31);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 78384, B.X1, B.Y1, B.X2, B.Y2, 3) then
begin
ATPA := TPAtoATPAEx(TPA, 55, 7);
if not (Length(ATPA) > 0) then Exit;
for i := 0 to High(ATPA) do
begin
tB := GetTPABounds(ATPA[i]);
Dist := Distance(tB.X1, tB.Y1, tB.X2, tB.Y2);
if (Dist > 54) then
begin
Result := True;
Break;
end;
end;
end;
ColorToleranceSpeed(CTS);
SetColorspeed2Modifiers(HM, SM);
end;