Code: Select all
Program Spirit; 
{$Include 'all.inc'} 
const 
Eat     = $09bb;
fizzle  = 'You fail your attempt'; 
success = 'You establish a connection'; 
var 
ctime: TDateTime; 
strs: string;
procedure Check_World_Save; 
 var k : integer; 
 begin 
  if InJournal('saving')<>-1 then 
   begin 
    ClearJournal; 
    k:=0; 
    repeat 
      wait(10000) 
      k:=k+1; 
      AddToSystemJournal('World is saving more than '+IntToStr(k*10)+' seconds.'); 
    until (InJournal('data')<>-1) or (k>30) 
   end 
 end; 
procedure SpSpeak; 
begin 
   ctime:=Now; 
   repeat 
      Check_World_Save;
      FindType(Eat,backpack); 
      AddToSystemJournal('Кушаю свинку');
      UseObject(finditem);
      AddToSystemJournal('Использую Спиритспик');
      UseSkill('Spirit Speak'); 
      Wait(2500); 
   until InJournalBetweenTimes(success, ctime, Now)=-1; 
   AddToSystemJournal('Удачно! Ожидание - 5мин...');
   ctime:=Timer; 
end; 
begin 
   SpSpeak; 
   while not Dead do
   begin
   Check_World_Save;
   AddToSystemJournal('...');
   if Round((Timer-ctime)/1000)>300 then SpSpeak else 
   begin
   Check_World_Save;
   wait(500); 
   strs:=IntToStr(300-(Round((Timer-ctime)/1000)));
   AddToSystemJournal('Осталось ждать: ' + strs + ' секунд');
   end;
   end;
End.

