Simba Code:
Function FoundSymbol(Ident: Integer; var X, Y, Dist: Integer): Boolean;
var
B: TBox;
TPA: TPointArray;
L,i,CTS: Integer;
ATPA,ATPA2: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
if ((Ident = 1) or (Ident = 2) or (Ident = 5) or (Ident = 6)) then
FindColorsTolerance(TPA, 12632256, MMX1, MMY1, MMCX+10, MMY2, 10)
else
FindColorsTolerance(TPA, 12632256, MMX1, MMY1, MMX2, MMY2, 10);
if Length(TPA) < 1 then
begin
ColorToleranceSpeed(CTS);
Exit;
end;
ATPA := TPAtoATPAEx(TPA, 10, 10);
L := High(ATPA);
SetArrayLength(ATPA2, L+1);
for i := 0 to L do
begin
B := GetTPABounds(ATPA[i]);
with B do
begin
if (Ident = 1) then
FindColorsTolerance(ATPA2[i], 16382969, B.X1, B.Y1, B.X2, B.Y2, 5) //Altar (white)
else if (Ident = 2) then
FindColorsTolerance(ATPA2[i], 1244922, B.X1, B.Y1, B.X2, B.Y2, 5) //Altar (yellow)
else if (Ident = 3) then
FindColorsTolerance(ATPA2[i], 2413294, B.X1, B.Y1, B.X2, B.Y2, 5) //Bank
else if (Ident = 4) then
FindColorsTolerance(ATPA2[i], 2370858, B.X1, B.Y1, B.X2, B.Y2, 5) //Hunter
else if (Ident = 5) then
FindColorsTolerance(ATPA2[i], 1787389, B.X1, B.Y1, B.X2, B.Y2, 5) //Big arrow
else if (Ident = 6) then
FindColorsTolerance(ATPA2[i], 2763504, B.X1, B.Y1, B.X2, B.Y2, 5); //Dungeon
Result := (Length(ATPA2[i]) > 0);
if Result then
begin
ColorToleranceSpeed(CTS);
MiddleTPAEx(ATPA2[i], X, Y);
Dist := Distance(MMCX, MMCY, X, Y);
Exit;
end;
end;
end;
end;
The MM symbols just needed a slight color update. I'm working on making a new FindBanker function but it's fighting me the whole way. Dunno when I'll get that sorted out.