• 0

    posted a message on Filger Help
    1. Use the latest version.

    2. Make sure the two groups are not overlapping each other by enabling test mode in the lua file and moving either one because by default they are both placed in the center of the screen.

    3. In the spell data, use either "player" for your or "all" for anyone's FF as a value instead of 1 for caster.

    { spellName = "Faerie Fire", size = 32, scale = 1, unitId = "target", caster = "all", filter = "DEBUFF" },


    (Had to use normal FF instead of feral for testing as I don't have that in my spellbook.)
    Posted in: AddOn HELP!
  • 0

    posted a message on Grid - Swiftmend
    You can use any drood's rejuv / regrowth and with glyph of swiftmend the HOT is not consumed.
    Posted in: Addon Ideas
  • 0

    posted a message on LibPendingHeals-1.0
    Not to mention even if you get them to support it, many users tend not to update their addons unless they are totally broken. :/ Adding HOTs to HealComm as optional may work - although even as a resto druid I am not sure I would want that -, changing the whole thing to GUIDs from names is a different story.
    Posted in: Libraries
  • 0

    posted a message on Grid - Swiftmend
    Addons go through their own evolution over time. If there is no need for one sooner or later it disappears, and frankly I am shocked this one has seen over 15k downloads. To elaborate:

    - You should be aware of everyone's healt in your party

    - You should know what HOTs you have on each person and for how much longer

    - An addon should not be telling you whom to heal, human judgement is superior in most cases

    - You should be using the Swiftmend glyph :p

    This addon does nothing more but show you a fraction of the larger picture. You should see the entire picture to begin with - that's what Grid is for -, and make your own decisions based on that. I have been healing with a druid for a very long time, been using Grid for a very long time but never felt the need for this particular module.
    Posted in: Addon Ideas
  • 0

    posted a message on Saving tables between sessions
    Keys are for finding / referencing the actual data that is stored in your table. You either know the key to begin with or you iterate over the elements in which case you have access to it in a temp variable. But if you consider your keys as actual data in the context of that particular table, you should probably structure it differently. My view may be all wrong of course.
    Posted in: Lua Code Discussion
  • 0

    posted a message on which makes less garbage?
    Quote from Tekkub
    Disable GC, save the current memory use and time, run a loop x times with the first method in it, print.


    So this is how it should be done?

    collectgarbage"stop"
    local memstart, cpustart = collectgarbage"count", GetTime()
    
    -- code to test
    
    print(collectgarbage"count" - memstart, GetTime() - cpustart)
    


    Or should the memory part be like so:

    local memstart = GetAddOnMemoryUsage"myaddon"
    
    -- code
    
    UpdateAddOnMemoryUsage()
    print(GetAddOnMemoryUsage"myaddon" - memstart)
    


    What's the difference between the two?
    Posted in: Lua Code Discussion
  • 0

    posted a message on i have a question
    yourframe:RegisterEvent("PLAYER_REGEN_ENABLED")
    yourframe:RegisterEvent("PLAYER_REGEN_DISABLED")
    yourframe:SetScript("OnEvent", function(self, event)
    	if event == "PLAYER_REGEN_DISABLED" then
    		self:SetAlpha(0)
    	else
    		self:SetAlpha(1)
    	end
    end)
    
    Posted in: AddOn HELP!
  • 0

    posted a message on Totem Range on Minimap
    It's not really about shaman vs non-shaman. Many totems don't have a corresponding buff so it is problematic to know if you are within range or not be it your own totems or others'. Frankly the reason is beyond me since they seem to share with regular totems that provide auras the need to update at regular intervals. The lack of a visible buff makes it that much more difficult to ascertain range at times. (Think multiple group only cleansing totems Yogg phase 2 for example.) Though I would prefer displaying the information in the form of artificial auras appended to the player buff bar. Using the minimap instead of the conventional place seems impractical to me.
    Posted in: Addon Ideas
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    SetStatusBarColor takes a series of numbers as its arguments and you are only feeding it a table. Use unpack or the appropriate r, g, b keys depending on how it is stored in RAID_CLASS_COLORS, memory fails me here.
    Posted in: Unit Frames
  • 0

    posted a message on Quartz Spell cooldown module.
    If EventHorizon is not your thing, ButtonTimers and Filger (Lua only config) are both capable of tracking auras and cooldowns at the same time.
    Posted in: Addon Ideas
  • 0

    posted a message on BigWigs
    I am not overly familiar with the hierarchy of modules within BigWigs, so I may be addressing the wrong forum. If that is the case I apologize.
    How would it be possible to incorporate BigWigs' proximity display into third party addons? I find having full featured raid frames plus another rather large window dedicated solely to displaying proximity warnings somewhat redundant. I understand this leads to compatibility issues and there are many players who do not use raid frames, yet for say Grid users a simple status display would reduce clutter and improve readability a lot.
    Making a Grid module that handles these status changes is very simple, but due to me being unfamiliar with BigWigs' innards, hooking into the proximity module is something beyond me. On Grid's part this would require nothing but receiving the unitID or GUID of the player entering / leaving range, or alternatively a list of all the valid players each time BW scans the raid. Can I get this data without changing the original files?
    Posted in: Raid AddOns
  • 0

    posted a message on Weird chat addon.
    Don't be afraid of opening the .lua file. The options are very simple, just change some numbers. No need to understand Lua at all.
    Posted in: General Chat
  • 0

    posted a message on Pattern Matching (yet again?)
    Quote from Arrowmaster
    Try "[%z%s]+'.+'[%z%s]+".


    Doesn't work :(.

    Here is the piece of code I managed to come up with as a not so nice solution:

    local killSingleQuotes = function(str)
    	local _, instances = str:gsub("'", "")
    	if instances < 2 then return str end	
    	local i, open, close, tempClose = 1
    	while not close do
    		local j = str:find("'", i)
    		if not j then
    			if tempClose then close = tempClose end
    			break
    		end
    		if str:sub(j, j + 2) ~= "'s " then
    			if str:sub(j, j + 2) == "'s" then
    				if tempClose then close = tempClose end
    				break
    			else
    				if not open then
    					open = j
    				else
    					if str:find("'", j + 1) then
    						tempClose = j
    					else
    						close = j
    					end
    				end
    			end
    		end
    		i = j + 1
    	end	
    	if open and close then
    		str = str:gsub(str:sub(open, close), ""):gsub("%s+" ," ")
    	end	
    	return str
    end
    


    Which sort of follows the policy of "if unsure, don't mess with it". Reversing the string created more problems than it would have solved, messing with temp strings likewise. For its purpose that is too much so I ended up ignoring '. But hey at least now I have a vague idea when dealing with patterns :). Again, thanks for all your help!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Pattern Matching (yet again?)
    Xinhuan: I have read the linked pages plus the reference manual plus the relevant part of Programming in Lua multiple times already. You are right, ^ is taken literally if it is not the first character and as stated I do know [ ^] does not equal [whitespace or no character at all], I just used it to describe what I was looking for. And of course I tried your solution the moment you posted it, after all I am at this for days now.

    local str = [[Kvaldir's Vessel, 'The Serpent's Maw']]
    print(str:match(" *'(.+)' *"))
    


    ---> s Vessel, 'The Serpent's Maw

    That is what it prints for me.

    Thanks for the tip Orion, no mod came to mind that did more than a simple 'chop off the excess', Parrot's solution seems to prove useful.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Pattern Matching (yet again?)
    It is intended to be part of an oUF layout, specifically to abbreviate NPC names on target, targettarget, focus, focustarget and possibly pettarget if their length exceeds 20 characters. This part is really scatchy so far but a drycode goes something like:

    local abbreviate = function(name)
    	-- Remove everything between parenthesis, quotes or double quotes
    	
    	
    	-- Loop through the string and abbreviate each word
    	local replaced = 1
    	while name:len() > 20 and replaced > 0 do
    		name, replaced = name:gsub("(%w)%w%w+", "%1.", 1)
    	end
    	
    	-- If all else fails
    	if name:len() > 20 then
    		name = "..." .. name:sub(-17)
    	end
    	return name
    end
    
    local setName = function(self, unit)
    	local name = UnitName(unit) or "Unknown"
    	if busyFrames[self] and not UnitIsPlayer(unit) and name:len() > 20 then
    		name = abbreviate(name)
    	end
    	self.Health.center:SetText(name)
    	self.Health.center:SetTextColor(colorize(unit))
    end
    


    I am aware of the problem words like Quel'Thalas present and is why I tried to find an expression that means "[start of string or whitespace]'.+'[end of string or whitespace]". The problem itself is inflated but I decided to mess around with it a bit (well... 2 days and counting) since patterns used to be a black spot I wanted to get familiar with. So of course you are right, getting an extension into this layout would be overkill. I will eventually settle with something less ambitious yet better than a simple 'chop off the excess' solution.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.