Welcome to Crestfall Gaming

Register now to Crestfall Gaming. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Ike

CastModifier - TBC and above like Conditionals for /cast macros

47 posts in this topic

Does this addon let me use mouseover blind without losing combo points?

0

Share this post


Link to post
Share on other sites

I'm afraid not since under the hood it still switches your target (albeit really, really quick).

0

Share this post


Link to post
Share on other sites

That's pretty nice :)

I do have a couple suggestions code-wise if you're interested.

1

Share this post


Link to post
Share on other sites

Of course! I've never intended this to be more than a proof of concept, but since I've decided to release this AddOn, I'll refactor it a fair bit. Any input on that front would, therefore, be greatly appreciated as well!

Also, small little update! I've added [no]stealth and [no]combat. The 'no' part on either is optional to invert the condition. In addition, I've started with some minor restructuring of the code.

 

Enjoy!

0

Share this post


Link to post
Share on other sites

How does this work with SuperMacro? No problems?

 

Logging on to K2 to test it is too depressing so I'll let you answer Ike :P

0

Share this post


Link to post
Share on other sites

It wasn't working at all with SuperMacro just an hour ago. But this is now fixed, so thank you very much for asking this question!

1

Share this post


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

It wasn't working at all with SuperMacro just an hour ago. But this is now fixed, so thank you very much for asking this question!

 

Edit: How do you prefer I send you some modifications? Pull request on github or a gist for copy-pasta?

 

Edited by Roadblock
0

Share this post


Link to post
Share on other sites

I've genuinely read it as "CatsModifier". Sorry, I'll see myself out now.

Edited by ilovecats
3

Share this post


Link to post
Share on other sites

Thanks to @Roadblock for improving the overall quality of the AddOn's source code! 

 

 

On 10/18/2016 at 6:12 PM, ilovecats said:

I've genuinely read it as "CatsModifier". Sorry, I'll see myself out now.

 

69297-Animals-Kitten-Crying-Meow-Miau-Me

5

Share this post


Link to post
Share on other sites

Quick little update. I've added the new Conditional 'equipped:weapon' where weapon stands for one of the following:

  • Daggers - Looks for a dagger in your mainhand
  • Fists - Looks for a fist weapon in your mainhand
  • Axes - Looks for an axe in your mainhand
  • Swords - Looks for a sword in your mainhand
  • Staffs - Looks for a staff in your mainhand
  • Maces - Looks for a mace in your mainhand
  • Polearms - Looks for a polearm in your mainhand
  • Shields - Looks for a shield in your offhand
  • Guns - Looks for a gun in your ranged slot
  • Crossbows - Looks for a crossbow in your ranged slot
  • Bows - Looks for a cow in your ranged slot
  • Thrown - Looks for a thrown weapon in your ranged slot
  • Wands - Looks for a wand in your ranged slot


 This allows you to do things like this:

/cast [equipped:Bows] Shoot Bow; [equipped:Crossbows] Shoot Crossbow; [equipped:Guns] Shoot Gun; [equipped:Thrown] Throw

This macro will use your ranged shoot ability depending on what ranged weapon you currently have equipped. It essentially emulates the 'Shoot' ability that came with TBC, so you no longer have to fiddle with all the different Shoot X spells!

2

Share this post


Link to post
Share on other sites

Thanks for making this addon.

Please implement the [dead] [nodead] conditionals from TBC.

0

Share this post


Link to post
Share on other sites

Anyway you could add an IsCasting check? I'd love to be able to spam my mind flay without being worried about casting it again while it is already being cast

0

Share this post


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

Thanks for making this addon.

Please implement the [dead] [nodead] conditionals from TBC.

 

Done and done! Since I was on a roll, I've added these Conditionals as well:

party - only fires when your target is in your party

raid - only fires when your target is in your raid

group:party/raid - only fires when you are in a party or raid

 

Oh, before I forget. Could you tell me how you intend to use the [dead] and [nodead] Conditionals? I've struggled to find an example that doesn't feel contrived to me.

15 minutes ago, Haitharn said:

Anyway you could add an IsCasting check? I'd love to be able to spam my mind flay without being worried about casting it again while it is already being cast

I've tried this a few weeks back and couldn't find a way to reliably implement this. However, while writing this to you I had an epiphany! I was trying to implement this for auto attacks which I don't think is possible. Channeled spells, however... Well, see for yourself:

