Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Walking#Walk having a dance party


    crazykid080
     Share

    Recommended Posts

    For me Walking#Walk has been the bane of my script, this is the code

     

    case MOVE_GE:
    			if (oldState != State.MOVE_GE) {
    				began = System.currentTimeMillis();
    			}
    			if (began > 4000) {
    				Walking.walk(3164, 3487);
    			}
    			oldState = State.MOVE_GE;
    			sleepUntil(new Condition() {
    
    				@Override
    				public boolean verify() {
    					return Walking.walkExact(GEArea.getRandomTile());
    				}
    			}, 3000);
    			return Calculations.random(400, 1000);
    		case MOVE_SHOP:
    			if (oldState != State.MOVE_SHOP) {
    				began = System.currentTimeMillis();
    			}
    			oldState = State.MOVE_SHOP;
    			sleepUntil(new Condition() {
    
    				@Override
    				public boolean verify() {
    					return Walking.walkExact(shopArea.getRandomTile());
    				}
    			}, 3000);
    			return Calculations.random(400, 1000);
    //----------
    if (Inventory.contains(item -> item.getName().contains(desiredItem)) && !GEArea.contains(localPlayer)) {
    			
    			return State.MOVE_GE;
    		}
    if (!Inventory.contains(item -> item.getName().contains(desiredItem)) && !shopArea.contains(localPlayer)) {
    			
    			return State.MOVE_SHOP;
    		}

    I would also like to mention that I have tried walk and walkExact, both have it partying like mad, but I think exact did cut it down by a little bit 

    Link to comment
    Share on other sites

    What state is that happening for, MOVE_SHOP, or MOVE_GE?

    You have seemed to overly complicated the script, which I'd say is part of the reason that you are having this issue.

    You need to read the Javadocs, there are some functions that would help you here. Mainly look into the Walking#shouldWalk() method, that may help you with walking.

    We could spoon feed you the answer, but you'll learn more by reading the javadocs and understanding what functionality the Dreambot API gives you.

    Hint:

    if (oldState != State.MOVE_GE) {
    				began = System.currentTimeMillis();
    			}
    			if (began > 4000) {
    				Walking.walk(3164, 3487);
    			}

    This is a strange one, look into getting rid of this, again, Walking#shouldWalk()

    Edited by Uplift
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.