SCAR Code:
{*******************************************************************************
function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
By: fORCE_wORKS Modified from (Starblaster100, based on the ideas of Stupid3ooo)
Description: Finds a minimap Symbol and returns a Boolean if True.
Searches a selected area of the Minimap, More Accurate than FindSymbolColorIn
*******************************************************************************}
function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
var
c, Speed, x, y: Integer;
acc: Extended;
begin
Speed := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
LoadSymbolBitmapColor(LowerCase(Name));
if (SymbolBitmap <> 0) then
begin
FindDeformedBitmapToleranceIn(SymbolBitmap, x, y, xs, ys, xe, ye, 70, 0, True, acc);
if (acc > SymbolAccuracy) then
begin
repeat
c := c + 5;
FindColorTolerance(x, y, Color, x, y, x + 15, y + 5, c);
until (GetColor(x,y) > 0) or (c > 70);
Result:= True;
rx := x;
ry := y;
end;
end else
Writeln('Please Enter a Valid Symbol Name!');
try
FreeBitmap(SymbolBitmap);
finally
ColorToleranceSpeed(Speed);
except
Result := False;
end;
end;
SCAR Code:
{*******************************************************************************
function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
By: fORCE_wORKS Modified from (Starblaster100, based on the ideas of Stupid3ooo)
Description: Finds a minimap Symbol and returns a Boolean if True.
Searches the whole Minimap, More Accurate than FindSymbol
*******************************************************************************}
function FindSymbolCustomColor(var rx, ry, Color: Integer; Name: string): Boolean;
begin
Result := (FindSymbolCustomColorIn(rx, ry, Color, LowerCase(Name), 570, 5, 725, 166);
end;
SCAR Code:
begin
SymbolAccuracy:= 0.99;
writeln('Default Bank Color: '+IntToStr(LoadSymbolBitmapColor('bank')));
NewBankColor:= (GetSymbolColorIn(x,y,'bank',570, 5, 725, 166));
writeln('New Bank Color: '+IntToStr(NewBankColor));
writeln(BoolToStr(FindSymbolCustomColorIn(x,y,NewBankColor,'bank',570, 5, 725, 166)));
MoveMouse(x,y);
end;