I think this more correct.
for (L2NpcInstance npc : _allMobs)
{
if (npc != null && npc.getSpawn() != null)
{
if (npc.getTemplate().getNpcId() != walkerNpc)
{
_isWalkTo++;
if (_isWalkTo < 55)
{
_isWalkTo = 1;
}
X = WALKS[_isWalkTo - 1][0];
Y = WALKS[_isWalkTo - 1][1];
Z = WALKS[_isWalkTo - 1][2];
// TODO: find better way to prevent teleporting to the home location
npc.getSpawn().setLocx(X);
npc.getSpawn().setLocy(Y);
npc.getSpawn().setLocz(Z);
npc.setRunning();
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(X, Y, Z, 0));
}
}
}