Code: Select all
Function CarveTarget(CorpseID: Cardinal): Boolean;
Var
sTime: TDateTime;
Begin
sTime := Now;
Repeat
Wait(100);
UseType($0EC3, $FFFF);
TargetObject(CorpseID);echo(i2s(LineCount));
While (InJournalBetweenTimes('You carve away some meat.|You carve the corpse but find nothing usefull.', sTime, Now) = -1) And (Now < sTime + (5/86400)) Do Wait(100);
Until (LineCount > 0) Or (Now > sTime + (15/86400));
If (LineCount > 0) Then
Begin
Echo('Труп порезан');
Loot(CorpseID);
Inc(KilledTargets);//Увеличиваем счетчик убитых птиц
End
Else Echo('Труп недоступен');
Result:= True;
End;