1. #1

    Mouse-Over Macro Question

    I'm looking for a macro that will cast harmful spells such as shadow word: pain on mouse-over if I currently do not have a target selected. Otherwise, with a target selected, it will cast the spells on the enemy target and disregard all other targets my mouse could be hovering over.

  2. #2
    #showtooltip Flame Shock
    /cast [nomod] Flame Shock
    /cast [target=mouseover] [mod:shift] Flame Shock

    this is a macro i use for multi dotting no modifier for curent target hold shift it was cast the ability on mouseover just switch the spell names out and replace em with whatever u want should work for what u want

  3. #3
    Moderator
    Join Date
    Dec 2009
    Location
    Brawl Pub
    Posts
    3,799
    You kind of said what you wanted backwards. What you want is something that IF @targets exists cast, OTHERWISE cast it at your mouseover.

    /cast [@target, harm, exists] normal spells here; [@mouseover, harm, exists] Shadow Word: Pain

  4. #4
    Dreadlord myhv's Avatar
    Join Date
    Apr 2010
    Location
    Aalborg
    Posts
    985
    #showtooltip
    /cast [exists] Shadow Word: Pain; [@mouseover, exists] Shadow Word: Pain; Shadow Word: Pain

    This should work, but it is a bit clumsy to write, would of been much easier if you wanted to cast mouseover if you have a mouseover target, otherwise your target.

    EDIT:. also eschatological, no point in checking for harm in this case, you are only making your macro break down not only when you have no target or mouseover target (you basically forgot the third the third option) but also if you have a friendly selected.
    Last edited by myhv; 2012-12-11 at 03:11 AM.
    Ashes to ashes, fade and rust, your mind be broken, your body to dust

  5. #5
    thanks a lot for all of your responses

  6. #6
    Quote Originally Posted by myhv View Post
    EDIT:. also eschatological, no point in checking for harm in this case, you are only making your macro break down not only when you have no target or mouseover target (you basically forgot the third the third option) but also if you have a friendly selected.
    Not quite sure what you mean here. With your first exists conditional you macro will stop if you have a friendly target and give a "Target is friendly" error, wouldn't you want it to go to mouseover at this point? This macro is what I would go with:
    Code:
    #showtooltip
    /use [harm,nodead][@mouseover,harm][]Shadow Word: Pain

  7. #7
    Dreadlord myhv's Avatar
    Join Date
    Apr 2010
    Location
    Aalborg
    Posts
    985
    What I meant is that escha's macro will turn in to "?" icon every time you don't have a hostile target selected or mousedovered. And about checking for hostile, there is no need to do that if you're only casting one spell, the inbuilt blizz framework will not allow you to cast it on friendly target anyway. [harm] check is more for macros where you want to condition spell casting depending on target. Like SWP on hostile, renew on friendly.

    Also in this case there is no need for [harm] check, but if it was the other way around (ie cast on mouseover if exists otherwise my target) then it would make sense, since you don't want to try and cast it on friendly and get error if you accidentally mouseovered someone.
    Last edited by myhv; 2012-12-11 at 12:40 PM.
    Ashes to ashes, fade and rust, your mind be broken, your body to dust

  8. #8
    You need the [harm] check if you want to be able to cast on mouseover if you have a friendly target. Using only [exists] will tell your macro to cast on your target as long as you have one, regardless of it being friend or foe, it basically says "I have a target, so I won't go to the next stage of the macro". In comparison if you use [harm] the macro would go to check if you can cast on mouseover when you have anything but a hostile target. There is no point in using the [exists] check because its only extra functionality over [harm] in this case is to lengthen the macro by 1 character and cripple the macro if you accidentally target a friend.

  9. #9
    Dreadlord myhv's Avatar
    Join Date
    Apr 2010
    Location
    Aalborg
    Posts
    985
    Yes, but my point was that you do not need it here. In this macro it first checks for a normal target and tries to cast on it, and only if it's missing it tries to mouseover, and lastly (at least in my version) it tries to use default settings to cast it if none of the conditions are met.

    There is in point in checking for harm on normal target, since you're casting only offensive spells anyway and OP stated that he wants mouseover only when he has no target at all, so by logic it should not mouseover if he has friendly selected.

    And there is no need to check for hostile target on mouseover, since you, once again, can't cast offensive on a friendly and if you have no target and trying to cast it using mouseover, you probably want it to be working instead of starting to looking for normal target or reverting to red "?" every time you pass your mouse over a friendly.
    Last edited by myhv; 2012-12-12 at 02:07 AM.
    Ashes to ashes, fade and rust, your mind be broken, your body to dust

  10. #10
    Your macro and the one I presented works exactly the same, with the exception of the harm/exists check and mine saving a few characters. I reread the first post and he did indeed specify at a point there that it should go to mouseover if no target was selected, so the [exists] check is rightfully the first option you'd go for. I will still argue for [harm] being a better option though since, as you're saying, the macro attempts to cast an offensive ability that can't be casted on friendly targets. If you have a friendly target you obviously don't want to cast your spell on that target, however since you're pressing the macro you obviously want to cast that spell. With an [exists] check the macro says you have a friendly target and stops, with a [harm] check the macro says that your target is friendly and guesses that you you wanted to cast on your mouseover instead.

    So if you find yourself in a situation where you have a friendly target and would like to cast your spell, you have a few options:
    1. With [exists] macro: drop your target, target new enemy, use macro - 3 key presses
    2. With [exists] macro: drop your target, use macro on mouseover - 2 key presses
    3. With [harm] macro: use macro on mouseover - 1 key press

    Having an extra key press in rare situations won't cost you much, but if we're talking about optimization a key press here or a key press there will save you some time in the end.

    And lastly, looking at your macro, without changing any functionality at all, you can shorten it down quite a bit. You repeatedly wrote the same spell name 3 times in the same macro, when you can get away with only doing so once. To cast spells with several condtions in the same macro you can do so by separating them with semi-colons, like you did in your macro, however you can use several conditions before the same spell and the macro will choose the first condition that comes true. So instead of having
    Code:
    [condition]SpellA;[condition2]SpellA;SpellA
    you can shorten it to
    Code:
    [condition][condition2][]SpellA
    Note the last empty bracket, that basically means cast spell with no conditions, or default settings as you called it and prevents the red question mark.

  11. #11
    Don't know if this is the right thread to ask in but, I need a macro that will cast Nether Tempest on my mouseover target but if I don't have a mouseover target cast it on my normal target. Is that possible?

  12. #12
    Quote Originally Posted by Snagletooth View Post
    Don't know if this is the right thread to ask in but, I need a macro that will cast Nether Tempest on my mouseover target but if I don't have a mouseover target cast it on my normal target. Is that possible?
    Code:
    #showtooltip
    /use [@mouseover,harm][]Nether Tempest

  13. #13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •