View Single Post
10/15/14, 11:01 AM   #10
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by Garkin View Post
If messages are correcly displayed in the chat, there must be something wrong in your code (like single = instead of double == in the condtion). Chat doesn't use anything else then messageType.

Lua Code:
  1. function ChatMessageChannel(eventCode, messageType, fromName, text, isFromCustomerService)
  2.     if messageType == CHAT_CHANNEL_WHISPER then
  3.         fromName = IsDecoratedDisplayName(fromName) and fromName or zo_strformat(SI_UNIT_NAME, fromName)
  4.         d(fromName)
  5.         if IsFriend(fromName) then
  6.             d("A friend just whispered you")
  7.         end
  8.     end
  9. end
  10.      
  11. EVENT_MANAGER:RegisterForEvent("MyAddonName", EVENT_CHAT_MESSAGE_CHANNEL, ChatMessageChannel)

Message types are listed here: http://wiki.esoui.com/Globals#MsgChannelType
Oh ok. I'll try that later, thanks again!
  Reply With Quote