Thread Tools Display Modes
01-04-21, 07:33 PM   #1
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
Macro for Battleground Defence

Code:
/run SendChatMessage(string.format("{Triangle} %s {Triangle} - CLEAR",GetMinimapZoneText()),select(2,GetInstanceInfo())=="pvp" and "BATTLEGROUND" or GetNumWorldStateUI()>0 and "RAID" or "YELL")
I used to have a bunch of BG macros for yelling "Incoming" "Clear" and "HELP"... but I started a new toon to level in BGs this time and they no longer work.. can anyone help me?

The macro is supposed to automatically call out the BG location I am standing in when I press it.

Last edited by Jynks : 01-04-21 at 07:49 PM.
  Reply With Quote
01-04-21, 08:30 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
The WorldStateFrame was removed, so GetNumWorldStateUI no longer exists. All extra info frames, such as capture bars under the minimap, world pvp zones, battleground information, and so on was consolidated into a central UIWidgetManager. However, you should just check if you're in a raid to use the RAID channel. Using that macro in an area with an active widget while not in a raid will give a chat message saying you're not in a raid.

/run SendChatMessage(string.format("{Triangle} %s {Triangle} - CLEAR",GetMinimapZoneText()),select(2,GetInstanceInfo())=="pvp" and "BATTLEGROUND" or IsInRaid() and "RAID" or "YELL")
  Reply With Quote
01-05-21, 08:49 AM   #3
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
Hey thanks man... I tried your macro and it seemed to yell in stormwind fine but it wouldn't print out in the battleground to the instance chat... I said /i hello it is was "active" on a enter to chat into it...
  Reply With Quote
01-12-21, 08:34 PM   #4
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
Any one able to modify this to work? Teh changes do not seem to send to the battleground instance chat?
  Reply With Quote
01-13-21, 07:37 PM   #5
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Ah, my bad. "BATTLEGROUND" was removed a long time ago. All instances use "INSTANCE_CHAT" instead.

Code:
/run SendChatMessage(string.format("{Triangle} %s {Triangle} - CLEAR",GetMinimapZoneText()),select(2,GetInstanceInfo())=="pvp" and "INSTANCE_CHAT" or IsInRaid() and "RAID" or "YELL")
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Macro for Battleground Defence

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off