How do I get my NPC back into my house from down a cave?

My merchant is stuck a long way down in a cave and I'd like to get him back into my house. I can't make a track back up because it would take an extremely long time. Any ideas?


Solution 1:

+1 to Havatra, however his answer is incomplete.

The NPC will only teleport back to its house when night falls. So when the sun is setting, leave your house, or if you do not have good enough weapons to survive the monsters, go out during the day and build a small shack to protect you. Dirt will work fine. An easy way to do this is to dig 3 blocks down and then place a roof on top. This leaves you with no room to move (unless you dig), but it is the easiest way to build a safe place for the night.

Another way to do this is to use a king/queen statue and wiring. A king statue will teleport a random male NPC, whereas a queen statue will teleport a female one. They will do this when they are activated by an active wire. This method however requires you to have progressed a fair bit into the game, by which time you will have many NPCs and the chance of teleporting the merchant is quite small.

Solution 2:

As long as your NPC is a part of a suitable housing, the NPC will magically despawn and respawn in his/her house when you are not looking. With other words, just move far enough away from the housing, and do something else meanwhile. Most likely, the next time you go back to the house, he'll be there.