Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Spirit speak for DRW

Only working scripts
Post Reply
dukeduke
Neophyte
Neophyte
Posts: 10
Joined: 23.08.2008 10:00
Contact:

Spirit speak for DRW

Post by dukeduke »

Зацените финальный апдейт 8) :

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.
I'M
Beren
Novice
Novice
Posts: 108
Joined: 08.09.2008 1:07

Post by Beren »

ну и мой)

Code: Select all

//Spirit Speak. SevenAmber. for DRW
Program Spirit; 
{$Include 'all.inc'} 

var
 ctime: TDateTime;
 tTime,SpiritTime, limitTime: cardinal;
		
const
 fizzle = 'You fail your attempt'; 
 sucsess = 'You establish a connection';
 eat=$160;// тип еды

procedure UseSpiritSpeak;
var 
 stime: TDateTime;
begin
 SetWarMode(False);
 SpiritTime:=SpiritTime+(Timer-tTime);
 if (SpiritTime>limitTime) then
  begin
   stime:=Now;
   checksave;
   UseSkill('Spirit Speak');
   repeat
    wait(100);
   until (InJournalBetweenTimes(fizzle+'|'+sucsess, stime, Now)<>-1);
   if (InJournalBetweenTimes(sucsess, stime, Now)<>-1) then limitTime:=300000 else limitTime:= 2500;
   SpiritTime:=0;
  end
end;

Begin
 clearjournal;  
 SpiritTime:=0;
 limitTime:=2500;
 While not Dead do 
  begin
   checksave;
   ctime:=now;
   tTime:=Timer;
   wait(limitTime);
   UseSpiritSpeak;	 
   UseObject(FindType(eat,Backpack));
  end;
End.
Post Reply