Code: Select all
program test;
const
cleaver=$0EC3;
weapon=$13FF;
var
i,n:integer;
corpseID:Cardinal;
animal:array[1..7] of Byte;
label find;
begin
animal[1]:=$00E7;
animal[2]:=$00E8;
animal[3]:=$00E9;
animal[4]:=$00DF;
animal[5]:=$00D8;
animal[6]:=$00D9;
animal[7]:=$00CB;
for i:=1 to 7 do
begin
find:
FindDistance:=20;
FindType(animal[i],ground);
n:=findcount;
AddToSystemJournal('Найдено '+IntToStr(n)+' '+GetName(FindItem));
if n>0 then
begin
usetype(weapon,$FFFFF);
attack(FindItem);
while GetDistance(FindItem)>2 do
begin
NewMoveXY(GetX(FindItem),GetY(FindItem),true,1,true);
wait(100);
end;
while gethp(finditem)>0 do wait(100);
FindDistance:=1;
if FindType($2006,ground)>0 then
begin
corpseID:=finditem;
WaitTargetObject(corpseID);
usetype(cleaver,$FFFFF);
UseObject(corpseID);
moveitem(findtype($1078,corpseID),1,BackPack,0,0,0);
WaitTargetObject(finditem);
usetype($0F9E,$FFFFF);
end;
if n>1 then goto find;
end;
end;
end.