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

bowcraft

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

bowcraft

Post by nepopus »

Делаем шафты по 1. Не обращайте внимания на присутствие типа стрелы : )

Code: Select all

program bc;

const
  containerID = $4026416B; // конт с логами и шафтами

  logType = $1BDD;
  arrowType = $0F3F;
  shaftType = $1BD4;
  featherType = $1BD1;

  timeDelay = 1.0/(24*60*12);

var
  cTime: tdatetime;

begin
  automenu('What do you want', 'shaft');
  automenu('Select arrow type', 'arrow');
  while NOT dead do begin
    wait(100);

    if findtype(logType, backpack) = 0 then begin
      useobject(backpack);
      checklag(70000);
      wait(300);
    end;

    if (findtype(shaftType, backpack) > 0) AND (findquantity > 100) then begin
      moveitem(finditem, 0, containerID, 0, 0, 0);
      checklag(70000);
      wait(300);
    end;

    if findtype(logType, backpack) = 0 then begin
      if findtypeex(logType, $0000, containerID, false) = 0 then begin
        useobject(containerID);
        checklag(70000);
        wait(3000);
      end;

      while findtypeex(logType, $0000, containerID, false) = 0 do begin
        addtosystemjournal('Кончились логи в сундуке.');
        wait(20000);

        useobject(containerID);
        checklag(70000);
        wait(3000);
      end;

      moveitem(finditem, 2, backpack, 0, 0, 0);
      checklag(70000);
      wait(300);

      //findtype(logType, backpack);
      moveitem(finditem, 1, containerID, 0, 0, 0);
      checklag(70000);
      wait(300);
    end;

    if (injournalbetweentimes('You put', cTime, now) >= 0) OR (cTime+timeDelay <= now) then begin
      if targetpresent then
        canceltarget;

      cTime := now;
      waittargettype(logType);
      useobject(objatlayer(rhandlayer));
    end;
  end;
end.
<( o_O<) <( O_O )> (>O_o )>
Post Reply