This works the way you'd expect it to from the Expansions. Just put an exclamation mark at the front of the spell's name.

Example:

/cast !Mind Flay

 

This is actually really cool, if I may say so myself! I was pretty sure that there is no way to implement this. But in the end, it was actually really easy. I'm curious what else might be possible! So feel free to keep suggesting me all kinds of crazy ideas that would make sense. B|

 

I hope you guys enjoy this update!

1

Share this post


Link to post
Share on other sites
On 30/10/2016 at 8:17 AM, Ike said:

Could you tell me how you intend to use the [dead] and [nodead] Conditionals? I've struggled to find an example that doesn't feel contrived to me.

I've tried this a few weeks back and couldn't find a way to reliably implement this. However, while writing this to you I had an epiphany! I was trying to implement this for auto attacks which I don't think is possible. Channeled spells, however... Well, see for yourself:

 

This is actually really cool, if I may say so myself! I was pretty sure that there is no way to implement this. But in the end, it was actually really easy. I'm curious what else might be possible! So feel free to keep suggesting me all kinds of crazy ideas that would make sense. B|

 

I hope you guys enjoy this update!

I have implemented IsChanneling and SpellIsTargeting (having a gtaoe spell loaded on the cursor) a few months back. You can see source here.

https://github.com/Road-block/PlayerStates/blob/master/PlayerStates.lua

 

Edited by Roadblock
removed parts of the humongous quote
0

Share this post


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

I have implemented IsChanneling and SpellIsTargeting (having a gtaoe spell loaded on the cursor) a few months back. You can see source here.

https://github.com/Road-block/PlayerStates/blob/master/PlayerStates.lua

 

 
 
 
 

I wish I would've known about this a few weeks ago! May I ask what servers you've tested this on? I do all my testing on a very old cmangos branch (at least a year old or two) and it sometimes fires the  SPELLCAST_STOP event multiple times while the channelled spell is still going. Therefore I don't listen to that event at all. Is there a scenario where you need the event that I didn't think about? Also, what about  SPELLCAST_CHANNEL_UPDATE? I thought that was only for group / raid members. Does that one fire for your actions as well?

 

11 hours ago, Ike said:

I was trying to implement this for auto attacks which I don't think is possible.

 

Or Blizzard is just weird when it comes to naming their events! Because, you know, PLAYER_ENTER_COMBAT isn't fired when entering combat but when you're using your Attack ability, duh!

This means that

/cast !Attack

is now also fully supported!

0

Share this post


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

Done and done! Since I was on a roll, I've added these Conditionals as well:

party - only fires when your target is in your party

raid - only fires when your target is in your raid

group:party/raid - only fires when you are in a party or raid

 

Oh, before I forget. Could you tell me how you intend to use the [dead] and [nodead] Conditionals? I've struggled to find an example that doesn't feel contrived to me.

I've tried this a few weeks back and couldn't find a way to reliably implement this. However, while writing this to you I had an epiphany! I was trying to implement this for auto attacks which I don't think is possible. Channeled spells, however... Well, see for yourself:

This works the way you'd expect it to from the Expansions. Just put an exclamation mark at the front of the spell's name.

Example:


/cast !Mind Flay

 

This is actually really cool, if I may say so myself! I was pretty sure that there is no way to implement this. But in the end, it was actually really easy. I'm curious what else might be possible! So feel free to keep suggesting me all kinds of crazy ideas that would make sense. B|

 

I hope you guys enjoy this update!

Thank you so much for this!!!

0

Share this post


Link to post
Share on other sites
On 30/10/2016 at 9:43 PM, Ike said:

<snip>

It's been a while so I might say something inaccurate. The addon was originally made from a request to have a spammable pet tame macro (for rare pet hunting), so I assume it's gotten a fair amount of testing.

