1. #1

    [Macro Help] Target if no target, use certain spell if i have a target

    Title explains it really simply.

    I'm gonna get back to WoW in legion, and that for me is perfect time for relearning my naga keybinds, and i wanna get away from using the number 4 button as target closest enemy. So what im trying to do here is to incorporate targeting an enemy, and executing a spell afterwards, or use a spell if i do have a target (from previously targeting with said macro)

    - - - Updated - - -

    think i might have figured it out right after i posted xD

    this is what i have:

    /targetenemy [noharm]
    /cast [@enemy, exists] Devouring plague; Devouring Plague

    3rd time editing, no it didnt work

  2. #2
    Pandaren Monk shanthi's Avatar
    10+ Year Old Account
    Join Date
    Oct 2011
    Location
    California
    Posts
    1,775
    Quote Originally Posted by Jahrern View Post
    Title explains it really simply.

    I'm gonna get back to WoW in legion, and that for me is perfect time for relearning my naga keybinds, and i wanna get away from using the number 4 button as target closest enemy. So what im trying to do here is to incorporate targeting an enemy, and executing a spell afterwards, or use a spell if i do have a target (from previously targeting with said macro)

    - - - Updated - - -

    think i might have figured it out right after i posted xD

    this is what i have:

    /targetenemy [noharm]
    /cast [@enemy, exists] Devouring plague; Devouring Plague

    3rd time editing, no it didnt work

    "enemy" isn't a unit type. This may work for you:

    Code:
    #showtooltip
    /targetenemy [noharm]
    /cast Devouring Plague

    You really don't need any conditionals in the cast, since you seem to want it to cast only if you have an enemy (harmful) target, but that's the default nature of the spell anyway. You can't cast Devouring Plague with no target or with a friendly target.
    That is not dead which can eternal lie.
    And with strange aeons even death may die.

  3. #3
    Quote Originally Posted by shanthi View Post
    "enemy" isn't a unit type. This may work for you:

    Code:
    #showtooltip
    /targetenemy [noharm]
    /cast Devouring Plague

    You really don't need any conditionals in the cast, since you seem to want it to cast only if you have an enemy (harmful) target, but that's the default nature of the spell anyway. You can't cast Devouring Plague with no target or with a friendly target.
    i get that. but i want it to first target. dont cast anything. second time, it casts the spell. cause then it has the target

  4. #4
    Pandaren Monk shanthi's Avatar
    10+ Year Old Account
    Join Date
    Oct 2011
    Location
    California
    Posts
    1,775
    Quote Originally Posted by Jahrern View Post
    i get that. but i want it to first target. dont cast anything. second time, it casts the spell. cause then it has the target
    Just reverse the targetenemy and cast lines in the macro I gave, then, I guess. If there's no target, the cast won't work...then it'll target an enemy. The next time you press it, the cast will work since you got the target on the previous press.

    I'm not sure why you don't want it to cast on the first press, too, since it's picking up the target.
    That is not dead which can eternal lie.
    And with strange aeons even death may die.

Posting Permissions

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