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
  • getWalking().walk() misclicking


    jazberry

    Recommended Posts

    Posted

    I'm noticing that getWalking().walk() will sometimes misclick and start combat with NPCs that are standing near the doors/gates (etc) it's trying to interact with. Is there any way to prevent this?

     

    Also, it seems to be ignoring z position sometimes. Like, if I try to go to Lumbridge bank it will attempt to walk to the center of every floor before interacting with stairs. 40% of the time its walking into the room with the spinning wheel and walking in circles for a while if the door is closed. Any way to prevent that too?

     

    Here's the code I use to walk.

    private void walkTo(Area area) {
    	getWalking().walk(area.getRandomTile());
    	if(getWalking().getDestination() != null) {
    		sleepUntil(()->Area.generateArea(1, getWalking().getDestination()).contains(getLocalPlayer()), getRand(4000,6000));
    	}
    }
    
    Posted

    To prevent your character walking to the center of the room, simply write the code exactly what it should do instead of relying on the random walking method.

     

    Also, you haven't defined the area.

     

     

    Edit: also, you want to check first if the destination is not null (or let's say "walkable"), and then click the tile. This will prevent your bot clicking areas you normally would not click as a human and then realising it can't walk there.

    Posted

    To prevent your character walking to the center of the room, simply write the code exactly what it should do instead of relying on the random walking method.

     

    Also, you haven't defined the area.

     

     

    Edit: also, you want to check first if the destination is not null (or let's say "walkable"), and then click the tile. This will prevent your bot clicking areas you normally would not click as a human and then realising it can't walk there.

     

    Do you mean just not using randomTile()? Or are you saying I can define a specific walking path, tile by tile,  from point a to b?

     

    Still having a hard time understanding the doc but an example would be cool if it's the latter. I'd really appreciate it.

     

     

    Btw, I do define the area first. That is just the snippet I'm using for all generic walking in my scripts. So like when walking to Lumbridge Bank I'm doing ...

    Area bankArea = BankLocation.LUMBRIDGE.getArea(3);
    
    walkTo(bankArea);
    

    Code in my first post shows what walkTo does. 

     

    This specific code will cause the character to walk to the kitchen in the castle and spin for a bit, climb stairs, walk to first room on that floor and spin for a bit, then climb stairs and go to bank. Sometimes it will start combat if one of the men is standing near the stairs and never make it up. Is that normal behavior for method, or am I just doing something wrong?

    Posted

    i dont think the walker supports the full castle, just the bank & wheel correct me if im wrong. 
     
    also if u add:  

    if (getWalking().shouldWalk()) { 
        getWalking().walk(area.getRandomTile);
    } 
     

    it wont spam click which might help in this situation 

     

    to support the full castle just add some node's

    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.