Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Daily Yak-hide [Deleted]

Status
Not open for further replies.
Joined
Aug 23, 2015
Messages
1,961
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:
    @Override
    public void execute() {
        if (Bank.depositInventory()) {
            Execution.delay(1000, 1500);
            Bank.close();
        }
    }

to

Code:
    @Override
    public void execute() {
        if (!Inventory.isEmpty()) {
            Bank.depositInventory();
        } else {
              Bank.close();
             }
    }

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.
 
Joined
Apr 2, 2016
Messages
53
This resource has been removed and is no longer available for download.
 
Status
Not open for further replies.
Top