1. #1
    Stood in the Fire Tybudd33's Avatar
    10+ Year Old Account
    Join Date
    Jun 2011
    Location
    Cali baby
    Posts
    403

    Weak Auras Trigger Help needed please

    Hey guys, I've made a Action Usable Aura for my "Spirit Mend" ability, that can only be cast by my Spirit Beast Pet (ima hunter).

    When I'm using my Spirit beast it works perfectly, when I can use it, its visible and when its on CD its not.

    Problem is, when I'm using any other type of pet, it shows the icon as if its usable even if the current pet or myself don't possess this spell.


    I need a trigger that checks to see if I'm using a spirit beast, and if not to not load the icon, can I ge some help with this please.

    I tried "specific Unit" and tried "pet: Spirit beast" in the available field, as you would in a macro, and as well tried "Spirit Beast" and it didn't work that way.

    I haven't found a tutorial that tells you have to specify a conditional for a type of unit.
    Last edited by Tybudd33; 2013-06-27 at 02:00 AM.

  2. #2
    Deleted
    Add a custom trigger:
    Required for Activation: All triggers
    Trigger 2 ->
    Type: Custom
    Event Type: Status
    Check on..: Every Frame

    then type this to Custom trigger, Replace "Pet Name" with Spirit Beast pet's name:
    Code:
    function()
    if (UnitName("pet") == "Pet Name") then
    return true;
    end
    end
    Not sure if this works, it should!
    Last edited by mmoc047901df21; 2013-06-27 at 02:06 AM.

  3. #3
    Stood in the Fire Tybudd33's Avatar
    10+ Year Old Account
    Join Date
    Jun 2011
    Location
    Cali baby
    Posts
    403
    The only problem with that is that, I have various Spirit Beast with Various names, can the UnitName be UnitType?

    If not is it possible for me to note each of my spirit beast's names in the trigger?

  4. #4
    Deleted
    I'm not too expert on Lua commands, but you can list all your spirit beast pet's names like this:
    Code:
    if(UnitName("pet") == "Pet Name" or UnitName("pet") == "Pet Name2" or UnitName("pet") == "Pet Name3") then
    You can make conditions like that as many as you want.

  5. #5
    Stood in the Fire Tybudd33's Avatar
    10+ Year Old Account
    Join Date
    Jun 2011
    Location
    Cali baby
    Posts
    403
    OK, I'll try this when I get home from work, if you can, check back for feedback tomorrow!

    ---------- Post added 2013-06-27 at 02:01 AM ----------

    It does work, but it's flawed, can dismiss the pet with the specific name in the Command and the icon still remains, unless I "/wa" to open up weak auras menu and the close the GUI and then the aura disappears like its supposed to, as if the aura had to reload its conditions.

    Would that be an addon error?

    ---------- Post added 2013-06-27 at 02:02 AM ----------

    I also notice an extra field below that is called "Name Info", is that of any importance?

    Thanks again in advance.

    ---------- Post added 2013-06-27 at 02:15 AM ----------

    Quote Originally Posted by esatikkane View Post

    Check on..: Every Frame
    Maybe the check on command is what is bugged, if you wanted it to be an event, could it be on summoning of the pet as the event?

    ---------- Post added 2013-06-27 at 11:59 AM ----------

    /bump with more characters and stuff

  6. #6
    The Patient
    15+ Year Old Account
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    319
    Code:
    Trigger
    function()
    	if UnitCreatureFamily("pet") == "Spirit Beast" then
    		return true
    	end
    end
    
    Untrigger
    function()
    	if UnitCreatureFamily("pet") ~= "Spirit Beast" then
    		return true
    	end
    end
    No clue if it works or if it's called "Spirit Beast" but you can easily check that. You could probably use PET_BAR_UPDATE event instead of spamming it on every frame, I'm not entirely sure which events to use though.

  7. #7
    Stood in the Fire Tybudd33's Avatar
    10+ Year Old Account
    Join Date
    Jun 2011
    Location
    Cali baby
    Posts
    403
    Quote Originally Posted by suprep View Post
    Code:
    Trigger
    function()
    	if UnitCreatureFamily("pet") == "Spirit Beast" then
    		return true
    	end
    end
    
    Untrigger
    function()
    	if UnitCreatureFamily("pet") ~= "Spirit Beast" then
    		return true
    	end
    end
    No clue if it works or if it's called "Spirit Beast" but you can easily check that. You could probably use PET_BAR_UPDATE event instead of spamming it on every frame, I'm not entirely sure which events to use though.
    I did see PET_BAR_UPDATE, and it did seem like the moste logical event, but how would I set that up? Would I just put PET_BAR_UPDATE in the event window, or does it have to be formatted into a formula with "function" or "if".

    My langauge skills go as far as HTML and excel, I'm just starting to look into this.

  8. #8
    The Patient
    15+ Year Old Account
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    319
    Code:
    d4Z8daqBs60i2LsuVMkshwrZeinxQqMTQmFLiDtQG68kvFdiggjSts0EL2nu7x0pvI4Vc1VbSmLugQsPbRYWvvhKkQtbuDmQQohvrlKQYsPc1IPsA5K6HuP8uupwbphPjsfKPcQjlOPt5IuP6QujUmX1HSrqyCurSzHSDLWIeOpRqtdK(ovGgjvapJQWObrJxjXjvk6wkfUMsQUNssRKQ0OakBtax)fUSA5WYHfU8kljkIkwHydORRWJak8dciqDY6q9dfAJ2a66LFaZWcxwd8Kcxwf9msHRvRw59LefrfRqeynfq9mGcqwdepcasaNOOrBanqzTmsaWW7FPmzaaxgHnnzCu0fU8aIAaQLJq4bJaGbd80BE5LxEKO8Cbtm30Y0qAbIPk5TdwWVybbpVCPRMxq(t0elpFYKAbZZGuWP38YlV8YlV8YtlgsJZZ0ij9MxE5LNGdtVcoSwzttghfDHlB7FP8aIAaQLhqudqn22)szQnneT8aIAaQLJq4bJaGbd80BE5LxEKO8Cbtm30Y0qAbIPk5TdwWVybbpVvxnVG8NOjwE(Kj1cMNbPGtV5LxE5LxE5LNwmKgNNPrs6nV8YlpbhMEfCy5biLbNwg9dNMuwwiyJwER7WX(C2XXUS1HCg29YdiQbOgdjjukpGOgGATYtKbuxltclZFIMy55WcoS8mmKyea88fBAY4OOPfUk9x4YMMmok6cx22)szQnneT8aIAaQX2(xktTPHOLrujMGxiAQuFLLfc2k7gaWleWbX5TvdmQfknpW4V8EGxMICvwiyBRwIiRuM36oOGwouCfffbV)LYoG7GUfcxaTmIkX0V8EkNQs9vgHjw5)BUl6Y4PQqlCTYiSSqWw5jYakJOsmctS6Rmf5QSqWgJIIiRuo2nNz4yg2zhdxM(L3t5uvQspv4ra)1kJWMMmok6cxM(L3t5uvQspv4ra)LrujM(L3t5uvQVYimXk)FZDrxgrLyeMy1xTA1kJrQWAY4OOPv5ALdj0)BUV5aaU8Myt0rZbXrBoaGPoI)Y7fZqovN4y(t0educ2P1ktl7FzOldYYEwErv6hQcf1Aba
    Try that, I can't guarantee it will work. I didn't know which event to use either so I put it on all frames for now.

  9. #9
    Stood in the Fire Tybudd33's Avatar
    10+ Year Old Account
    Join Date
    Jun 2011
    Location
    Cali baby
    Posts
    403
    That Seemed to work perfectly, when you first presented the code as Trigger, and untrigger, I thought that all went together in the same Custom Trigger window

    It seemed that putting the command in the Untrigger window is what made it stable.

    So it more so works like a toggle, am I right? I had it toggling on, but nothing to toggle it off, and that's why sometimes it would stay visible upon changing to pets that didn't apply

  10. #10
    The Patient
    15+ Year Old Account
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    319
    The trigger triggers the aura and unless you /reload or open WeakAura options again (which acts as a reload for auras in WA) it would stay. Untrigger removes the aura when something in there is true. So yeah, kind of a toggle I suppose.

    You should run /eventtrace, /eventtrace start in an area where no one is around you and see if you can find out the event that always fires when your pet is out and that would be the most suitable event (it might be that there is none, but I doubt it).

  11. #11
    There's a UNIT_PET event that in theory does what you're looking for but in my experience it seems to trigger too early before the pet is actually out so it doesn't allow you to do API calls on the pet you just summoned

    If I'm correct on that (haven't exactly looked into it) the cleanest solution would probably be to track the UNIT_PET event, and grab a timestamp when it triggers with GetTime() and store it into a global variable, then have a second trigger that would check once x number of seconds had elapsed since that time and then do the appropriate API checks, and then clear the global variable.
    Last edited by aggixx; 2013-06-30 at 09:35 AM.


    Druid / Demon Hunter SimulationCraft Maintainer

Posting Permissions

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