kadiem Posted July 21, 2019 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
Token Posted July 21, 2019 Posted July 21, 2019 shop.interact("Trade"); new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }.sleep();
Apaec Posted July 21, 2019 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!"); }