Берем логи из сундука, делает стафф, выбрасываем стафф в мусорку(trash can).
Code: Select all
program carp;
const
containerID = $4026416B;
trashID = $405758A0;
toolType = $1030;
logType = $1BDD;
staffType = $0E89;
var
cTime: tdatetime;
begin
automenu('Carpentry', 'Weapons & Tools');
automenu('Weapons & Tools', 'quarter staff');
while NOT dead do begin
if findtype(toolType ,backpack) = 0 then
useobject(backpack)
else if findtype(staffType ,backpack) > 0 then
moveitem(finditem, 0, trashID, 0, 0, 0)
else if (findtype(logType ,backpack) > 0) AND (findquantity >= 3) then begin
if (injournalbetweentimes('fail|put', cTime, now) >= 0) OR (cTime+1.0/(24*60) <= now) then begin
wait(100);
cTime := now;
usetype(toolType, $FFFF);
checklag(100000);
wait(100);
if injournalbetweentimes('fail', cTime, now) >= 0 then
cTime := now;
end;
end else begin
if findtype(logType, containerID) = 0 then begin
useobject(containerID);
checklag(100000);
wait(300);
end;
while findtype(logType, containerID) = 0 do begin
addtosystemjournal('Кончились логи в сундуке.');
wait(20000);
useobject(containerID);
checklag(100000);
wait(300);
end;
moveitem(finditem, 500, backpack, 0, 0, 0);
end;
checklag(100000);
wait(500);
end;
end.