Close
Showing results 1 to 9 of 9
  1. #1

    Default group cooldowns with dbm-spelltimers

    Scroll down for a better implementation of this!

    Hi all,

    I've been lurking around here for a while but this is my first post so be gentle! Anyway, I've been hacking around with dbm-spelltimers a bit and think I've come up with something useful to others - so I thought I would share it. Got the idea from here.

    This modification will only show cooldowns for a whitelist of players, so no spam from other members of your group/raid.

    I added a whitelist to the top of SpellTimers.lua

    Code:
    local playerWhitelist = {"Síri", "Sìri", "Sìrí", "Sírì"}
    and then modified the main handler for combat log events as follows:

    Code:
    -- first some exeptions (we don't want to see any skill around the world)
    if settings.only_from_raid and not DBM:IsInRaid() then return end
    if not settings.active_in_pvp and (select(2, IsInInstance()) == "pvp") then return end
    
    local fromplayer = select(4, ...)
    local toplayer = select(7, ...)		-- Added by Florin Patan
    local spellid = select(9, ...)
    local spellname = select(10, ...)
    
    
    -- now we filter if cast is from outside raidgrp (we don't want to see mass spam in Dalaran/...)
    if settings.only_from_raid and DBM:GetRaidUnitId(fromplayer) == "none" then return end
    
    for k,v in pairs(settings.spells) do
    	if v.spell == spellid and v.enabled == true then
    	
    		local found = false
    		for j,whitelistPlayer in pairs(playerWhitelist) do
    			if (fromplayer == whitelistPlayer) then
    				found = true
    			end
    		end
    		if (not found) then
    			DEFAULT_CHAT_FRAME:AddMessage("Filtered spell "..spellname.."("..spellid..") from player: "..fromplayer)
    			return
    		else
    			DEFAULT_CHAT_FRAME:AddMessage("Passed spell "..spellname.."("..spellid..") from player: "..fromplayer)
    		end				
    	
    		local spellinfo, _, icon = GetSpellInfo(spellid)
    		local bartext = v.bartext:gsub("%%spell", spellinfo):gsub("%%player", fromplayer):gsub("%%target", toplayer)	-- Changed by Florin Patan
    		SpellBars:CreateBar(v.cooldown, bartext, icon, nil, true)
    
    		if settings.showlocal then
    			local msg =  L.Local_CastMessage:format(bartext)
    			if not lastmsg or lastmsg ~= msg then
    				DBM:AddMsg(msg)
    				lastmsg = msg
    			end
    		end
    	end
    end
    Those two DEFAULT_CHAT_FRAME:AddMessage are in there so you can check it is working, comment them out using -- if all is fine.



    My plan is to modify this further to send the cooldown bars for different characters to different sets of cooldown bars. So, for example, you can have a set of cooldown bars for each character beside its unitframe.

    Please let me know if you have any problems with this.

    By the way, I'm rolling a new group on grim batol but don't have permission to post in the forum yet. So to all those there, looking forward to meeting you!
    Last edited by soro : 06-20-2010 at 05:25 PM

  2. #2

    Default

    I am liking what you are doing here. One of the things I hated about DBM Spell counters was picking up every Tom Dick and Harry's Cooldown.

  3. #3

    Default

    Thanks for your kind words Fizzler. I have been working on this for the last few days and I now feel what I have is ready for release as an addon. This addon was adapted from DBM-SpellTimers and my thanks and acknowledgement goes to the authors.

    Group Cooldowns v0.2-beta

    What it does:

    - Creates a set of cooldown bars for each character you specify
    - You control which cooldowns are shown & choose cooldown lenghs (so you use tallent/glyph modifiers)
    - Bars are configurable using standard DBM commands
    - Here's a pic!



    In this screen shot I am using Grid with the custom layouts mod to layout my unitframes in the same way for each char (and hide all other group members). When combined with group-cooldowns you can create a uniform unitframe/cooldown area of your UI for all group members, i.e., each unit frame and the cooldowns for that char will stay in the same location when you switch screens. You can see I have this off to the side at the moment, when it is a bit more polished I might center it and replace my player unitframe.

    How to configure:

    Well its not super easy to configure but very usable I think. Setup requires entering some information directly into the lua file and some slash commands in game.

    Lets start with your characters (line 39 of Group-Cooldowns.lua):

    Code:
    bars = { "Síri", "Sìri", "Sìrí", "Sírì" }, -- max size 5 at the moment
    Just enter up to five characters in the list. The size limitation is arbitrary and can be removed if someone requests it.

    Next enter the spells that you would like to track. There are a whole bunch already in there from the DBM-SpellTimers mod and a couple I chucked in for my mages (lines 40-69). Here are a few examples:

    Code:
    { spell = 22700, bartext = default_bartext, cooldown = 600 }, 	-- Field Repair Bot 74A
    { spell = 44389, bartext = default_bartext, cooldown = 600 }, 	-- Field Repair Bot 110G
    { spell = 54711, bartext = default_bartext, cooldown = 300 }, 	-- Scrapbot Construction Kit
    { spell = 67826, bartext = default_bartext, cooldown = 600 }, 	-- Jeeves
    { spell = 45438, bartext = "Block", cooldown = 300 }, 	-- Ice Block
    { spell = 13033, bartext = "IceBarr", cooldown = 30 }, 	-- Ice Barrier Rank4	
    { spell = 10230, bartext = "Nova", cooldown = 25 }, 	-- Frost Nova Rank4
    { spell = 12051, bartext = "Evo", cooldown = 240 }, 	-- Evocation
    { spell = 11958, bartext = "Snap", cooldown = 480 } 	-- Cold Snap
    First entry is spell id (look up spell on wowhead and then grab the id from the url - remember different ranks have different ids!). Second is the text you want displayed on the bar. Note, you must put some text in here as I guess DBT uses this as a unique identifier. Third is the cooldown in seconds. Just add as many spells as you need.

    Ok, thats all the lua. Now for the in game config.

    Type
    Code:
    /gcd move
    to display a moveable bar for each char you specified in the bars variable earlier.



    You can now now configure the bars using the following (note that settings made here apply to all bars).

    Code:
    \gcd barsetbool <option> <value>
    \gcd barsetstr <option> <value>
    \gcd barsetnum <option> <value>
    Here is what I used:

    Code:
    \gcd barsetbool HugeBarsEnabled false
    \gcd barsetnum Scale 1.5
    \gcd barsetnum Width 70
    HugeBarsEnabled = false is important as it stops the bars moving to the center of the screen DBM style.

    You can use any option specified in DBT.lua (in your DBM-Core addon directory) lines 65-217.

    Argh, nothing works!

    You can check the addon is loaded as a quick sanity check using the following:

    Code:
    \gcd version
    You can also get the addon to print verbose debug info by setting the variable db at line 36 to true.

    What do I need to use it?

    DBM-Core (the addon is attached to this post)

    Well, I think thats about it. Had a lot of fun writing it and learnt a lot. Hope this is useful to someone, if so I might see if I can improve it a bit. Any feedback is most welcome and if you have any problems give me a shout.
    Attached Files Attached Files
    Last edited by soro : 06-21-2010 at 05:37 AM

  4. #4

    Default

    Im very interested in what I see here, could you be more specific for the programmer impaired crowd? I'v DLd and installed DBM Spell timers, where do your group cooldown.lua and .toc go exactly? into the DBM - core folder??
    Deadguyfred
    Arathor Horde Shammies Andagurls, Andagurls, Andagirlz, Andagirls and Sianee Pally tank LVL 85. Druids x 5 LVL 85, Pallies x 4 LVL 80, Locks x 4 lvl 60.
    Necronelly DKs x 4 + Omghalp Disc Priest current FOTM

  5. #5

    Default

    I will download the file and give it a go tomorrow. Have you thought about looking at Jamba Proc? I can see this working nicely with that addon. Either way this is very useful as I already use DBM spell timers religiously.

  6. #6

    Default

    I'm not playing WoW, but I'mma post here so I can find this when I come back.
    Blog : Herding Khats
    Team : Kina - Çroaker - Messkit - Lìfetaker - Wìdowmaker
    Newbie Guides : Multiboxing Vol. 1 - Multiboxing Vol. 2 - HotKeyNet - Jamba
    The Almighty Lax made a liar out of me, apparently I DO get prizes for it.
    *Commences Wielding the Banhammer like there's piñatas up in here and I'm Lady Thor*

    _ Forum search letting you down? Use the custom Google search _

  7. #7

    Default

    @deadguyfred - Sorry! This was my mistake, I just stuck the files in a zip. The zip now has a folder called Group-Cooldowns containing the two addon files. The folder should be placed in your addon directory just like any other addon. Have fun!

    @Fizzler - Yes, I have looked at Jamba Proc and I'm sure it would be possible to modify it to give this type of functionality. However, this is the first time I have looked at lua/wow api so one of my main goals was to keep it simple. I understand every line of code in my app - I can't say the same for Jamba Proc! Furthermore, this uses DBT to simplify the bars/timing while I think Jamba uses custom bars. This addon is incredibly simple compared to Jafula's work

    Now I'm thinking about it, there really needs to be support for spells that modify the timers. For example, cold snap should remove all the bars that show a cooldown for frost spells. I'll see if I can sort out something like this.
    Last edited by soro : 06-21-2010 at 05:39 AM

  8. #8

    Default

    bump
    Everything that is fun in life is either bad for your health, immoral or illegal!

  9. #9

    Default

    oops wrong thread.
    Last edited by lightstriker : 11-17-2010 at 08:29 PM

Posting Rules

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