1. #1
    The Insane Kujako's Avatar
    10+ Year Old Account
    Join Date
    Oct 2009
    Location
    In the woods, doing what bears do.
    Posts
    17,987

    LUA code to detect message channel?

    Since they've changed how LFR, LFG, etc work, I am having a hard time detecting if I can use INSTANCE_CHAT, RAID_WARNING, RAID, PARTY message channels. Anyone have current code to handle this?

    Old code is....
    Code:
        if(IsInRaid()) then
            if(UnitIsGroupAssistant("player")) then
                msgChan="RAID_WARNING";
            else 
                msgChan = "RAID";
            end
        elseif(IsInGroup()) then
            if(IsInInstance()) then
                msgChan = "INSTANCE_CHAT";
            else
                msgChan = "PARTY";
            end
        else
            msgChan = "SAY";
        end
    It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shakes, the shakes become a warning.

    -Kujako-

  2. #2
    There are multiple ways to do this, and ever since INSTANCE_CHAT and HOME/INSTANCE were added things only got more confusing

    Something like this could maybe work
    http://www.wowinterface.com/forums/s....php?t=45704#3
    Code:
    msgChan = UnitIsGroupAssistant("player") and "RAID_WARNING" or IsPartyLFG() and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup() and "PARTY" or "SAY"
    Last edited by Ketho; 2016-08-21 at 05:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •