That's all pathing related things which si done by the webwalker and has nothing to do with the script though.
The webwalker will use the spirit trees if it has the quest finished, but only if the quest is finished, will check it out but pretty sure It does use it for me to the village and uses Elkoy. But the webwalker doesn;t always picks the shortest path, it's pretty unhumanlike to always walk the exact same shortest path.