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

Нарезка опилок

Only working scripts
Post Reply
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Нарезка опилок

Post by Alex »

указать ИД дагера и тайл дерева

Code: Select all

Program gathering; 
var 
dagger:cardinal; 
i:integer; 

{$Include 'all.inc'} 

function timer(var acttimer:integer;actafter:integer):boolean; 
begin 
   result:=false; 
   acttimer:=acttimer+1; 
   if acttimer>=actafter then 
   begin 
      acttimer:=0; 
      result:=true;        
   end; 
end; 

procedure fulldisconnect; 
begin 
 SetARStatus(false); 
 Disconnect; 
end; 

procedure CheckDead; 
begin 
WaitConnection(3000); 
CheckSave; 
if Dead then 
begin 
 SetWarMode(true); 
 WaitGump('1'); 
 wait(5000); 
 while (Dead) do Wait (1000); 
 wait (2000); 
 Hungry(1, ground); 
end; 
end;

BEGIN 
dagger:=$4F71EE23; 
SetARStatus(true); 
i:=0; 

while true do begin 
CheckDead;
WaitConnection(2000);
  checksave; 
  if timer(i,100) then begin 
  Hungry(1,ground); 
  Stack($0DE1,$0000); 
  end; 
   if targetpresent then canceltarget; 
   UseObject(dagger); 
   WaitForTarget(2000); 
   if targetpresent then TargetToTile(3299,1188,1392,0); 
   wait(2000); 
   CheckTargetError(2,2); 
end;
END.
жду замечаний как обезопасить от Error with target. Disconnected
Post Reply