Jump to content
Ike

[AddOn] CastModifier - TBC and above like Conditionals for /cast macros

Recommended Posts

How would you write a most reliable hunter pet totem killing macro? So far i've been using:

/run local c=UnitName t=TargetByName t("Windfury Totem")if(not c("target")=="Windfury Totem")then t("Grounding Totem")if(not c("target")=="Grounding Totem")then t("Poison Cleansing")end end PetAttack()TargetLastTarget()

Only problem is that it drops my target and sometimes target players so i've been using urs /petattack [@mouseover harm nodead] as more reliable variant. Any ideas on how to make it better? how would you do it? 

Share this post


Link to post
Share on other sites

I can't think of any better way of doing this than the mouseover macro. Back in TBC I used something like this:

/target Poison Cleansing Totem
/target Grounding Totem
/target Windufry Totem
/petattack

But this will not re-target your original target. 

Share this post


Link to post
Share on other sites

I have the addon working for Mind flay, so that it won't clip. I was wondering if it was possible to make it so I'll cast rank 6 Mind Flay when I have mana, and if I don't have the mana for rank 6, I will cast rank 1. Is that possible?

Share this post


Link to post
Share on other sites

You can do that on a percentage basis:

/cast [mypower>10] !Mind Flay; !Mind Flay (Rank 1)

Will cast the highest rank of Mind Flay when you have more than 10% mana or Mind Flay rank 1 if you have less than that (or an equal amount). If you want it to be exact you need to do the math which should be easy enough. 

Edited by Ike

Share this post


Link to post
Share on other sites
1 hour ago, Ike said:

You can do that on a percentage basis:


/cast [mypower>10] !Mind Flay; !Mind Flay (Rank 1)

Will cast the highest rank of Mind Flay when you have more than 10% mana or Mind Flay rank 1 if you have less than that (or an equal amount). If you want it to be exact you need to do the math which should be easy enough. 

So it has to be on a % base, not raw mana? In a raid setting I may have ZG buff, Kings, AI, Blasted Lands Int buff, etc. but may not have all of them at the same time, so my total mana % will be different. This is a nice solution and I will use it, but was wondering if there was just a raw mana number I could put in. Anyways, thank you so much for the help and keep being awesome!

Share this post


Link to post
Share on other sites
9 hours ago, Ike said:

You can do that on a percentage basis:


/cast [mypower>10] !Mind Flay; !Mind Flay (Rank 1)

Will cast the highest rank of Mind Flay when you have more than 10% mana or Mind Flay rank 1 if you have less than that (or an equal amount). If you want it to be exact you need to do the math which should be easy enough. 

Another option is to use a modifier, a bit more user demanding tho :P
 

/cast [mod:shift] !Mind Flay(rank 1); Mind Flay

I use this, and other variations, if i just want the effect of a spell.. like slowing down targets.

Share this post


Link to post
Share on other sites
12 hours ago, Haitharn said:

So it has to be on a % base, not raw mana? In a raid setting I may have ZG buff, Kings, AI, Blasted Lands Int buff, etc. but may not have all of them at the same time, so my total mana % will be different. This is a nice solution and I will use it, but was wondering if there was just a raw mana number I could put in. Anyways, thank you so much for the help and keep being awesome!

 
 

I see that this might be a problem and have therefore added the new "[my]rawpower" conditional. You can use it like this:

/cast [myrawpower<205] !Mind Flay(Rank 1); !Mind Flay

This will do exactly what you want!

 

Just re-download the Addon from my Github page and you're good to go!

Edited by Ike
typo

Share this post


Link to post
Share on other sites
12 hours ago, Ike said:

I see that this might be a problem and have therefore added the new "[my]rawpower" conditional. You can use it like this:


/cast [myrawpower<205] !Mind Flay(Rank 1); !Mind Flay

This will do exactly what you want!

 

Just re-download the Addon from my Github page and you're good to go!

Thank you very much!!!!

Share this post


Link to post
Share on other sites
15 hours ago, Ike said:

I see that this might be a problem and have therefore added the new "[my]rawpower" conditional. You can use it like this:


/cast [myrawpower<205] !Mind Flay(Rank 1); !Mind Flay

This will do exactly what you want!

 

Just re-download the Addon from my Github page and you're good to go!

