*NOTE* There's a probably a much more better way to do this, but this should work too.
You should look in NPCCombat.java for this:
Where it says addWalkSteps, that's the place where you're gonna add your exception.
After that, you're gonna have to go in Entity.java(where addwalksteps is) and make a custom one and make the npc do a ForceMovement (if that's possible) and then a FT. So it should look like this in processNPC:
Code:
if (getId() == X) {
addRunSteps(target.getX() + 1, npc.getY(), npc.getPlane());//One of the three
}
and a method like that in ForceMovement:
Code:
public void addRunSteps(int tox, int toy, int plane) {
if(this instanceof NPC) {
NPC npc = (NPC) this;
//npc.setNextRender(X); No methods for npc I believe ;s
int steps = getForceMovementTime(tox, toy);
WorldTile tile = new WorldTile(tox, toy, plane);
npc.setNextForceMovement(new ForceMovement(tile, steps));
WorldTasksManager.schedule(new WorldTask() {
@Override
public void run() {
npc.setNextWorldTile(tile);
}
}, steps);
}
}
And then you make a getForceMovementTime that returns the time of the forcemovement depending on the distance : (tox^2 * toy^2) = distance^2.