Shorten RadialRoadWalk and LinearRoadWalk.
New ones
SCAR Code:
{*******************************************************************************
function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: Nielsie95
Description: Walks TheColor from StartRadial to EndRadial for Radius Distance
Valid Arguments:
TheColor: RoadColor. RoadColor will be dynamically updated.
StartRadial/EndRadial: Any number between 0-720. 0=N,90=E,180=S,270=W.
Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
*******************************************************************************}
function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
begin
Result := False;
if (not LoggedIn) then Exit;
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
Result := RadialWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod);
If Result then
RoadColorChecker;
end;
{*******************************************************************************
function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: Nielsie95
Description: Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance
Valid Arguments:
TheColor: Any Color, but Road- or WaterColor will do fine :)
Direction: Any number between 0-720. 0=N,90=E,180=S,270=W.
Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
*******************************************************************************}
function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
begin
Result := False;
if (not LoggedIn) then Exit;
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
Result := LinearWalk(TheColor, Direction, Radius, Xmod, Ymod);
If Result then
RoadColorChecker;
end;
Old ones
SCAR Code:
{*******************************************************************************
function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: Nielsie95
Description: Walks TheColor from StartRadial to EndRadial for Radius Distance
Valid Arguments:
TheColor: RoadColor. RoadColor will be dynamically updated.
StartRadial/EndRadial: Any number between 0-720. 0=N,90=E,180=S,270=W.
Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
*******************************************************************************}
function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
i: Integer;
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
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
CountFlag(10);
Result := True;
Break;
end;
end;
{*******************************************************************************
function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: Nielsie95
Description: Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance
Valid Arguments:
TheColor: Any Color, but Road- or WaterColor will do fine :)
Direction: Any number between 0-720. 0=N,90=E,180=S,270=W.
Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
*******************************************************************************}
function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
i: Integer;
begin
Result := False;
if (not LoggedIn) then Exit;
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
if LinearWalkEx(tpa, MMCX, MMCY, TheColor, 0, Direction, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
CountFlag(10);
Result := True;
Break;
end;
end;