I am trying to write a script in retail that can be used in a macro that will output a chat message to the correct channel based on the type of group I am in. Either Raid/LFR, Instance/LFG or Party.
I have done some searching and found a range of older scripts using now outdated API commands. But using these examples with the updated API commands I have hacked together what I think it should be based on my very limited code knowledge and as expected it does not work.
Here is what I have:
`
/run local C; if (IsInRaid()=TRUE) then C=“RAID”; elseif (IsInGroup(LE_PARTY_CATEGORY_INSTANCE)=TRUE) then C=“INSTANCE”; else C=“PARTY”; end SendChatMessage(“custom_chat_message_here!”,C);
`
Can anyone offer any advice or corrections to make this work as I am wanting it to work? Would be much appreciated, thanks.