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
  • Walking#Walk having a dance party


    crazykid080

    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()

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.