WoW:API FollowUnit
FollowUnit("UnitID")
Can only follow allies
Q: Is there a way to stop following from a script? Before patch 1.6 you could issue a movement command to stop following, but that is no longer an option.
A: Try this: /script MoveForwardStart(0) /script MoveForwardStop(0)
Which starts you moving (thus breaking the follow), and then immediately stops (Which means you stay in one place).