Ok, there seems to be one little problem (hopefully the last haha!). When I reach below 205 mana, the button goes red and will allow me to cast rank 1 mind flay (I'm find with the red, nbd) but, I can now click my tank 1 Mind Flay. I checked the macro and both Mind Flay's have a ! infront of them, so I don't understand. Here is my exact macro

/script if nil then CastSpellByName("Mind Flay"); end
/cast [myrawpower<205] !Mind Flay(rank 1); !Mind Flay

 

Share this post


Link to post
Share on other sites

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Charge(Rank 3)"); else CastSpellByName("Battle Stance()"); end;

 

 

 

Error:  attempt to call global `CastSpellByName' (a nil value)
File: Interface\AddOns\CastModifier\MMC.lua
Line: 545
Count: 3

Share this post


Link to post
Share on other sites
14 hours ago, Haitharn said:

Ok, there seems to be one little problem (hopefully the last haha!). When I reach below 205 mana, the button goes red and will allow me to cast rank 1 mind flay (I'm find with the red, nbd) but, I can now click my tank 1 Mind Flay. I checked the macro and both Mind Flay's have a ! infront of them, so I don't understand. Here is my exact macro


/script if nil then CastSpellByName("Mind Flay"); end
/cast [myrawpower<205] !Mind Flay(rank 1); !Mind Flay

 

 

I'm sorry, but I don't understand what your problem is. Your button is red (which you're fine with) but you can click it? Would you mind clarifying that a little bit? The more time you put into this, the easier it will be for me to figure things out! :)

 

1 hour ago, Kase said:

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Charge(Rank 3)"); else CastSpellByName("Battle Stance()"); end;

 

 

 

Error:  attempt to call global `CastSpellByName' (a nil value)
File: Interface\AddOns\CastModifier\MMC.lua
Line: 545
Count: 3

 

There's no way that macro is causing the error. First of all, it doesn't even trigger the Addon (which only reacts to chat commands that start with "/cast", "/target" or "/petattack") and second, if "CastSpellByName" is undefined then you're having a pretty serious issue. Maybe some other Addon is causing troubles or your WoW installation might be broken.

So seeing as your macro doesn't require this Addon at all, I'd advise in turning all Addons off and then try it again. If you're still having the error, you should re-download WoW. If it does go away, turn my Addon back on again and test it. If the error message returns I'm going to have some serious issues. If it doesn't, however, you should enable your Addons one at a time while testing the macro. This way you can see which one is actually causing your troubles. If you can tell me what Addon is causing the issue, I can look into it and maybe fix any compatibility issues.

Share this post


Link to post
Share on other sites
6 hours ago, Ike said:

I'm sorry, but I don't understand what your problem is. Your button is red (which you're fine with) but you can click it? Would you mind clarifying that a little bit? The more time you put into this, the easier it will be for me to figure things out! :)

 

There's no way that macro is causing the error. First of all, it doesn't even trigger the Addon (which only reacts to chat commands that start with "/cast", "/target" or "/petattack") and second, if "CastSpellByName" is undefined then you're having a pretty serious issue. Maybe some other Addon is causing troubles or your WoW installation might be broken.

So seeing as your macro doesn't require this Addon at all, I'd advise in turning all Addons off and then try it again. If you're still having the error, you should re-download WoW. If it does go away, turn my Addon back on again and test it. If the error message returns I'm going to have some serious issues. If it doesn't, however, you should enable your Addons one at a time while testing the macro. This way you can see which one is actually causing your troubles. If you can tell me what Addon is causing the issue, I can look into it and maybe fix any compatibility issues.

Oops typo! I mean't to say I can no clip my my mind flay. So it's like the macro doesn't understand there is a ! on the rank 1 Mind Flay command. Sorry for the confusion

Share this post


Link to post
Share on other sites

Hey

/cast [@Player] Linen Bandage

doesnt seem to work, is that a limit of the game or am i doing it wrong? :)

I am using your addon + supermacro, and i keep getting this error

 

Count: 3
Error: [string "/supermacro macrotip 1"]:1: unexpected symbol near `/'

the count varies ofc, and i am using the improvederrorframe to handle it. but it also prevents the showtooltip function to work. How can i fix this?
note: I am using the "latest" version of both addons (Supermacro v3.15)

Edited by Heymom
multiple questions/information.

Share this post


Link to post
Share on other sites

For bandages its /use, not /cast, as far as i know.(supermacro)

I would love to see  /use conditional support in CastModifier. PLEASE. ;)

Share this post


Link to post
Share on other sites
2 hours ago, Heymom said:

Hey

/cast [@Player] Linen Bandage

doesnt seem to work, is that a limit of the game or am i doing it wrong? :)

I am using your addon + supermacro, and i keep getting this error

 


Count: 3
Error: [string "/supermacro macrotip 1"]:1: unexpected symbol near `/'

the count varies ofc, and i am using the improvederrorframe to handle it. but it also prevents the showtooltip function to work. How can i fix this?
note: I am using the "latest" version of both addons (Supermacro v3.15)

So.. i did some testing. And it seems that this addon (castmodifier) is the culprit, supermacro dont recognize the brackets [], which is giving the error and also preventing it from working.
Any workaround for this? either edit the supermacro addon or castmodifier ? 

Share this post


Link to post
Share on other sites
3 minutes ago, jagonx said:

For bandages its /use, not /cast, as far as i know.(supermacro)

I would love to see  /use conditional support in CastModifier. PLEASE. ;)

