Code: Select all
program tamingKill;
var
k : integer;
ctime : TDateTime;
const
animal =$00ED; // Hind
{$Include 'all.inc'}
Begin
FindDistance := 13;
repeat
while FindTypeEx(animal, $FFFF, ground, false) <> 1 do
begin
while not connected do wait(100);
SetWarMode(false);
if dead then exit;
ctime := Now;
UseSkill('Animal Taming');
WaitTargetObject(FindItem);
k := 0;
repeat
wait(1000);
k := k + 1;
until (InJournalBetweenTimes('successfully|failed|already.', ctime, Now)<>-1) or (k > 600);
If (injournal('successfully|failed|already.')<>-1) or (k>600) then
begin
uosay('all come');
Attack(FindItem);
repeat
if FindTypeEx(animal, $FFFF, ground, false) <> 0 then
wait(2000);
until FindTypeEx(animal, $FFFF, ground, false) = 0;
end;
CheckSave;
end;
wait(5000);
until false;
end.