kadiem Posted July 21, 2019 Share Posted July 21, 2019 shop.interact("Trade"); new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }; the ConditionalSleep is supposed to wait 4 to 8 seconds or until store is opened, but neither of those are working Quote Link to comment Share on other sites More sharing options...
Token Posted July 21, 2019 Share Posted July 21, 2019 shop.interact("Trade"); new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }.sleep(); Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 21, 2019 Share Posted July 21, 2019 You're constructing a new ConditionalSleep, but never using it so ofcourse it isn't working! You're going to need the call sleep method: ConditionalSleep awaitShop = new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }; if (shop.interact("Trade") && awaitShop.sleep()) { log("hi!"); } Quote Link to comment Share on other sites More sharing options...