Results 1 to 3 of 3

Thread: [AL] AeroLib F2P Bone Bury

  1. #1
    Join Date
    Apr 2017
    Location
    The Great White North
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Lightbulb [AL] AeroLib F2P Bone Bury

    Hello!

    This is my first finished script. It is mostly an amalgamation of different things I had to figure out. This script is 100% COLOR!

    I got the idea for this script from looking at this thread. My goal was basically to update it for AeroLib but it ended up turning into a bloated mess.

    The script needs to start out in a bank, I tested at Draynor and Varrock East & West but it should work at just about any standard bank. I tested it at GE, and after awhile I got it to work, so that is something. The script was also my first experience working with DTMs, and I managed to get it down to ONE good one thanks to a lot of community help. That is the reason I had to use 5 DTMs of the bone before!

    The script will not check if you are in a bank, it doesn't need to move from that spot so I didn't add it.

    The script will start out by checking if the bank is open, and if it is, it will do the banking. (I eventually figured out how to use isBankOpen; it no longer uses a homebrew method.)

    Otherwise, it will bury bones if you have them in your inventory, and if not, it will withdraw some. It currently only does regular bones. I will eventually make this include multiple bone types.

    I have not added randoms nor do I really plan to for a script that buries bones. There is some antiban, I tweaked it to fit a sort of random/bored playstyle, and several features are borrowed.

    But now they are returned!

    So go crazy! Buy 1,000! That's only 70k at current market prices. Bury those bones! I know I did. It might take awhile because this script is pretty slow. But you would eventually have Lv. 20 Prayer. That's the equivalent of only 63 dragons you noob!

    Simba Code:
    program BuryYourBoner; //Big thanks to everyone who contributed to this script.

    {$DEFINE SMART}
    {$i AeroLib/AeroLib.Simba}

    //here be dragons

    const

      P_USERNAME   = '';
      P_PASSWORD   = '';
      P_NICKNAME   = '';
      P_PIN        = '';
      P_MEMBER     = False;

    var

    x, y, Loads, times: integer;
    Boner: TItem;
    bankerPoint, bonerPoint, Pnt, bonerbank: TPoint;
    BankBoothCol, BankBoothCol2 : TColEx;
    Obj_BankBooth, Obj_BankBooth2, Obj_GEBanker, Obj_GEBooth, Obj_PurplePeople: TMSObject;
    tim : timer;

    procedure declarePlayer();
    begin
      Me.Name      := P_USERNAME;
      Me.Pass      := P_PASSWORD;
      Me.Pin       := P_PIN;
      Me.Nick      := P_NICKNAME;
      Me.Member    := P_MEMBER;
      Me.Active    := True;
    end;

    procedure initItem;
    begin

      Obj_BankBooth.create('Bank', ['Bank Booth', 'ank', 'anker'], [createCol(6584961, 2, 0.67, 0.45)]);
      Obj_BankBooth2.create('Bank Booth', ['ank B','nk bo','booth'], [createCol(2377297, 1, 0.28, 0.14)]);
      Obj_GEBanker.create('Bank', ['Bank', 'Bank', 'nk Ban'], [createCol(6842480, 5, 0.42, 0.11)]);
      Obj_GEBooth.create('Bank Booth', ['Bank Booth', 'Bank', 'Booth', 'nk Boo'], [createCol(2634811, 0, 0.00, 0.00)]);
      Obj_PurplePeople.create('Bank', ['Bank', 'nk Ban'], [createCol(4861241, 10, 0.06, 0.54)]);



      Boner.DTM := DTMFromString('mlwAAAHicY2dgYIgA4gQgDoZiHygdBcSJQJwExBlQdjwQx0Lx7WvXGO7dvMlw8fRpMA3iX7t4geHKuXMM/EB5XJgRD4YCAMe3FvA=');

      WriteLn('Items Initialized!');

    end;

    procedure free;
    begin
      FreeDTM(Boner.DTM);
      WriteLn('FreeDTM(Boner)!');
      WriteLn('All Memory Free!');
    end;

    // Called when timer exceeds x time to logout and stop the script
    // inFunc tells me what procedure it timed out during
    function timedOut(inFunc: String): boolean;
    begin
      Writeln('Timed out while doing ' + inFunc);
      logoutPlayer();
      TerminateScript();
    end;

    // Called when the bot has time to do a variety
    //  of things to act like a human.
    procedure AntiBan;
    begin
      tim.start;
      WriteLn('Antibanning');
      case random(100) of
        1..10: examineInv;
        11..19: pickUpMouse();
        20..29: hoverSkill('random', false);
        30..39: randomTab(True);
        40..49: randomMovement;
        50..59: compassMovement(5, 15, false);
        60..69: humanRandomMouse();
        70..79: sleepAndMoveMouse(7500);
        80..89: boredHuman();
        90..100: MMouseOffClient('random');
      end;
      if (tim.timeElapsed > 50000) then timedOut('antiban');
    end;

    procedure AntiBanCase;
    begin
      WriteLn('AntibanCase');
      if (not isBankOpen()) then
      case random(100) of
        1..15: AntiBan();
        16..100: WriteLn('Skip AntiBan');
      end else
        WriteLn('Skip AntiBan');
    end;

    procedure customMouse(tempPoint: TPoint);   //Thanks to Jacz for this neat idea

    begin
      case random(0, 100) of
        0..19: BrakeMMouse(tempPoint, random(12), random(12), true);
        20..29: BrakeMMouse(tempPoint, random(12), random(12), false);
        30..49: MissMouse(tempPoint, random(12), random(12));
        50..100: HumanMMouse(tempPoint, random(12), random(12));
      end;
    end;

    procedure RandomCamera();    //thanks john_frusciante!
    var i,j,k: integer;
    begin
      if not isLoggedIn() then Exit;
      i := Random(1)*2+37;
      j := 38;
      if Random(20) < 10 then
      begin
        k:= i;
        i := j;
        j := k;
      end;
      KeyDown(i);
      wait(50+Random(50));
      KeyDown(j);
      Sleep(250+Random(1000));
      KeyUp(i);
      wait(50+Random(50));
      KeyUp(j);
      Wait(500 + Random(100));
    end;

    procedure doBanking;

    begin

      writeln('Do Banking!');

          if (Boner.findIn(AREA_MS, bonerbank)) then
          begin
            writeln('Found Boner in Bank!');
            wait(200+random(200));
            writeln('Withdraw Boner from Bank!');
            withdrawItem(Boner, 28);
            wait(1400+random(200));
            if isInvFull then
            closeInterface();
          end else
          begin
          writeln('No Boner Found in Bank!');
          logoutPlayer;
          wait(200+random(200));
          addOnTerminate('free');
          terminateScript;
          end;
    end;

    procedure openDaBank;

    begin
      writeln('Attempt to Open the Bank');

      if isBankOpen() then
      begin
        doBanking;
        exit;
      end else

        If Obj_GEBanker.find(20, MSCP, bankerPoint) then
        begin
          AntiBanCase;
          writeln('Looking for Bank');
          customMouse(bankerPoint);
          writeln('Found GE Banker at '+toStr(bankerPoint));
          fastClick(Mouse_Right);
          wait(200+random(200));
          ChooseOptionMulti(['Bank Banker']);
          wait(1000+Random(500));
          exit;
        end else
        If Obj_GEBooth.find(20, MSCP, bankerPoint) then
        begin
          AntiBanCase;
          writeln('Looking for Bank');
          customMouse(bankerPoint);
          writeln('Found GE Bank Booth at '+toStr(bankerPoint));
          fastClick(Mouse_Right);
          wait(200+random(200));
          ChooseOptionMulti(['Bank']);
          wait(1000+Random(500));
          exit;
        end else
        If Obj_PurplePeople.find(20, MSCP, bankerPoint) then
        begin
          AntiBanCase;
          writeln('Looking for Bank');
          customMouse(bankerPoint);
          writeln('Found Purple People at '+toStr(bankerPoint));
          fastClick(Mouse_Right);
          wait(200+random(200));
          ChooseOptionMulti(['Bank Banker']);
          wait(1000+Random(500));
          exit;
        end else
        If Obj_BankBooth.find(20, MSCP, bankerPoint) then
        begin
          AntiBanCase;
          writeln('Looking for Bank');
          customMouse(bankerPoint);
          writeln('Found Bank Booth 1 at '+toStr(bankerPoint));
          fastClick(Mouse_Right);
          wait(200+random(200));
          ChooseOptionMulti(['Bank']);
          wait(1000+Random(500));
          exit;
        end else
          If Obj_BankBooth2.find(20, MSCP, bankerPoint) then
        begin
          AntiBanCase;
          writeln('Looking for Bank');
          customMouse(bankerPoint);
          writeln('Found Bank Booth 2 at '+toStr(bankerPoint));
          fastClick(Mouse_Right);
          wait(200+random(200));
          ChooseOptionMulti(['Bank']);
          wait(1000+Random(500));
          exit;
        end else
        begin
          writeln('Didn''t Open Bank');
          RandomCamera();
          wait(1000+Random(500));
        end;
    end;

    procedure buryBoners;  //thanks john_frusciante!

    begin

      if isBankOpen() then
      begin
        closeInterface;
      end else

      WriteLn('Bury your Boner!');
        if Boner.findIn(AREA_INV, bonerpoint) then
        begin
          customMouse(bonerPoint);
          wait(100+random(200));
          fastClick(Mouse_left);
          wait(1000+random(500));
          if didClick(true, 1000) then
          begin
            WriteLn('We have a Boner!');
          end;
        end;
    end;
    procedure BonerCheck;
    begin

      begin
        if (Boner.findIn(AREA_INV, bonerpoint)) then
        begin
          WriteLn('Found Boner in Inventory!');
          buryBoners;
          exit;
        end else
          WriteLn('We do not have any Boner so Opening Bank!');
          openDaBank;
      end;
    end;

    procedure initPlayer();
    begin
      if (not isLoggedIn()) then
        begin
          loginPlayer(false);
          setAngle(ANGLE_HIGH);
          setCompass('E');  //set this to whatever direction your bank is
          setAngle(ANGLE_HIGH);
          toggleRunning(True);
          //fixGraphics();
        end
      else
        begin
          setAngle(ANGLE_HIGH);
          setCompass('E');  //set this to whatever direction your bank is
          setAngle(ANGLE_HIGH);
          toggleRunning(True);
          //fixGraphics();
        end
    end;

    procedure setup();
    begin
      mouseSpeed := Random(12, 18);
      writeln('mouseSpeed set at: ' + intToStr(mouseSpeed));
      setScreenName(Me.Nick);
      addOnTerminate('free');
      initItem;
      initPlayer();
      loginPlayer(false);
      end;

    begin
      declarePlayer;
      initAL;
      setup;
      WriteLn('Setup Complete!');
      times:=1000;
      Loads:=0;
      WriteLn((Loads), ' Loads!');
      repeat
        begin
        mouseSpeed := Random(12, 18);
        Inc(Loads);
        WriteLn((Loads), ' Loads!');
        AntiBanCase();
        BonerCheck();
        wait(500+random(500));
        end
      until(Loads=times);
      logoutPlayer;
      addOnTerminate('free');
      terminateScript;
    end.

    TL;DR Don't use my script, it's slower than dragons.

    Any help improving the script would be appreciated!
    Attached Files Attached Files
    Last edited by AliveDriveGames; 04-20-2017 at 07:23 PM.

  2. #2
    Join Date
    Apr 2016
    Location
    New Zealand
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    A few tips:

    If you aren't using code / functions, get rid of them. Why is there all the code trying to rotate the minimap?

    When doing antiban, it should ideally mimic the way that you or another average player would play. For example, if you are a free to play, why would you check your herblore skill while burying bones?

    I am pretty sure it doesn't take 4.5 seconds to bury a bone. Take a look at Borland's scripts, and use the XP bar to confirm that actions are taking place, as well as a way to better the burying the bones.

  3. #3
    Join Date
    Apr 2017
    Location
    The Great White North
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I made an adjustment, and I made a tradition out of it.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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