Path finder script command

why i can’t use path finder as first script line?
just to make script working from any town

Because it must be able to detect that it is the correct town. Click in town spawn then do it.