Results 1 to 11 of 11

Thread: [RS3]Battlestaff crafter AIO[300k exp/hour]

  1. #1
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default [RS3]Battlestaff crafter AIO[300k exp/hour]

    AIO Battlestaff Crafter

    Instructions:
    1. Set the const for bank slot of orb
    2. Set the const for bank slot of staff
    3. setup the declarePlayers procedure
    4. start the script logged in at Soul Wars bank chest
    5. Camera angle should be up and face north!




    Script Features:
    Crafts water, earth, fire and air battlestaves


    Notes:
    • Script is designed for speed, don't abuse it
    • There is no login functionality, start logged in
    • There is not 6hr fix, don't bot that long
    • Script is barebones but fast and accurate, report bugs


    Simba Code:
    program battlestaff_crafter;
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    var
      _bank_box, _inv_box, _pack_box: TBox;

    const
      orb_slot = 9;//1-10
      staff_slot = 10;//1-10
      orb_type = 'air';//water,earth,fire,air

    procedure declarePlayers;
    begin
      setLength(players, 1);
      with players[0] do
      begin
        bankPin    := '1234';
        isActive   := true;
        isMember   := true;
        world      := -1;
      end;
      currentPlayer := 0;
    end;

    function FindBank: T2DPointArray;
    var
      searchArea: TBox;
      bankChest: TPointArray;
    begin
      if findColorsTolerance(bankChest, 1053721, mainscreen.getBounds, 10) then
      begin
        result := bankChest.toATPA(31, 15);
        result.sortBySize;
      end;
    end;

    function OpenBank: boolean;
    var
      timely, i: integer;
      boothSpots: T2DPointArray;
    begin
      if bankScreen.isOpen then exit(true);
      timely := getSystemTime + randomRange(11000, 15000);
      while (timely > getSystemTime) do
      begin
        wait(randomRange(50, 200));
        if bankScreen.isOpen then exit(true);
        boothSpots := FindBank;
        if length(boothSpots) < 1 then continue;
        boothSpots.sortFromMidPoint(mainscreen.playerPoint);
        for i := 0 to high(boothSpots) do
        begin
          if not(inRange(length(boothSpots[i]), 200, 350)) then continue;
          mouse(boothSpots[i].getMiddle, Mouse_Right);
          if chooseOption.select(['Use Bank'], randomRange(2500,3500)) then
          begin
            wait(randomRange(1, 20));
            if random(10)>0 then mouseBox(_pack_box,  MOUSE_MOVE, MOUSE_HUMAN);
            result := bankScreen.isOpen(randomRange(2500,3500));
            if not(players[CurrentPlayer].bankPin = '') and not result then
              if pinscreen.isOpen(randomRange(2500,3500)) then
              begin
                if not pinScreen.enter(players[CurrentPlayer].bankPin) then
                  exit else wait(randomRange(100,500));
              end;
          end;
        end;
      end;
    end;

    function doneButton: boolean;
    var
      bluePoints: TPointArray;
      blueArea: TBox;
    begin
      blueArea := [244,197, 335, 223];
      findColorsTolerance(bluePoints, 13278759, blueArea, 44);
      result := length(bluePoints) > 145;
      status('Done button: ' + toStr(result));
    end;

    procedure wait_crafting;
    var
      count, threshold: integer;
    begin
      wait(randomRange(1, 20));
      if random(10)>0 then mouseBox(_bank_box,  MOUSE_MOVE, MOUSE_HUMAN);
      threshold := getSystemTime + randomRange(30000, 45000);
      repeat
        wait(randomRange(255, 555));
        if doneButton then
        begin
          threshold := getSystemTime + randomRange(5000, 10000);
          repeat
            wait(randomRange(100, 200));
            if not(doneButton) then exit;
          until (getSystemTime > threshold);
          exit;
        end;
      until (getSystemTime > threshold);
    end;

    function craft_option: boolean;
    const
      BORDER_COLOR = 1356525;
    var
      searchArea, choiceBox: TBox;
      borderPoints: TPointArray;
      t: integer;
    begin
      if not productionScreen.isOpen then exit;
      searchArea := [51, 104, 242, 145];
      choiceBox := intToBox(52, 105, 91, 144);
      case orb_type of
        'earth': choiceBox.edit(50, 0, 50, 0);
        'fire': choiceBox.edit(100, 0, 100, 0);
        'air': choiceBox.edit(150, 0, 150, 0);
      end

      t := getSystemTime + randomRange(5000, 1000);
      while t > getSystemTime do
      begin
        if not findColors(borderPoints, BORDER_COLOR, searchArea) then
        begin
          writeln('Unable to select a produce. I think we''re out of supplies.');
          writeln('Terminating');
          terminateScript;
        end;
        if choiceBox.equals(borderPoints.getBounds) then exit(true);
        mouseBox(choiceBox, MOUSE_LEFT, MOUSE_HUMAN);
        wait(randomRange(125, 300));
      end;
    end;

    function craft_inventory: boolean;
    var
      threshold: integer;
    begin
      wait(randomRange(1, 20));
      if random(10)>0 then mouseBox(_inv_box,  MOUSE_MOVE, MOUSE_HUMAN);
      tabBackpack.waitWhileLocked;
      wait(randomRange(1, 25));
      if tabBackpack.mouseSlot(11, MOUSE_LEFT) then
        if tabBackpack.mouseSlot(16, MOUSE_LEFT) then
        begin
          threshold := getSystemTime + randomRange(5000, 10000);
          repeat
            wait(randomRange(25, 100));
            if getSystemTime > threshold then exit;
          until productionscreen.isOpen;
          if craft_option then if productionScreen.clickStart then result := true;
        end;
    end;

    procedure mainLoop;
    begin
      if OpenBank then
      begin
        wait(randomRange(1, 100));
        if bankscreen.quickDeposit(QUICK_DEPOSIT_INVENTORY) then
          if bankscreen.withdraw(orb_slot, 14, ['']) then
            if bankscreen.withdraw(staff_slot, 14, ['']) then
              if bankscreen.close then
                if craft_inventory then wait_crafting;
      end;
    end;

    begin
      smartEnableDrawing := true;
      setupsrl;
      declarePlayers;
      _inv_box := tabBackpack.getSlotBox(11);
      _bank_box := [265, 155, 310, 184];
      _pack_box := [399, 565, 429, 586];
      while isLoggedIn do mainLoop;
    end.
    Last edited by footballjds; 12-16-2013 at 08:07 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    sweettt

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Apr 2006
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Default

    If you have the script just click the orb it will bring up the crafting menu. I found this to be faster and more effective. So you can take out the line where it selects the battle staff as well. Also when the script is done creating 14 staffs it locks up and won't reopen the bank and craft more. Anyone having this problem as well? I would fix this if I knew how.

  4. #4
    Join Date
    Jan 2014
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    49 Post(s)

    Default

    Yo can you update this? it tries to do the old method and i just end up wielding one of the battlestaffs. now you just need to click the orb

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

    Default

    Quote Originally Posted by Shindigs View Post
    Yo can you update this? it tries to do the old method and i just end up wielding one of the battlestaffs. now you just need to click the orb
    I'm not sure how this works, but assuming it's like most skilling nowadays you could just try and use my fletcher doing the string option and see if it works

  6. #6
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    I was thinking about doing a fire battlestaff runner that uses the 80 agility shortcut, might end up using this after.
    PS. Congratulations on the release
    You have permission to steal anything I've ever made...

  7. #7
    Join Date
    Sep 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    uhm why not use bankscreen.open ?

  8. #8
    Join Date
    Dec 2015
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    AIO Battlestaff Crafter

    Instructions:
    1. Set the const for bank slot of orb
    2. Set the const for bank slot of staff
    3. setup the declarePlayers procedure
    4. start the script logged in at Soul Wars bank chest
    5. Camera angle should be up and face north!




    Script Features:
    Crafts water, earth, fire and air battlestaves


    Notes:
    • Script is designed for speed, don't abuse it
    • There is no login functionality, start logged in
    • There is not 6hr fix, don't bot that long
    • Script is barebones but fast and accurate, report bugs


    Simba Code:
    program battlestaff_crafter;
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    var
      _bank_box, _inv_box, _pack_box: TBox;

    const
      orb_slot = 9;//1-10
      staff_slot = 10;//1-10
      orb_type = 'air';//water,earth,fire,air

    procedure declarePlayers;
    begin
      setLength(players, 1);
      with players[0] do
      begin
        bankPin    := '1234';
        isActive   := true;
        isMember   := true;
        world      := -1;
      end;
      currentPlayer := 0;
    end;

    function FindBank: T2DPointArray;
    var
      searchArea: TBox;
      bankChest: TPointArray;
    begin
      if findColorsTolerance(bankChest, 1053721, mainscreen.getBounds, 10) then
      begin
        result := bankChest.toATPA(31, 15);
        result.sortBySize;
      end;
    end;

    function OpenBank: boolean;
    var
      timely, i: integer;
      boothSpots: T2DPointArray;
    begin
      if bankScreen.isOpen then exit(true);
      timely := getSystemTime + randomRange(11000, 15000);
      while (timely > getSystemTime) do
      begin
        wait(randomRange(50, 200));
        if bankScreen.isOpen then exit(true);
        boothSpots := FindBank;
        if length(boothSpots) < 1 then continue;
        boothSpots.sortFromMidPoint(mainscreen.playerPoint);
        for i := 0 to high(boothSpots) do
        begin
          if not(inRange(length(boothSpots[i]), 200, 350)) then continue;
          mouse(boothSpots[i].getMiddle, Mouse_Right);
          if chooseOption.select(['Use Bank'], randomRange(2500,3500)) then
          begin
            wait(randomRange(1, 20));
            if random(10)>0 then mouseBox(_pack_box,  MOUSE_MOVE, MOUSE_HUMAN);
            result := bankScreen.isOpen(randomRange(2500,3500));
            if not(players[CurrentPlayer].bankPin = '') and not result then
              if pinscreen.isOpen(randomRange(2500,3500)) then
              begin
                if not pinScreen.enter(players[CurrentPlayer].bankPin) then
                  exit else wait(randomRange(100,500));
              end;
          end;
        end;
      end;
    end;

    function doneButton: boolean;
    var
      bluePoints: TPointArray;
      blueArea: TBox;
    begin
      blueArea := [244,197, 335, 223];
      findColorsTolerance(bluePoints, 13278759, blueArea, 44);
      result := length(bluePoints) > 145;
      status('Done button: ' + toStr(result));
    end;

    procedure wait_crafting;
    var
      count, threshold: integer;
    begin
      wait(randomRange(1, 20));
      if random(10)>0 then mouseBox(_bank_box,  MOUSE_MOVE, MOUSE_HUMAN);
      threshold := getSystemTime + randomRange(30000, 45000);
      repeat
        wait(randomRange(255, 555));
        if doneButton then
        begin
          threshold := getSystemTime + randomRange(5000, 10000);
          repeat
            wait(randomRange(100, 200));
            if not(doneButton) then exit;
          until (getSystemTime > threshold);
          exit;
        end;
      until (getSystemTime > threshold);
    end;

    function craft_option: boolean;
    const
      BORDER_COLOR = 1356525;
    var
      searchArea, choiceBox: TBox;
      borderPoints: TPointArray;
      t: integer;
    begin
      if not productionScreen.isOpen then exit;
      searchArea := [51, 104, 242, 145];
      choiceBox := intToBox(52, 105, 91, 144);
      case orb_type of
        'earth': choiceBox.edit(50, 0, 50, 0);
        'fire': choiceBox.edit(100, 0, 100, 0);
        'air': choiceBox.edit(150, 0, 150, 0);
      end

      t := getSystemTime + randomRange(5000, 1000);
      while t > getSystemTime do
      begin
        if not findColors(borderPoints, BORDER_COLOR, searchArea) then
        begin
          writeln('Unable to select a produce. I think we''re out of supplies.');
          writeln('Terminating');
          terminateScript;
        end;
        if choiceBox.equals(borderPoints.getBounds) then exit(true);
        mouseBox(choiceBox, MOUSE_LEFT, MOUSE_HUMAN);
        wait(randomRange(125, 300));
      end;
    end;

    function craft_inventory: boolean;
    var
      threshold: integer;
    begin
      wait(randomRange(1, 20));
      if random(10)>0 then mouseBox(_inv_box,  MOUSE_MOVE, MOUSE_HUMAN);
      tabBackpack.waitWhileLocked;
      wait(randomRange(1, 25));
      if tabBackpack.mouseSlot(11, MOUSE_LEFT) then
        if tabBackpack.mouseSlot(16, MOUSE_LEFT) then
        begin
          threshold := getSystemTime + randomRange(5000, 10000);
          repeat
            wait(randomRange(25, 100));
            if getSystemTime > threshold then exit;
          until productionscreen.isOpen;
          if craft_option then if productionScreen.clickStart then result := true;
        end;
    end;

    procedure mainLoop;
    begin
      if OpenBank then
      begin
        wait(randomRange(1, 100));
        if bankscreen.quickDeposit(QUICK_DEPOSIT_INVENTORY) then
          if bankscreen.withdraw(orb_slot, 14, ['']) then
            if bankscreen.withdraw(staff_slot, 14, ['']) then
              if bankscreen.close then
                if craft_inventory then wait_crafting;
      end;
    end;

    begin
      smartEnableDrawing := true;
      setupsrl;
      declarePlayers;
      _inv_box := tabBackpack.getSlotBox(11);
      _bank_box := [265, 155, 310, 184];
      _pack_box := [399, 565, 429, 586];
      while isLoggedIn do mainLoop;
    end.
    is it possible you could update this with the new method?

    Thanks

  9. #9
    Join Date
    Apr 2015
    Location
    Seattle, WA
    Posts
    10
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Ollie99 View Post
    is it possible you could update this with the new method?

    Thanks
    The layout is there, if you want to change a function all you have to do is update it yourself.. I had no coding experience when I joined the community here, I can now make my own basic scripts and have an overall basic understanding of SRL. It's quite simple to learn once you grasp the concepts.

    Here's a guide by The Mayor that helped me understand the fundamentals https://villavu.com/forum/showthread.php?t=107757

    Good luck
    Last edited by jrowe; 01-14-2016 at 09:16 AM.

  10. #10
    Join Date
    Dec 2015
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by jrowe View Post
    The layout is there, if you want to change a function all you have to do is update it yourself.. I had no coding experience when I joined the community here, I can now make my own basic scripts and have an overall basic understanding of SRL. It's quite simple to learn once you grasp the concepts.

    Here's a guide by The Mayor that helped me understand the fundamentals https://villavu.com/forum/showthread.php?t=107757

    Good luck
    Thank you very much, I will look into this

  11. #11
    Join Date
    Apr 2015
    Posts
    45
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    I had about 20k air orbs lying around, I pass them around bot it down 20k battlestaffs on the account.

    thanks for sharing the script though.

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
  •