Ok first things first, i am not sure if it is a bug or if i can do something about it. But in certain situations the webwalking fails me with "WebWalkingEvent; Terminated! Exceeded attempt threshold."
I am quite confused what does that mean. I know that the path exists. The same webwalking snippet found the path from other positions. For example when this occurs to me is when i webwalk to Vannaka. I have varrock tele and brass key in inventory, along with few other teles (dueling,games,falador,camelot). It works from most places, i have webwalked there from several different banks (lumby,camelot,castle wars and maybe others i dont remember all), but when i try to webwalk from varrocks northern prayer altar it fails with the mentioned output. I even paused the script, trying walking a bit south, that did not fix it, but when i teleproted to falador and then tried, it worked again.
Area i am walking from (the prayer altar) : new Area(new Position(3252,3485,0),new Position(3255,3484,0));
Area i am walking to (around Vannaka) : new Area(new Position(3145,9915,0),new Position(3148,9912,0));
This is the snippet i use for webwalking :
public static void webWalkToDest(Area destination,Script script){
WebWalkEvent event = new WebWalkEvent(destination);
PathPreferenceProfile ppp = new PathPreferenceProfile();
ppp.setAllowObstacles(true);
ppp.setAllowTeleports(true);
event.setPathPreferenceProfile(ppp);
event.prefetchRequirements(script.getBot().getMethods());
script.execute(event);
}
How can i get around this? Is there a way, can i maybe increase the treshold somehow? is it a bug? I am not sure, any advice would be appreciated.
Most of all i dont understand how do i reach the treshold when i am closer to the target location than when i am not.