Were you standing in the exact position I gave? 2945,3335.
Because using your code in my script has the same error. Modified the script to run exactly to that space. WebWalk uses Banks.FALADOR_WEST, spammed with Exceeded attempt threshold.
import org.osbot.rs07.script.Script;
import org.osbot.rs07.event.WalkingEvent;
import org.osbot.rs07.event.WebWalkEvent;
import org.osbot.rs07.event.webwalk.PathPreferenceProfile;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.map.constants.Banks;
import org.osbot.rs07.script.ScriptManifest;
import java.awt.*;
@ScriptManifest(author = "Razeth", info = "Walking Bug", name = "Walking Bug", version = 0.01, logo = "")
public class main extends Script {
@Override
public void onStart() {
log("Script started");
}
private enum State {
TRAVEL2GEM,
TRAVEL2GEM_WALK,
TRAVEL2BANK
};
private State getState() {
if(myPlayer().getPosition().distance(new Position(2945,3335,0))>3) return State.TRAVEL2GEM;
if(myPlayer().getPosition().distance(new Position(2945,3335,0))>0) return State.TRAVEL2GEM_WALK;
return State.TRAVEL2BANK;
}
@Override
public int onLoop() throws InterruptedException {
// Am I moving? If so do nothing
if(myPlayer().isMoving()) return(random(2000, 3000));
// Initialise Locals
int tempX = 0;
int tempY = 0;
WebWalkEvent oEvent;
PathPreferenceProfile oPPP;
// Get Next State
switch(getState()) {
case TRAVEL2GEM:
// Set ourself to walk to West Falador bank then walk there
tempX = 2945;
tempY = 3335;
log("WebWalking to Gem Store ("+tempX+","+tempY+")");
oEvent = new WebWalkEvent(new Position(tempX, tempY, 0));
oPPP = new PathPreferenceProfile();
oPPP.setAllowObstacles(false);
oPPP.setAllowTeleports(true);
oEvent.setPathPreferenceProfile(oPPP);
execute(oEvent);
break;
case TRAVEL2GEM_WALK:
// Set ourself to walk to West Falador bank then walk there
tempX = 2945;
tempY = 3335;
log("Normal walking to Gem Store exact pos ("+tempX+","+tempY+")");
WalkingEvent oWalkEvent = new WalkingEvent(new Position(tempX, tempY, 0));
oWalkEvent.setMinDistanceThreshold(0);
execute(oWalkEvent);
break;
case TRAVEL2BANK:
// Set ourself to walk to West Falador bank then walk there
log("WebWalking to West Falador Bank");
oEvent = new WebWalkEvent(Banks.FALADOR_WEST);
oPPP = new PathPreferenceProfile();
oPPP.setAllowObstacles(true);
oPPP.setAllowTeleports(true);
oEvent.setPathPreferenceProfile(oPPP);
oEvent.prefetchRequirements(getBot().getMethods());
execute(oEvent);
break;
}
return random(400, 800);
}
@Override
public void onExit() {
log("Script ended");
}
@Override
public void onPaint(Graphics2D g) {
}
}
WalkExample.jar
EDIT: Got someone else to test it and I'm not crazy! They get the same issue! Strangely enough, they noticed if you run it with the door CLOSED, it'll use a Fally tele tab to get out. Door open, can't find a path