program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/FaladorColorFinder.scar}
var x, y : integer;
//------------------------------ RRWFailSafe --------------------------------//
// DESCRIPTION: calls RadialRoadWalk for about 11 seconds or until a Road
// is found and clicked. Returns false if time runs out, and
// true if road is found and clicked.
// INPUTS:
// TheColor - int color
// StartRadial - int radial 0 - 720 (360 degrees in a circle)
// EndRadial - int radial 0 - 720
// Radius - how far from minimap center to search for the color to walk to
// Xmod, Ymod - don't understand these yet. use 2, 2.
// NOTES:
// ~ No antibans implemented yet
// ~ EndRadial should be greater than Start Radial
//------------------------------ RRWFailSafe --------------------------------//
function RRWFailsafe(TheColor: Integer; StartRadial, EndRadial: Integer;
Radius: Integer; Xmod, Ymod: Integer) : boolean;
var Start : integer;
begin
MarkTime(Start);
Result := false;
repeat
Result := RadialRoadWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod);
wait(125 + random(40));
until ((TimeFromMark(Start)>=(10000+random(2500))) or Result);
end;
/////////////////////////////////////////////////////////////////////////////
{ MAIN PROCEDURE }
/////////////////////////////////////////////////////////////////////////////
begin
wait(3000); // retarget window if necessary.
setupsrl;
if (RRWFailsafe(FindFaladorRoadColor, 81, 85, 70, 2, 2)) then
writeln('RRW successful w/ FaladorRoadColor')
else
writeln('RRW failed w/ FaladorRoadColor

');
if (RRWFailsafe(FindRoadColor, 81, 85, 70, 2, 2)) then
writeln('RRW successful w/ RoadColor')
else
writeln('RRW failed w/ RoadColor

')
end.