Results 1 to 18 of 18

Thread: [F2P] Potato Picker 120-200k an hour, looking for suggestions.

  1. #1
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default [F2P] Potato Picker 120-200k an hour, looking for suggestions.

    I've been working on this script for a little while, and its almost perfect. However..... it includes opening a gate and I can't get the script to run flawlessly for more than around 20-30 mins. I'm not good at TPA and ATPA yet, but I think I have everything else done.

    I hope this doesn't crash potato prices, but it probably will once it runs better. Oh well..... I did it for the coding experience.

    Description:

    Start the script in the Lumbridge Combat Training Area next to the bank with an empty inventory preferable. This uses the DirectX plugin and also is optimized with the smallest possible chatbox.

    It runs from the bank location to the potato field, and all the way back.

    Simba Code:
    program PotatoPicker;
    {$DEFINE SMART}
    {$i srl-6/srl.simba}
    {$I SPS/lib/SPS-RS3.Simba}

    var        //Global
      pathToPotato, pathToBank, pathOutPotato: TPointArray;
      picked: integer;


    procedure declarePlayers();
    begin
      setLength(players, 1);

      with players[0] do
      begin
        loginName := '';
        password := '';
        isActive := true;
        world := -1;
        isMember := true;
      end

      currentPlayer := 0;
    end;

    procedure setupPaths();
    begin
      pathToPotato := [Point(123, 332), Point(142, 324), Point(166, 322), Point(211, 321), Point(204, 285), Point(202, 244), Point(200, 206), Point(204, 165), Point(214, 142), Point(238, 119), Point(264, 98), Point(281, 87), Point(292, 90)];
      pathToBank := [Point(283, 86), Point(268, 93), Point(252, 111), Point(226, 127), Point(207, 148), Point(200, 182), Point(204, 209), Point(197, 238), Point(209, 268), Point(204, 306), Point(188, 320), Point(157, 321), Point(121, 328), Point(112, 333)];
      pathOutPotato := [Point(268, 139), Point(280, 123), Point(289, 107), Point(296, 93)];
    end;

    procedure walkToPotato();
    begin
      if not isLoggedIn() then
           exit;
          writeLn('Walking to the Field');
          minimap.setAngle(MS_ANGLE_HIGH);
          if SPS.walkPath(pathToPotato) then
          minimap.waitPlayerMoving();
    end;

    procedure walkToBank();
    begin
     if not isLoggedIn() then
           exit;

          writeLn('Walking to the Bank');
          minimap.setAngle(MS_ANGLE_HIGH);
          if SPS.walkPath(pathToBank) then
          minimap.waitPlayerMoving();
    end;

    procedure walkOutField();
    begin
      if not isLoggedIn() then
        exit;

        minimap.setAngle(MS_ANGLE_HIGH);
          if SPS.walkPath(pathOutPotato) then
          minimap.waitPlayerMoving();

          wait(randomRange(2000, 2500));
    end;

    procedure findGate();
    var
      x, y, i: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      gateTimer:TTimeMarker;

    begin
      if not isLoggedIn() then
        exit;
      repeat
        writeLn('Finding Gate');
        minimap.setAngle(MS_ANGLE_HIGH);

       findColorsSpiralTolerance(x, y, TPA, 7439776, mainScreen.getBounds(), 12, colorSetting(2, 0.18, 0.68));

        if length(TPA) < 1 then
          exit;


        ATPA := tpa.cluster(2);
        ATPA.filterBetween(0, 20);
        ATPA.sortFromMidPoint(mainscreen.playerPoint);
        smartImage.debugATPA(ATPA); //This is here for debugging purposes
        for i := 0 to high(ATPA) do
        begin
          mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
          if isMouseOverText(['pen'], 800) then
          begin
            writeLn('Opening Gate!');
            fastClick(MOUSE_LEFT);
           smartImage.clear;
           wait(randomrange(2000, 3500));
           exit();
         end;
          if isMouseOverText(['lose'], 800) then
         begin
            writeLn('Gate is already open!');
            smartImage.clear();
            exit();
          end;
        end;

        until (gateTimer.getTime() > 75000);

    end;


    procedure clickPotatos();
    var
      x, y, i: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;

    begin
      if not isLoggedIn() then
        exit;

      writeLn('Finding Potatos');

      repeat
        findColorsSpiralTolerance(x, y, TPA, 13151330, mainScreen.getBounds(), 12, colorSetting(2, 3.59, 1.67));

        if length(TPA) < 1 then
         exit;

       ATPA := TPA.toATPA(20, 40);
       ATPA.sortFromMidPoint(mainscreen.playerPoint);
       //smartImage.debugATPA(ATPA);

       for i := 0 to high(ATPA) do
       begin
         mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
         if isMouseOverText(['otato'], 800) then
         begin
            fastClick(MOUSE_LEFT);
           smartImage.clear;
           if tabBackpack.waitForShift(7000) then
              begin
                wait(randomrange(2000, 3000));
                inc(picked);
                break;
              end;
          end
        end;
      until tabBackpack.isFull();

    end;

    procedure bank();
    var
      x, y, i, picked: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin
      if not isLoggedIn() then
          exit;

      writeLn('Finding Potatos');

      findColorsSpiralTolerance(x, y, TPA, 11181201, mainScreen.getBounds(), 3, colorSetting(2, 0.34, 0.49));

      if length(TPA) < 1 then
        exit;

       ATPA := TPA.toATPA(40, 40);
       ATPA.sortFromMidPoint(mainscreen.playerPoint);
       smartImage.debugATPA(ATPA);

       for i := 0 to high(ATPA) do
       begin
         mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
         if isMouseOverText(['hest'], 800) then
         begin
          fastClick(MOUSE_LEFT);
          smartImage.clear;
          if (bankScreen.isOpen(randomrange(4000, 5000))) then
            begin
            writeln('Bankscreen is open!');
            bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
            writeln('Deposited');
            wait(randomrange(1000, 2000));
            bankScreen.close()
            end;
          end;
       end;


    end;

    procedure progressReport();
    var
      profit, profitPerHour, potentialProfit: integer;
    begin

      profitPerHour := round((picked * 418 * 60 /(getTimeRunning() / 60000))); //Can be edited by the user
      potentialProfit := round((picked * 600 * 60 /(getTimeRunning() / 60000))); //Can also be edited
      profit := round((picked*418));

      writeln('===========Overlord''s Potato Banker============');
      writeln('     Potatos Picked: ' + (toStr(picked)));
      writeln('     Profit: ' +  (toStr(profit)));
      writeln('     Profit per Hour ' + (toStr(profitPerHour)));
      writeln('     Potential Profit per hour: ' + (toStr(potentialProfit))); //This line is added in because potato prices are very flexible
      writeLn('     Time running: ' + timeRunning(TIME_SHORT));
      writeln('================================================');
    end;


    begin
      clearDebug();
      DisableSRLDebug := true;
      smartPlugins := ['d3d9.dll'];
      smartEnableDrawing := true;
      setupSRL();
      declarePlayers();
      SPS.setup('path', RUNESCAPE_OTHER);
      setupPaths();

      repeat
      begin;
        exitTreasure();

        if not isLoggedIn() then
          begin
            players[currentPlayer].login();
            wait(randomRange(4000, 6000));
           mainscreen.setAngle(MS_ANGLE_HIGH);
         end;

        if tabBackpack.count() = 28 then
         begin
         walktoBank();
         bank();
         progressReport();
         end;

        walkToPotato();
        findGate();
        clickPotatos();
        walkOutField();
        findGate();
        walkToBank();
        bank();
        progressReport();

      end;
      until(false);

    end.


    To Do List:

    1. Find a better way to find and open the gate (All help is appreciated!)
    2. Add more failsafes
    3. Include a price getter.
    3. Add antiban (Not a priority because the script requires literally no stats)
    4. Fix spacing. Still used to java, I hate this part and will probably procrastinate

    If you use this script, never sell potatoes for below mid. NEVER DO IT THEY WILL SELL EVENTUALLY. If you are exceptionally patient, you can do a 150% mark up which is why I included a potential profit per hour in the progress report.

    path.png

    Place this in runescape_other folder as "path"


    EDIT

    The potato picker has finally moved out of beta stages and has now received a nice facelift!

    Download SimplyPotato.simba

    I haven't put it through proper testing for long periods of time, but oh well, its better than before.

    New SPS image: http://i.imgur.com/eiM5iT5.png
    Last edited by yourule97; 09-30-2014 at 02:00 AM.

  2. #2
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Congratulations on release!

    Forum account issues? Please send me a PM

  3. #3
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Nice release!

    As for your gate issue, is the gate red on the minimap?

  4. #4
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Not bad for a first script!

    Since there's not a lot you can do for antiban, you should consider a breaking system instead. This say you can take breaks when a human would realistically be bored of picking and baking repeatedly.



    New to scripting? Procedures & Functions for Beginners
    Do you use your computer at night? Just get f.lux

  5. #5
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    Congratulations on release!
    Thanks!


    Quote Originally Posted by NKN View Post
    Nice release!

    As for your gate issue, is the gate red on the minimap?
    That's a good idea. Sometimes the SPS pathing moves too far away from the gate for it to be found. This seems like a much better solution.


    Quote Originally Posted by Incurable View Post
    Not bad for a first script!

    Since there's not a lot you can do for antiban, you should consider a breaking system instead. This say you can take breaks when a human would realistically be bored of picking and baking repeatedly.
    Thanks for the suggestion! Its very logical. I'm just not willing to add it in because honestly I'm lazy and I plan to use this scripts with only fresh accounts which I wouldnt mi

  6. #6
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    wannabe @Wetish;

  7. #7
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by yourule97 View Post
    Thanks!




    That's a good idea. Sometimes the SPS pathing moves too far away from the gate for it to be found. This seems like a much better solution.




    Thanks for the suggestion! Its very logical. I'm just not willing to add it in because honestly I'm lazy and I plan to use this scripts with only fresh accounts which I wouldnt mi
    I was going more along the idea of using the red then using pointToMainscreen to plot a general location, then search inside a box created from those points. Eliminates a lot of the overhead.

  8. #8
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    I was going more along the idea of using the red then using pointToMainscreen to plot a general location, then search inside a box created from those points. Eliminates a lot of the overhead.
    Thats what I did when I wrote a very similar script a year or so ago.

    Quote Originally Posted by yourule97 View Post
    I hope this doesn't crash potato prices, but it probably will once it runs better.
    The current price is highly inflated because I haven been buying potatoes for my collection. I started buying them when they were around 130gp each.

    Once you sell about 110k potatoes I will not longer be buying and the price might crash.
    Last edited by Wetish; 09-30-2014 at 06:56 PM.

  9. #9
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    I was going more along the idea of using the red then using pointToMainscreen to plot a general location, then search inside a box created from those points. Eliminates a lot of the overhead.
    That's much smarter than what I had in mind before! Thanks for the insight.



    Quote Originally Posted by Wetish View Post
    Thats what I did when I wrote a very similar script a year or so ago.



    The current price is highly inflated because I haven been buying potatoes for my collection. I started buying them when they were around 130gp each.

    Once you sell about 110k potatoes I will not longer be buying and the price might crash.
    Pls giff money. I am poor peasant

  10. #10
    Join Date
    Jul 2012
    Location
    Australia
    Posts
    136
    Mentioned
    0 Post(s)
    Quoted
    57 Post(s)

    Default

    I'm fairly sure a few people collect them, so hopefully it doesn't crash too much.

  11. #11
    Join Date
    Oct 2014
    Posts
    43
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    is this to like train cooking, or just for potato hoarders lol

  12. #12
    Join Date
    Sep 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    ^hahaah I was wondering the same thing

  13. #13
    Join Date
    Apr 2007
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    Just to gather them taters me thinks?

  14. #14
    Join Date
    Mar 2015
    Location
    Australia
    Posts
    101
    Mentioned
    2 Post(s)
    Quoted
    46 Post(s)

    Default

    Has anyone tried this recently? I was looking to start my own potato picker script to learn but found this tucked away here. Would this be a safeish script to try?

  15. #15
    Join Date
    Jun 2014
    Posts
    369
    Mentioned
    14 Post(s)
    Quoted
    217 Post(s)

    Default

    ===========Overlord's Potato Banker============
    Potatos Picked: 196
    Profit: 81928
    Profit per Hour 149474
    Potential Profit per hour: 214556
    Time running: 32m 53s

    Something to do
    1.Gate
    2.Bypass 6hours
    3.antiban
    Last edited by WYD; 03-30-2015 at 06:56 PM.

  16. #16
    Join Date
    Jun 2014
    Posts
    369
    Mentioned
    14 Post(s)
    Quoted
    217 Post(s)

    Default

    Bug

  17. #17
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default

    I can't believe anyone is deciding to use this. It's absolute garbage. I'll try and freshen things up

  18. #18
    Join Date
    Jun 2014
    Posts
    369
    Mentioned
    14 Post(s)
    Quoted
    217 Post(s)

    Default

    I have fix my haha with some help

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
  •