Results 1 to 16 of 16

Thread: Gilded Altar Bot - BETA - [SMART]

  1. #1
    Join Date
    Apr 2013
    Location
    USA
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default Gilded Altar Bot - BETA - [SMART]

    This is my first bot I've made and released, it was originally for a friend and I but I've decided I'd release it to the public. It's still in beta and has bugs that need sorting out. Currently I haven't enabled any random detection or anti-bans.

    To summarize what the bot does, it essentially will run to the portal in Yanille, enter the designated house, and find the altar to use the bones with. It currently has difficulty finding the altar, be sure to only use this in a house where the altar is in the room beside the portal, otherwise it'll get stuck. After there's no bones left, it will proceed to find the portal and walk to the bank, and then loop over again. The walking can be buggy at times, and the road color constantly changes, so occasionally it will have issues with this part.

    I plan to allow this bot to be open source, so feel free if anyone would like to contribute to its development. Further information on how to set it up is in the configuration. Good luck, enjoy, and be sure to post any errors.


    EDIT: Because of errors, and the problem of the script not being consistent I decided to just release a small utility script. It'll use the bones on the altar for you, and then end. Simply go bank manually and return to the altar and run again.
    Code:
    program new;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}
    {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
    
    var
    X, Y: integer;
    altarlocation, altarangle:Boolean;
    
    const
    bonecolor = 11711164; //Custom bone colors if you wish
    bonecolor2 = 4342343;
    bonecolor3 = 10329514;
    
    procedure Altar;
    begin
    repeat
    if  FindObjEx(X, Y, ['ltar', 'ray', 'se'], [9405829, 1355193, 1687772, 1351091, 9669000, 1888494, 11977670, 4510942], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
      begin
      if altarangle = false THEN
        begin
          SMART_DrawBox(intToBox(X-32, Y-5, X+35, Y+25));
          altarangle := true;
          altarlocation := true;
          writeln('Altar found! Using bones on altar...')
          Mouse(X, Y, 5, 5, 0);
          wait(100+ random(50))
          if ChooseOptionMulti(['ltar']) then
            begin
              ChooseOptionMulti(['ltar'])
              wait(200+ random(50))
              SetAngle(SRL_ANGLE_HIGH);
            end;
          SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2, MSY2))
        end
          else
        begin
          SMART_DrawBox(intToBox(X-32, Y-5, X+35, Y+25));
          altarlocation := true;
          writeln('Altar found! Using bones on altar...')
          Mouse(X, Y, 5, 5, 0);
          wait(100+ random(50))
          if ChooseOptionMulti(['ltar']) then
            begin
              ChooseOptionMulti(['ltar'])
              wait(200+ random(50))
            end;
          SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2, MSY2))
        end
      end
      else
      begin
        writeln('Altar not found! Looking around...')
        altarlocation := false;
        SetAngle(SRL_ANGLE_LOW);
        altarangle := false;
        wait(500+random(200))
        makecompass(randomrange(0, 360))
        wait(400+random(200))
      end;
      until(altarlocation = true);
    end;
    procedure SelectBone;
    begin
    adjustmousespeed(2, 10, 20)
    if (not FindColorTolerance(X, Y, bonecolor, MIX1, MIY1, MIX2, MIY2, 25)) THEN
        begin
          writeln('No bones found, exiting...');
          terminatescript;
        end else
          if  FindObjEx(X, Y, ['ur', 'one'], [bonecolor, bonecolor2, bonecolor3], 25, 50, MIX1, MIY1, MIX2, MIY2) THEN
          begin
            Mouse(X, Y, 5, 5, 0);
            wait(100+ random(50))
            if ChooseOptionMulti(['se']) then
            begin
              ChooseOptionMulti(['se'])
              wait(100+ random(50))
              Altar;
            end else
            Mouse(644, 187, 5, 5, 1);
          end
    end;
    begin
      SetupSRL();
      ActivateClient;
      WriteLn('Starting...')
      MouseSpeed := 25;
      gametab(tab_Inv)
      MakeCompass('N')
      setangle(0)
      wait(1000)
      begin
        begin
          repeat
            SelectBone;
          until (false);
        end
      end;
    end.
    Last edited by Ryutoh; 05-14-2013 at 06:36 AM.

  2. #2
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,164
    Mentioned
    26 Post(s)
    Quoted
    433 Post(s)

    Default

    Im kinda on a time crunch, but I took a quick glance at it. Looks alright, but i did make it a bit easier on the eyes. I spaced things out and made them a bit easier to read.

    Here is what it currently looks like:

    Simba Code:
    //////////////////////////////////////////////////
    //       (Beta Version)Script by Ryutoh         //
    //                                              //
    // 1. Set your bones in top left bank corner    //
    // 2. Set house name and other user info        //
    // 3. Start in Yanille bank or house            //
    //////////////////////////////////////////////////

    program new;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}
    {$i SRL-OSR\SRL\misc\debug.simba}

    var
      X, Y, i: integer;
      Portal, altarlocation, altarangle:Boolean;


    const
      housename = 'housename'; //Name of the host
      nickname = 'nickname'; //Nickname/Username (ign)
      username = 'emailoruser'; //Email/user
      password = 'pass'; //Password
      bonecolor = 11447993; //Custon bone colors if you wish
      bonecolor2 = 4342342;
      bonecolor3 = 10329514;

    //NOTE: You might need to change the road color, go below and find "RoadColor :=", set the color there

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name        := username;
        Pass        := password;
        nick        := nickname;
        Active      := True;
      end;
    end;

    procedure Altar;
    begin
      repeat
        if  FindObjEx(X, Y, ['Altar', 'Pray', 'Use'], [9405829, 1355193, 1687772, 1351091, 9669000, 1888494, 11977670, 4510942], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
        begin
          if altarangle = false THEN
          begin
            altarangle := true;
            altarlocation := true;

            writeln('Altar found! Using bones on altar...')
            Mouse(X, Y, 5, 5, 0);
            wait(100+ random(50))
            ChooseOptionMulti(['Altar', 'Pray']);
            wait(100+ random(50))
            SetAngle(SRL_ANGLE_HIGH);
          end else

          begin
            altarlocation := true;

            writeln('Altar found! Using bones on altar...')
            Mouse(X, Y, 5, 5, 0);
            wait(100+ random(50))
            ChooseOptionMulti(['Altar', 'Pray']);
            wait(100+ random(50))
          end
        end else

        begin
          writeln('Altar not found! Looking around...')
          altarlocation := false;
          SetAngle(SRL_ANGLE_LOW);
          altarangle := false;
          wait(500+random(200))
          makecompass(randomrange(0, 360))
          wait(400+random(200))
        end;
      until(altarlocation = true);
    end;


    procedure LetsWalk(path:Integer);
    begin
      RoadColor := 6545612;//Road color here
      GetNewRoadColor(mmx1, mmy1, mmx2, mmy2, 8)
        if not LoggedIn then LogInPlayer;
        case path of
          1: RadialWalkTolerance(RoadColor,0,45,65,5,5,12);

          2: RadialWalkTolerance(RoadColor,-10,25,65,5,5,12);

          3: RadialWalkTolerance(RoadColor,-30,10,65,5,5,12);

          4: RadialWalkTolerance(RoadColor,-20,20,65,5,5,12);

          5: RadialWalkTolerance(RoadColor,0,30,35,5,5,12);

          6: if FindColor(X, Y, 5889774, MMX1, MMY1, MMX2, MMY2) THEN
             begin
               Mouse(X, Y, 5, 5, 1);
               wait(4000);
             end; //bank

          7: RadialWalkTolerance(RoadColor,190,230,60,5,5,12);

          8: RadialWalkTolerance(RoadColor,180,220,72,5,5,12);

          9: RadialWalkTolerance(RoadColor,140,190,65,5,5,12);

          10: RadialWalkTolerance(RoadColor,180,210,65,5,5,12);

          11: RadialWalkTolerance(RoadColor,180,205,35,5,5,12);

          12: if FindColor(X, Y, 9639252, MMX1, MMY1, MMX2, MMY2) THEN
              begin
                Mouse(X, Y, 7, 0, 1);
                wait(4000);
              end; //portal
      end;
    end;


    procedure backtoportal;
    begin
      MakeCompass('E')
      SetAngle(SRL_ANGLE_HIGH);
      setrun(true)
      gametab(tab_Inv)
      Writeln('Walking to portal...');
      if  FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
        begin
          writeln('Portal found, moving to portal...')
          Portal := true
          Mouse(X, Y, 5, 5, 1);
          wait(4000+random(1000))
          Mouse(260, 429, 3, 3, 1);
          wait(3000+random(300))
          TypeSend(housename);
          wait(3000+random(300))
        end;

      for i := 7 to 12 do
      begin
        Writeln('You are on Walk Number ' + IntToStr(i));
        LetsWalk(i);
        wait(500+random(500))
      end;

      repeat
        if  FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
          begin
            writeln('Portal found, moving to portal...')
            Portal := true
            Mouse(X, Y, 5, 5, 1);
            wait(4000+random(1000))
            Mouse(260, 429, 3, 3, 1);
            wait(3000+random(300))
            TypeSend(housename);
            wait(3000+random(300);
          end else

          begin
            writeln('Portal not found, rotating...')
            Portal := false
            SetAngle(SRL_ANGLE_LOW);
            wait(500+random(200))
            makecompass(randomrange(0, 360))
            wait(400+random(200))
          end;
        until(Portal = true);
    end;


    procedure bank;
    var
      obank: Boolean;

    begin
      if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
        begin
          obank := true
          Mouse(X, Y, 5, 5, 1);
          wait(500+random(200))
          if Bankscreen = false THEN
          begin
            bank;
            wait(1500+random(500))
          end else

          begin
            writeln('Found bank...')
            Withdraw(0, 0, 28);
            wait(1000+random(500))
            CloseBank;
            wait(1000+random(200))
            backtoportal;
          end;
        end else

        begin
          MakeCompass('E')
          SetAngle(SRL_ANGLE_HIGH);
          setrun(true)
          gametab(tab_Inv)
          Writeln('Walking to bank...');
          for i := 1 to 6 do
            begin
              Writeln('You are on Walk Number ' + IntToStr(i));
              LetsWalk(i);
              wait(500+random(500))
            end;
            repeat
              if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
                begin
                  obank := true
                  Mouse(X, Y, 5, 5, 1);
                  wait(500+random(200))
                  if Bankscreen = false THEN
                  begin
                    bank;
                    wait(1500+random(500))
                  end else

                  begin
                    writeln('Found bank...')
                    Withdraw(0, 0, 28);
                    wait(1000+random(500))
                    CloseBank;
                    wait(1000+random(200))
                    backtoportal;
                  end;
                end else

                begin
                  obank := false
                  writeln('Bank not found, looking around...')
                  SetAngle(SRL_ANGLE_HIGH);
                  wait(500+random(200))
                  makecompass(randomrange(0, 360))
                  wait(400+random(200))
                end;
            until obank = true;
        end;
    end;


    procedure start;
    var
      i : integer;

    begin
      if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
      begin
        bank;
      end else

      begin
        if (not FindColor(X, Y, bonecolor, MIX1, MIY1, MIX2, MIY2)) THEN
        begin
          writeln('No bones found, looking for portal...')
          repeat
            if  FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) and not FindObjEx(X, Y, ['arroc', 'alado', 'haryrl', 'umbridg'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
            begin
              writeln('Portal found, moving to portal...')
              Portal := true
              Mouse(X, Y, 5, 5, 1);
              wait(5000+random(1000))
              bank;
            end else

            begin
              writeln('Portal not found, rotating...')
              Portal := false
              SetAngle(SRL_ANGLE_LOW);
              wait(500+random(200))
              makecompass(randomrange(0, 360))
              wait(600+random(200))
            end;
          until(Portal = true);
        end else

        begin
          writeln('Looking for bones in inventory...')

          if  FindObjEx(X, Y, ['ur', 'one'], [bonecolor, bonecolor2, bonecolor3], 5, 50, MIX1, MIY1, MIX2, MIY2) THEN
          begin
            writeln('Bones found! Looking for altar...')
            Mouse(X, Y, 5, 5, 0);
            wait(100+ random(50))
            ChooseOptionMulti(['Use']);
            wait(100+ random(50))
            Altar;
          end;
        end;
      end;
    end;


    begin
      disguise('Gilded Altar')
      SetupSRL();
      ActivateClient;
      WriteLn('Starting...')
      SelectWorld(330)
      DeclarePlayers;
      SRL_CombatRandoms := False;

      repeat
        if (not LoggedIn) then
        begin
          LogInPlayer;
          setrun(true)
          MouseSpeed := 25;
          MakeCompass('N')
          SetAngle(SRL_ANGLE_HIGH);
          gametab(tab_Inv)
          wait(1500+random(500))
          writeln('Ready!')
        end;

      if (LoggedIn) then
      begin
        start;
      end;
      until(false);
    end.


    Now, I did not compile or run it, nor did I look for other errors. The spacing just really got to me, so I quickly fixed that a little. And, while i was spacing it, i noticed that you used a lot of FindObjEx. I know its your first script, but why not try learning TPAs or FindColorToloerance. (Just a recommendation)

    Anyways, nice job! Congratz on the release. Maybe if I have time later today, I will try it out and look for those little errors that could show up!

  3. #3
    Join Date
    Apr 2013
    Location
    USA
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Aha, thanks. I updated it under the attachments. I still get so many issues with the roads and minimap changing colors, it's frustrating.

  4. #4
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Ill try as soon as i see someone post a proggy.

  5. #5
    Join Date
    Jun 2012
    Location
    Missouri, USA
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    The only issue I have is the walking. Once outside the portal, it just stands there as the Walk Numbers increase. It then angles camera attempting to find the bank, even though I actually haven't moved at all.

  6. #6
    Join Date
    Jun 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    It would be easier to make a gilded altar for your own personal altar. Not everyone's house is the same, it will be extremely difficult to make it find an altar when they are in different places.

  7. #7
    Join Date
    Apr 2013
    Location
    USA
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Could never get this to work perfectly right, so released a simpler script that'll do the fun job of clicking and using the bones on the altar instead.

  8. #8
    Join Date
    Mar 2013
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thanks

  9. #9
    Join Date
    May 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    anyway to make it do dag bones?

  10. #10
    Join Date
    Apr 2013
    Location
    USA
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Quote Originally Posted by kpvols View Post
    anyway to make it do dag bones?
    Change bone color

  11. #11
    Join Date
    Apr 2013
    Location
    Las Vegas
    Posts
    111
    Mentioned
    1 Post(s)
    Quoted
    35 Post(s)

    Default

    I made a script like this for teleport tablets. To get around the walking you need 50 construction and rings of dueling. Tele to castlewars, bank, tele home, exit portal, enter other guys home and go from there. Not only do you get around walking but it also saves loads of time. My teleport tablet script was able to run for hours and averaged 600k/hr.

    As stated before, finding altars inside other people's houses is the main issue and will likely need customization by the user.

  12. #12
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    [Error] (1:1): period ('.') expected at line 0
    Compiling failed.

    Any help with ths?

  13. #13
    Join Date
    May 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    [Error] C:\Simba\Includes\SRL-OSR\SRL\misc\SmartGraphics.simba(22:3): Unknown identifier 'SmartSetDebug' at line 21
    Compiling failed.


    anyhelp with this?

  14. #14
    Join Date
    Jun 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just keeps changing camera angles after it right clicks on a bone lol.
    Altar not found! Looking around...

  15. #15
    Join Date
    Feb 2012
    Posts
    317
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is this still working for burying bones?

  16. #16
    Join Date
    Sep 2008
    Posts
    754
    Mentioned
    8 Post(s)
    Quoted
    275 Post(s)

    Default

    ShatteredHand has an excellent G altar script on tribot, totally worth checking.


    Also i don't see any Burner detection? i mean something simple like this

    Simba Code:
    function FindBurners: boolean;
    var
    b,TmpCTS:integer;
    tempTpa,TPA: tpointarray;
    ATPA: T2DPointArray;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.20, 0.70);

      FindColorsTolerance(TPA, 5795954,60, 50, 400, 250, 6)


      ColorToleranceSpeed(TmpCTS);
      setColorSpeed2Modifiers(0.2, 0.2);




      if (length(tpa) <= 0) then exit;

      SplitTPAWrap(tpa,100,atpa);
      b := GetArrayLength(atpa);

      writeln(b);



      //  writeln(length(atpa));
     if ((b) >= 2) then
      begin




     result := true;

      end;

    end;

    Tried it on low angles and it would work, just would sometimes give false positive when players were standing around with similar colors, nothing too bad tho just needs a better color for the burners smoke.

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
  •