Author Topic: ti.teg.tnod.I's Steel Super Heater V1.0.1  (Read 768 times)

Offline ti.teg.tnod.I

  • The Best
  • Administrator
  • *****
  • Posts: 3233
  • Rep: 10
  • ^-^
    • View Profile
    • Rainbows In A Fire
ti.teg.tnod.I's Steel Super Heater V1.0.1
« on: April 06, 2010, 08:08:39 pm »
To do:

Fix anti-randoms (For some reason they fail, if you know why please tell me)
Optimize speed (More...But not by much, it's pretty fast)

Features:

~66k magic XP/H
Can run for a very long time without fail
SMART

Best report (By me):

Code: [Select]
|ti.teg.tnod.I's Steel Super Heater|
Time run: 1:52:43
Steel bars made: 2319
Smithing XP gained: 39423
Magic XP gained: 122907

Code: (SCAR) [Select]
program SteelSuperHeater;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
//V1.0.1
//ti.teg.tnod.I's Steel Super Heater
//No multi-player
//Always have at least 2x coal than iron (or idk...)
//Enjoy

{/-------------------SETUP----------------------------\\
\\1. Put coal & iron in a visible area of your bank   //
//2. Equip a fire staff                               \\
\\3. Keep nature runes in first slot of your inventory//
//4. Stand in the GE                                  \\
\\----------------------------------------------------/}


const MEMBERS = False; //True if you have a members account
      SERVER = 64; //Server to use upon load

Procedure DeclarePlayers;
begin
  NumberOfPlayers(1);
  CurrentPlayer := 0;

  Players[0].Name :='';
  Players[0].Pass :='';
  Players[0].Nick :='';
  Players[0].Active := True;
  Players[0].WorldInfo := [MEMBERS];
end;

//X, Y, i, BarsMade, Count
var x, y, i, BarsMade, Count : integer;
//DTMs
var iron, coal, SuperHeatItem : integer;

function FindDTMRetry(dtm : integer; var x, y : integer; x1, y1, x2, y2, count : integer) : boolean;
begin
  Result := FindDTM(dtm, x, y, x1, y1, x2, y2)
  if (count < 3) and (not Result) then
  begin
    Wait(1000);
    Result := FindDTMRetry(dtm, x, y, x1, y1, x2, y2, count+1);
  end;
end;

procedure Report;
var S, M, H: integer;
begin
  ClearReport;
  AddToReport('|ti.teg.tnod.I''s Steel Super Heater|');
  ConvertTime(GetTimeRunning, H, M, S);
  AddToReport('Time run: ' + IntToStr(H) + ':' + IntToStr(M) + ':' + IntToStr(S));
  AddToReport('Steel bars made: ' + IntToStr(BarsMade));
  AddToReport('Smithing XP gained: ' + IntToStr(BarsMade*17));
  AddToReport('Magic XP gained: ' + IntToStr(BarsMade*53));
end;

procedure DefineDTMs;
begin
  iron := DTMFromString('78DA6334636060C8614001964A920C5C409A1' +
       '188FF0301A33590918C5B0D0830DA018902FC6A00F857076B');
  coal := DTMFromString('78DA634C616060C86140011A1AF20C5C409A1' +
       '188FF030123484D2AAA1A555519B81A1060CC001205A86AE4E4C4' +
       '51D40000169007BA');
  SuperHeatItem := DTMFromString('78DA630C6562606065644006FBB47919B8803' +
       '448F43F10300603D5FC4251C2F0A68619AE060418FD816AFEA3AA' +
       'F9389F15554D2450CD6FFCE6000060AD0DE0');
end;

procedure SetupSmart;
begin
  Smart_Members := MEMBERS;
  Smart_Server := SERVER;
  Smart_Signed := True;
  Smart_SuperDetail := False;
end;

procedure SetTop;
begin
  KeyDown(VK_Up);
  Wait(3500 + Random(500));
  KeyUp(VK_Up);
end;

procedure Startup(); forward;
procedure GetSupplies(); forward;

procedure Die(find : string);
begin
  if not LoggedIn then
  begin
    StartUp;
    GetSupplies;
  end else
  if not FindNormalRandoms then
  begin
    WriteLn('Could not find ' + find + ' commiting suicide');
    TerminateScript;
  end;
end;

procedure ClickMouseSafe(X, Y: Integer; Left: Boolean);
begin
  HoldMouse(X, Y, Left);
  Wait(31 + Random(10));
  ReleaseMouse(X, Y, Left);
end;

procedure GetSupplies;
begin
  if not FindDTMRetry(iron, x, y, 26, 85, 480, 292, 0) then die('iron ore');
  Mouse(x, y, 7, 7, False);
  if not WaitOption('-9 Iron o', 300) then
  begin
    Wait(75 + Random(25));
    Mouse(x, y, 7, 7, False);
    if WaitOption('-X Iron o', 300) then
    begin
      Wait(1000 + Random(1000));
      TypeSend('9');
    end else die('iron ore');
  end;
  Wait(150 + Random(500));
  if not FindDTMRetry(coal, x, y, 26, 85, 480, 292, 0) then die('coal');
  Mouse(x, y, 7, 7, False);
  if not WaitOption('-All Coa', 300) then
  begin
    Wait(100 + Random(100));
    Mouse(x, y, 7, 7, False);
    if not WaitOption('-All Coa', 300) then die('coal');
  end;
  Wait(150 + Random(500));
  CloseBank;
end;

procedure Cast;
begin
  GameTab(28);
  if not FindDTMRetry(SuperHeatItem, x, y, 556, 214, 731, 426, 0) then
  begin
    Wait(500 + Random(500));
    if not FindDTMRetry(SuperHeatItem, x, y, 556, 214, 731, 426, 0) then
      Die('superheat item spell');
  end;
  Wait(100 + Random(200));
  Mouse(x, y, 3, 3, True);
  Wait(100 + Random(100));
  if not FindDTMRetry(iron, x, y, 560, 210, 725, 317, 0) then Die('iron ore');
  Mouse(x, y, 10, 10, True);
end;

procedure SetupScript;
begin
  SetupSMART;
  SetupSRL;
  DeclarePlayers;
  LampSkill := 'smithing';
  DefineDTMs;
end;

{*******************************************************************************
function OpenBankNPC: Boolean;
By: Home, modified for the GE by ti.teg.tnod.I
Description: Opens the bank by using Banker.
*******************************************************************************}

function OpenBankNPC1: Boolean;
var
  bx, by, Speed, ColFace, ColHair, ColWhit: Integer;
begin
  Speed := GetColorToleranceSpeed;
  ColorToleranceSpeed(2);
  ColFace := 1403796; // Hair Color
  ColHair := 1537699; // Hair Color
  ColWhit := 1337488; // Hair Color
  if (FindObjThroughMM(bx, by, 'npc', [ColFace, ColWhit, ColHair], [5, 5, 5], ['to B'], 2, 2)) then begin
    Mouse(bx, by, 1, 1, False);
    WaitOption('ank B', 300);
    FFlag(0);
    Wait(900 + Random(400));
    if (Length(Players) > 0) then
      if (Players[CurrentPlayer].Pin <> '') then
        InPin(Players[CurrentPlayer].Pin);
  end;
  Result := (BankScreen) or (PinScreen);
  ColorToleranceSpeed(Speed);
end;

procedure StartUp();
begin
  ActivateClient;
  LoginPlayer;
  SetTop;
  FindNormalRandoms;
  Wait(750 + Random(750));
  if not OpenBankNPC1 then
    if not OpenBankNPC1 then
      if not OpenBankNPC1 then Die('bank');
  Deposit(2, 28, True);
end;

begin
  SetupScript;
  StartUp;
  repeat
    GetSupplies;
    for i := 0 to 8 do
    begin
      repeat
        Wait(75 + Random(25));
        Count := Count + 1
      until((Count = 9) or (GetCurrentTab = 28));
      Count := 0
      FindNonInventoryRandoms;
      Cast;
      BarsMade := BarsMade + 1;
      Report;
    end;
    if not OpenBankNPC1 then
      if not OpenBankNPC1 then
        if not OpenBankNPC1 then Die('bank');
    Deposit(2, 28, True);
  until(false);
end.
« Last Edit: June 01, 2011, 09:50:44 pm by ti.teg.tnod.I »

Freddy1990.com

ti.teg.tnod.I's Steel Super Heater V1.0.1
« on: April 06, 2010, 08:08:39 pm »

Offline Freddy

  • Owner
  • *****
  • Posts: 2616
  • Rep: 19
    • MSN Messenger - freddy1990@gmail.com
    • AOL Instant Messenger - Freddy199O
    • View Profile
    • Email
Re: ti.teg.tnod.I's Steel Super Heater V1.0.1
« Reply #1 on: April 07, 2010, 04:00:04 pm »
Ooh, kewl =D

Freddy1990.com

Re: ti.teg.tnod.I's Steel Super Heater V1.0.1
« Reply #1 on: April 07, 2010, 04:00:04 pm »