1. #6521

    Ask it! Macro Edition

    Hello guys I'm Sophia.

  2. #6522
    The Undying Lochton's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    FEEL THE WRATH OF MY SPANNER!!
    Posts
    37,553
    Soo, yes, I'm a nerd. I have a macro that cycles through two pieces of gear but I am hitting some issues after a hotfix, preventing it from doing what it is meant to do.

    Code:
    /equip [Helm A]
    /equip [Helm B]
    /run a,_ = GetItemInfo(GetInventoryItemLink("player", 1)) b = a =="[Helm B]" SendChatMessage(b and "pulls down his hood." or "pulls his hood up.", "EMOTE")
    It seems that something has broken then simple macro, and it just keeps 'printing' the same emote result while it is meant to be different depending on the hood.

    [Helm A] is what is currently worn, [Helm B] is what you switch over to, making the macro print the action of the change, and when you press the macro again, it should equip [Helm A] once more, and printing to pull it off.

    Any hand? Thank you
    FOMO: "Fear Of Missing Out", also commonly known as people with a mental issue of managing time and activities, many expecting others to fit into their schedule so they don't miss out on things to come. If FOMO becomes a problem for you, do seek help, it can be a very unhealthy lifestyle..

  3. #6523
    Quote Originally Posted by Lochton View Post
    It seems that something has broken then simple macro, and it just keeps 'printing' the same emote result while it is meant to be different depending on the hood.
    Weird, it works for me, so I can only assume some sort of race condition, where at the time the /run is called, the game always thinks you're wearing the same helm, possibly because the other helm triggers some server script so it's not considered "equipped" yet.

    One way to address this would be to move the /run command to the first position, making it consider what you were wearing before, so you'd have to flip the check around.

    So, like this, although I have shortened the code to remove the use of the global variable b, which might contribute to the issue you're having (although it is read immediately after setting it, if anything, this should only affect other code hypothetically using that variable)
    Code:
    /run SendChatMessage(GetItemInfo(GetInventoryItemLink("player", 1)) == "[Helm A]" and "pulls down his hood." or "pulls his hood up.", "EMOTE")
    /equip [Helm A]
    /equip [Helm B]

    You can also add the line
    Code:
    #show 1
    in front to show your currently equipped helm, if that helps.
    But your duty to Azeroth is not yet complete. More is demanded of you... a price the living cannot pay.

  4. #6524
    The Undying Lochton's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    FEEL THE WRATH OF MY SPANNER!!
    Posts
    37,553
    Quote Originally Posted by Nathanyel View Post
    Weird, it works for me, so I can only assume some sort of race condition, where at the time the /run is called, the game always thinks you're wearing the same helm, possibly because the other helm triggers some server script so it's not considered "equipped" yet.

    One way to address this would be to move the /run command to the first position, making it consider what you were wearing before, so you'd have to flip the check around.

    So, like this, although I have shortened the code to remove the use of the global variable b, which might contribute to the issue you're having (although it is read immediately after setting it, if anything, this should only affect other code hypothetically using that variable)
    Code:
    /run SendChatMessage(GetItemInfo(GetInventoryItemLink("player", 1)) == "[Helm A]" and "pulls down his hood." or "pulls his hood up.", "EMOTE")
    /equip [Helm A]
    /equip [Helm B]

    You can also add the line
    Code:
    #show 1
    in front to show your currently equipped helm, if that helps.
    Thanks for your work, seems I owe cake/beer for being stupid.

    I.. kinda flipped items around it seems, so the macro got confused about the function of its setup.

    Though, I'll have a look into yours, as it makes a bit more space. Thank you!

    Edit: Yours works perfect as well. And gives a little more wiggle room.
    Last edited by Lochton; 2023-05-01 at 03:42 PM.
    FOMO: "Fear Of Missing Out", also commonly known as people with a mental issue of managing time and activities, many expecting others to fit into their schedule so they don't miss out on things to come. If FOMO becomes a problem for you, do seek help, it can be a very unhealthy lifestyle..

  5. #6525
    Back in SL i used a macro to release Earth elemental:

    /click TotemFrameTotem1 RightButton

    Worked just fine, just not to move the mouse but being able to keybind it, but it doesn't seem to work now.

    Tried multiple macros i found but they basically all use the same line i did, maybe with /petdismiss additionally but they all don't work.
    Did the command change or is there another way to keybind Earth Elemental dimisses?

  6. #6526
    Try
    Code:
    /click TotemFrameTotem1 RightButton 1
    It's because of this behavior they introduced in DF.
    https://us.forums.blizzard.com/en/wo...ken/1361972/42

  7. #6527
    It looks like I may have to finally replace Power Auras Classic with Weakauras. Not happy about it.

    I'm trying to create an aura that's a simple square showing the countdown of a player buff in seconds.

    i.e. If I activate Blade Flurry, a number appears and counts down 10... 9... 8... etc.

    I've created the number, but I can't seem to change the background to a black square like the old one (on the right):




    Anyone know how? There's a Background option, but I can only chose from ingame assets and models.

    Last edited by thottstation; 2023-11-11 at 03:26 AM.

  8. #6528
    Mechagnome
    15+ Year Old Account
    Join Date
    Apr 2009
    Location
    Austin, Texas
    Posts
    685
    So I've read a few things and I'm wondering if I have this correct. I'm a total newb when it comes to macro's like this but figured I'd ask.

    /cast [mod:shift,@player]Bonedust Brew;[nomod]Spear Hand Strike

    Actually edited this in game and got it working.

    Edit.

    Ok so question on this. The macro works as I want it to work. My question is when I make another macro (with a different mod key lets say it's alt) pressing that mod key also changes the ctrl mod key to a ? icon and goes back to normal when not pressed. Is there some way to stop that from happening? So say if I press ctrl which is one mod button it does not also trigger the atl mod macro to change icons?
    Last edited by cidic; 2024-01-15 at 06:09 AM.

  9. #6529
    Quote Originally Posted by cidic View Post
    Ok so question on this. The macro works as I want it to work. My question is when I make another macro (with a different mod key lets say it's alt) pressing that mod key also changes the ctrl mod key to a ? icon and goes back to normal when not pressed. Is there some way to stop that from happening? So say if I press ctrl which is one mod button it does not also trigger the atl mod macro to change icons?
    You don't need the [nomod]
    /cast [mod:shift,@player]Bonedust Brew; Spear Hand Strike
    When you press Shift, the macro would use Bonedust Brew anyway, and in any other case it should use Spear Hand Strike, right? Omitting a conditional is equal to using the empty conditional [] which is "any case not covered by previous conditionals".

    You could also specify [nomod:shift] to prevent the question mark, but that is functionally identical to just omitting the conditional. After evaluating something for "with Shift", anything after that would be "without Shift" anyway.

    There is also a method to show something different from what the actual macro would evaluate to, e.g.:
    #showtooltip Spear Hand Strike
    /cast [mod:shift,@player]Bonedust Brew; Spear Hand Strike
    would always show Spear Hand Strike, even if you press Shift.
    The part after #showtooltip can look like anything you can put after /cast, it doesn't have to be just one ability, I just couldn't think of something more complex but also 'useful' right now
    But your duty to Azeroth is not yet complete. More is demanded of you... a price the living cannot pay.

  10. #6530
    Mechagnome
    15+ Year Old Account
    Join Date
    Apr 2009
    Location
    Austin, Texas
    Posts
    685
    Thank you sir. I played around with this a bit last night before I finally went to sleep and did do that nomod:shift part but I did notice others saying that you really don't need to do that nomod part it just didn't click in my brain (I had been up for 24 hours at the time) but just now trying it out and it's doing exactly what I want so Thank you Now just to build out macro's or figure out how I want to bind things with them.

Posting Permissions

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