Counterspell macro

Anybody see any problems with a counterspell macro like the following.

/stopcasting
/cast Counterspell
/script if GetNumRaidMembers() > 0; then c="raid"; elseif GetNumGroupMembers() > 0; then c="party"; else c="say"; m=UnitName("target"); s="Counterspelling "..m; SendChatMessage(s,c)

One of the things I would like to do is check the result of /cast so check it worked successfully but I can't actually see a way of doing this.

Thought's picture

@ Thu, 10/01/2008 - 11:48

i just use

/stopcasting
/cast Counterspell

the script warning that i counterspelled something, i think its a bit useless, unless u have a counterspell rotation, in that case maybe some changes , and instead of telling the raid/party that i used CS, send a whisper to the next fellow to do CS.

if so , just add a /w "name" CS done, your next or something like that Sticking out tongue

Darkpilgrim's picture

@ Thu, 10/01/2008 - 15:02

Disclaimer: I know little to nothing about lua and the WoW api, but it seems that you need to create a hidden frame and register it for the relevant combat event rather than bother trying to get a return from a cast function (becuse these are all blocked unless you are writing a Blizzard endorsed mod)

http://www.wowwiki.com/Events_%28API%29

GL

"My DPS was like a wet sock, my healing a dry one..." - Mandos Darklord 23.08.07

May your enemys die looking into your eyes as you smile and twist the sword.

"Taste my lightning fuckers!" - The Devil, 2007

@ Thu, 10/01/2008 - 16:38

Cleo, The script to check and say in party or raid does not seem to work any longer. I used to have the same for Portals announcement, it worked fine pre-aptch 2.something, than not any more. So I replaced it by simply /ra and /p chat Eye-wink

Always look at the bright side of WoW... didam, dida, didadidadidam...

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <blockquote> <pre> <img>
  • Lines and paragraphs break automatically.
  • You may quote other posts using [quote] tags.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options