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

carpenter

Only working scripts
Post Reply
nepopus
Novice
Novice
Posts: 121
Joined: 29.02.2012 23:45
Location: Москва
Contact:

carpenter

Post by nepopus »

Инструмент карпентра в паке(jointing plane).
Берем логи из сундука, делает стафф, выбрасываем стафф в мусорку(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.
<( o_O<) <( O_O )> (>O_o )>
feo
Posts: 7
Joined: 18.07.2014 11:42

Re: carpenter

Post by feo »

Спасибо, очень стабильный скрипт. Шард DRW
Поменял FindType на FindTypeEx, что бы цвет проверял.
Добавил хайдинг (он не ревелится когда крафтит)
Дома нет трэша, качаюсь на улице, подправил дроп в трэш на DropHere

Спасибо.
Post Reply