Close
Showing results 1 to 10 of 10
  1. #1

    Default Macro conditionals: self?

    Is there any conditional for macros that will indicate if the target is myself? I want a macro such that:

    if target==self then cast shield
    else if target == friend cast renew
    else if target == hostile cast smite


    Telling the difference between a friendly target and an enemy target is easy, but is there any way to tell the difference between myself and another party member?

  2. #2

    Default

    I think player should be a valid unit id. Try

    /cast [target=player] Power Word: Shield
    /cast [target=target,help] Renew
    /cast [target=target,harm] Smite

    See link (wowwiki).
    Jafula.
    Jamba - Jafula's Awesome Multi Boxer Assistant. An addon for YOU.

  3. #3

    Default

    I think the above macro will always cast PWS on yourself, since [target=player] will always evaluate to true and execute first -- I believe [target=player] isn't evaluating whether the target is the player, its saying the target IS the player for this cast, no? Try it out and let us know though, I suck at macros and could be completely wrong.

    Another option is (basically just reversing stuff):

    /cast [help] Renew
    /cast [harm] Smite
    /cast [target=player] Power World: Shield

    the [target=player] is actually superflous in this case if you have self-cast enabled.

  4. #4

    Default

    I don't believe we have found a way to conditionally cast a spell depending on if targeting self or others. Essentially I was asking the same question (with different functionality, but it all comes down to can I find out if I'm targeting myself) in the following thread:

    Macro that if targeting self use barkskin, if targeting another player then heal

    There are some interesting ideas with playing with tartget=targettarget and so on, but I'm not sure if there was a functional solution in the end.
    Owltoid, Thatblueguy, Thisblueguy, Otherblueguy, Whichblueguy

  5. #5

    Default

    Quote Originally Posted by 'Owltoid',index.php?page=Thread&postID=167060#post 167060
    I don't believe we have found a way to conditionally cast a spell depending on if targeting self or others. Essentially I was asking the same question (with different functionality, but it all comes down to can I find out if I'm targeting myself) in the following thread:
    Actually, subject to the caveat of none of us having tested this particular code, I believe the approach outlined above and elaborated by puppychow should work.

    It's basically using the fact that when a line of the macro does something that invokes the global cooldown, the following lines are not processed. On the other hand, if a line simply fails due to the target predicates, execution of the macro continues.

    While this isn't fully conditional logic, the revised macro posted by puppychow takes advantage of this GCD-abort effect to effectively create target-based spell selection.
    Current team: Shnoght (DK) + 4 elemental shamans (Shalph, Sheta, Shamma, Shepsilon)
    Heroics cleared: Drak'Tharon, VH, CoS, UK, Gundrak, HoL, Nexus

    Waiting in the wings at 80: Shaladin (pally), Shmage (mage), Shruud/Shrued (boomkins), Shelta (leftover shaman)

    <Chain Lightning>, Alliance Bonechewer

  6. #6

    Default

    /cast [help] Renew
    So it doesn't consider yourself as "help"? If you target yourself and it considers yourself to be help then it will always cast renew unless targeting an enemy. You'll never get to the PW:Shield. If it doesn't consider yourself as help then this would also solve my barkskin question.
    Owltoid, Thatblueguy, Thisblueguy, Otherblueguy, Whichblueguy

  7. #7

    Default

    If you have yourself targeted, then yes [help] would cast Renew and you would never cast PW: Shield. Only if you have NOBODY targeted would the PW: Shield go off since neither [help] nor [harm] are valid. I just tested it on my pally while sitting kinda AFK in wintergrasp, my macro was:

    #showtooltip
    /cast [harm] Seal of Light
    /cast [help] Flash of Light
    /cast [target=player] Holy Light


    if I target an enemy, Seal of Light casts, no problem. If I target a friendly player, Flash of Light casts. If I target nobody, Holy Light casts on myself. If I target myself, Flash of Light casts on myself, since [help] when target is myself evaluates as true.

    So imo just always target nobody when you want it to be you and you will be able to do what you want. Otherwise you will have to do things with /castrandom and commas and hope it drops through randomly to abuse the GCD logic.

  8. #8

    Default

    I have this for my low level priest/mage team. (Just does renew, SW: P)

    Code:
    /cast [target=mouseover, help]Renew;[target=mouseover, harm]Shadow Word: Pain;[help]Renew;[harm]Shadow Word: Pain; []Renew
    Same macro, broken up -
    Code:
    /cast - This needs no explanation.
    
    [target=mouseover, help]Renew;  - (Allows mouse healing)
    
    [target=mouseover, harm]Shadow Word: Pain; - (Allows Mouse attacking)
    
    [help]Renew; - (Heals current target, if friendly)
    
    [harm]Shadow Word: Pain; - (attacks current target, if hostile)
    
    []Renew - (If there is no friendly/unfriendly target/mouseover target, this will just cast renew)

    As for the macro you want, try this: (Some fiddling may be required)

    Code:
    /cast [harm]Smite; [help]renew; [player]Power Word: Shield
    If you need more character space you can try this:
    /cast [harm]Smite; [help]renew; []Power Word: Shield
    Hardware Lurker

  9. #9

    Default

    I personally set up these type of macros to use my normal targeting system as follows:

    Code:
    /cast [target=player mod:shift] Power Word: Shield; [target=focustarget exists,harm,nodead] Smite;
     [target=focustarget exists,help,nodead] renew; [target=focustarget exists,dead] ressurect; [target=focus] Power Word: Shield
    That way I can use focus targeting to hit enemies or heal friends with my lead toons target and if my focus does not have a living target it shields my focus with a shift:mod thrown in to shield the priest (this may not be needed for priest being lead toon etc.) and dead targets can be rez'd

    (Disclaimer: I am at work so this macro may be typed incorrectly as I can't look at my macros right now, but you get the idea)

  10. #10

    Default

    Quote Originally Posted by 'Owltoid',index.php?page=Thread&postID=167081#post 167081
    If it doesn't consider yourself as help then this would also solve my barkskin question.
    I already solved your barkskin problem in the other thread. It just takes a little bit of set up.
    And there are NO unitID based conditionals, unfortunately you need to get creative with multiple buttons or modifiers to do what is being asked here.
    There is no way to distinguish between yourself and a party member with conditionals.

Similar Threads

  1. [MACRO] Arcane Mage DPS Macro
    By heffner in forum Macros and Addons
    Replies: 19
    Last Post: 04-28-2009, 08:26 PM
  2. Replies: 12
    Last Post: 03-25-2009, 04:29 PM
  3. MAcro guru's please help with retri paladin macro
    By Heraveth in forum Macros and Addons
    Replies: 3
    Last Post: 01-07-2009, 05:43 PM
  4. Replies: 5
    Last Post: 09-16-2008, 11:01 PM
  5. [Macro] Handy healing macro
    By Vicker in forum Macros and Addons
    Replies: 1
    Last Post: 05-18-2008, 01:08 AM

Posting Rules

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