I've been trying to find out whats wrong but i just can't find the mistake.
If i'm on the tile where i'm trying to go, nothing happens. ( this is correct )
But if i'm not on the tile all i see is the "Returning to exact AFK spot." get spammed on log and my character doesn't walk there.
Can someone point me to the right direction?
This is on my getState:
if (afk.contains(myPlayer()) && !(myPlayer().getX() == 2704) && !(myPlayer().getY() == 3726))
return State.AFKSPOT;
Position:
Position afkspot = new Position(2704, 3726, 0);
And this is my AFKSPOT case:
case AFKSPOT:
getWalking().walk(afkspot);
log("Returning to exact AFK spot.");
sleep(random(345, 825));
break;