Carpentry

Program Carpentry;
{$Include 'all.inc'}

var
i : Integer;
ctime, n : TDateTime;

const
madeitem = $0DF0; //Black staff
saw = $1035;
logs = $1BDD;
boxtype = $0E7D; //тип коробок, куда раскладываем сделанное

//Настройки
UseLore = 1; //Качаем армс
ToBoxes = 1; //0 - не раскладываем по коробкам, 1 - копейка рубль бережёт! 

procedure PackItems;
var
tmpid : Cardinal;

begin
  tmpid := FindType(madeitem, backpack);
  if FindQuantity > 0 then MoveItem(tmpid, 1, FindType(boxtype, backpack), 0, 0, 0);
end;

procedure MoveToBoxes;
var
boxid : Cardinal;

begin
  FindType(boxtype, backpack);
  UseObject(FindItem);
  if (FindCount > 0) then
  begin
    boxid := FindItem;
    if CountEx($ffff, $ffff, boxid) > 499 then
    begin
      drophere(boxid);
      wait(500);
      ignore(boxid);
    end;
    PackItems;
  end;
end;

procedure ArmsLore;
var
d, t: TDateTime;

begin
  d:=StrToTime('0:00:11');
  if ((now - n) > d) or (n = 0) then
  begin
    t:=now;
    FindType($0F51,backpack);
    if FindCount > 0 then
    begin
      WaitTargetType($0F51)
    end;
    FindType($0F43,backpack);
    if FindCount > 0 then
    begin
      WaitTargetType($0F43)
    end;
    UseSkill('Arms Lore');
    WaitJournalLineSystem(t, 'This|tell', 3000);
    if TargetPresent then CancelTarget;
    n:=now;
  end;
end;

begin
  ctime := Now;
  while not Dead do
  begin
    if Connected then
    begin
      SetARStatus(true);
      Hungry(1, backpack);
      waitmenu('to make', 'Staffs and Poles');
      waitmenu('to make', 'Black Staff');
      for i := 0 to 50 do
      begin
        FindType(logs, backpack);
        if FindCount() > 0 then
        Begin
          if GetQuantity(FindItem) >= 12 then
          Begin
            CancelTarget;
            usetype(saw, $ffff);
            WaitTargetObject(FindItem);
          end
          else
          DropHere(FindItem); // выкидываем логи если их мало, психуем!
        end;
        wait(4100);
        if UseLore = 1 then ArmsLore;
        if ToBoxes = 1 then MoveToBoxes;
      end;
    end;
  end;
end.
 
faq/stealth/carpentry.txt · Последние изменения: 2019/11/22 10:59 — tsatsur
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki