npcTalk

npcTalk is an addon intended primarily for roleplayers. It makes /say and /emote chat messages written in a certain format appear to actually be performed by the chosen NPC in the chat frame of anyone using the addon (example in the screenshot). Furthermore, anyone with the addon will not see chat bubbles for the sending player when they make an NPC talk, to avoid ruining immersion.

It also provides slash commands to make it easy to send messages with this format. You can either use a target NPC, or use any custom name you want.

People that don't have the addon will see you saying or performing the text/emote instead, prefixed by a tag with the NPC name.

Usage:

To make an NPC 'talk', use one of the following slash commands:

/npcs, /npcsay message - if an NPC is targeted, make the target NPC speak the message. Else, if a name is memorised, use the memorised NPC name.
/npce, /npcme, /npcem, /npcemote emote - if an NPC is targeted, make the target NPC perform the emote. Else, if a name is memorised, use the memorised NPC name.
/npctalk setname - Memorise the name of an NPC (this can be anything you want, so you can make your own NPCs) to use when no NPC is targeted.
/npctalk get - Show the currently memorised name.
/npctalk clear - Reset the memorised name. The memorised name can also be overwritten by setting a new one.

You can also type /npctalk at any time, or view the in-game options panel, to see an overview of these commands.

2.0.0

NOTE: not backwards compatible with earlier versions.

Emote channel is now used for /say messages as well to prevent the sender's character performing a /say emote.
You can now use your current target to store a name with /set instead of having to specify the name manually.
Code improvements for future maintainability.

Making an NPC talk now no longer shows a chat bubble above the sending player's head.
Added a 'get' command to show the currently memorised name (in case you forgot).
Made instructions a little more clear.
ToC bump for patch 5.4.

Someone will then ask: "Hey, who are you speaking to, noone's here?" "Hae? Don't you see Dave sitting right here", I would reply. "Hm, do you have an imaginary friend?", he will ask. "But you just heard him speaking too, right?", I will laugh back

To anyone without the addon, it'll appear as if you are saying/emoting the message, with the prefix [npc:npcname] at the start. For example:

[Cavanoskus]: [npc:Reese Langston] thinks you are awesome.

I thought it was best to at least let people without the addon know what's going on. The 'npc' prefix is needed because otherwise it might conflict with how some people type emotes already (e.g. prefixed by [low]).