jazberry 1 Posted August 10, 2017 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)); } }
Cardozz 46 Posted August 11, 2017 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.
jazberry 1 Author Posted August 11, 2017 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?
Nex 2546 Posted August 11, 2017 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.