SRL Archive - Research & Development Lounge

FlagWait


Ultra

2009-03-30 17:30:23

Need Testers!
//Waits a certain amount of time while the red flag on the minimap is present.
procedure FlagWait(MinWaitSecs, MaxWaitSecs : Integer);
var
TheWait, Mark : Integer;
begin
Wait(Randomrange(50, 100));
if not(MinWaitSecs=MaxWaitSecs)then TheWait := (RandomRange(MinWaitSecs, MaxWaitSecs)*1000)
else TheWait := MinWaitSecs*1000;
MarkTime(Mark);
repeat
begin
Wait(300);
if Random(20)=1 then MMouse(MMX1, MMY1, MMX2, MMY2);
end;
until(TimeFromMark(Mark)>TheWait)or(not(FlagPresent));
end;
Waits a certain amount of time while the flag is present on the minimap.
I made this because, whenever you walk somewhere, where your character cant go (ex: right at the spot of a bankbooth), the red flag will still be there even after you stop walking.

Nava2

2009-03-30 17:38:55

This has been fixed in the Dev SVN. :)

Uses a distance timeout though.

This would work for now though ;)

Ultra

2009-03-30 17:43:09

From: Nava2
This has been fixed in the Dev SVN. :)

Uses a distance timeout though.

This would work for now though ;)


Lol thanks :)