Code: Select all
program tamingUp;
// (c) Edred
var
animal : cardinal;
k : integer;
ctime : TDateTime;
{$Include 'all.inc'}
Begin
animal := $00053BDB;
While not Dead do
begin
while not connected do wait(100);
if TargetPresent then CancelTarget;
ctime := Now;
UseSkill('Animal Taming');
WaitTargetObject( animal );
k := 0
repeat
wait(100);
k := k + 1;
until (InJournalBetweenTimes('accept you as master|You fail|is already tame.', ctime, Now)<>-1) or (k > 600);
If (injournal('accept you as master|is already tame.')<>-1) or (k>600) then uosay('all release' );
wait(1000);
CheckSave;
end;
End.