Add this to your following class if you don't already have it. If you already have it, replace it.
Code:
public static void stepAway(Player playerObject) {
if (Region.getClipping(playerObject.getX() - 1, playerObject.getY(), playerObject.heightLevel, -1, 0))
playerObject.getPA().walkTo(-1, 0);
else if (Region.getClipping(playerObject.getX() + 1, playerObject.getY(), playerObject.heightLevel, 1, 0))
playerObject.getPA().walkTo(1, 0);
else if (Region.getClipping(playerObject.getX(), playerObject.getY() - 1, playerObject.heightLevel, 0, -1))
playerObject.getPA().walkTo(0, -1);
else if (Region.getClipping(playerObject.getX(), playerObject.getY() + 1, playerObject.heightLevel, 0, 1))
playerObject.getPA().walkTo(0, 1);
}
Still in following you should find a method along the lines of;
Code:
public static void player(Player p) {
In that method remove this
Code:
if(sameSpot) {
stepAway(p);
p.faceUpdate(p.followId + 32768);
return;
}
In the attackPlayer function in CombatAssistant, add this.
Code:
if(c.absX == PlayerHandler.players[i].getX() && c.absY == PlayerHandler.players[i].getY()) {
Following.stepAway(c);
return;
}
Also, there is a following issue which pertains to the attackPlayer method where the player tries to stop his diagonal movement. This causes the player the move along the x-axis of the map until the x is equal to that of your opponent.