SCAR Code:
program New;
{.include srl/srl.scar}
{*************************}
{ FindAnd Use Function }
{* by: Dumpin *}
{Description:
Finds an Object and Uses it}
{*************************}
Function FindAndUse(Name : string; Color : TintegerArray; Tolerance: integer): boolean;
var
B,C, x, y, L : integer;
FoundC : boolean;
begin
For B := 0 To High(Color) Do
begin
L := High(Color);
For B := 0 To L Do
begin
if FindColorTolerance(x, y, Color[b], MIX1,MIY1, MIX2, MIY2, Tolerance) then
begin
FoundC := True;
Break;
end;
end;
if FoundC then
begin
mouse(x,y, 0, 0, False);
if IsUpText(Name) then
wait(100+ random(100));
ChooseOption('se');
C := C+1;
Result := true;
end;
end;
end;
begin
SetupSRL;
wait(2000);
FindAndUse('ey', [1410982], 10);
end.