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