function CurrentRadialWalkEx(var tpa: TPointArray; cx, cy, TheColor, tol: Integer; StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
var
i, SD, ED, j: Integer;
atpa : T2DPointArray;
begin
Result := False;
SD := StartRadial;
ED := EndRadial;
if (SD = ED) then
begin
WriteLn('Using LinearWalkEx, equal values.');
Result := LinearWalkEx(tpa, cx, cy, TheColor, tol, StartRadial, Radius);
end;
if (SD > ED) then
Swap(SD, ED);
while (SD > 360) do
SD := SD - 360;
while (ED > 360) do
ED := ED - 360;
if (not LoggedIn) then Exit;
i := GetSystemTime;
try
FindColorsSpiralTolerance(MmCX, MmCY, tpa, TheColor, MMX1, MMY1, MMX2, MMY2, tol);
atpa := SplitTPAEx(tpa, 5, 5);
for j := 0 to High(atpa) do
if High(atpa[j]) > 5 then
tpa := atpa[j];
FilterPointsPie(tpa, SD, ED, 10, Radius, cx, cy);
SortCircleWise(tpa, cx, cy, SD, ED, False);
Result := (Length(tpa) > 0);
except WriteLn('RWex error!'); Exit; end;
end;
function CurrentRadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
tpa, block: TPointArray;
i: Integer;
roadpoint : TPoint;
begin
Result := False;
if (not LoggedIn) then Exit;
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, 0, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
begin
FindColorsSpiralTolerance(tpa[i].x, tpa[i].y, block, roadcolor, tpa[i].x - 5, tpa[i].y - 5, tpa[i].x + 5, tpa[i].y + 5, 0);
roadpoint := MiddleTPA(block);
if MFNF(roadpoint.x, roadpoint.y, Xmod, Ymod) then
begin
CountFlag(10);
Result := True;
Break;
end;
end;
end;