Item Identification

на ноже
program ItemID;
{$Include 'all.inc'}

var
i : Integer;

const
itemtype = $0F51; // dagger

begin
  SetARStatus(true);
  While not Dead do
  begin
    if Connected then
    begin
      Hungry(1,backpack);
      for i := 0 to 50 do
      begin
        CheckSave();
        ClearJournal;
        UseSkill('Item Identification');
        Wait(500)
        WaitForTarget(5000);
        WaitTargetObject(FindType(itemtype, backpack));
        Wait(10000);
        while not Connected do Wait(1000);
      end;
    end;
  end;
end.
на коробке
program ItemID;
{$Include 'all.inc'}

var
i : Integer;
n : TDateTime;

const
deed = $14F0; //дид
box = $0E7D; //коробка

procedure Ident;

begin
  n := Now;
  repeat
    if TargetPresent then CancelTarget;
    WaitTargetObject(FindType(deed, backpack));
    UseSkill('Item Identification');
    Wait(10100);
  until InJournalBetweenTimes('normal item', n, now) <> -1;
end;

procedure Redeed;
begin
  if FindType(box, ground) > 0 then
  begin
    n := Now;
    repeat
      if TargetPresent then CancelTarget;
      WaitTargetObject(FindItem);
      UOSay('.redeed');
      Wait(500);
    until InJournalBetweenTimes('deed in', n, now) <> -1;
  end;
end;

procedure Opendeed;
begin
  if TargetPresent then CancelTarget;
  if FindType(deed, backpack) > 0 then
  begin
    n := Now;
    repeat
      WaitMenu('orientation', 'East');
      WaitGump('1025');
      WaitTargetObject(self);
      UseObject(FindItem);
      Wait(500);
    until InJournalBetweenTimes('key in', n, now) <> -1;
  end;
end;

begin
  SetARStatus(true);
  While not Dead do
  begin
    if Connected then
    begin
      Hungry(1,backpack);
      for i := 0 to 50 do
      begin
        Checksave();
        Ident;
        OpenDeed;
        Redeed;
        while not Connected do Wait(1000);
      end;
    end;
  end;
end.
идент для ханта

Каждый проиденченый пакет кидает под ноги.

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

var
SubBag : Cardinal;

const
IDBag = $4F1A2D4B; //ID пакета с вещами для идента. В пакете могут быть другие пакеты.

procedure OpenBag(IDBag : cardinal);
begin
  if LastContainer <> IDBag then
  begin
    repeat
      UseObject(IDBag);
      wait(1000);
    until LastContainer = IDBag;
  end;
end;

procedure IdCurrItem(item : Cardinal);
var
TimeStart : TDateTime;

begin
  if TargetPresent then CancelTarget;
  CancelWaitTarget;
  UseSkill('Item Identification');
  wait(500)
  waitfortarget(5000);
  TimeStart := now;
  WaitTargetObject(item);
  WaitJournalLine(TimeStart,'item|object|not sure |It appears to be ', 12000);
  wait(9400);
  if InJournalBetweenTimes('not sure', TimeStart, now) > 0 then begin
    exit;
  end;
  Ignore(item);
end;

begin
  checksave;
  OpenBag(IDBag);
  while FindTypeEx($FFFF, $FFFF, IDBag, False) <> 0 do
  begin
    IdCurrItem(FindItem);
    ClickOnObject(FindItem);
    if IsContainer(finditem) then begin
      SubBag := finditem;
      OpenBag(SubBag);
      while FindTypeEx($FFFF, $FFFF, SubBag, False) <> 0 do begin
        ClickOnObject(FindItem);
        IdCurrItem(FindItem);
      end;
      drophere(SubBag);
    end;
    hungry(1, backpack);
  end;
  drophere(IDBag);
  exit;
end.
 
faq/stealth/item_identification.txt · Последние изменения: 2019/11/19 16:48 — tsatsur
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki