http://forums.rpgmakerweb.com/index.php?/topic/3064-pathfinding/
Example of following the player at a distance, either using:
Event's custom move route (on repeat):
find_path($game_player.x, $game_player.y, 3)
Or set move route command in a loop:
find_path($game_player.x, $game_player.y, 0, true, 3)
You may also use find_path(x, y) (no ev or wait) inside of an event's
"Set Move Route..." command, using the "Script..." tab. This does the same
as above, but takes on the properties of the move route you are making,
including the affected character.
Wow. I'm an idiot.
I didn't realized it but yeah, that's an VX Ace script. Sorry about that.
Try out Modern's script.
In the custom move route, select script and put this-
find_path($game_player.x, $game_player.y)