Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • 7804364's Efficient Json Grand Exchange Item Puller


    7804364
     Share

    Recommended Posts

    Welcome

     

    Features

    - Gets all the item prices in OSRS in under 0.4 seconds

    - Persistent data so you don't need to keep making multiple GE calls

    - Has the following methods

    getId() - int
    getSellingPrice() - int
    getBuyAverage() - int
    getBuyQuanity() - int
    getSellAverage() - int
    getSellQuanity() - int
    getOverallAverage() - int
    getOverallQuanity() - int
    getName() - String
    isMembers() - boolean

    Github

    How to Use

    (If you do not have Java EE you may need Javax library from Oracle)

    1. Insert file into your script

    qpJrCjv.png

     

    2. in your onStart() method, call the method

    Prices.loadPrices();

    3. Where ever you want to store the price use the Prices methods

    int runeScimitarPrice = Prices.getItem(i -> Objects.nonNull(i) &&
                    i.getName().contains("Rune scimitar")).getBuyAverage();
    
    int price = Prices.getItem(i -> Objects.nonNull(i) &&
                    i.getId() == 655).getBuyAverage();
            
    Collection<Item> getAllIronItems = Prices.getFilteredItems(i -> Objects.nonNull(i) && 
                    i.getName().contains("Iron"));

     

     

    Adding a GrandExchangeLibrary.jar to the thread for easy install, just import this library.jar into your IDE and do the above steps.

     

    http://prntscr.com/m7qdpn

    GrandExchangeLibrary.jar

    Edited by 7804364
    Link to comment
    Share on other sites

    looks really interesting. I will use this if a use for it comes up in my scripts. thanks for making it available!

    I wish we could use external packages instead of directly including source code... I wonder if the admins would consider adding a repo of approved libraries that could be used in scripts.

    Link to comment
    Share on other sites

    3 hours ago, Chef Sk1llz said:

    Teach me how to implement this onto excel or google sheets please <3

    couple of options:

    1. import this library into a project, and use a csv parsing library to insert the data into an excel spreadsheet.

    2. import this library to a project and serve it through a node server you're running locally, exposing an api. then, query that api through excel's built in json query features and have an actively refreshing  spreadsheet.

     

    Link to comment
    Share on other sites

    • 1 month later...
    On 1/15/2019 at 10:33 PM, 7804364 said:

    Welcome

     

    Features

    - Gets all the item prices in OSRS in under 0.4 seconds

    - Persistent data so you don't need to keep making multiple GE calls

    - Has the following methods

    getId() - int
    getSellingPrice() - int
    getBuyAverage() - int
    getBuyQuanity() - int
    getSellAverage() - int
    getSellQuanity() - int
    getOverallAverage() - int
    getOverallQuanity() - int
    getName() - String
    isMembers() - boolean

    Github

    How to Use

    (If you do not have Java EE you may need Javax library from Oracle)

    1. Insert file into your script

    qpJrCjv.png

     

    2. in your onStart() method, call the method

    Prices.loadPrices();

    3. Where ever you want to store the price use the Prices methods

    int runeScimitarPrice = Prices.getItem(i -> Objects.nonNull(i) &&
                    i.getName().contains("Rune scimitar")).getBuyAverage();
    
    int price = Prices.getItem(i -> Objects.nonNull(i) &&
                    i.getId() == 655).getBuyAverage();
            
    Collection<Item> getAllIronItems = Prices.getFilteredItems(i -> Objects.nonNull(i) && 
                    i.getName().contains("Iron"));

     

     

    Adding a GrandExchangeLibrary.jar to the thread for easy install, just import this library.jar into your IDE and do the above steps.

     

    http://prntscr.com/m7qdpn

    GrandExchangeLibrary.jar

    This works without using db client but when implementing it in a script it doesn't output anything. It gets stuck trying to load the prices. Any idea why? I'm using eclipse btw.

    Link to comment
    Share on other sites

    3 hours ago, ozeki6 said:

    This works without using db client but when implementing it in a script it doesn't output anything. It gets stuck trying to load the prices. Any idea why? I'm using eclipse btw.

    did you add this ? on the onStart() ?

    Prices.loadPrices();
    Link to comment
    Share on other sites

    20 hours ago, ozeki6 said:

    Yes. It gets stuck there. 

    Is there any error? because i have the library in a few of my scripts and they are working fine?

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.