Results 1 to 17 of 17

Thread: Development Log - 3Garrett3's Flipper

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

    Default Development Log - 3Garrett3's Flipper

    As some of you may know, I've been attempting to write an RS3 flipper since before the OSRS GE even existed. I've been plagued with laziness and problems with the accuracy of color scripting over the last 5-6 months. After three rewrites of various quality, I've decided that I need to motivate myself with the threat of people knowing how lazy I am. As such, I'll be discussing my progress on the newest rewrite.

    I intend to write the script in phases to increase the illusion of completing things. Here is a rough outline of what I expect:

    Revision 1
    This portion of the script is the base functionality. It will not flip, it will only gather price data. The script will be able to complete:
    • Login / Logout / Breakhandler
    • Open / Close / Detect GE / All other GE Interactions
    • Buy an Item / Sell an Item (Pricecheck) and store the information
    • Run through a (user defined) list of items and grab profit margins on each item

    Revision 2
    At this point, the script will actually be a "flipper" with basic functionality. It will be able to complete:
    • Determine profit margins and select items based on price checks
    • Manage money and track available cash at all times
    • Track status of trades and manage all trades automatically (IE do the flip)

    Revision 3 (Final)
    At this point, the script will mimic real people who flip the GE. It will:
    • Actively manage trades and optimize gp/hr by updating offers
    • Collect statistics on trades to help improve the working item list


    Current Progress
    Below, Green = complete and Red = incomplete

    Revision 1
    Player management
    Breakhandler

    Open/Close/Detect GE
    GE Slot Management (tracking status, open number of slots)
    Item Management (INI interactions)

    Item Buying
    Item Selling

    Data Collection
    Data Storing


    If you've made it this far, congratulations! You've made it to the bottom of this post. Feel free to encourage, advise, or discuss any of the above or anything on this topic.

    Suggested topic: Release Decision
    I know that Rev 3 will end up being a private script, but I'm not sure what to do with Rev 2 and 1. I can see Rev 1 being released to Members as an FYI/learning experience. I may also release a dumb version of Rev 2, in which the end user has to create their own item list (so nobody ruins my favourite flipping items). Thoughts?
    Last edited by 3Garrett3; 07-30-2015 at 03:00 AM.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  2. #2
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    I need to motivate myself with the threat of people knowing how lazy I am.
    Everyone knows already, it's not a secret
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

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

    Default

    Quote Originally Posted by Hawker View Post
    Everyone knows already, it's not a secret
    And here I thought that I did a good job of hiding it. Well it's out in the open now for all to see my failure, hopefully I turn it into a success this time.

    In actual updates:

    I worked on the system that will monitor the GE Slots during script operation, allowing me to know which items are in which slots when I'm doing the flips. I'll use a custom type that contains all the GE Slot information and interaction functions, which should simplify things compared to previous attempts.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  4. #4
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    This would be exponentially easier in OGL!

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

    Default

    good luck dude! i've suffered from the same since i got here, never got to release a script because i always leave them at 3/4... Hope you can do this!
    Formerly known as Undorak7

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

    Default

    Quote Originally Posted by Ross View Post
    This would be exponentially easier in OGL!
    I didn't say I wasn't using OGL

    The plan right now is to use OGL and help develop their GE include along the way. There's some interesting challenges even with OGL though. For example, in SRL-6 we used Grid() to determine a lot of locations of GE interfaces. I'd rather use textures in OGL because the window size can be dynamic. However, the textures change between empty slots and offers, so the slot numbering becomes variable when using textures (when we need it to be static). That's why I'm looking to create a better "Slot management system" that will init the bounds of each slot and create our custom grid on the first opening of the GE. I'm just working through that logic right now to make sure I don't miss anything and then a lot of the functions can be based off static 'offer slots'.

    After trying to explain that I'm realizing that we really need better names for all the different GE "slots". I'll just try to keep consistent in my coding haha.

    Quote Originally Posted by Lipcot View Post
    good luck dude! i've suffered from the same since i got here, never got to release a script because i always leave them at 3/4... Hope you can do this!
    Thanks, hopefully I'm able to break through this time. All my other attempts got lost in the "active management" of the flips, getting accurate information through tesseract proved to be a big hurdle and it was never 100% accurate, which is a requirement.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    I have faith in you.


    Let me know if you need a hand with something.

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

    Default

    @NCDS; Thank you for the offer. I'll be sure to chat you on IRC if I need anything.

    I updated the OP with current status. I've basically finished what I consider my "OGL GE Functions". The base is there: I can buy, sell, collect, abort. The missing link is just the "management" part, which will allow me to say "isSlotEmpty" or "isSlotComplete" like in the SRL include. To do this I think I'll need to do an initial scan, init the GE record, and then always access the static coords that are generated, which will resemble the "grid" functionality that SRL has. Then I'll easily be able to access the buy/sell buttons of specific GE slots and know when offers are pending and when they're complete.

    After that, it's mostly nitty-gritty work which will probably involve a lot of code-porting from past attempts.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  9. #9
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    @NCDS; Thank you for the offer. I'll be sure to chat you on IRC if I need anything.

    I updated the OP with current status. I've basically finished what I consider my "OGL GE Functions". The base is there: I can buy, sell, collect, abort. The missing link is just the "management" part, which will allow me to say "isSlotEmpty" or "isSlotComplete" like in the SRL include. To do this I think I'll need to do an initial scan, init the GE record, and then always access the static coords that are generated, which will resemble the "grid" functionality that SRL has. Then I'll easily be able to access the buy/sell buttons of specific GE slots and know when offers are pending and when they're complete.

    After that, it's mostly nitty-gritty work which will probably involve a lot of code-porting from past attempts.
    Better idea.

    isSlotEmpty():

    Get coordinates of the slot you are looking for (using the slot texture). Get the number of interfaces stacked at that location (by TBox.isPointInside() or whatever its called, i have it if its not a standard part of SRL let me know and ill send it. Also easy to make yourself). If the number of stacked interfaces = 1 then the slot is empty.

    ------------------------------

    isSlotComplete():

    Get the progress bar for the specific slot, and check the progress texture's color ID. Green (complete) will have a different ID than yellow (incomplete).

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

    Default

    Quote Originally Posted by the bank View Post
    Better idea.

    isSlotEmpty():

    Get coordinates of the slot you are looking for (using the slot texture). Get the number of interfaces stacked at that location (by TBox.isPointInside() or whatever its called, i have it if its not a standard part of SRL let me know and ill send it. Also easy to make yourself). If the number of stacked interfaces = 1 then the slot is empty.

    ------------------------------

    isSlotComplete():

    Get the progress bar for the specific slot, and check the progress texture's color ID. Green (complete) will have a different ID than yellow (incomplete).
    Thank you for the advice, although I obviously haven't explained the problem very well.

    As for your advice, I'd used the isSlotEmpty function for collecting items after aborting the offer. If the collection slots only have 1 texture within their bounds, then there is no item in the slot. I'd also intended to use the green bar to determine when an offer is complete.

    For my problem: There is no *simple* way to refer to slots. In srl-6 the grid function is used and therefore we have static coordinates for every slot. In OGL, the window can be dynamic size so the detection has to be dynamic. I had considered simply using the texture to detect the slots, but the texture IDs change depending on the status of the slot. See picture below:



    So when I say mouse.click(ogl.getTextures(X)[0].bounds) to start an offer, it will pick slot 1 labelled above. Then if I want to check the bounds of slot 1 for the completion texture, I don't have any way of getting the bounds. I can grab the "in progress" texture, but I have no idea of comparing index X and Y to be sure it's the same slot. If I scan for the regular texture while there is an offer in progress, it will see that I'm going to index 0 again, but this time it is actually slot 2.

    This means there will need to be some sort of slot record where I store the information about the slots based on an initial scan. That will allow me to refer to static slot bounds as required and make the rest of the code work reliably.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  11. #11
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Thank you for the advice, although I obviously haven't explained the problem very well.
    ...
    Ahh I understand, I actually had to overcome this myself while making a Pyramid Plunder script (the doors dynamically changing).

    I would personally tackle it by finding the first box (theTexture.X will be the smallest X value of the bunch, this will leave you with 3 possible squares. Then from those 3, whichever has the smallest theTexture.Y value will be your top left corner).

    Now you've got the choice of continuing with a row approach or a column approach. We are going to be populating a brand new array with all of your textures in order. With that in mind, a row approach might be better (at least in terms of readability).

    Your goal here is to iterate through and fill the array from [0] to [7] with the ordered list of squares.

    If you don't get whta I mean, I could probably whip something up for you!

  12. #12
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default

    How's it going with this, any problems?





  13. #13
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Fitta View Post
    How's it going with this, any problems?
    Also curious!

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

    Default

    @3Garrett3; ^

    Motivation wants to know what you're up to!



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

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

    Default

    Quote Originally Posted by Fitta View Post
    How's it going with this, any problems?
    Quote Originally Posted by Ross View Post
    Also curious!
    Quote Originally Posted by Incurable View Post
    @3Garrett3; ^

    Motivation wants to know what you're up to!
    Oh god, um..... Okay I might have been working on other things.

    I expect I can actually *start* next week.

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  16. #16
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Oh god, um..... Okay I might have been working on other things.

    I expect I can actually *start* next week.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  17. #17
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Haha, spot on with that one.

    Garrett, if you need help testing, I'm here for you.





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
  •