Hi all,
I had an old addon that prints in a chosen channel when someone died and for what it is happened.
Now I have expanded it with the announces also of the spells interrupts/dispell/steals.
But the problem is that it only randomly works.
It never, never, SendChatMessage the spell interrupts/dispell in the channel chosen but it works only with a simple print().
It sometimes SendChatMessage the death of someone in the chosen channel, and always works with print().
I know that now SendChatMessage() is a restricted in outdoor for the the "SAY", "YELL" and others.
But it should work in INSTANCE/GUILD and other channel as well without problems.
The code I use is something similar to these:
Lua Code:
local msg = "This is the message of the death or of the interrupted spell"
if CONFIGURED_CHANNEL == "GROUP" then
SendChatMessage(msg, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and 'INSTANCE_CHAT' or IsInRaid() and 'RAID' or IsInGroup() and 'PARTY' or 'SAY')
else
print(msg)
end
Lua Code:
local msg = "This is the message of the death or of the interrupted spell"
if CONFIGURED_CHANNEL == "GROUP" then
if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
channel = "INSTANCE_CHAT"
elseif IsInRaid() then
channel = "RAID"
elseif IsInGroup() then
channel = "PARTY"
else
channel = "SELF"
end
SendChatMessage(msg, channel)
else
print(msg)
end
Both versions doesn't work
Could be related to the fact that sometime this is triggered while in combat sometime while I am out of combat ?
Or there is something else I am missing ?
Basically I can simplify it because what I want to achieve is to find a method to announce what was happening to the party members.
.... If possible
Thanks for any helps.