I tried with both /use and /cast, either worked :) Just want a macro so i dont have to target myself each time i need to bandage hehe..

Share this post


Link to post
Share on other sites
1 hour ago, Heymom said:

Just want a macro so i dont have to target myself each time i need to bandage hehe..

Same.  

 

Thanks @ Ike for the great addon.

Share this post


Link to post
Share on other sites
On 10/1/2017 at 6:39 PM, Ike said:

I'm sorry, but I don't understand what your problem is. Your button is red (which you're fine with) but you can click it? Would you mind clarifying that a little bit? The more time you put into this, the easier it will be for me to figure things out! :)

 

There's no way that macro is causing the error. First of all, it doesn't even trigger the Addon (which only reacts to chat commands that start with "/cast", "/target" or "/petattack") and second, if "CastSpellByName" is undefined then you're having a pretty serious issue. Maybe some other Addon is causing troubles or your WoW installation might be broken.

So seeing as your macro doesn't require this Addon at all, I'd advise in turning all Addons off and then try it again. If you're still having the error, you should re-download WoW. If it does go away, turn my Addon back on again and test it. If the error message returns I'm going to have some serious issues. If it doesn't, however, you should enable your Addons one at a time while testing the macro. This way you can see which one is actually causing your troubles. If you can tell me what Addon is causing the issue, I can look into it and maybe fix any compatibility issues.

 

TITAL PÂNEL was the problem

Share this post


Link to post
Share on other sites
On 1/6/2017 at 1:25 PM, Ike said:

I can't think of any better way of doing this than the mouseover macro. Back in TBC I used something like this:


/target Poison Cleansing Totem
/target Grounding Totem
/target Windufry Totem
/petattack

But this will not re-target your original target. 

Wouldnt it be possible to somehow add an option for this?

/petattack [@Windfury Totem]
/petattack [@Tremor Totem]
/petattack [@Grounding Totem]

Share this post


Link to post
Share on other sites

Hmm is there any function ur addon adds that can make it so aimed shot won't start casting until your autoshot is out? or is after 50%. Would make life so much easier :P Any ideas?

Share this post


Link to post
Share on other sites

I just finished working on the next big update!

 

  • Implemented '/use' chat command with full support for all conditionals (wiki)!
  • Implemented '/equip' and '/equipoh' chat commands with full support for all conditionals (wiki)!

 

As always, make sure to re-download the Addon if you want to use the latest and greatest features!

 

 

 

 

 

On 1/12/2017 at 0:39 AM, Finrodi said:

Wouldnt it be possible to somehow add an option for this?

/petattack [@Windfury Totem]
/petattack [@Tremor Totem]
/petattack [@Grounding Totem]

 
 
 
 

This might be something I'll add in the feature. But I'm not sure yet, as this is a very niche use case.

 

2 hours ago, Morathe said:

Hmm is there any function ur addon adds that can make it so aimed shot won't start casting until your autoshot is out? or is after 50%. Would make life so much easier :P Any ideas?

 
 
 
 

Not in this Addon, but there is one created by Geigerkind (Shino) that pretty much does the entire Hunter rotation for you. Might be worth a look.

https://github.com/Geigerkind/OneButtonHunter

Edited by Ike
typo

Share this post


Link to post
Share on other sites
Just now, Ike said:

 

This might be something I'll add in the feature. But I'm not sure yet, as this is a very niche use case.

 

This would be _very_ much appreciated as the other macro does not work because he just loses the target in the end and does not attack.

Share this post


Link to post
Share on other sites
В 11.01.2017 в 19:57, Heymom сказал:

I tried with both /use and /cast, either worked :) Just want a macro so i dont have to target myself each time i need to bandage hehe..

/script TargetUnit("player")
/use heavy runecloth bandage
/script TargetLastTarget()
 

Share this post


Link to post
Share on other sites

I got a problem. For some reason i cant renew the spells on target. For example: 
/cast [help @mouseover] Power Word: Shield

It wont recast shield if target is already shielded. And the same thing with renew(spell),

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×