Jump to content

How would I apply a conditional sleep to this?


Recommended Posts

Posted (edited)

I just started programming about 10 days ago (3~ days into OsBot), so I don't understand a lot of the stuff in the API (how to use conditional sleeps, or classes in general).

Is there a way I can add a sleep condition to this to sleep until storeSlot[j] != null, the condition for continual click is true, or literally anything to pause it that isn't sleep(xxxx)?

if (iLoop && jLoop) {
    InventorySlotDestination emptySlot = new InventorySlotDestination(getBot(), storeSlot[i]);
    InventorySlotDestination fullSlot = new InventorySlotDestination(getBot(), storeSlot[j]);
    getMouse().continualClick(fullSlot, new Condition() {
        @Override
        public boolean evaluate() {
            getMouse().move(emptySlot, true);
            return getInventory().getMouseDestination(i).getBoundingBox().contains(getMouse().getPosition());
        }
    });
}

 

Edited by DidYouSeeMyShoes
Figured it out

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...