Jump to content

How would I apply a conditional sleep to this?


DidYouSeeMyShoes

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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