Code: Select all
program Ani;
{$Include 'all.inc'}
const
horse=$00Ed;
var
animal : cardinal;
k : integer;
ctime : TDateTime;
OldSkill : Double;
Begin
Finddistance := 3;
OldSkill := GetSkillValue('Animal Lore');
While (not Dead) AND (GetSkillValue('Animal Lore') < 100.0) do
begin
repeat
findtype( Horse, ground);
animal := finditem;
until animal <> 0;
waitconnection(3000);
if TargetPresent then CancelTarget;
ctime := Now;
UseSkill('Animal Lore');
WaitTargetObject( animal );
k := 0
repeat
wait(100);
k := k + 1;
until (InJournalBetweenTimes('You can|it looks|own master', ctime, Now)<>-1) or (k > 600);
CheckSave;
if GetSkillValue('Animal Lore') > OldSkill then
begin
AddToSystemJournal('Скилл Animal Lore вырос. Теперь он равен ' + FloatToStr(GetSkillValue('Animal Lore')));
OldSkill := GetSkillValue('Animal Lore');
end;
waitconnection(3000);
end;
End.