1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Daily Yak-hide [Deleted]

Discussion in 'Bot Support & Feedback' started by Bloky, Aug 10, 2017.

Thread Status:
Not open for further replies.
  1. Bloky

    Joined:
    Apr 2, 2016
    Messages:
    53
    Likes Received:
    12
  2. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Code's looking pretty good. You should make an effort to break things like depositing inventory and closing bank up so that only one is executing per loop. For example, change

    Code (Text):
    1.     @Override
    2.     public void execute() {
    3.         if (Bank.depositInventory()) {
    4.             Execution.delay(1000, 1500);
    5.             Bank.close();
    6.         }
    7.     }
    to

    Code (Text):
    1.     @Override
    2.     public void execute() {
    3.         if (!Inventory.isEmpty()) {
    4.             Bank.depositInventory();
    5.         } else {
    6.               Bank.close();
    7.              }
    8.     }
    You'll find it helps with code stability a lot.

    Also, make an effort to use callables in your delays whenever possible. You'll find they speed things up significantly. Many API calls have built in delays, so you don't need anything extra, but it's hard to know which do and which dont. A callable makes it so that the delay ends almost instantly if the API method already had delays built in. In your code, you'll always be waiting at least 1000ms after depositing your inventory, when you could just delay until your inventory is empty. The wasted time adds up quickly.
     
    auxi likes this.
  3. Bloky

    Joined:
    Apr 2, 2016
    Messages:
    53
    Likes Received:
    12
    This resource has been removed and is no longer available for download.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...