OSBOTTESTER101 Posted December 31, 2020 Share Posted December 31, 2020 if (exactLocationOfConveyor.interact(x.getBot(), "Put-ore-on") || exactLocationOfConveyor2.interact(x.getBot(), "Put-ore-on")) { Sleep.sleepUntil(() -> !x.myPlayer().isMoving() && !x.getInventory().contains("Gold ore"), 5000); if (!x.getInventory().contains("Gold ore")) { x.getWalking().walk(exactLocationOfBarDispenser); Sleep.sleepUntil(() -> getSmithXP < x.getSkills().getExperience(Skill.SMITHING), 3000); if (x.getEquipment().isWearingItem(EquipmentSlot.HANDS, "Goldsmith gauntlets")) { x.getInventory().interact("Wear", "Ice gloves"); barDispenser.interact("Take"); } } } Ok so I am getting results on my bot up until the lines i wrote in here the first line works for example it is suppose to click on the conveyor belt and walk to it but for some reason it does do that and when it gets there it spams click instead of sleeping i am using a sleep that i found on explvs and it was working for some things but it just does not actaully sleep the way i thought it would any suggestion? Quote Link to comment Share on other sites More sharing options...
OSBOTTESTER101 Posted December 31, 2020 Author Share Posted December 31, 2020 import org.osbot.rs07.utility.ConditionalSleep; import java.util.function.BooleanSupplier; public final class Sleep extends ConditionalSleep { private final BooleanSupplier condition; public Sleep(final BooleanSupplier condition, final int timeout) { super(timeout); this.condition = condition; } @Override public final boolean condition() throws InterruptedException { return condition.getAsBoolean(); } public static boolean sleepUntil(final BooleanSupplier condition, final int timeout) { return new Sleep(condition, timeout).sleep(); } } this is my sleep method Quote Link to comment Share on other sites More sharing options...
Nbacon Posted January 1, 2021 Share Posted January 1, 2021 (edited) try looping logic were all states are independent... making bots like how you are just clause alot of errors. examples can be found in here https://github.com/Explv/Explvs-AIO/tree/master/src/main/java/activities/skills I think this is what you need to make a blast furnce bot(sorry the blocks are all fucked up) if(gold bars in inv){ if(not at bank){ if(moving){ wait }else{ walk to bank } }else{ do banking things like swap gloves and withdraw gold ore } }else{ if(gold ore in inv){ if(moving){ wait }else{ if (Conveyor not in view ){ move towards }else{ click Conveyor } } }else{ if(gloves right gloves on){ pick up bars }else{ swap gloves } } } Edited January 1, 2021 by Nbacon Quote Link to comment Share on other sites More sharing options...