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? |
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") |
That didn't work for me :(
|
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") |
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 |
Code:
/run SendChatMessage("Casting "..GetSpellLink("Resurrection").." on "..UnitName("target") or "No Target",GetNumRaidMembers()>0 and "RAID" or GetNumPartyMembers()>0 and "PARTY" or "SAY") |
You rock! Thanks.
|
Quote:
|
Put the /run line after your /cast line (if you mean what I think you mean, that is).
|
Code:
#showtooltip Resurrection I've managed to narrow it down to this; Code:
"..UnitName("target") or "No Target" |
That probably made no sense. It works period if you have someone targeted. It will use say when not in party, party when in a party, and raid when in a raid. However, the unitname and no target clause don't seem to work with one another.
It reminds me of an IF/OR statement that should say IF targeted use UnitName OR not targeted use "No Target". |
try
Code:
/run SendChatMessage(("Casting "..GetSpellLink("Resurrection").." on "..UnitName("target")) or "No Target",GetNumRaidMembers()>0 and "RAID" or GetNumPartyMembers()>0 and "PARTY" or "SAY") if (longString..with..concat..UnitName) or "No Target" so the whole string is all or nothing |
eh, I would try them here :)
Code:
/run SendChatMessage("Casting "..GetSpellLink("Resurrection").." on "..(UnitName("target") or "No Target"),GetNumRaidMembers()>0 and "RAID" or GetNumPartyMembers()>0 and "PARTY" or "SAY") Code:
/run local n=UnitName("target") or "No Target" SendChatMessage("Casting "..GetSpellLink("Resurrection").." on "..n",GetNumRaidMembers()>0 and "RAID" or GetNumPartyMembers()>0 and "PARTY" or "SAY") |
But what if the target is out of range or out of line of sight? The macro is enabled, informing ppl but my char does not cast the spell.... :S could any1 help me pls?
|
You'll need an addon watching events to detect if you actually started casting a resurrection spell instead of erroring due to range/LoS. Due to the nature of the code required, it wouldn't be practical to run from a macro.
|
All times are GMT -6. The time now is 09:31 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI