Code:
program new;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i sps/lib/sps-rs3.simba}
procedure Walk();
var
MYpath: TPointArray;
begin
MYpath := [[175, 81], [173, 108], [169, 150], [169, 181], [166, 218], [163, 262],
[156, 302], [149, 343], [138, 382], [129, 414], [123, 441],
[111, 463], [107, 480], [89, 487], [75, 472]];
WAIT(500);
if not sps.walkPath(MYPATH)THEN
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(MYpath[high(MYpath)]);
end;
end;
function magictree : Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetToleranceSpeed;
setcolorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(7.58, 0.89);
if not (FindColorsTolerance(arP, 6709107, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
begin
clearDebug();
setupSRL();
sps.setup('seersfinal', RUNESCAPE_SURFACE);
magictree(x,y);
end;