Hmm, I think I know a method for this. Unfortunately, it will use about 50 variables and 500 conditional branches for every single town.
But here it is anyway.
@>Control Variables: [0001: NPC X] = NPC's Map X
@>Control Variables: [0002: NPC Y] = NPC's Map Y
@>Control Variables: [0003: Door X] = Door's Map X
@>Control Variables: [0004: Door Y] = Door's Map Y
@>Control Variables: [0001: NPC X] -= [0003: Door X]
@>Control Variables: [0002: NPC Y] -= [0004: Door Y]
That code stores the coordinates of the NPC event and the Door event in variables, then subtracts the Door value from the NPC value. That basically gives you the distance between the two events. If the value is positive, the NPC is to the right of or below the Door; if the value is negative, the NPC is to the left of or above the door.
After that, you could do a series of conditional branches checking the distance and using "Set Move Route" to make the NPC walk to the door.
And there you have it. An extremely tedious and time-consuming event system. Now, there are STILL bugs with this-- making the NPC avoid trees, water, stuff like that. But that's about as far as you can get with eventing (unless you want to check if the player is near every single impassable tile and work off that).
Basic summary: scrap that idea. Use a pathfinding script.