July 21, 20196 yr 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
July 21, 20196 yr shop.interact("Trade"); new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }.sleep();
July 21, 20196 yr 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!"); }
Create an account or sign in to comment