Once the webwalk is called, that's all the bot will focus on until the task is complete, but it doesn't handle al-kharid gate and I need a way to interrupt it mid event and interact with the gate:
if (!getArea(location).contains(myPlayer())) {
getWalking().webWalk(getArea(location).getRandomPosition());
RS2Object gate = getObjects().closest("Gate");
if (gate != null) {
if (gate.hasAction("Pay-toll(10gp)")) {
gate.interact("Pay-toll(10gp)");
}
}
}
I also tried placing the gate interaction before the walk event but obviously that still doesn't work.