1. #1

    Weakaura based on DBM pull timer

    I was looking to make a weak aura based off the dbm pull timer, so that on ~3 seconds left, it would pop up a reminder for me to start fraps recording (probably a text aura "START FRAPS!" or something).

    So I found, at least part of, the DBM code that does the pull timer....:

    elseif cmd:sub(1, 4) == "pull" then
    		if DBM:GetRaidRank(playerName) == 0 or IsEncounterInProgress() then
    		local timer = tonumber(cmd:sub(5)) or 10
    		local channel = (IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT") or (IsInRaid() and "RAID_WARNING") or "PARTY"
    		if IsInGroup() and timer > 1 then
    			SendChatMessage(DBM_CORE_ANNOUNCE_PULL:format(timer), channel)--Still give everyone first raid warning (but only that one)
    			DBM:Schedule(timer, SendChatMessage, DBM_CORE_ANNOUNCE_PULL_NOW, channel)
    		sendSync("PT", timer)
    Now my question is, is there something in there, or something I could add, that a weak aura could trigger off of?

  2. #2
    It's sending a chat message with text (evaluated) DBM_CORE_ANNOUNCE_PULL:format(timer) to channel. You could get from that the amount of time till pull, and then do a paralell count down using update scripts.

  3. #3
    I get the concept of doing like another timer of length (timer - 3 seconds) parallel with the pull timer which would be sent to a hidden channel or whatever. I don't know how to "catch" that event with weakauras. I'm quite unfamiliar with LUA.

    So perhaps something like this...?

    DBM:Schedule(timer, SendChatMessage, DBM_CORE_ANNOUNCE_PULL_NOW, channel)

    DBM:Schedule(timer - 3, SendAddonMessage, "StartFrapsTimer", "RAID")

    And then pick it up from "CHAT_MSG_ADDON" ?

    Am I on the right track here?

  4. #4
    I'm not in any way familiar with the specifics of DBM code, but something like that may possibly work. Best way to find out is by testing your theory - use /eventtrace to check for CHAT_MSG_ADDON actually firing.

    PS: Try this instead:
    DBM:Schedule(timer - 3, SendAddonMessage, "MyWAPrefix","StartFrapsTimer","RAID")

    Make sure you register for the prefix - does WA have some sort of OnLoad hook?
    UI & AddOns expert | Interface & Macros moderator - My work

  5. #5
    I'll give it a shot when I get home hopefully. Though I'm not really sure where to put the Register Prefix thing. Perhaps this has the answer. But I'm quickly exiting my area of experience/expertise .

    Thanks for the info.

    ---------- Post added 2013-05-15 at 06:34 PM ----------

    Alright so I got something working, basically first try - thanks for the help again.

    For anyone interested that wants to use this:

    1. Open Addons\DBM-Core\DBM-Core.lua in a text editor
    2. Search for text (ctrl+f):

    DBM:Schedule(timer, SendChatMessage, DBM_CORE_ANNOUNCE_PULL_NOW, channel)

    3. Add this line directly below it:
    DBM:Schedule(timer - 3, SendAddonMessage, "MyWAPrefix","StartFrapsTimer","RAID")

    4. In weakauras, import the following aura:

    5. And that should be all. You'll want to do a /rl if you do steps 1-3 with the game open. And for the sake of import issues, the trigger for the aura is:

    Type -> Custom
    Event Type -> Event
    Event(s) : CHAT_MSG_ADDON
    Custom Trigger:
        if(prefix == "MyWAPrefix" and msg == "StartFrapsTimer") then
            return true;
    Timed: 2 (seconds)

    ---------- Post added 2013-05-15 at 09:32 PM ----------

    So, not sure why I didn't realize this as it's quite obvious, but... yeah... this as is will only work with your own DBM pull timer.

  6. #6
    So, I figured out where it needed to be put to make it work with any pull timer from anyone in the raid. There is a sync handler function in DBM-Core and that's where it needs to go.

    So in order to do it follow the steps above, but instead on step 2 do a ctrl+f search for:

    DBM:StartLogging(timer, checkForActualPull)

    And add the line from step 3 above to above where this line you searched for is. Below it should be fine too really.

    Haven't actually tested if this alone (without adding the line in the previous location as outlined in the previous post) will show the weakaura for a timer made by yourself. But as I am not the tank on my main, 99% of the time I am not starting the timer myself anyway. Showed on every pull last night for timers started by our tank.

    Either way there should be more than enough info here for someone to get this working for themselves.

  7. #7
    Sorry to post in an old thread but the information here is a great starting point for me.

    What I want to do, is set up a combat timer in Weak Auras which I can then tweak for example so I can send myself reminders to do certain abilities at particular times in the fight.

    I understand the information above on how to modify the DBM .lua file so that DBM sends a chat message that weak auras recognizes.

    I need help with how to set up weak auras so that I can put a combat timer on screen, and how to trigger off that to put messages on screen at specific times.

  8. #8
    Mechagnome Krazyito's Avatar
    Join Date
    Oct 2010
    North Miami
    Necroing again to add better information.

    DBM and big wigs already send an addon msg to each other for pull timers. You can simply catch that msg to figure out how much time is left.

    Here is an example that will play a sound at 3s.


Posting Permissions

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