[Classic] Macro for broadcasting dungeon group to multiple channels

I’m trying to make a macro so that I can broadcast a dungeon group to multiple channels. I have something that works so far but it’s limited and I would like some more advanced functionality.

This is what I have so far:

> /1 LF HEALER + DPS SM ARMOURY
> /2 LF HEALER + DPS SM ARMOURY
> /4 LF HEALER + DPS SM ARMOURY
> /5 LF HEALER + DPS SM ARMOURY
> /6 LF HEALER + DPS SM ARMOURY

Feature One:

Firstly If I ever want to switch dungeons I would not like to have to copy the dungeon 6 times for each channel. Can you have like a variable macros that defines the dungeon I want once, then use that variable in place of the actual text?

Something like this:

> string dungeon = “SM ARMOURY”;
> 
> /1 LF HEALER + DPS dungeon
> /2 LF HEALER + DPS dungeon
> /4 LF HEALER + DPS dungeon
> /5 LF HEALER + DPS dungeon
> /6 LF HEALER + DPS dungeon

Feature Two:

The other thing is more complex. Basically I would like it so when I call this macro it will join the global channels lfg, world and lookingforgroup. Then it broadcasts my message to all 6 channels as normal. And finally it leaves the 3 global channels lfg, world and lookingforgroup.

The reason I want to leave the global channels is because it’s annoying to keep open. So the idea is I can quickly join the global channels, broadcast my message, then leave the global channels again so I don’t have to see the global channels. All in one macro automatically.

It does already partially work I’m able to use another macro to join the global channels manually, then I can broadcast my message to the channels, then it automatically leaves the global channels.

Like this:

> /1 LF HEALER + DPS SM ARMOURY
> /2 LF HEALER + DPS SM ARMOURY
> /4 LF HEALER + DPS SM ARMOURY
> /5 LF HEALER + DPS SM ARMOURY
> /6 LF HEALER + DPS SM ARMOURY
> 
> /leave lfg
> /leave world
> /leave lookingforgroup

However If I try to automatically join the global channels first then do the rest of the command it ends up broadcasting to the trade chat, then joins the global channels, then it broadcasts to general chat. But it never broadcasts my message to the global channels even though I joined them.

This is the macro that does this:

> /join lfg
> /join world
> /join lookingforgroup
> 
> /1 LF HEALER + DPS SM ARMOURY
> /2 LF HEALER + DPS SM ARMOURY
> /4 LF HEALER + DPS SM ARMOURY
> /5 LF HEALER + DPS SM ARMOURY
> /6 LF HEALER + DPS SM ARMOURY
> 
> /leave lfg
> /leave world
> /leave lookingforgroup

Is there anything I can do with macros or addons that can achieve feature one and two?

Thanks.

first of all, make a new chat window for all the channels you dont want to see but want to post in.

Im currently not able to test it but second:

/script string=“lfm this and tthat for dungeon xy”
/script t={“1”, “2”, “4”, “5”} – the /number of the channels you want to post in
/script for i = 1, #t do SendChatMessage(string, nil, t[i]) end

no guarantee though
tell me if it worked please :wink:

Why are you using multiple /script statements?

Even worse, why are you overwriting the string table

See https://us.forums.blizzard.com/en/wow/t/classic-macro-for-broadcasting-dungeon-group-to-multiple-channels/403183

Gosh Im sorry I just stood up when I wrote that, replace the string with whatever letter

And if i only need a small script i use multiple /script for readability :stuck_out_tongue:

lol just make sure you declare your variables as local in the future.
also, if you wrap your code in code tags it wont smartquote the quotes

/run local msg,chan="lfm this and that for dungeon xy",{"1", "2", "4", "5"} for i = 1, #chan do SendChatMessage(msg, nil, chan[i]) end

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.