I tested it on Nostalrius while it still lived and briefly on The Rebirth? (I don't play those servers but I have low level chars I use occasionally for addon testing)

Afaik SPELLCAST_STOP fires in different situations (instant casts, spell interrupted due to moving etc)

SPELLCAST_CHANNEL_UPDATE fires when pushback occurs due to damage for example. SPELLCAST_STOP I believe also fires exclusively when a channeled spell finishes but is resisted or target is immune/evading.

As I recall I simply checked the extracted code for WoW's casting bar to find the relevant events.

It's possible your cmangos build has some bug related to this event. There is a suspicious note in 1.10 patch notes that says it was DEPRECATED in favor of SPELLCAST_CHANNEL_STOP but doesn't mention if it also stopped firing, so basically my code is the a version of "wearing both a belt + suspenders to make sure your pants don't fall down" :P

Edited by Roadblock
1

Share this post


Link to post
Share on other sites

Ike, thanks for updating this addon to introduce the [dead] [nodead] conditionals on my request.

However, I tried these commands just now and they were not working. Can you check if they work and post on how to use it?

See you.

0

Share this post


Link to post
Share on other sites

How did you try to use them? Did you do something like

/cast [dead] Resurrection

on a target that has already released it's spirit? If so, then I have to disappoint you, because there is no way I know of to do something like this. The macro will only work if your target hasn't released its spirit yet.

If not, could you please provide me some more information on what exactly you tried to do?

0

Share this post


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

How did you try to use them? Did you do something like


/cast [dead] Resurrection

on a target that has already released it's spirit? If so, then I have to disappoint you, because there is no way I know of to do something like this. The macro will only work if your target hasn't released its spirit yet.

If not, could you please provide me some more information on what exactly you tried to do?

I tried to target mobs based on whether they were alive or not by using

/target [nodead] mobname

/target [dead] mobname

and it didn't work at all. No error given, but also no work.

0

Share this post


Link to post
Share on other sites

@Salvia: Ah, that explains it. This wasn't supported before as this only enhanced '/cast' macros, but I have very good news for you! See below ;)

 

 

A new big update!

 

  • You're no longer required to use ClassicMouseover, as I've implemented my own logic for that. In fact, you should disable it or remove ClassicMouseover all together, as it interferes with this AddOn because of its nature. I did this because ClassicMouseover is no longer supported by the original author and, because of that, has no support for more modern UnitFrame AddOns or all-in-one solutions like pfUI. By moving this functionality into my own AddOn, it allowed me to - as of right now - support all of these AddOns in addition to Blizzard's own UnitFrames:
    • agUnitFrames
    • CT_RaidAssist
    • Discord Unit Frames
    • Grid
    • Luna Unit Frames
    • Perfect Raid
    • pfUI
    • sRaidFrames
    • XPerl
    • And probably many more because I've implemented this in a more generic way! Also, please tell me if your AddOn isn't working!
  • More Conditionals:
    • [no]buff:name - Ensures that the specified target has [not] the given buff. The name has to meet some conditions. Please check the Wiki.
    • [no]debuff:name - Ensures that the specified target has [not] the given debuff. The name has to meet some conditions. Please check the Wiki.
    • [no]mybuff:name - Ensures that you have [not] the given buff. The name has to meet some conditions. Please check the Wiki.
    • [no]mydebuff:name - Ensures that you have [not] the given debuff. The name has to meet some conditions. Please check the Wiki.
    • power<amount, power:>amount - Ensures that the specified target has the given amount of its power type in percent.
    • mypower<amount, mypower>amount - Ensures that you have the given amount of your power type in percent.
    • hp<amount, hp>amount - Ensures that the specified target has the given amount of hit points in percent.
    • myhp<amount, myhp>amount - Ensures that you have the given amount of hit points in percent.
  • Integrated support for ClassicFocus. You're now able to use '@focus' in your Conditionals if you have said AddOn installed!
  • And thanks to @SalviaIntegrated support for Conditionals in '/target' macros! These work the same way as '/cast' macros, but have some extra syntactic sugar on top of them. For more information refer to the Wiki.

 

Again, please make sure to remove or disable ClassicMouseover as it severely interferes with mouseover targeting!

 

Enjoy!

1

Share this post


Link to post
Share on other sites

Ike. Thanks for the update.

I should tell you that I tried your add-on and /target [nodead] Elder Mottled Boar still does not work.

Can you look into the /target commands and confirm it works?

see you.

0

Share this post


Link to post
Share on other sites

Yes, that happened because of the way I implemented the way the conditionals are being validated. For spells, it made sense to validate them against your current target, if you do not specify a target. I didn't give it much thought when I reused that code for targeting. But since this isn't very intuitive and even prohibitive, I've changed it to where now the Conditionals will be validated against the given unit. That means that it does the following instead if you do not specify a target:

  • Target the given unit by its name
  • Validate the conditionals
  • Return to your last target (because the Conditionals may fail)
  • Re-target the given unit if all the conditions are met

It does this so fast that you won't even notice all the different target switches. I believe this should be a lot less confusing!

 

Thank you for pointing that out!

0

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