here it is my object finder
SCAR Code:
function ThingFinder(cx,cy,PColor:integer; SColor:tIntegerarray; Text:TStringArray; Tolerance,Precision,scolors:Integer):Boolean;
var px1,px2,py1,py2,Trys,t,ms:Integer;
begin
ms:=mousespeed;
mousespeed:=50;
Repeat
t:=random(scolors);
wait(1000);
writeln(inttostr(trys));
if FindColorspiraltolerance(x,y,PColor,MSx1,MSy1,MSx2,MSy2,2) then
begin
px1 := x-Precision;
px2 := x+Precision;
py1 := y-Precision;
py2 := y+Precision;
if FindColorspiraltolerance(x,y,scolor[t],px1,py1,px2,py2,Tolerance) then
begin
MMouse(x,y,2,2);
if isuptextmulticustom(Text) then result:=true;
end;
end;
trys:=trys+1;
until ((Result=True) or(Trys>=5));
if Result=True then Writeln('Thing Found');
if Result=False then Writeln('Couldnt Find Thing');
Trys:=0;
mousespeed:=ms;
end;
howto declare it
SCAR Code:
ThingFinder(x,y,7833746,[2702921,3295831,2573652],['ooth','Bank'],10,10,3);
SCAR Code:
ThingFinder(x,y,a color that is rare ,[secondary colours],[uptext],tolerance,the area around the primary color to look for secondary colors,number of secondary colours)
please test it out and tell me if you have any improvements