Create a quest and go to topics. On the left should be a vertical white bar. Right click and select "create new topic" or "add topic" I forget which one it says. Then there should be another vertical bar full of words. right click and create a new topic. name it. It should add it to the original white bar. From there, highlight it and go to the right to a horizontal white box. right click and add new info. Might have to go through the same steps as last time...Haven't done this in a while. fill in what ever you want the NPC to say and make sure you have him selected as a reference. the small box below the topics box should be where you type what the player says. You don't have to fill it in. Then there's another box you don't have to worry about below it. But below that are some options you can check. One says "goodbye" check that, and once the NPC says it's line, the conversation will be over.
There's a tutorial on this on Nexus.