Yeah, you need to detect the roadcolor. This should work.
program roadwalk;
{.include SRL/SRL.scar}
var
a,b:integer;
function FindRoadColor:integer; // By Tarajunky
var red,green,blue:integer;
var TestColor,a,b,GenericRoadColor:integer;
begin
GenericRoadColor:=6842479;
Flag;
a:=MMX1;
b:=MMY1;
repeat
b:=b+1;
repeat;
a:=a+1;
if FindColorTolerance(x,y,GenericRoadColor,a,b,MMX2,MMY2,80) then
begin
a:=x;
b:=y;
TestColor:=GetColor(x,y);
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
if Red-Green>=5 then if Red-Green<=10 then
if Red-Blue>=5 then if Red-Blue<=10 then
begin
if GetColor(a+5,b+5)=TestColor then
if GetColor(a+3,b+3)=TestColor then
if GetColor(a,b+5)=TestColor then
if GetColor(a+5,b)=TestColor then
if GetColor(a,b+3)=TestColor then
if GetColor(a+3,b)=TestColor then
if GetColor(a+5,b+3)=TestColor then
if GetColor(a+3,b+5)=TestColor then
begin
result:=TestColor;
RoadColor:=TestColor;
Writeln('RoadColor = '+IntToStr(TestColor));
exit;
end;
end;
end else a:=MMX2;
until a>=MMX2;
a:=MMX1;
until b>=MMY2;
Writeln('Could not find Road Color!');
result:=0;
end;
procedure walk;
begin
radialroadwalk(RoadColor,270,180,35,1,1)
wait(7000)
end;
begin
RoadColor:=FindRoadColor;
repeat
if not(FindMMColor(x,y,RoadColor)) then RoadColor:=FindRoadColor;
walk;
until(false)
end.