Here's a function you might want to use
SCAR Code:
function FindFire(var x, y: integer): Boolean;
var
P: TPointArray;
Fire, Tol, j, fx, fy: integer;
B: TBox;
a: extended;
begin
if not LoggedIn then Exit;
Debug('FindFire');
FindColorsSpiralTolerance(MSCX, MSCY, P, 3385314, MSX1, MSY1, MSX2, MSY2, 40);
RemovePointsInBox(P, PointToBox(Point(31, 4), Point(129, 24)));
if Length(P) < 10 then Exit;
Fire := BitmapFromString(1, 11, '3B3000F4C63FF8C83FF4C73EE6' +
'BC39E6BC39BC922CE6BE45BC9E38BC9E3B352A00');
Tol := 40;
B := GetTPABounds(P);
try
for j := 1 to 3 do
begin
FindDeformedBitmapToleranceIn(Fire, fx, fy, B.x1-10, B.y1-10, B.x2+10, B.y2+10, Tol, 2, True, a);
if a >= 1-j*0.2 then
begin
x := fx;
y := fy+4;
Result := True;
Exit;
end;
DecEx(Tol, 5);
end;
except
writeln('Exception');
finally
FreeBitmap(Fire);
end;
end;
Usually when there's an exception, there is no fire.