Page 1 of 3 123 LastLast
Results 1 to 25 of 66

Thread: Development diary - Flipping script

  1. #1
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default Development diary - Flipping script

    This is my long-term project. I started this 'blog' to keep me motivated. My progress will be posted here every once in a while. As I was working on this script I learned a lot. Because of that I rewrote the entire script multiple times. In the current state I'm quite happy, so for now I can (hopefully) make more progress.

    Project overview:


    • Grand exchange functions
    • Buy item high and sell cheap to get the prices
    • Database management
    • Bulk buying item with most profit
    • Getting the prices with tesseract
    • Getting the quantity with tesseract

    • Break system
    • Multiplayer
    • Releasing for public use
    • Easy way of adding new items


    Changelog:


    05-07-2016
    Rewrote the entire script. Most of the script is working now.


    Credits:


    @The Mayor - For his grand exchange functions.
    @3Garrett3 - For his text-parsing snippet.
    @Olly - For the Tesseract filter


    Feel free to post suggestions!
    Last edited by SlipperyPickle; 07-05-2016 at 10:35 AM.

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,420
    Mentioned
    84 Post(s)
    Quoted
    862 Post(s)

    Default

    I wrote a fully functioning merchanter (still works!), only problem with it is the huge item list with limits that you need.

  3. #3
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Sin View Post
    I wrote a fully functioning merchanter (still works!), only problem with it is the huge item list with limits that you need.
    Nice! I wasn't planning on making a huge list, just the items I usually flip, since I know they work. Just trying to automate the process

  4. #4
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Updated OP with my progress.

    28-02-2015
    Had to rewrite several parts of the grand Exchange. Because sometimes the search box doesn't open at the same place.

    Updated functions:
    • geGetBounds(); (thought the ge was always at the same place when opened, which isn't true. Now it dynamically searches for the ge).
    • geSearchBoxBounds() (same reason. Now it dynamically gets the search box, and tBoxes for the items found).


    New functions:
    • gePercentageDone(); (checks how much is sold/bought)

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,621
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I find it interesting that you failed to mention that the code I posted earlier is what you have for GE text reading. I'll give you the benefit of the doubt that you created the filter yourself and you've come up with the same filter as Olly, and just had the same text-parsing idea that I had and publicly posted. It's completely fine to use code I'm posting, but I would like to see some credit if that's the case.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  6. #6
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    I find it interesting that you failed to mention that the code I posted earlier is what you have for GE text reading. I'll give you the benefit of the doubt that you created the filter yourself and you've come up with the same filter as Olly, and just had the same text-parsing idea that I had and publicly posted. It's completely fine to use code I'm posting, but I would like to see some credit if that's the case.
    Oh I'm really sorry! Found that code on paste.villavu.com. Didnt know whos code that was, will add to credits! Was never my intention to insult anyone, or anything like that!

    here is the link. Will add credits now!
    Last edited by SlipperyPickle; 02-28-2015 at 05:03 PM.

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,621
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by SlipperyPickle View Post
    Oh I'm really sorry! Found that code on paste.villavu.com. Didnt know whos code that was, will add to credits! Was never my intention to insult anyone, or anything like that!

    here is the link. Will add credits now!
    Hahah this is the foundation of a project I'm working on with Taric, right now we plan on being selfish and keeping the profits to ourselves though . Credit Olly for the Filter, I would have been still trying to figure out tesseract if it weren't for him. Sorry for sounding cranky in my first post, I'd just woken up.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  8. #8
    Join Date
    Oct 2014
    Location
    With ezreal~
    Posts
    295
    Mentioned
    45 Post(s)
    Quoted
    255 Post(s)

    Default

    Quote Originally Posted by SlipperyPickle View Post
    Oh I'm really sorry! Found that code on paste.villavu.com. Didnt know whos code that was, will add to credits! Was never my intention to insult anyone, or anything like that!

    here is the link. Will add credits now!
    We're going to have to talk about royalties



    It's not gay if it's efficient.

  9. #9
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Hahah this is the foundation of a project I'm working on with Taric, right now we plan on being selfish and keeping the profits to ourselves though . Credit Olly for the Filter, I would have been still trying to figure out tesseract if it weren't for him. Sorry for sounding cranky in my first post, I'd just woken up.
    I understand why you were mad. I too was for more than an hour busy with the filter, without success. After finding that snippet it finally worked

    Quote Originally Posted by Taric View Post
    We're going to have to talk about royalties
    Haha, I'll add a part in my script that 50% of the profit will be traded to my mules, for royalties

  10. #10
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,700
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  11. #11
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,621
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    You should also post a bug report if any of the SRL-6 functions are outdated.
    Check bug reports for GE stuff I submitted

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  12. #12
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,700
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  13. #13
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    You should also post a bug report if any of the SRL-6 functions are outdated.
    Yeah, I know! But I wasnt sure it was a bug, or just me. Didnt want to jump to any conclusion. And i liked the challenge of a full ge script.

  14. #14
    Join Date
    Jan 2015
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Gl ith this, I was allso intrested in making a Ge flipping script but iam more focusing on 07 but have no clue how to do that using simba :/

  15. #15
    Join Date
    Nov 2012
    Location
    OKC
    Posts
    123
    Mentioned
    5 Post(s)
    Quoted
    56 Post(s)

    Default

    Wish i had seen this before i requested it. Let me know if you need help. I am still a noob but have written a few basic scripts.

  16. #16
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,621
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    @SlipperyPickle; Do you mind posting your function for the buy offer search box? I've submitted a bug report to @The Mayor; about it not clicking the right items in the box, but if he had more helper code for dynamically finding the searchbox I bet it would help him make a fix for it. I suggested code for actually getting the right items but I used a fixed tBox for the search coords so the dynamic box finding would be ideal.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  17. #17
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    @SlipperyPickle; Do you mind posting your function for the buy offer search box? I've submitted a bug report to @The Mayor; about it not clicking the right items in the box, but if he had more helper code for dynamically finding the searchbox I bet it would help him make a fix for it. I suggested code for actually getting the right items but I used a fixed tBox for the search coords so the dynamic box finding would be ideal.
    Sure! Here you go:

    Simba Code:
    function getItemBounds(itemNumber: integer): tBox;
    var
      i: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      b, searchBox, itemBox: TBox;
    begin
      if (not self.isOpen()) then
        exit();

      findColorsTolerance(TPA, 9877448, getClientBounds(), 35);
      if length(TPA) < 1 then
      begin
        WriteLn('.getSearchBoxBounds(): Didn''t find correct colors');
        exit();
      end;

      ATPA := TPA.cluster(5);
      ATPA.sortBySize(true);

      for i := 0 to high(ATPA) do
      begin
        b := ATPA[i].getBounds();
        if b.getWidth() < 150 then
          continue();

        searchBox.setBounds(b.x1 + 60, b.y1, b.x2, b.y2);  //Here you'll get the bounds of the entire searchbox
        itemNumber := itemNumber - 1;
        itemBox.setBounds(b.x1 + 60, b.y1 + (15 * itemNumber), b.x2 - 300, b.y2 - (16 * (6 - itemNumber)));  //Here you'll get the bounds of the items in the searchbox
      end;
      result := itemBox;
    end;

  18. #18
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,621
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by SlipperyPickle View Post
    Sure! Here you go:

    Simba Code:
    function getItemBounds(itemNumber: integer): tBox;
    var
      i: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      b, searchBox, itemBox: TBox;
    begin
      if (not self.isOpen()) then
        exit();

      findColorsTolerance(TPA, 9877448, getClientBounds(), 35);
      if length(TPA) < 1 then
      begin
        WriteLn('.getSearchBoxBounds(): Didn''t find correct colors');
        exit();
      end;

      ATPA := TPA.cluster(5);
      ATPA.sortBySize(true);

      for i := 0 to high(ATPA) do
      begin
        b := ATPA[i].getBounds();
        if b.getWidth() < 150 then
          continue();

        searchBox.setBounds(b.x1 + 60, b.y1, b.x2, b.y2);  //Here you'll get the bounds of the entire searchbox
        itemNumber := itemNumber - 1;
        itemBox.setBounds(b.x1 + 60, b.y1 + (15 * itemNumber), b.x2 - 300, b.y2 - (16 * (6 - itemNumber)));  //Here you'll get the bounds of the items in the searchbox
      end;
      result := itemBox;
    end;
    Sweet, looks like the same idea I was trying to give him. I think he might be looking for the entire search box coords, but I'm not 100% sure what direction he's headed in.

    What's the progress like on this btw? @Taric; and I have a prototype that does a lot of the simpler things. We've got quite a heavy to-do list to go through before it's finished though.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  19. #19
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Sweet, looks like the same idea I was trying to give him. I think he might be looking for the entire search box coords, but I'm not 100% sure what direction he's headed in.

    What's the progress like on this btw? @Taric; and I have a prototype that does a lot of the simpler things. We've got quite a heavy to-do list to go through before it's finished though.
    I have put my project on a hold for now, since I go on my holiday to Africa in a few days.

    Didn't update the blog, but I have written the buy and sell part. Had to rewrite the part where it got the price, since it wasn't accurate enough. Had to write a script that searches for the bounds of the price, before parsing the text. Will continue this when I'm back home

  20. #20
    Join Date
    Nov 2011
    Location
    Norway
    Posts
    203
    Mentioned
    4 Post(s)
    Quoted
    100 Post(s)

    Default

    For RS3 or 07? Or maybe both? Sounds interesting!

  21. #21
    Join Date
    Sep 2014
    Location
    Netherlands
    Posts
    264
    Mentioned
    11 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Aufi View Post
    For RS3 or 07? Or maybe both? Sounds interesting!
    RS3, I don't "play" 07

  22. #22
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,700
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  23. #23
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Good job on those fixes @the Mayor
    Will be usefull for my production script to update ge offers.

    Might consider making a somewhat Flawless public base for other scripts such as a granite cutter to buy and sell items. And dont have to bother running out of supplies, but seems like a waste of time to do so untill opening the collect screen has been added to srl?

  24. #24
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,700
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by lovebotter View Post
    Good job on those fixes @the Mayor
    Will be usefull for my production script to update ge offers.

    Might consider making a somewhat Flawless public base for other scripts such as a granite cutter to buy and sell items. And dont have to bother running out of supplies, but seems like a waste of time to do so untill opening the collect screen has been added to srl?
    Didn't you get my PM? Just use that for the time being?

  25. #25
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Didn't you get my PM? Just use that for the time being?

    Ye I got it! Thanks a bunch for that.
    But I meant for the public add-on for new scripters to add to their scripts to update supplies on their production scripts

Page 1 of 3 123 LastLast

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
  •