SCAR Code:
{*******************************************************************************
function VarrockRadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: ORIGINALLY by WT-Fakawi and Wizzup?, small thing added by n3ss3s
Description: Does the same thing except is made for varrock:
It avoids clicking the walls because they have the same color.
Comments: Especially for varrock east miners.
*******************************************************************************}
function VarrockRadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
Fx, Fy, SR, ER, i, X1, Y1: Integer;
begin
SR := StartRadial;
ER := EndRadial;
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
if (SR = ER) then
begin
if(not(SR = 0))then
begin
SR := SR - 1;
ER := ER + 1;
end else
begin
SR := SR;
ER := ER + 2;
end;
end
else if (StartRadial < EndRadial) then
begin
repeat
for i := StartRadial to EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if Not LoggedIn then Exit;
if (FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1)) then
begin
if(FindColorCircleTolerance(Fx, Fy, 16250871, x, y, 5, 10))then
begin
Writeln('Oh noes! We tried to clickie a wall!');
Writeln('Me likey not clicking wall :(');
Writeln('Exitting VarrockRadialRoadWalk');
Exit;
end else
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result := True;
CountFlag(10);
Exit;
end;
end;
end;
Radius := Radius - 4;
until (Radius <= 1);
end else
begin
if (StartRadial > EndRadial) then
begin
repeat
for i := StartRadial downto EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if Not LoggedIn then Exit;
if (FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1)) then
begin
if(FindColorCircleTolerance(Fx, Fy, 15723511, x, y, 5, 10))then
begin
Writeln('Oh noes! We tried to clickie a wall!');
Writeln('Me likey not clicking wall :(');
Writeln('Exitting VarrockRadialRoadWalk');
Exit;
end else
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result := True;
CountFlag(10);
Exit;
end;
end;
end;
Radius := Radius - 4;
until (Radius <= 1);
end;
end;
end;