Инклюды в архиве, распоковать и копировать и вставить в свою папку.

Файл для скачивания

all.inc:

Код:
{$Include 'checksave.inc'} 
{$Include 'hungry.inc'} 
{$Include 'WaitConnection.inc'} 
{$Include 'stack.inc'} 
{$Include 'fulldisconnect.inc'}
{$Include 'checkdead.inc'}
{$Include 'stackpack.inc'}
{$Include 'CheckTargetError.inc'}
procedure CheckStability;
begin
WaitConnection(3000);
CheckDead;
CheckSave;
wait(500);
end;

checksave.inc:

Код:
procedure checksave; 
var Time : TDateTime; 
begin 
Time:= Now - (0.5 / 1440); 
if InJournalBetweenTimes('Saving World State',Time,Now) >= 0 then Wait(10000) 
end;

hungry.inc:

Код:
procedure Hungry(NeededLevel : Integer; Container : Cardinal);
var HArray : array [0..10] of String;
    CurrentLevel : Integer;
    HasError : Boolean;
    TimeSayHungry : TDateTime;
    FoodID : Cardinal;
    i,c,difference : Integer;
begin
if Not Connected then Exit;
if (NeededLevel < 0) or (NeededLevel > 10) then Exit;
   HArray[0] := 'You are absolutely stuffed!';
   HArray[1] := 'You are stuffed';
   HArray[2] := 'hungry at all';
   HArray[3] := 'You are a little hungry';
   HArray[4] := 'You are somewhat hungry';
   HArray[5] := 'You are REALLY hungry';
   HArray[6] := 'Your stomash hurts';
   HArray[7] := 'Your stomash hurts and you feel dizzy';
   HArray[8] := 'You are starving';
   HArray[9] := 'You are almost dying of hunger';
   HArray[10] := 'You are DYING of hunger...';
HasError := true;
TimeSayHungry := Now;
UOSay('.hungry');
wait(100);
i:=0;
while i < 100 do
   begin
   for c := 0 to 10 do
   if InJournalBetweenTimes(HArray[c],TimeSayHungry,Now) >= 0 then
	begin
	CurrentLevel := c;
	HasError := false;
	i := 100;
	end;
   wait(100);
   i := i + 1;
   end;
if HasError then
   begin
   AddToSystemJournal('Error with Hungry: Lag? Conection error? Something else?');
   Exit;
   end;
difference := CurrentLevel - NeededLevel;
FindType($097B,Container);
if (difference > 0) and (FindCount > 0) then for i := 1 to difference do
   begin
   FoodID := FindType($097B,Container);
   if FoodID <> $00 then UseObject(FoodID);
   wait(200);
   end;
if FindType($097B,Container) = 0 then AddToSystemJournal('No Food');
end;

WaitConnection.inc:

Код:
procedure WaitConnection(WaitTime : Integer);
begin
if Connected then Exit;
while not Connected do Wait(1000);
{WaitTime - Waiting After Connected}
wait(WaitTime);
end;

stack.inc:

Код:
procedure stack(ObjType, Color : word);
var PackItem, GroundItem : Cardinal;
StackCount: integer;
begin
  PackItem := 0;
  GroundItem := 0;
  FindtypeEx(ObjType,Color,backpack,false);                    
  IF FindFullQuantity > 0 then
if GetQuantity(finditem)=60000 then
begin
 DropHere(finditem);
 wait (300);
 exit;
end
else PackItem := finditem;
  if finditem=0 then exit;
repeat
  Findtype(ObjType,ground);                    
  repeat
     FindtypeEx(ObjType,Color,ground,false);
     IF FindCount > 0 then
if FindQuantity = 60000 then Ignore(finditem)
else GroundItem := finditem;
     FindtypeEx(ObjType,Color,ground,false);
  until (finditem = 0) or (GroundItem <> 0);
  if (GroundItem =0) then
  begin
DropHere(PackItem);
wait (300);
exit;
  end;
  if (PackItem <> 0) and (GetQuantity(PackItem)>0) then
  begin
StackCount:=60000-GetQuantity(GroundItem);
if GetQuantity(PackItem)<StackCount then StackCount:=0;
MoveItem (PackItem, StackCount, GroundItem, 0,0,0)
wait (300);
  end;
until GetQuantity(PackItem)<1;
end;

fulldisconnect.inc:

Код:
procedure fulldisconnect;
begin; 
SetARStatus(false) ; 
Disconnect; 
end;

checkdead.inc

Код:
procedure CheckDead; 
var q: integer;
begin 
WaitConnection(3000); 
CheckSave; 
if Dead then 
begin 
SetWarMode(true);
UOSay('.forgivethee'); 
WaitGump('1'); 
wait(5000); 
q:=0;
while (Dead) do 
begin
Wait (1000); 
q:=q+1;
if q>180 then 
begin
q:=0;
UOSay('Res me please!');
end;
end;
wait (2000); 
UOSay('Thanks!');
Hungry(1, ground); 
end; 
end;

stackpack.inc:

Код:
procedure StackPack(ItemType, ItemColor : Word);
var
FirstItem: cardinal;
begin
FindTypeEx(ItemType,ItemColor,backpack,false);
if FindCount >1 then 
begin
 FirstItem := FindItem;
 Ignore(FirstItem);
 MoveItems(BackPack,ItemType,ItemColor,FirstItem, 0, 0, 0, 1000);
 IgnoreOff (FirstItem);
 Wait(1000);
end;
end;

CheckTargetError.inc:

Код:
procedure CheckTargetError(lines, checktime : integer);
var D : TDateTime;
begin
{5 minutes in DateTime = (1.0 * checktime) / 1440 = 0.00347}
D := Now - ((1.0 * checktime) / 1440.0);
InJournalBetweenTimes('I am already doing something else|doing something',D,Now);
if LineCount > lines then
  begin
  AddToSystemJournal('Error with target. Disconnected');
ClearJournal;
  Disconnect;
  end;
end;