Thread Tools Display Modes
09-20-10, 08:34 PM   #1
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
Resurrection Macro

I'm trying to do two things with a macro. I don't know how to do it tho.

Cast Resurrection

Say "(Resurrection) on 'PlayerName'". I want the (Resurrection) to be the actual spell link. I want it to use raid or party depending on whether im in raid or not.

Possible?
__________________
  Reply With Quote
09-20-10, 09:35 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you just want it to send the message every time you press the button:

/run SendChatMessage(GetNumRaidMembers()>0 and "RAID" or "PARTY","Casting "..GetSpellLink("Resurrection").." on "..UnitName("target") or "No Target")
  Reply With Quote
09-20-10, 09:46 PM   #3
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
That didn't work for me
__________________
  Reply With Quote
09-20-10, 10:20 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Phanx has the arguments switched around. Should be message first:

Code:
/run SendChatMessage("Casting "..GetSpellLink("Resurrection").." on "..UnitName("target") or "No Target",GetNumRaidMembers()>0 and "RAID" or "PARTY")
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-20-10, 10:29 PM   #5
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
Worked.. however, if I'm not in a party and I want to rez a nube who happen to get killed by the environment, this pops.

Date: 2010-09-20 23:29:02
ID: 1
Error occured in: Global
Count: 1
Message: [string "SendChatMessage("Casting "..GetSpellLink("R..."] line 1:
attempt to concatenate a nil value
Debug:
(tail call): ?
[C]: ?
[string "SendChatMessage("Casting "..GetSpellLink("R..."]:1: in main chunk
[C]: RunScript()
..\FrameXML\ChatFrame.lua:1996: value()
..\FrameXML\ChatFrame.lua:4070:
..\FrameXML\ChatFrame.lua:3997
[C]: ChatEdit_ParseText()
..\FrameXML\ChatFrame.lua:3660: ChatEdit_SendText()
..\FrameXML\ChatFrame.lua:2477:
..\FrameXML\ChatFrame.lua:2470
[C]: ?
[C]: UseAction()
..\FrameXML\SecureTemplates.lua:310: handler()
..\FrameXML\SecureTemplates.lua:529:
..\FrameXML\SecureTemplates.lua:478
__________________
  Reply With Quote
09-21-10, 02:19 AM   #6
Guardix
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 42
Code:
/run SendChatMessage("Casting "..GetSpellLink("Resurrection").." on "..UnitName("target") or "No Target",GetNumRaidMembers()>0 and "RAID" or GetNumPartyMembers()>0 and "PARTY" or "SAY")
Simply added a GetNumPartyMembers() and make it use "SAY" if you are not in raid nor party.
__________________
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Resurrection Macro


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