How do I set this kind of timer ?
Code:
function FindMonsterM(Color1, Color2, Color3, Tolerance: Integer; MonsterName: String): Boolean;
var
i: integer;
dir: string;
begin
case random(4)+1 of
1: dir:= 'nswe';
2: dir:= 'wens';
3: dir:= 'sewn';
4: dir:= 'ewns';
end;
for i:= 1 to 4 do
if(not(KAttackMonsterM(Color1, Color2, Color3, Tolerance + i, monsterName)))then
MakeCompass(strget(dir, i))
else
begin
result:= true;
exit;
end;
end;
How could I set it that if it wont find a monster in 2 minutes it would logout ?