SCAR Code:
{*******************************************************************************
function DFFlag(Distance: Integer): Boolean;
By: IceFire908.
Description: Same as FFlag but waits until flag is present before waiting.
*******************************************************************************}
function DFFlag(Distance: Integer): Boolean;
var
T: LongInt;
begin
MarkTime(T);
while (not ((FlagPresent) or ((TimeFromMark(T)) >= (RandomRange(5000, 7000))))) do
Wait(RandomRange(100, 200));
Result := FFlag(Distance);
end;
{*******************************************************************************
function OnMM(Point: TPoint): Boolean;
By: IceFire908.
Description: Checks if a point is on the mini-map.
*******************************************************************************}
function OnMM(Point: TPoint): Boolean;
begin
Result := InCircle(Point.X, Point.Y, MMCX, MMCY, 73);
end;
{*******************************************************************************
function OnMS(Point: TPoint): Boolean;
By: IceFire908.
Description: Checks if a point is on the main-screen.
*******************************************************************************}
function OnMS(Point: TPoint): Boolean;
begin
Result := PointInBox(Point, IntToBox(MSX1, MSY1, MSX2, MSY2));
end;
{*******************************************************************************
function WalkTo(Point: TPoint): Boolean;
By: IceFire908.
Description: All purpose walking.
*******************************************************************************}
function WalkTo(Point: TPoint): Boolean;
begin
if ((OnMS(Point)) or (OnMM(Point))) then
begin
if (OnMM(Point)) then
Mouse(Point.X, Point.Y, 0, 0, True)
else
begin
Mouse(Point.X, Point.Y, 4, 4, False);
Wait(RandomRange(500, 800));
ChooseOption('alk');
end;
Result := DFFlag(RandomRange(5, 15));
end
else
WriteLn('That point is not on the mini-map or main-screen!');
end;