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

Alchemy

You can train Alchemy along with Evaluating Intelligence (in settings).

Program Alchemy;
{$include 'all.inc'}

var
i : Integer;
n : TDateTime;

const
Gingseng = $0F85; //Gingseng
Nightshade = $0F88; //Nightshade
MandrakeRoots = $0F86; //Mandrake Roots
SulphurousAshs = $0F8C; //Sulphurous Ashs
bottles = $0F0E; //empty bottles
mortar = $0E9B; //mortar
boxtype = $0E7D; //type of box to put potions in later (it's better to choose Box - 500 fits in there)
strength = $0F09; //Strength Potion
poison = $0F0A; //Poison Potion
heal = $0F0C; //Heal Potion
explosion = $0F0D; //Explosion Potion


//Turn off the AutoLoop in .options
//Options
UseEval = 1; //1 - To train Evaluation, 0 - no
ToBoxes = 1; //1 - To put in the box, 0 - no

procedure PackItems;
begin
  FindType(strength, backpack);
  if FindQuantity > 0 then MoveItem(FindType(strength, backpack), 1, FindType(boxtype, backpack), 0, 0, 0);
  FindType(poison, backpack);
  if FindQuantity > 0 then MoveItem(FindType(poison, backpack), 1, FindType(boxtype, backpack), 0, 0, 0);
  FindType(heal, backpack);
  if FindQuantity > 0 then MoveItem(FindType(heal, backpack), 1, FindType(boxtype, backpack), 0, 0, 0);
  FindType(explosion, backpack);
  if FindQuantity > 0 then MoveItem(FindType(explosion, backpack), 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 ignore(boxid);
    PackItems;
  end;
end;

procedure EvalInt;
var
d, t: TDateTime;

begin
  d := StrToTime('0:00:11');
  if ((now - n > d) or (n = 0)) then
  begin
    t := now;
    CheckSave;
    CheckTargetError(2,2);
    UseSkill('Evaluating Intelligence');
    WaitTargetObject(self);
    WaitJournalLineSystem(t, 'mental str', 3000);
    if TargetPresent then CancelTarget;
    n:=now;
  end;
end;

Procedure StrengthPotion;
Begin
  CancelMenu;
  WaitMenu('a', 'Strength');
  if TargetPresent then CancelTarget;
  WaitTargetType(MandrakeRoots);
  usetype(mortar,$ffff);
end;

Procedure PoisonPotion;
Begin
  CancelMenu;
  WaitMenu('a', '(2)');
  if TargetPresent then CancelTarget;
  WaitTargetType(Nightshade);
  UseType(mortar,$ffff);
end;

Procedure HealPotion;
Begin
  CancelMenu;
  WaitMenu('a', '(2)');
  if TargetPresent then CancelTarget;
  WaitTargetType(Gingseng);
  UseType(mortar,$ffff);
end;

Procedure ExplosionPotion;
Begin
  CancelMenu;
  WaitMenu('a', 'Explosion');
  if TargetPresent then CancelTarget;
  WaitTargetType(SulphurousAshs);
  UseType(mortar,$ffff);
end;

Procedure GreaterHealPotion;
Begin
  CancelMenu;
  WaitMenu('a', 'Greater');
  if TargetPresent then CancelTarget;
  WaitTargetType(Gingseng);
  UseType(mortar,$ffff);
end;

Procedure GreaterPoisonPotion;
Begin
  CancelMenu;
  WaitMenu('a', 'Greater');
  if TargetPresent then CancelTarget;
  WaitTargetType(Nightshade);
  UseType(mortar,$ffff);
end;

Procedure DeadlyPoisonPotion;
Begin
  CancelMenu;
  WaitMenu('a', 'Deadly');
  if TargetPresent then CancelTarget;
  WaitTargetType(Nightshade);
  UseType(mortar,$ffff);
end;

begin
  While not Dead do
  begin
    SetARStatus(true);
    Hungry(1,backpack);
    wait(1000);
    if GetQuantity(FindType(bottles,backpack)) > 0 then
    begin
      for i:=0 to 20 do
      begin
        if UseEval = 1 then EvalInt;
        if TargetPresent then CancelTarget;
        CheckSave;
        if (GetSkillValue('Alchemy') <= 52.0) then StrengthPotion;
        if (GetSkillValue('Alchemy') <= 62.0) and (GetSkillValue('Alchemy') >= 52.1) then PoisonPotion;
        if (GetSkillValue('Alchemy') <= 72.0) and (GetSkillValue('Alchemy') >= 62.1) then HealPotion;
        if (GetSkillValue('Alchemy') <= 87.0) and (GetSkillValue('Alchemy') >= 72.1) then ExplosionPotion;
        if (GetSkillValue('Alchemy') <= 92.0) and (GetSkillValue('Alchemy') >= 87.1) then GreaterHealPotion;
        if (GetSkillValue('Alchemy') <= 100) and (GetSkillValue('Alchemy') >= 92.1) then GreaterPoisonPotion;
        if (GetSkillValue('Alchemy') <= 122.0) and (GetSkillValue('Alchemy') >= 100.1) then DeadlyPoisonPotion;
        if (GetSkillValue('Alchemy') > 121.9) then
        begin
          
        end;
        Wait(7100);
        if ToBoxes = 1 then MoveToBoxes;
      end;
      i := i + 1;
    end;
  end;
end.
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki