Results 1 to 17 of 17

Thread: First Superheater

  1. #1
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default First Superheater

    Hello, This is my first script, a IRON SuperHeater.

    Hate, rate & Comment :P

    Start in LUMBRIDGE BANK.
    Will change to SoulWars bank soon.

    Added:
    Anti-ban
    -Made CloseBank;

    Simba Code:
    Program SuperHeater;
      {$Define SMART}
      {$Include SRL/SRL/Misc/SMART.simba}
      {$i SRL/SRL.simba}



    Var

    IronOre:integer;
    CastSuperHeat:integer;
    BankBooth:integer;
    DepositIronBar:integer;
    TakeOres:integer;
    x,y:integer;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';     //Username
      Players[0].Pass := '';     //Password
      Players[0].Active := True;
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
      LampSkill := 'Magic';
      end;

    Procedure LoadDTM;
    Begin

       TakeOres := DTMFromString('mWAAAAHicY2FgYIgD4hggjgfiRCD+BMTvoPgjEJvKizMYyIgyWChKMFgrSTGwAsWQMSMaBgEArGkHCg==');
       IronOre := DTMFromString('mbQAAAHicY2VgYNjExMCwFYg3QDGI3cbIwNABxE1A3AnELUBsIi/OYKMizaAnI8pgKCsGplmB+tExIxYMBgCZ3ghT');
       CastSuperHeat := DTMFromString('mrAAAAHic42BgYGhlYmBoA+JuIG4A4k4oDeI3A3ERIwNDBhAXQ3EZEOdBcSkQv3u9gWGzMBPDoQUCDH8fGjJ8mM/KYMfEzPCmhpnhy8QsBjmgHfgwIwEMAwC4bxTQ');
       BankBooth := DTMFromString('mbQAAAHicY2VgYDBnZGBQA2I5INYEYn0gnsGAiqcD8YblCxjWLJ7NsGrBDDC9Yek8BlagODpmxILBAABYfQ2T');
       DepositIronBar := DTMFromString('mbQAAAHicY2VgYJjGxMAwFYgXMEHYPUDszMjAYA/ETkDsAcQuQBzk58dgZ2MDxooKCmCaGagfHTNiwWAAAE88B9c=');


      end;

      Procedure FrDTMS;
    Begin
       FreeDTM(IronOre);
       FreeDTM(CastSuperHeat);
       FreeDTM(BankBooth);
       FreeDTM(DepositIronBar);
       FreeDTM(TakeOres);
      end;

      procedure AntiBan;
    begin
      if not(LoggedIn)then
      Exit;
      case Random(175)of
        0: HoverSkill('Magic', false);
        1: RandomRClick;
        2: BoredHuman;
        3: PickUpMouse;
        4: RandomMovement;
        5: HoverSkill('Smithing', false);
      end;
    end;

        procedure Start;
        begin
            MakeCompass('N')
            wait(300);
        SetAngle(SRL_ANGLE_HIGH);
            wait(300);
        end;

    Procedure SuperHeat;
    Begin
     if FindDTM(CastSuperHeat, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
                MMouse(X, Y + 3, 0, 0);
                  ClearDebug;
                If WaitUptextMulti(['Superheat', 'Item'], 500) Then
                Begin

                Writeln('--------------------------')
                Writeln('------ SuperHeater -------')
                Writeln('--------------------------')
                Writeln ('Selected Superheat > NEXT')
                  ClickMouse2(true);

                   wait(300);


           end;
       end;
       end;

       Procedure Item;
    Begin
     if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['Superheat', 'Item'], 500) Then
                Begin
                Writeln ('Superheating > Iron Ore.')
                  ClickMouse2(true);

                   wait(600);

           end;
           end;
       end;


       Procedure Bank;
    Begin
     if FindDTM(BankBooth, x, y, MSX1, MSY1, MSX2, MSY2) then
      Begin
                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['Bank', 'Booth'], 500) Then
                Begin
                Writeln ('BANK > Banking')
                  ClickMouse2(true);
                   wait(400);

                   end;
                   end;
                end;

     Procedure DepositeBars;
       begin

              if FindDTM(DepositIronBar, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['Iron bar'], 500) Then
                Begin
                Writeln ('BANK > Deposite Bars.')
                  ClickMouse2(false);
               ChooseOption('all');

           end;
       end;
       end;

       Procedure TakesOresFromBank;
       begin

              if FindDTM(TakeOres, x, y, MSX1, MSY1, MSX2, MSY2) then
      Begin
                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['Iron ore'], 500) Then
                Begin
                Writeln ('BANK > Take Ore.')
                  ClickMouse2(false);
               ChooseOption('all');

               wait(120);
               CloseBank;
             wait(170);
              GameTab(Tab_Magic);
                    wait(130);
           end;
       end;
       end;


    Begin
      Smart_Server := 86;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      LoadDTM;

    Writeln ('Waiting 10 Seconds before starting...')
    wait(10000);
    GameTab(Tab_Magic);
    wait(400);
    Start;
    wait(100);

      repeat


    SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         SuperHeat;
         Item;
         AntiBan;
         SuperHeat;
         Item;


         //BANKING

          Bank;
          DepositeBars;
          TakesOresFromBank;

         FrDTMS;
         wait(200);
         until(false);

    end.
    Last edited by bas; 04-22-2012 at 12:35 PM.

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

    Default

    Hey mate grats on first script
    I can't see the whole script atm but I notice you have a DTM for close bank there is actually a function for this already is SRL called CloseBank

    Will update this post when I get on pc in 10 mins will look at the rest of your code

  3. #3
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    Hey mate grats on first script
    I can't see the whole script atm but I notice you have a DTM for close bank there is actually a function for this already is SRL called CloseBank

    Will update this post when I get on pc in 10 mins will look at the rest of your code
    Hey thanks! Will update the CloseBank + add anti-ban in a few mins

    EDIT: Done, i guess they in the correct place? :P
    Last edited by bas; 04-22-2012 at 12:19 PM.

  4. #4
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Use simba tags!

  5. #5
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Use simba tags!
    I did?...

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

    Default

    First thing your standards are a mess so ive fixed them for you
    try not to copy and paste all your code we all do it but its not good practice

    i've added a mainloop which should make it easier for you to operate things within your script
    i also added a counter within the main loop which counts each cast you do rather than just repeating the command 28 times

    Have a look thru the SRL DOCS for alot of functions made for us all to use.

    http://docs.villavu.com/srl-5/srlref.html

    Compare this one with yours
    SCAR Code:
    Program SuperHeater;
      {$Define SMART}
      {$Include SRL/SRL/Misc/SMART.simba}
      {$i SRL/SRL.simba}

    Var
    IronOre:integer;
    CastSuperHeat:integer;
    BankBooth:integer;
    DepositIronBar:integer;
    TakeOres:integer;
    i,x,y:integer;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';     //Username
      Players[0].Pass := '';     //Password
      Players[0].Active := True;
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
      LampSkill := 'Magic';
    end;

    Procedure LoadDTM;
    Begin
       TakeOres := DTMFromString('mWAAAAHicY2FgYIgD4hggjgfiRCD+BMTvoPgjEJvKizMYyIgyWChKMFgrSTGwAsWQMSMaBgEArGkHCg==');
       IronOre := DTMFromString('mbQAAAHicY2VgYNjExMCwFYg3QDGI3cbIwNABxE1A3AnELUBsIi/OYKMizaAnI8pgKCsGplmB+tExIxYMBgCZ3ghT');
       CastSuperHeat := DTMFromString('mrAAAAHic42BgYGhlYmBoA+JuIG4A4k4oDeI3A3ERIwNDBhAXQ3EZEOdBcSkQv3u9gWGzMBPDoQUCDH8fGjJ8mM/KYMfEzPCmhpnhy8QsBjmgHfgwIwEMAwC4bxTQ');
       BankBooth := DTMFromString('mbQAAAHicY2VgYDBnZGBQA2I5INYEYn0gnsGAiqcD8YblCxjWLJ7NsGrBDDC9Yek8BlagODpmxILBAABYfQ2T');
       DepositIronBar := DTMFromString('mbQAAAHicY2VgYJjGxMAwFYgXMEHYPUDszMjAYA/ETkDsAcQuQBzk58dgZ2MDxooKCmCaGagfHTNiwWAAAE88B9c=');
    end;

    Procedure FrDTMS;
    Begin
       FreeDTM(IronOre);
       FreeDTM(CastSuperHeat);
       FreeDTM(BankBooth);
       FreeDTM(DepositIronBar);
       FreeDTM(TakeOres);
    end;

    procedure AntiBan;
    begin
      if not(LoggedIn)then
      Exit;
      case Random(175)of
        0: HoverSkill('Magic', false);
        1: RandomRClick;
        2: BoredHuman;
        3: PickUpMouse;
        4: RandomMovement;
        5: HoverSkill('Smithing', false);
      end;
    end;

    procedure Start;
    begin
      MakeCompass('N')
      wait(300);
      SetAngle(SRL_ANGLE_HIGH);
      wait(300);
    end;

    Procedure SuperHeat;
    Begin
      if FindDTM(CastSuperHeat, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
        MMouse(X, Y + 3, 0, 0);
        ClearDebug;
        If WaitUptextMulti(['Superheat', 'Item'], 500) Then
        Begin
          Writeln('--------------------------')
          Writeln('------ SuperHeater -------')
          Writeln('--------------------------')
          Writeln ('Selected Superheat > NEXT')
          ClickMouse2(true);
          wait(300);
        end;
      end;
    end;

    Procedure Item;
    Begin
      if FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
       MMouse(X, Y + 3, 0, 0);
       If WaitUptextMulti(['Superheat', 'Item'], 500) Then
       Begin
        Writeln ('Superheating > Iron Ore.')
        ClickMouse2(true);
        wait(600);
       end;
      end;
    end;


    Procedure Bank;
    Begin
     if FindDTM(BankBooth, x, y, MSX1, MSY1, MSX2, MSY2) then
      Begin
      MMouse(X, Y + 3, 0, 0);
       If WaitUptextMulti(['Bank', 'Booth'], 500) Then
        Begin
          Writeln ('BANK > Banking')
          ClickMouse2(true);
          wait(400);
        end;
      end;
    end;

    Procedure DepositeBars;
      begin
      if FindDTM(DepositIronBar, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
        MMouse(X, Y + 3, 0, 0);
       If WaitUptextMulti(['Iron bar'], 500) Then
       Begin
        Writeln ('BANK > Deposite Bars.')
        ClickMouse2(false);
        ChooseOption('all');
       end;
      end;
    end;

    Procedure TakesOresFromBank;
    begin
      if FindDTM(TakeOres, x, y, MSX1, MSY1, MSX2, MSY2) then
      Begin
        MMouse(X, Y + 3, 0, 0);
       If WaitUptextMulti(['Iron ore'], 500) Then
       Begin
        Writeln ('BANK > Take Ore.')
        ClickMouse2(false);
        ChooseOption('all');
        wait(120);
        CloseBank;
        wait(170);
        GameTab(Tab_Magic);
        wait(130);
       end;
      end;
    end;
    //added a main loop
    procedure MainLoop;
    begin
      repeat
        repeat  //----------v
         SuperHeat;//-------|
         Item;//              Added an extra loop this will cast 28 then break
         Inc(i);//----------|
        Until(i > 28)//-----^
    //BANKING
        Bank;
        DepositeBars;
        TakesOresFromBank;
        FrDTMS;
        wait(200);
      until(false);
    end;

    Begin
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      LoadDTM;
      Writeln ('Waiting 10 Seconds before starting...')
      wait(10000);
      GameTab(Tab_Magic);
      wait(400);
      Start;
      wait(100);
      MainLoop;
    end.
    keep at it we was all noobs at one point

  7. #7
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Thanks man!
    So all my code was alright, but the loop was a failture?
    So this mean if i use your MainLoop for all my scripts, im gonna be alright? :P
    Last edited by bas; 04-22-2012 at 12:56 PM.

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

    Default

    Pretty much yeah now you should work on removing some of those WriteLn lines and making a proggy function instead

    Also Look into using Timed Loops instead of waiting helps maximize Speed and efficiency is perfect for slow computers

    Simba Code:
    MarkTime(a);// dont forget to declare a: integer;
    Repeat
    wait(0);
    Until(FindDTM(CastSuperHeat, x, y, MIX1, MIY1, MIX2, MIY2)or TimeFromMark(a)>15000)
    if TimeFromMark(a)>15000 then
    begin
    //Failed to superheat do something
    end else
    //continue

    Last edited by Mark; 04-22-2012 at 01:07 PM.

  9. #9
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Alright i look into it, thanks for your help

    Going to try it all with a fresh start on a Dungeoneer Farmer.
    Didnt saw a DungFarmer on Simba, hope i can make the community happy with it

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

    Default

    hmm whats the xp per hour on this im sure its been mentioned before

  11. #11
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    hmm whats the xp per hour on this im sure its been mentioned before
    I think about 15-20K/h

  12. #12
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Nevermind, cant get it to work...

  13. #13
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by kipjes bende View Post
    Nevermind, cant get it to work...
    Keep trying and don't hesitate to ask for help, great scripts don't just come together in 30 minutes

  14. #14
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Looks pretty nice for a first script well done, what isn't working?
    Current Project: Retired

  15. #15
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    My second script isnt working :P A dungeoneer farmer. Guess i have to start with something easyer.
    It moves mouse over the seed, but dont click it :S also it cant find the herb patch.
    Awell, as i said guess i gotta start simple(r) first :P

  16. #16
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Use ACA to find good colors on the patch and use a TPA to find the patch and the clicking is just probably missing something like after having it move the mouse and a function to click there Like ClickMouse2(True);
    Current Project: Retired

  17. #17
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Ill look into it when i made a few easy scripts
    Going to try simple scripts first. eg herb cleaner :P

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
  •