Is this a lua question? Windower, or original game?
Any kind of solution that would stop the annoying behavioer.
I think he's looking for something that if the follow target gets lost they stop and stand still. The only success I've had with something like that is using a shitty follow feature with a cure bot. I never liked using them because they don't move when I want them to and the character ends up stuck in terrain.
Those always seems to be really bad at movement. I prefer the game built in /follow/ with the exception of lag/zoning makes thme run off instead of just stopping.