Reply
Thread Tools Display Modes
Unread 07-28-12, 04:53 AM   #1
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
Question /stopcasting limitations

I'm interested in having my macro only "/stopcasting" if certain conditions are either met or not met. For example, this is a useful macro for a mage (in certain, specific situations):
Code:
#showtooltip Pyroblast
/stopcasting
/cast Pyroblast
However, it'd be infinitely more useful if it "stopcasting only if casting anything other than Pyroblast". In other words, if Pyroblast is currently casting, don't do anything.

Anyway, I just wanted to make sure that this wasn't possible already before I write an addon to create a version of /stopcasting that has more bells and whistles.

Thanks!
Aelorean is offline   Reply With Quote
Unread 07-28-12, 05:30 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 764
Sadly I think it's only possible to check with "channeling" like "channeling:Spellname" but since it's a cast and not channel, I think the creativity with the macro logic ends here.


Not sure why we have channeling but not also casting, really odd.
Vlad is offline   Reply With Quote
Unread 07-28-12, 12:20 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,025
The [channeling] condition indeed only works on channeled spells. This is to add the option to limit what you do so you don't interrupt a channel you're already in the progress of casting. There is no check to see if you're already casting another type of spell. Since the API function behind it is protected, no addon code can change its behavior.

An example of a macro using what [channeling] was meant for.
Code:
/cast [nochanneling] Barkskin
/cast Hurricane
This is a simple Druid Hurricane macro. Note Hurricane is a channeled spell. When chain casting, this ensures Barkskin is only cast when Hurricane isn't already in effect. Otherwise, casting Barkskin will interrupt the channel of a previous Hurricane.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-28-12 at 12:27 PM.
SDPhantom is offline   Reply With Quote
Unread 07-28-12, 12:39 PM   #4
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
Since the API function behind it is protected, no addon code can change its behavior.
My thought was to create a simple addon that adds a new command that works the same way as /stopcasting but has conditional arguments ...something like "/scasting ifcasting <abilityname>" or "/scasting ifnotcasting <abilityname>"

I just assumed that the addon API would have access to the current ability being casted and then if it's there (or not there) issue the /stopcasting command itself. In my mind, it's a very simple but effective solution for my particular desire. But, I'm just getting started with addon development, so I may be making a false assumption.
Aelorean is offline   Reply With Quote
Unread 07-28-12, 01:08 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,616
This is not something that addons are able to do.
__________________
"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

Seerah is offline   Reply With Quote
Unread 07-28-12, 01:26 PM   #6
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,384
Addons cannot cast spells or cancel a spell cast. Those (and a number of other) actions require both a hardware event (key press or mouse click) and a secure code path (either by invoking the action through the default UI without any addon being involved, or by using one of the secure templates provided by Blizzard, which are subject to the same restrictions as macros).

See also: Things Addons/Macros Can't Do (sticky thread in the Addon Requests forum)
__________________
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 07-28-12, 02:10 PM   #7
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
Ok, I see now from looking at that list.

It's too bad that addons aren't able to 'end a macro' as that would work just about as well. I guess I can understand a lot of the restrictions, but that one would be helpful I think.


Hmm...Addons can create or 're-write' macros though, right? I think that I've seen a couple do that. But, will it work in combat? (I don't see that as a restriction on the page, but maybe someone knows.) In other words, could an addon actually change macro text/commands on the fly based upon what is going on in combat?

Just trying to think outside the box. I'm new, so I apologize if this is an old argument/thought process.

Anyway, perhaps someone with connections to blizzard could request something similar to [channeling] for 'casting' abilities to use in macros. I think it would be helpful in a lot of instances.
Aelorean is offline   Reply With Quote
Unread 07-28-12, 03:13 PM   #8
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 80
Addons can edit macros but not during combat.
Barjack is offline   Reply With Quote
Unread 08-26-12, 04:55 AM   #9
Jarod24
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 49
As others have stated before:

Addons can not edit macros when you are in combat. Its simply not possible.

However, i wrote an addon that among other things will let you edit dynamically edit a macro when you are out of combat based on conditions you specify.

Its called IfThen and it is -technical- (if you have done any programming before you'll be fine).

Link: http://www.wowinterface.com/download...11-IfThen.html
Jarod24 is offline   Reply With Quote
Unread 08-26-12, 12:05 PM   #10
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,025
In the context of what the OP was requesting, that solution wouldn't solve their problem.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
SDPhantom is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » Macro Help » /stopcasting limitations

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