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....:

    Code:
    elseif cmd:sub(1, 4) == "pull" then
    		if DBM:GetRaidRank(playerName) == 0 or IsEncounterInProgress() then
    			return DBM:AddMsg(DBM_ERROR_NO_PERMISSION)
    		end
    		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"
    		DBM:Unschedule(SendChatMessage)
    		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)
    		end
    		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
    Deleted
    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:
    Code:
    DBM:Schedule(timer - 3, SendAddonMessage, "MyWAPrefix","StartFrapsTimer","RAID")

    Make sure you register for the prefix - does WA have some sort of OnLoad hook?
    Code:
    RegisterAddonMessagePrefix("MyWAPrefix")

  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:

    Code:
    daezdaqivIArisJcs0PGKmleXTqGDPszyqCmuyzu0ZKOMgL6AsQTPQ8nP04OGZjH8ojq3ds1brsleH8qvQMOkHlIG2is8riHrkHALivZesXnvjTtu5NiudvcAPsKEkPPc4RqknxiP2RYFvvnyHoSkwSeXJrrtgLUmXMrvFwsgnf60cMTQ42uYUf1VLQHlflhQNlY0P66aTDKY3vjY4ruNxvA9sa7h0JXaMAnLDk7aMY3ZUgkGmogiitz2F64bmoZrPTigMMiF2i2m(S)k)nEcQnmUYJdzC2Jd5wB98PSHuZZ5fqi7tvaQLcaJukLAH6LNAfW4oELmTKhjZETZktjcneYDXuYeZZNeFuSRrkBO1UgP2ST12gz8euBo9LyE(K4JsDzBdiMiMFM1LRz8zy8eyxp1fYoiwMciKDqSKqT2ippuz6bAhp0ZettWpN3eQjcFc5FkyrkGmnjp8f2dzF6Dc5aiS0Poouvj4bm1FBKPmbtE3AQLKsNkb4TrMEVyQa)xvu8FVyQCCeIMPSG4Jh65PMtfAs2NE34XHXRskDQKPGzHMK9PhqVpLjyY7wt5bZm9qpJsHMKDsAWcFGmjwPks83gHKdOBSJrfKomcJWimg4rzdw4dKHr0rhgj96lAPwiw4dKjfgpzwy0kvbJOJomsQ6hStbFAsablbtkQGr3OKH0HryegHryegHryeloiodJogukiKomcJWimkzwiDjZcPdPdPdPpvOjzpn9EXub(VQO4N6fxqm3uMGjVB97VnYuHMK9PGj53ssPtLa82iJOPmbtE363yGvM6blHD(0a7uk4ttcgr7bNd5QPSHetS4YpU7hp0ZJdz6LcSUXX9v03ndT1tXD)4HEECitZGwa4qvLGtJJXuwjDCq8XLvYuJsOYOpkTiL)m0AA2IyAWST2C8ey)nf39JlJOPp9d7aMI7pYaMAb(4HbmF(8PyPk0ZaVnYuxi7ZNMMY4M9T2BfnL24yyJGmFd
    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:
    Code:
    function(event,prefix,msg,type,author)
        if(prefix == "MyWAPrefix" and msg == "StartFrapsTimer") then
            return true;
        end
    end
    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
    10+ Year Old Account
    Join Date
    Oct 2010
    Location
    Dallas, TX
    Posts
    561
    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.


    https://wago.io/Cuphead

Posting Permissions

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