Reply
 
Thread Tools Display Modes
Unread 01-21-13, 12:26 AM   #1
Flaer
A Murloc Raider
Join Date: Sep 2006
Posts: 6
Announce to Raid Chat issue

I've been using the mouseover macro below to both whisper the target I cast my battle rez on and announce it to the raid but since 5.1 changed GetRealNumRaidMembers the raid chat announce doesn't work anymore. Does anyone have insight into what I'd need to change to make it work again? I'd also like it to stop the whisper to the target if the spell doesn't fire but I haven't been able to figure that part out. Lastly, I never PvP so the Battleground part can be removed if it's unneeded but I don't know if that's the case. Thanks.

Code:
#showtooltip Raise Ally
/stopmacro [@mouseover,nodead]
/cast [@mouseover,dead,help][@target,dead,help][]Raise Ally
/run SendChatMessage("Raise Ally cast on you. Rise up and fight!!","WHISPER",nil, UnitName("mouseover") or UnitName("target"))
/stopmacro [nogroup][@mouseover,nodead]
/run SendChatMessage("Aethran cast Raise Ally on "..UnitName("mouseover")..".", GetRealNumRaidMembers() > 0 and "RAID" or GetNumRaidMembers() > 0 and "BATTLEGROUND" or GetNumPartyMembers() > 0 and "PARTY" or "SAY")
Flaer is offline   Reply With Quote
Unread 01-21-13, 03:01 AM   #2
Sharparam
A Warpwood Thunder Caller
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 93
Changing the last line to this should work:
Code:
/run SendChatMessage("Aethran cast Raise Ally on "..UnitName("mouseover")..".", UnitInBattleground("player") and "BATTLEGROUND" or IsInRaid() and "RAID" or IsInGroup() and "PARTY" or "SAY")
Note that I haven't tested it.

Edit: Changed to IsInRaid and IsInGroup instead of checking player count.

Last edited by Sharparam : 01-21-13 at 03:03 AM.
Sharparam is offline   Reply With Quote
Unread 01-21-13, 03:04 AM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
Change the last line to:
Code:
/run SendChatMessage("Aethran cast Raise Ally on "..UnitName("mouseover")..".", IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup() and "PARTY" or "SAY")
Uses IsInRaid/IsInGroup, but also supports the INSTANCE_CHAT channel added in 5.1 for LFG/LFR/battleground groups.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-21-13, 03:09 AM   #4
Sharparam
A Warpwood Thunder Caller
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 93
Ah, didn't realize IsInGroup took a parameter. I should start checking wowpedia and not just wowprogramming :P
Sharparam is offline   Reply With Quote
Unread 01-21-13, 07:40 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
Wowprogramming's documentation tends to be more consistent, but the problem is that it's only updated by a very small group of people (I don't actually know, but I'd guess 1-5 people) while anyone can add info to Wowpedia, so while the documentation can be inconsistent (eg. random functions not documented, writing quality varies wildly, some stuff is really outdated, etc.) it's also more thorough, with lots of notes and examples on usage, bugs, etc.

When in doubt, check the default UI code to verify current API usage. Blizzard is generally pretty bad at writing efficient code, but one thing they are good at is using descriptive variable names.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-22-13, 12:10 AM   #6
Flaer
A Murloc Raider
Join Date: Sep 2006
Posts: 6
Awesome, thanks guys!
Flaer is offline   Reply With Quote
Unread 01-22-13, 01:29 AM   #7
Sharparam
A Warpwood Thunder Caller
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 93
Originally Posted by Phanx View Post
the problem is that it's only updated by a very small group of people (I don't actually know, but I'd guess 1-5 people) while anyone can add info to Wowpedia
Just thought I should add, anyone can edit wowprogramming as well (I updated http://wowprogramming.com/docs/api/IsInGroup for example). But it probably doesn't have as many active editors as wowpedia does.
Sharparam is offline   Reply With Quote
Unread 01-22-13, 09:28 PM   #8
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,057
Originally Posted by Phanx View Post
Wowprogramming's documentation tends to be more consistent, but the problem is that it's only updated by a very small group of people (I don't actually know, but I'd guess 1-5 people) while anyone can add info to Wowpedia, so while the documentation can be inconsistent (eg. random functions not documented, writing quality varies wildly, some stuff is really outdated, etc.) it's also more thorough, with lots of notes and examples on usage, bugs, etc.

When in doubt, check the default UI code to verify current API usage. Blizzard is generally pretty bad at writing efficient code, but one thing they are good at is using descriptive variable names.
Anyone can edit WoWProgramming's API documentation - you simply need to make an account and start editing.

Edit: This is what I get for replying before reading later posts. Meh.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of Revelation, Spamalyzer, TravelAgent, Volumizer, and many other AddOns.
Torhal is offline   Reply With Quote
Unread 01-26-13, 02:54 PM   #9
Flaer
A Murloc Raider
Join Date: Sep 2006
Posts: 6
Anyone have insight into what change would be needed to stop the whisper if the spell doesn't activate?
Flaer is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » Macro Help » Announce to Raid Chat issue

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