Results 1 to 9 of 9

Thread: [First Script] Shantay Bonfire

  1. #1
    Join Date
    Sep 2014
    Posts
    74
    Mentioned
    2 Post(s)
    Quoted
    34 Post(s)

    Default [First Script] Shantay Bonfire

    Hey, This is my very first script, so please do not hate on me.

    A little history.
    I left runescape a little while ago, when EOC came out because I hated it, then, about 2-3 months ago I decided to join again to give it another try.
    I started leveling up my stats legit, but about a week ago I decided to try get my first 99 on this account, so I went for firemaking, I got it to 75 legit but I was just about to kill myself of bordem. I started searching for working bots that do not get you banned in 24h, and found Simba.

    I decided to try make a little program to get my firemaking up instead of being a leecher and 'stealing' other people's work.

    It's a very simple script, It just opens the chest at Shantay, withdraws the 10th item in your bank (top-right), closes the bank, and adds them to a near bonfire.

    How could I improve my script? What anti-ban features can I add?

    I've already made it a bit less obvious that I'm botting by making random delays.

    The logs variable is only so I can loop it.


    Code:
    procedure ShantayFiremake();
    var
    logs: integer;
    begin
      
       repeat
    
      if bankScreen.open(BANK_CHEST_SHANTAY) then
         if bankScreen.withdraw(10, WITHDRAW_AMOUNT_ALL, ['']) then
            wait(RandomRange(500, 1000));
            bankScreen.close();
             wait(RandomRange(5000, 1000));
    
             tabBackPack.mouseSlot(1, MOUSE_MOVE);
             fastClick(MOUSE_LEFT);
             wait(RandomRange(1000, 2000));
             SendKeys('3', 15+RandomRange(15,100), 20+RandomRange(10,30));
             wait(RandomRange(100000, 120000));
    
        until logs=1000;
    Thank you.

  2. #2
    Join Date
    Jun 2014
    Posts
    463
    Mentioned
    27 Post(s)
    Quoted
    229 Post(s)

    Default

    This is great for a first script, but it does need improvement.

    For example, how about when you run out of logs? Does it continue? Try adding failsafes and more locations

    Looks great, and I can't wait to see more from you.

    - DMC
    Tsunami

  3. #3
    Join Date
    Aug 2014
    Location
    germany
    Posts
    47
    Mentioned
    4 Post(s)
    Quoted
    15 Post(s)

    Default

    short and good.
    like Blytez said, some antifails would be good. just let the script run a few hours and see if it stucks at any point.
    also some antiban would be good. Since you have a "long" waiting time when the bot is burning the logs i would do some antibans like mouse out of screen etc, to simulate you are looking at another webiste or smth.
    but nice first script

  4. #4
    Join Date
    Sep 2014
    Posts
    74
    Mentioned
    2 Post(s)
    Quoted
    34 Post(s)

    Default

    Thanks for your replies guys, they mean a lot.

    How would I go about checking when I run out of logs? Every time it takes out logs from the bank, check if the inventory is full, and if not, stop the script?

    Yeah, I'm trying to implement The Grand Exchange for some F2P players.

    How do I add antibans while it's waiting? Because if I add wait(), and then under that line of code the antiban procedure, will it not do it after waiting(?).

    Edit: When trying to implement the GREY banker at the grand exchange, it has troubles finding him, the camera is zoomed out fully and facing north. Any ideas?

    Thanks.
    Last edited by TomTop; 09-12-2014 at 06:15 AM.

  5. #5
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  6. #6
    Join Date
    Aug 2014
    Location
    germany
    Posts
    47
    Mentioned
    4 Post(s)
    Quoted
    15 Post(s)

    Default

    for checking if logs are lef tin bank u could just create a DTM of the logs and then end the script if dtm is not found

  7. #7
    Join Date
    Sep 2014
    Posts
    74
    Mentioned
    2 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Instead of sendkeys - why not try the toolscreen.open function?
    I didn't know that function existed, I'm still very, very new to writing my own scripts.

    Quote Originally Posted by sipfer3 View Post
    for checking if logs are left in bank u could just create a DTM of the logs and then end the script if dtm is not found
    What is a DTM?

  8. #8
    Join Date
    Aug 2008
    Location
    Oklahoma, USA
    Posts
    173
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Go to Mayors scripting tut and go down a bit to Sub-tutorial 2. A good explanation of DTMs.

  9. #9
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Cool

    I made an easy Shantay Burner some time ago to get to 50 FM heheh. so here, have a look into it and see if you can use anything! i didnt know about the toolscreen function at that moment either, so i made it work with sendkeys and a mousebox. Look for the instructions inside the code after the //. It has some kind of failsafe, but if the bonfire is not withing adding range and you get the message "no bonfires near" it will move behind the chest and stop working (this happens only when you run out of logs). It also has some functions that i ended up not using, so just take a look and see if something is useful to you.

    Code:
    program FireMaker;
    
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    {$I SPS/lib/SPS-RS3.Simba}
    
    // Go To shantay. Set preset 2 with logs you want to burn (any type)
    // Put the logs you want to burn on slot "0". Start.
    // This Script uses DIRECTX
    
    var
    loadsdone: integer;
    
    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
      begin
        loginName := '';
        password := '';
        isActive := true;
        isMember := true;
        World := 100;
      end
      currentPlayer := 0;
    end;
    
    function FindFire(): boolean;
    var
      x, y, i, r: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin
    
    if findColorsSpiralTolerance(x, y, TPA, 3125185, mainScreen.getBounds(), 13, colorSetting(2, 0.19, 0.88)) then
       begin
       writeLn('We Found a Bonfire!');
       result := true;
       writeLn('We Found a Bonfire!');
       end else
            begin
              result := false;
              writeLn('We Didnt Find a Bonfire, Making One');
            end;
    
    end;
    
    function notMoving(): boolean;
    begin
      result := not minimap.isPlayerMoving();
      print('Function notMoving() result: ' + boolToStr(result));
    end;
    
    function AddingToBonfire(): boolean;
    var
    count1, count2, count3: integer;
    begin
    
    count1 := tabBackpack.count();
    wait(randomRange(5500, 6000));
    count2 := tabBackpack.count();
    count3 := (count1 - count2);
    
    if count3 >= 1 then
     result := true;
    
    if count3 <1 then
      result := false;
    
    print('Function AddingToBonfire() result: ' + booltostr(result));
    end;
    
    procedure LightFire();
    
    var
    mybox: tbox;
    mybox2: tbox;
    
    begin
    
    myBox := intToBox(162, 187, 206, 224);
    myBox2 := intToBox(265, 106, 300, 124);
     repeat
       begin
           mouseBox(mybox2, MOUSE_LEFT);
           if notmoving() then
           begin
           SendKeys('0', 50, 30);
           wait(randomRange(3000, 4000));
           mouseBox(mybox, MOUSE_LEFT);
           tabBackpack.waitForShift(1000);
           wait(randomRange(7000, 10000));
           end;
       end;
    
     until findfire();
    end;
    
    procedure clickchest();
    var
      x, y, i: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    
    begin
      if not isLoggedIn() then
        exit;
     repeat
      findColorsSpiralTolerance(x, y, TPA, 6587300, mainScreen.getBounds(), 3, colorSetting(2, 0.25, 0.84));
    
      if (Length(TPA) < 1) then
        exit;
    
      ATPA := TPA.toATPA(30, 30);
      ATPA.sortFromMidPoint(mainscreen.playerPoint);
      smartImage.debugATPA(ATPA);
    
      for i := 0 to high(ATPA) do
      begin
        mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
        if isMouseOverText(['hest'], 500) then
        begin
          fastClick(MOUSE_LEFT);
          wait(randomrange(3000, 4000));
          smartImage.clear();
          break;
        end;
      end;
     until bankscreen.isopen;
    end;
    
    
    procedure preset2();
    begin
    
    sleepAndMoveMouse(1000 + random(500));
    bankScreen.clickButton(BANK_BUTTON_PRESET_1);
    wait(randomrange(655, 1000));
    
    end;
    
    procedure antiban();
    begin
    
      case randomRange(1,102) of
        1..30: begin
                    writeLn('Simulating Checking Social Networks');
                    mouseOffClient(OFF_CLIENT_RANDOM);
                    wait(randomRange(40000, 50000));
                  end;
        31..41: begin
                    writeLn('Simulating Bored Human');
                    boredHuman();
                    wait(randomRange(5000, 10000));
                  end;
        42..102: begin
                    writeLn('Simulating Small afk');
                    sleepAndMoveMouse(500 + random(1000));
                    wait(randomRange(8000, 12000));
                    pickUpMouse();
                  end;
             end;
    end;
    
    procedure AddTobonfire();
    var
    mybox: tbox;
    begin
    myBox := intToBox(362, 187, 407, 224);
    
    repeat
    
    if not AddingToBonfire() then
      begin
        if tabBackpack.isEmpty then
          begin
            break;
            exit;
          end;
        SendKeys('0', 50, 30);
        wait(randomRange(3000, 4000));
        mouseBox(mybox, MOUSE_LEFT);
        mouseOffClient(OFF_CLIENT_RANDOM);
        wait(randomRange(9000, 15000));
        antiban();
      end;
    
    until AddingToBonfire();
    
    end;
    
    
    
    // main loop
    begin
     smartPlugins := ['d3d9.dll'];
      clearDebug();
      smartEnableDrawing := true;
      smartShowConsole := false;
      setupSRL();
      declarePlayers();
      disableSrlDebug := false;
    
        repeat
        if not isLoggedIn() then
        begin
          players[currentPlayer].login();
          exitSquealOfFortune();
          mainScreen.setAngle(MS_ANGLE_HIGH);
          minimap.setAngle(MM_DIRECTION_NORTH);
        end;
    
          if tabBackpack.isEmpty then
       begin
       clickchest();
       Preset2();
       end;
    
       addtobonfire();
    
    
      until (false)
    end.
    Undorak7

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
  •