wavefloat Posted January 4 Share Posted January 4 Hi there. So I've tried to call on web walking a couple different ways. Each time the script gets to the part where a destination is found, it fails to walk there via web walk. Console spits out this error: WebWalkingEvent; No route found! Here's my code, please assist. it'd be greatly appreciated public void walkCow() throws InterruptedException { sleep(2000); // Find the nearest cow Entity cow = getNpcs().closest("Cow"); log("Finding cow"); // Check if a cow is found if (cow != null) { // Get the position of the cow Position cowPosition = cow.getPosition(); log("Cow located!"); // Walk to the position of the cow if (cowPosition != null) { if (getWalking().webWalk(cowPosition)) { log("Walking to the cow"); } else { log("Failed to find a route to the cow!"); } } } else { // If no cow is found, walk to the nearest tree RS2Object tree = getObjects().closest("Tree"); log("No cow found, walking to the nearest tree"); // Check if a tree is found if (tree != null) { // Get the position of the tree Position treePosition = tree.getPosition(); // Walk to the position of the tree if (treePosition != null) { if (getWalking().webWalk(treePosition)) { log("Walking to the tree" + treePosition); } else { log("Failed to find a route to the tree! trying again" + treePosition); walkLol(); } } } else { log("No tree found either. Nowhere to walk!"); } } } and here is walkLol public void walkLol() throws InterruptedException { WebWalkEvent walkLol = new WebWalkEvent(new Position(3215, 3456, 0)); walkLol.useSimplePath(); execute(walkLol); log("im trying lol"); pls help Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted January 5 Share Posted January 5 16 hours ago, wavefloat said: Hi there. So I've tried to call on web walking a couple different ways. Each time the script gets to the part where a destination is found, it fails to walk there via web walk. Console spits out this error: WebWalkingEvent; No route found! Here's my code, please assist. it'd be greatly appreciated public void walkCow() throws InterruptedException { sleep(2000); // Find the nearest cow Entity cow = getNpcs().closest("Cow"); log("Finding cow"); // Check if a cow is found if (cow != null) { // Get the position of the cow Position cowPosition = cow.getPosition(); log("Cow located!"); // Walk to the position of the cow if (cowPosition != null) { if (getWalking().webWalk(cowPosition)) { log("Walking to the cow"); } else { log("Failed to find a route to the cow!"); } } } else { // If no cow is found, walk to the nearest tree RS2Object tree = getObjects().closest("Tree"); log("No cow found, walking to the nearest tree"); // Check if a tree is found if (tree != null) { // Get the position of the tree Position treePosition = tree.getPosition(); // Walk to the position of the tree if (treePosition != null) { if (getWalking().webWalk(treePosition)) { log("Walking to the tree" + treePosition); } else { log("Failed to find a route to the tree! trying again" + treePosition); walkLol(); } } } else { log("No tree found either. Nowhere to walk!"); } } } and here is walkLol public void walkLol() throws InterruptedException { WebWalkEvent walkLol = new WebWalkEvent(new Position(3215, 3456, 0)); walkLol.useSimplePath(); execute(walkLol); log("im trying lol"); pls help If you are going to want to walk to a tile that's unwalkable you might run into these issues. For exmaple the tree position is obviously unwalkable as it's blocked by the tree. What you can do to solve this is either get a proper position or create a area around the position and walk to the area instead. Try something like this: Position treePosition = tree.getPosition(); Area treeArea = treePosition.getArea(3); getWalking().webWalk(treeArea); 1 Quote Link to comment Share on other sites More sharing options...
wavefloat Posted January 5 Author Share Posted January 5 7 hours ago, Khaleesi said: If you are going to want to walk to a tile that's unwalkable you might run into these issues. For exmaple the tree position is obviously unwalkable as it's blocked by the tree. What you can do to solve this is either get a proper position or create a area around the position and walk to the area instead. Try something like this: Position treePosition = tree.getPosition(); Area treeArea = treePosition.getArea(3); getWalking().webWalk(treeArea); you're a beautiful person, code works now. thank you so much 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted January 6 Share Posted January 6 17 hours ago, wavefloat said: you're a beautiful person, code works now. thank you so much No worries! Quote Link to comment Share on other sites More sharing options...