faq/stealth/tinkering.txt · Last modified: 2020/12/14 08:05 (external edit)
 

Tinkering

Script is made mainly for recources. For example glass, wood and iron.

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

var
n : TDateTime;
i : Integer;

const
tools = $1EBC;
logs = $1BDD;
ingots = $1BF2;
glass = $1BF5;
bottle = $0F0E;
blankmap = $14EB;
blankscroll = $0E34;

//Settings. 0 - not to do, 1 - to do
UseLore = 0;
MakeBottles = 0;
MakeMaps = 0;
MakeWands = 0;
MakeScrolls = 1;

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;
    UseSkill('Arms Lore');
    WaitJournalLineSystem(t, 'This|tell', 3000);
    if TargetPresent then CancelTarget;
    n:=now;
  end;
end;

procedure MakeWand;
begin
  WaitMenu('to make', 'Deadly Tools');
  WaitMenu('to make', 'Wand');
  if TargetPresent then CancelTarget;
  UseType(tools, $ffff);
  Wait(200);
  WaitTargetObject(FindType(ingots, backpack));
  Wait(7100);
end;

procedure MakeBottle;
begin
  WaitMenu('to make', 'Alchemical Tools');
  WaitMenu('to make', 'Empty Bottle');
  if TargetPresent then CancelTarget;
  UseType(tools, $ffff);
  Wait(200);
  WaitTargetObject(FindType(glass, backpack));
  Wait(7100);
end;

procedure MakeMap;
begin
  WaitMenu('like to', 'Paper items');
  WaitMenu('like to', 'Blank Map');
  if TargetPresent then CancelTarget;
  UseType(tools, $ffff);
  Wait(200);
  WaitTargetObject(FindType(logs, backpack));
  Wait(7100);
  MoveItem(FindType(blankmap, backpack), 1, backpack, 0, 0, 0);
  Wait(500);
end;

procedure MakeScroll;
begin
  WaitMenu('like to', 'Paper items');
  WaitMenu('like to', 'Blank Scroll');
  if TargetPresent then CancelTarget;
  UseType(tools, $ffff);
  Wait(200);
  WaitTargetObject(FindType(logs, backpack));
  Wait(7100);
end;

begin
  while not Dead do
  begin
    if Connected then
    begin
      SetARStatus(true);
      Hungry(1, backpack);
      if UseLore = 1 then ArmsLore;
      for i:=0 to 50 do
      begin
        if MakeMaps = 1 then MakeMap;
        if MakeScrolls = 1 then MakeScroll;
        if MakeBottles = 1 then MakeBottle;
        if MakeWands = 1 then MakeWand;
      end;
      i := i + 1;
      AddToSystemJournal('Logs: ' + IntToStr(GetQuantity(FindType(logs,backpack)))
      + '. Glass: ' + IntToStr(GetQuantity(FindType(glass,backpack)))
      + '. Bottles: ' + IntToStr(GetQuantity(FindType(bottle,backpack)))
      + '. Maps: ' + IntToStr(GetQuantity(FindType(blankmap,backpack)))
      + '. Scrolls: ' + IntToStr(GetQuantity(FindType(blankscroll,backpack))));
      Wait(500);
    end;
  end;
end.
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki