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
  • Bank Cache Usage


    420x69x420

    Recommended Posts

    Hello, in my first attempt at using the Bank Cache function of dreambot API, I am not getting any success with it, and seems to not work, but I'm not sure exactly so I'm asking if anyone is succesfully using these API calls:

    Bank.getBankHistoryCache()
    Bank.getLastBankHistoryCacheTime()

    Currently to test its usage I set up a simple script to call both of these methods and store them into variables, then print the variables. The method Bank.getBankHistoryCache().size() always returns 0, and Bank.getLastBankHistoryCacheTime() returns 0 always also. Opening and closing the bank, depositing/withdrawing items, setting Bank.setUseBankHistoryCache(boolean) to true or false, and calling Bank.resetCache() does nothing to create/update the cache.  Am I missing something or doing it wrong?

    Link to comment
    Share on other sites

    16 hours ago, Hans Zimmer said:

    My guess would be that you need to set your script to use the cache before trying to use the getCache methods.

     

    setUseBankHistoryCache(boolean useCache)

    I tried that already, and doing that alone doesn't work.

    16 hours ago, RetroBot said:

    I haven't needed to use that method, but I think it updates once you use a call from the banking class (ie Bank.openClosest)

    You're right! Some calls from the banking class don't update the cache, for instance, the 2 calls I am posting about not working are part of the Bank API class. Simply calling Bank.all(); on its own line w/ no assignment works to update the bank cache if it's open.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.