Lua Code:
local unitname = GetUnitName("interact")
Works fine.
You must interact with the NPC while executing this code.
exemple using :
Lua Code:
EVENT_MANAGER:RegisterForEvent("addon", EVENT_CHATTER_BEGIN, letstalk)
If you want to use QUEST events, you need to use EVENT_QUEST_OFFERED