Results 1 to 10 of 10

Thread: -- Iron Superheater -- By Wreck

  1. #1
    Join Date
    May 2012
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default -- Iron Superheater -- By Wreck

    -- Iron Superheater --
    By Wreck

    Note: As this is my first ever script if you want to help me improve this further post suggestions / corrections in this thread and I shall work on implementing them, Thanks!

    Instructions
    • Move to the SoulWars bank chest
    • Natures runes in inventory (Last slot for best results)
    • Start with more than 1 ore in inventory
    • Have Iron ore visible in bank preferably in first slot
    • Enter username/password/pin in settings
    • Enter SUPERHEATSTODO in settings
    • SMART is disable by default


    Current Version:
    0.4 (Latest progress report below)
    Recent Changes:
    Small tweaks and improvements, banking is still messing up occasionally if anyone would care to help me with that?
    Future Changes
    Further improve banking / possibly reduce antiban frequency.

    Code:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       Thank you for using Superheater
       Version: 0.4
       Author: Wreck
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Time Running:    17 Minutes and 57 Seconds
    AntiBans Done:   13
    AntiBans/Hour:   43
    Superheats Done: 500
    Superheats/Hour: 1671
    Magic XP Gained: 26500
    Magic XP/Hour:   88579
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Simba Code:
    program Superheater;
    //{$DEFINE SMART}
    {$i SRL/SRL.simba}
    {$i SRL/SRL/SKILL/Magic.simba}

    //{$IFDEF SMART}
    //    {$i srl/srl/mis/paintsmart.simba}
    //{$ENDIF}

    //MIX1, MIY1, MIX2, MIY2 - main inventory coords
    //MSX1, MSY1, MSX2, MSY2 - main screen coords
    //MBX1, MBY1, MBX2, MBY2 - main bank coords
    //DBX1, DBY1, DBX2, DBY2 - deposit box coords
    //MSCX, MSCY - main screen center coords
    //xs, ys, xe, ye - whole screen coords

    var
      fs, fs1, x, y, MagicXPH, SmithingXPH, InvOre, InvBars, {LevelsGained,}
      Superheats, SuperheatsPH, AntiBans, AntiBansPH :Integer;

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //~ ---=< Setup >=---
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    const
      VERSION = '0.4';          //Script Version
      SUPERHEATSTODO = 1000;     //How many ores to Superheat

      SRLStats_User = '';       //SRLStats Username
      SRLStats_Password = '';   //SRLStats Password

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active:= True;
      Players[0].Pin := '';
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'ssence'];
    end;

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //~ ---=< Progress Report >=---
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    procedure OnFinish;
    var
      MagicXP :Integer;
    begin
      AntiBansPH := Round((AntiBans * 3600) / (GetTimeRunning / 1000));
      MagicXP := Superheats * 53;
      MagicXPH := Round((MagicXP * 3600) / (GetTimeRunning / 1000));
      //SmithingXP := ;
      //SmithingXPH := Round((SmithingXP * 3600) / (GetTimeRunning / 1000));
      SuperheatsPH := Round((Superheats * 3600) / (GetTimeRunning / 1000));
      Writeln('');
      Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      Writeln('   Thank you for using Superheater');
      Writeln('   Version: '+ version);
      Writeln('   Author: Wreck');
      Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      Writeln('Time Running:    ' + TimeRunning);
      Writeln('AntiBans Done:   ' + IntToStr(AntiBans));
      Writeln('AntiBans/Hour:   ' + IntToStr(AntiBansPH));
      //Writeln('Levels Gained:   ' + IntToStr(LevelsGained));
      Writeln('Superheats Done: ' + IntToStr(Superheats));
      Writeln('Superheats/Hour: ' + IntToStr(SuperheatsPH));
      Writeln('Magic XP Gained: ' + IntToStr(MagicXP));
      Writeln('Magic XP/Hour:   ' + IntToStr(MagicXPH));
      //Writeln('Smithing XP Gained: ' + IntToStr(SmithingXP));
      //Writeln('Smithing XP/Hour:   ' + IntToStr(SmithingXPH));
      Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      Logout;
    end;

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //~ ---=< AntiBan >=---
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    procedure FindRandoms;
    begin
      FindNonInventoryRandoms;
      FindNormalRandoms;
    end;

    procedure AntiBan;
    begin
      case random(400) of
        1: Begin HoverSkill('magic', False); AntiBans := AntiBans + 1; End;
        2: Begin HoverSkill('random', False); AntiBans := AntiBans + 1; End;
        3: Begin Boredhuman; AntiBans := AntiBans + 1; End;
        4: Begin Wait(2500 + random(4500)); AntiBans := AntiBans + 1; End;
        5: Begin HoverSkill('smithing', False); AntiBans := AntiBans + 1; End;
        6: Begin PickUpMouse; AntiBans := AntiBans + 1; End;
        7: Begin RandomMovement; AntiBans := AntiBans + 1; End;
        8: Begin RandomRClick; AntiBans := AntiBans + 1; End;
      end;
    end;

    function Failsafes: Boolean;
    begin
      if (fs >= 5) then
        Result := false else
      if (fs1 >= 5) then
        Result := false else
      Result := true;
    end;

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //~ ---=< Main Script >=---
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    function FindNatureRunes: Boolean;
    var
      NatureRuneDTM :Integer;
    begin
      NatureRuneDTM := DTMFromString('mrAAAAHic42BgYOBlQAA2IBYEYkkglgFiaSBmBmJGIOYE' +
                                     'YiEgFgFifiBmh+oRqgKJMOHEcgz4ASMBDAMAui4Bmg==');
      if (not (GameTab(tab_inv))) then
        GameTab(tab_inv) else
      if FindDTM(NatureRuneDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
        begin
          writeln('Nature runes found - Starting Script');
          Result := True;
        end else
        begin
          writeln('Unable to find nature runes - Ending Script');
          Result := False;
        end;
      FreeDTM(NatureRuneDTM);
    end;

    procedure InventoryCount; //Will create shorter DTMs soon.
    var
      IronOreDTM, IronBarDTM:Integer;
    begin
      IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
                                  '0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
                                  'it8Py4jJ98wAHJwJd');
      IronBarDTM := DTMFromString('m1gAAAHic42JgYOADYnYgZmSAAEkgFgBiLiAWAWJZIJYCYlY' +
                                  'gZoKq54RiISAWhIqxQPU72dtDVeLHcgzEAUYiMQIAACAQAfU' +
                                  '=');
      InvOre := CountItems('dtm', IronOreDTM, []);
      InvBars := CountItems('dtm', IronBarDTM, []);
      FreeDTM(IronOreDTM);
      FreeDTM(IronBarDTM);
    end;

    procedure Bank;
    var
      IronOreDTM, IronBarDTM :Integer;
    begin
      IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
                                  '0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
                                  'it8Py4jJ98wAHJwJd');
      IronBarDTM := DTMFromString('m1gAAAHic42JgYOADYnYgZmSAAEkgFgBiLiAWAWJZIJYCYlY' +
                                  'gZoKq54RiISAWhIqxQPU72dtDVeLHcgzEAUYiMQIAACAQAfU=');
      if (not (BankScreen)) then
        begin
          OpenBankChest(SRL_BANK_SW);
          wait(500+RandomRange(50,250));
        end else
      if (PinScreen) then
        InPin(Players[0].Pin) else
      if ((InvBars >= 1) and (InvOre = 0)) then
        if WaitFindDTMEx(IronBarDtm, x, y, MIX1, MIY1, MIX2, MIY2, 50, 500) then
          begin
            Mouse(x, y, 10, 10, mouse_Right);
            if WaitOption('-All Ir', 500) then
              begin
                wait(750+RandomRange(50,250));
                InventoryCount;
              end
            else
              writeln('Depositing Failed');
          end
        else
          writeln('FindDTM unable to find IronBarDtm');
      if ((InvOre = 0) and (InvBars = 0)) then
        if WaitFindDTMEx(IronOreDtm, x, y, MBX1, MBY1, MBX2, MBY2, 50, 500) then
          begin
            Mouse(x, y, 10, 10, mouse_Right);
            if WaitOption('-All Ir', 500) then
              begin
                wait(750+RandomRange(50,250));
                InventoryCount;
              end
            else
              writeln('Withdrawing Failed');
          end
        else
          writeln('FindDTM unable to find IronOreDtm');
      FreeDTM(IronOreDTM);
      FreeDTM(IronBarDTM);
    end;

    procedure Superheat;
    var
      SuperheatDTM, IronOreDTM :Integer;
    begin
      SuperheatDTM := DTMFromString('mlwAAAHicY2dgYOAAYnYgZgZiQSAWYIAARiDmg7LZgJgTK' +
                                    'scPxDxA/O71BgY9RmasWI4BN2DEg6EAAISYBF4=');
      IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
                                  '0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
                                  'it8Py4jJ98wAHJwJd');
      if (not (GameTab(tab_magic))) then
        begin
          FindRandoms;
          writeln('Unable to find spell - Selecting Spellbook');
          GameTab(tab_magic);
        end else
          if WaitFindDTMEx(SuperheatDTM, x, y, MIX1, MIY1, MIX2, MIY2, 50, 500) then
            begin
              fs := 0;
              Mouse(x, y, 7, 7, mouse_Left);
              FindRandoms;
              if WaitFindDTMEx(IronOreDTM, x, y, MIX1, MIY1,MIX2,MIY2, 50, 500) then
                begin
                  fs1 := 0;
                  MMouse(x, y, 10, 10);
                  //if IsUpText('ast Sup') then
                  if WaitUpTextMulti(['ast Sup', 'ron ore'], 500) then
                    begin
                      InventoryCount;
                      GetMousePos(x, y);
                      Mouse(x, y, 0, 0, mouse_Left);
                      Superheats := Superheats + 1;
                      InvOre := InvOre - 1;
                      InvBars := InvBars + 1;
                      //WaitFindDTM(x, y, SuperheatDTM, 1000+RandomRange(150,250));
                      WaitFindDTMEx(SuperheatDTM, x, y, MIX1, MIY1,MIX2,MIY2, 50, (1000+RandomRange(150,250)));
                    end;
                end else
                  fs1 := fs1 + 1;
            end else
              fs := fs + 1;
      FreeDTM(SuperheatDTM);
      FreeDTM(IronOreDTM);
    end;

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //~ ---=< Main Loop >=---
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    begin
      {$IFDEF SMART}
       Smart_Server := 0;
       Smart_Members := True;
       Smart_Signed := True;
       Smart_SuperDetail := False;
      {$ENDIF}
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      if not(LoggedIn) then
        LoginPlayer else
      if FindNatureRunes then
        begin
          MakeCompass('W');
          SetAngle(SRL_ANGLE_HIGH);
          InventoryCount;
          SetSpellMode(False, False, False, True);
          SortBook(BOOKSORT_COMBAT);
          repeat
            if (InvOre = 0) then
              Bank else
            if ((InvOre >= 1) and BankScreen) then
              CloseBank else
            Superheat;
            Antiban;
          until (Superheats = SUPERHEATSTODO) or (Failsafes = False);
          OnFinish;
        end;
    end.
    Last edited by Wreck; 05-18-2012 at 01:22 PM.

  2. #2
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Increase the tolerance on the DTMs. Log out and log back in a few times and get screenshots to test each time to see if they work.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  3. #3
    Join Date
    May 2012
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by litoris View Post
    Increase the tolerance on the DTMs. Log out and log back in a few times and get screenshots to test each time to see if they work.
    What would be good tolerance to use? I have it set around 30~ and tested them a few times, the DTM editor picks them up every time but the script doesnt so I having to assume its something else :/

  4. #4
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    If the editor does and the script doesn't, the problem is not the DTMs themselves. I would suggest you check Teh's superheater, I learned a lot about DTMs from that script.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  5. #5
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Talking

    Simba Code:
    if FindDTM(IronOreDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
        begin
          Count;//this is the wrong place
          Mouse(x, y, 10, 10, mouse_Left);
       {  InvOre := InvOre - 1; because count is in the wrong place you have to do these things right?
          InvBars := InvBars + 1; both these lines are useless if you just call Count at the end}

          SuperheatsDone := SuperheatsDone + 1;
          WaitFindDTM(x, y, SuperHeatItemDTM, 1000+RandomRange(150,200));
        end;

    here's what i meen.
    Simba Code:
    if FindDTM(IronOreDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
        begin
          Mouse(x, y, 10, 10, mouse_Left);
          SuperheatsDone := SuperheatsDone + 1;
          WaitFindDTM(x, y, SuperHeatItemDTM, 1000+RandomRange(150,200));
          Count;
        end;
    only had a quick look keep it up tho will watch this tread

  6. #6
    Join Date
    May 2012
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    Simba Code:
    if FindDTM(IronOreDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
        begin
          Count;//this is the wrong place
          Mouse(x, y, 10, 10, mouse_Left);
       {  InvOre := InvOre - 1; because count is in the wrong place you have to do these things right?
          InvBars := InvBars + 1; both these lines are useless if you just call Count at the end}

          SuperheatsDone := SuperheatsDone + 1;
          WaitFindDTM(x, y, SuperHeatItemDTM, 1000+RandomRange(150,200));
        end;

    here's what i meen.
    Simba Code:
    if FindDTM(IronOreDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
        begin
          Mouse(x, y, 10, 10, mouse_Left);
          SuperheatsDone := SuperheatsDone + 1;
          WaitFindDTM(x, y, SuperHeatItemDTM, 1000+RandomRange(150,200));
          Count;
        end;
    only had a quick look keep it up tho will watch this tread
    That was to get a reliable count of how many ores / bars there are a split second before you click and then recount every cast to make up for missclicks/interupted clicks and lag with the inventory getting changed to the spellbook before the ore has even changed to a bar (Well that was the idea anyway )

    Besides i didnt really notice it slowing down the script at all (when it was working ) but ill have another look when ive got it up and running, thanks!

  7. #7
    Join Date
    May 2012
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Updated!

  8. #8
    Join Date
    Mar 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    excellent

  9. #9
    Join Date
    Dec 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Idk if you can set it up to have the mage book so superheat is at the bottom, that way the mouse only has to move for the last 4 ores. Would help xp/h alot

  10. #10
    Join Date
    May 2012
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ill look into it, but im not sure whether that would be more or less detectable :s

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •