hello,
i'm using the EVENT_CHAT_MESSAGE_CHANNEL event to see if a friend is whispering me, it seems to be working properly but i'm friend that the message display even when its not a direct whisper and its even a "group chat" message to the group we are in. I'd only like to catch when someone whispers me directly rather than seeing the debug statement when the message is in group chat. any ideas?
Code:
function ChatMessageChannel(eventCode, messageType, fromName, text)
local pstPerson = zo_strformat(SI_UNIT_NAME, fromName)
if messageType == CHAT_CATEGORY_WHISPER_INCOMING and then
d(pstPerson)
if (IsFriend(pstPerson)) then
d("A friend just whispered you")
end
end
end