Update dialog.js

Changes on how the dialog works with the new NPC system. Pretty much almost the same, the NPCs are created by a script now.