Results 1 to 4 of 4

Thread: RSPS Theifing Script

  1. #1
    Join Date
    Mar 2015
    Location
    Washington, USA
    Posts
    20
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default RSPS Theifing Script

    This is my first working script. It took me a while to write and i had alot of help from The_Prince so a large thanks to him for helping me out. The script simply steals from the stall until my inventory is full of gems, it then finds the shopkeeper and sells the gems to him and repeats.
    Simba Code:
    program TheifBot;
    {$i SRL-OSR/SRL.simba}
    function InShop: Boolean;  //Check to make sure shop is open before selling
    var x, y:Integer;
    begin
      if FindColorTolerance(x, y, 2070783 , 227, 25, 321, 40, 1) then
        Result := true
      else
        Result := false;
    End;

    function OutShop: Boolean; // check to make sure shop is close before moving on
    var x, y:Integer;
    Begin
      if FindColorTolerance(x, y, 1253790, 123, 225, 323, 335, 1) then
        Result := true
       else
        Result := false;
    End;

    (*
       Set Player in front of Scimitar Stall
       Set Camera to north
       And all the way up (Up Arrow Key)
    *)


     Procedure ClickStall
      var
        x, y:integer
      Begin
        repeat;
        if FindObj(x, y, 'cim', 6118756, 2) then  //find stall
          Begin
            Mouse(x, y, 2, 2, true); //click on stall
            wait(3350);              //wait 3.35 secconds
          End;
          until (InvFull);
      End;

    Procedure FindShopkeeper;
      var
        x, y:integer
      Begin
      repeat
        if FindObj(x, y, 'hopk', 733534, 2) then
          Begin
            Mouse (x, y, 2, 2, true); //trade shopkeepr  (true = RClick false = LClick)
            wait(2500);
          End;
      until (InShop);
        End;

    Procedure SellItems;
      var
      x, y, Sell100:integer;
      Begin
        Sell100 := BitmapFromString(48, 7, 'meJxjYGCQUddmAAMgAxeauuMYEEH' +
            'UILMx1aDJwrlAAJclKEUQEeMeiL9wuQfZwZjmIPsFjzdJdQ+mLJwL' +
            'MQ2rOchSuOyF+5SK7kELPaxScHH89lLoHoj5WN2DJoUnHuEBRRX34' +
            'EkzmFZj2gsHFMYXWrwg24VVCgAb+Vss');

        if FindObjEx(x, y, ['lood', 'ood'], [791905, 7191905], 15, 50, 544, 206, 740, 465) then //finds Diamsond in inventory
         Begin
            Mouse (x, y, 2, 2, false); //right clicks blood diamond
            wait(300);
            if FindBitmapToleranceIn(Sell100, X, Y, 475, 155, 764, 497, 145) then
            begin
              mmouse(x, y,1,1);
              Wait(150);
              ClickMouse(X, Y, mouse_Left);
              wait(500);
            end;
          End;

        if FindObjEx(x, y, ['ce', 'mond'], [8213007 , 8213007 ], 15, 50, 544, 206, 740, 465) then
          Begin
            Mouse (x, y, 2, 2, false); //right click ice diamond
            wait(300);
            if FindBitmapToleranceIn(Sell100, X, Y, 475, 155, 764, 497, 145) then
            begin
              mmouse(x, y,1,1);
              Wait(150);
              ClickMouse(X, Y, mouse_Left);
              wait(500);
            end;
          End;

        if FindObjEx(x, y, ['apis', 'zuli'], [15100242 , 15100242 ], 15, 50, 544, 206, 740, 465) then
          Begin
            Mouse (x, y, 2, 2, false); //right click lapiz
            wait(300);
            if FindBitmapToleranceIn(Sell100, X, Y, 475, 155, 764, 497, 145) then
            begin
              mmouse(x, y,1,1);
              Wait(150);
              ClickMouse(X, Y, mouse_Left);
              wait(500);
                End;
              End;
            End;

    Procedure CloseShop
      var
        x, y: integer;
      Begin
        wait(500);
        if FindObjEx(x, y, ['los', 'ose'], [1449250, 1449250], 1, 10, 478, 29, 489, 39) then
        Begin
          mmouse(x, y,1,1);
          wait(150);
          ClickMouse(X, Y, Mouse_Left);
          wait(200);
        End;
      End;



      Begin
        MouseSpeed :=15;
         repeat
         ClickStall;
         FindShopkeeper;
         SellItems;
         CloseShop;
          until(false);
      End.
    I'll still be fine tuning it and make it 100% flawless but its been running for a few hours with no bugs. If you have any suggestions to make this script better please tell me I'm always looking to learn more.
    Last edited by Vis_Vires; 04-01-2015 at 05:30 PM.

  2. #2
    Join Date
    Feb 2015
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    What rsps is this for?

  3. #3
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    the-if'ing script! does it philosophize?
    thief*

    anyhoo gz, that first feeling of it all coming together and working is pretty damn nice =)

  4. #4
    Join Date
    Mar 2015
    Location
    Washington, USA
    Posts
    20
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Curse View Post
    What rsps is this for?
    It's for Zarpor. In the donator area. They just updated it so I had to rewrite it.

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
  •