1. #1
    Deleted

    Target Tank in Macro or something like that.

    Hey
    First, english is not my first language, so I hope you understand what I want

    I created a macro to always cast Lifebloom to my current focus target.
    And I also have macros to cast some CC (like roots/hibernate) to the focus target.

    My problem is, when I have to CC something I have to change my focus target and have to manually target the Tank to cast LB on him.

    So...
    Afaik ther is no macro way to target the player with the TANK role in a group within a macro.
    Is there a way to do this with a /run, /scrip or two macros with a global variable?

    Another solution whould be a second focus frame. But afaik if such a frame whould be created via an addon I couldn't target it within a macro.

    And my third idea:
    Could an addon be made, in which I can select a spell, a target an bind it to a key. And would such an addon be allowed?


    An rewrite of the LB macro with the player name is no option, because
    1. I need the option to switch the target fast an within the fight.
    2. The macro is allready rather lengthy with all the check if player is dead, or I'm in Tree Of Life form and such thing.

    Thanks so far
    DatGizmo

  2. #2
    Your best option that comes to mind first would be keep your tank macro the way it is and make your cc macro a mouseover macro
    ...Made it through 9 years of wow...

  3. #3
    Try this: TargetRole.

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  4. #4
    Deleted
    I've allready seen TargetRole.
    But the problem with this addon is, it modifies the macro text.
    And macro modifying is not allowed during the fight afaik.

    I could possible use it for the CC macro, but I would prefer a solution which is still possible infight.

  5. #5
    If you don't mind doing some editing each time you raid, you can try and fail and find out which raid# unitid is the tank and use that

    example, tank is raid6:
    /cast [@raid6, help] Lifebloom

  6. #6
    Quote Originally Posted by DatGizmo View Post
    I've allready seen TargetRole.
    But the problem with this addon is, it modifies the macro text.
    And macro modifying is not allowed during the fight afaik.

    I could possible use it for the CC macro, but I would prefer a solution which is still possible infight.
    The macro modifying refers to you setting a role of a tank to whatever player in the raid. You do this at the start of the raid/dungeon so it won't be in combat anyway. Once it's set, all your macros are modified and you can use it in combat just fine.

  7. #7
    Deleted
    Quote Originally Posted by Chaltione
    If you don't mind doing some editing each time you raid, you can try and fail and find out which raid# unitid is the tank and use that

    example, tank is raid6:
    /cast [@raid6, help] Lifebloom
    This, I did when I started using the LB macro, and it annoyed me, because if there was some player moving within the raid I had to adapt the macro.

    Quote Originally Posted by Sedivy
    The macro modifying refers to you setting a role of a tank to whatever player in the raid. You do this at the start of the raid/dungeon so it won't be in combat anyway. Once it's set, all your macros are modified and you can use it in combat just fine.
    As I said, I want the posibillity to change the target for the spell midfight.


    As it seems, I will have to create a little addon for my needs.
    So some questions:
    1. Can the slash commands created from an addon used within a macro?
    2. Can someone point me to a good addon beginners guide? As it seems I'm to stupid to google right, because most results are pointing to wowwiki. And afaik wowwiki is more or less outdated. (Correct me if I'm wrong)
    3. Is there a way to "check" if such an addon whould be against Blizzards rules? I've no idea how to check this.

  8. #8
    Deleted
    Quote Originally Posted by DatGizmo View Post
    This, I did when I started using the LB macro, and it annoyed me, because if there was some player moving within the raid I had to adapt the macro.


    As I said, I want the posibillity to change the target for the spell midfight.


    As it seems, I will have to create a little addon for my needs.
    So some questions:
    1. Can the slash commands created from an addon used within a macro?
    2. Can someone point me to a good addon beginners guide? As it seems I'm to stupid to google right, because most results are pointing to wowwiki. And afaik wowwiki is more or less outdated. (Correct me if I'm wrong)
    3. Is there a way to "check" if such an addon whould be against Blizzards rules? I've no idea how to check this.
    Yes
    Before any attempt to make an addon, do you have knowledge of some language?
    if you can do it with the api, it is allowed(95% sure).

  9. #9
    Deleted
    I'm working as a software engineer with C/C++/C#.

    And as far as I have seen, lua code looks like it uses basic syntax.
    So I think I won't have any problems adapting to lua.

    But currently I have no idea where to start.

  10. #10
    As I said, I want the posibillity to change the target for the spell midfight.
    This isn't possible. On purpose. It was implemented back in vanilla to prevent all sorts of exploits. Buttons are locked down in combat and there is no macro editing on the fly or changing button assignment once the fight starts.
    Last edited by Sedivy; 2012-08-30 at 03:07 PM.

  11. #11
    Deleted
    Think about the implications it would cause. Self-targeting dispel macros (we had that in vanilla)? Screw that, one-button macros that automatically select both healing spell and target appropriately, and communicate that to all other healers completely avoiding overheal?

    Blizzard doesn't allow that in combat, and with good reason.

    ---------- Post added 2012-08-30 at 06:30 PM ----------

    Quote Originally Posted by DatGizmo View Post
    As it seems, I will have to create a little addon for my needs.
    So some questions:
    1. Can the slash commands created from an addon used within a macro?
    2. Can someone point me to a good addon beginners guide? As it seems I'm to stupid to google right, because most results are pointing to wowwiki. And afaik wowwiki is more or less outdated. (Correct me if I'm wrong)
    3. Is there a way to "check" if such an addon whould be against Blizzards rules? I've no idea how to check this.
    1. Yes. However, you won't be able to call protected functions from your slash command handler.
    2. Your entire file is executed on addon load. If you want code to run later, register callbacks (note that ScriptObject is inherited by pretty much every frame type in existance) for the various frame script handlers. There's an API reference, a Widget (=Frame, Texture, FontString, etc.) reference and a secure template reference. Look at the CreateFrame call, for starters.
    3. If you can do it with the API, you're home free. The API is built to restrict what addons can do to what Blizzard wants addons to be able to do - if an addon gets "too powerful", they will adapt the API to break it (see AVR[E] back in WotLK).
    Last edited by mmocba105e19de; 2012-08-30 at 04:32 PM.

  12. #12
    Deleted
    Quote Originally Posted by Sedivy
    This isn't possible. On purpose. It was implemented back in vanilla to prevent all sorts of exploits. Buttons are locked down in combat and there is no macro editing on the fly or changing button assignment once the fight starts.
    Yea, I see that there is no macro way to solve my problem.


    Quote Originally Posted by Treeston View Post
    Think about the implications it would cause. Self-targeting dispel macros (we had that in vanilla)? Screw that, one-button macros that automatically select both healing spell and target appropriately, and communicate that to all other healers completely avoiding overheal?

    Blizzard doesn't allow that in combat, and with good reason.

    ---------- Post added 2012-08-30 at 06:30 PM ----------



    1. Yes. However, you won't be able to call protected functions from your slash command handler.
    2. Your entire file is executed on addon load. If you want code to run later, register callbacks (note that ScriptObject is inherited by pretty much every frame type in existance) for the various frame script handlers. There's an API reference, a Widget (=Frame, Texture, FontString, etc.) reference and a secure template reference. Look at the CreateFrame call, for starters.
    3. If you can do it with the API, you're home free. The API is built to restrict what addons can do to what Blizzard wants addons to be able to do - if an addon gets "too powerful", they will adapt the API to break it (see AVR[E] back in WotLK).
    I'm not planing in doing this with a one button solution.

    I will try to explain what I want to do with the addon, hope I can make it clear (curse my bad english).

    What I want, in simple, is an additional focus frame. (I will call it sticky frame for now). But, at first, without the visual frame and stuff like that.

    With the first action you select the target for the sticky frame (like /focus).
    The second action would be a cast, triggered by the user, which will target the sticky frame. (like /cast [@focus] Polymorph). I think here the sequence would be something like:
    Code:
    target=sticky
    /cast <spell>
    target=lasttarget

    Then I want, if possible, create tow button which are dragable to the action bar, one for the targeting, and one for the cast with the sticky target in it.
    Or give an option to bind these buttons to keyevents.
    Or create a slash commands to target the sticky target in a macro (is targeting a protected function, haven't looked yet)
    Like:
    Code:
    /targetsticky
    /cast <spell>
    /targetlasttarget
    Haven't yet decided which would be my preffered solution. (Depending, for sure, on the possibilty of each solution)

    Can someone tell me if this is theoretically possible to do? (Before I spend my whole weekend trying to create this addon which isn't even possible )

    I hope I could communicate, what I'm trying to do.

  13. #13
    I'm not a programmer so Treeston can explain this better I'm sure.
    But I've heard the requests for a second focus frame and it's apparently not possible to do and requests for it were declined. If you found a way it'd probably be popular (but nixed very soon after).
    If you intend to sort your target in that frame in any way automatically (based on health level for example), you wouldn't be able to do it. This is what Healbot and Decursive used to do back in vanilla and that's why raidframes got locked down in combat and raidIDs are reassigned on every change in roster, resulting in the wonderful raidframe combat glitch we got today, which they refuse to fix. In other words, trying to find a way around this will again result in a giant dev nerf bat, so don't try
    Last edited by Sedivy; 2012-08-31 at 01:21 PM.

  14. #14
    Deleted
    1) Targeting is protected, yes.
    2) It's not possible, no.
    3) You can make a focus frame because "focus" is an unitID. You cannot make a "sticky" frame because "sticky" is not an unitID.
    4) You need an unitID to target because, as I said earlier, attributes can only be set out of combat. You can set ("action" => "target", "unit" => "focus") out of combat - the "focus" unitID will update as your focus changes. You cannot do the same for a "sticky" target, as you cannot create custom unitIDs.
    Last edited by mmocba105e19de; 2012-08-31 at 11:43 PM.

  15. #15
    Deleted
    Quote Originally Posted by Treeston View Post
    1) Targeting is protected, yes.
    2) It's not possible, no.
    3) You can make a focus frame because "focus" is an unitID. You cannot make a "sticky" frame because "sticky" is not an unitID.
    4) You need an unitID to target because, as I said earlier, attributes can only be set out of combat. You can set ("action" => "target", "unit" => "focus") out of combat - the "focus" unitID will update as your focus changes. You cannot do the same for a "sticky" target, as you cannot create custom unitIDs.
    Ah, thanks for the infos. I still think there is a possible solution, that could work for me, but currently I have some more basic problems

    1. To cast a spell, use a macro or target, I need a "SecureActionButtonTemplate". Creating such a thing, modifying it's attributes and using works so far. But I don't see the button. I can only see the button if I also inherit "UiPanelButtonTemplate". But there has to be a solution without the UiPanelButton. But I couldn't find an excample -_-
    2. How do I get the UnitId of my current target? I have found GameTooltip:GetUnit(). But this always returns nil. So far I only have tested with self targeting, but I had expected, it would return atleast "player". Is there another metod to achive this?

  16. #16
    Deleted
    The unitID of your current target is "target". If you want any other ones matching it, go through all possible unitIDs and check UnitIsUnit for them.

    ---------- Post added 2012-09-02 at 12:13 AM ----------

    Not sure what you're saying in 1). You can just :SetTexture on your button manually (or create a texture child of your button with :CreateTexture, :SetAllPoints that to your button, then :SetTexture the texture object).

Posting Permissions

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