Raskolnikov
01-30-2008, 04:15 AM
This function will wait for the flag to reach the distance specified, the special thing is that it will search for randoms. Here it is:
{//////////////////////////////////////////////////
function FRandFlag(Distance: Integer) : boolean
Author : cut em2 it
Description: Waits until flag is within distance and results true if finds randoms while waiting.
///////////////////////////////////////////////////}
function FRandFlag(Distance: Integer) : boolean;
var Stuff: integer;
begin
Result := False;
while FlagPresent do
begin
if FindNormalRandoms then Result := True;
if CountFlag(Stuff) = Distance then Break;
end;
if Result then Writeln('Found random while walking.');
end;
Thanks,
Cut em2 it
{//////////////////////////////////////////////////
function FRandFlag(Distance: Integer) : boolean
Author : cut em2 it
Description: Waits until flag is within distance and results true if finds randoms while waiting.
///////////////////////////////////////////////////}
function FRandFlag(Distance: Integer) : boolean;
var Stuff: integer;
begin
Result := False;
while FlagPresent do
begin
if FindNormalRandoms then Result := True;
if CountFlag(Stuff) = Distance then Break;
end;
if Result then Writeln('Found random while walking.');
end;
Thanks,
Cut em2 it