• 0

posted a message on Lua Tables
Yep, it's me again...

So I'm working on a little module for an addon... What it does is compare the damage your main-hand melee weapon is doing to a target versus the damage it would do against an unarmored target. It then throws that value into a table as follows:

```local t = {}

if table.getn(t) <= 10 then
table.insert(t, value)
elseif table.getn(t) > 10 then
table.remove(t, 1)
table.insert(t, value)
end
end

(This is only part of the code, shortened to get my point across... If it's working how I think it's working, it should allow it to send a never ending stream of values, but with never more than ten held in the table at any given time.)

Now my specific problem is this... I seem to be able to add values to the table just fine... But I need to be able to take those values in the table, add them up, get the average, then spit that average out. (This is designed to counteract the effect a weapon's damage range has on the estimated armor taken from a single calculation.)

I've poked around on several different forums, looked at a few different addons, but I can't figure out the right way to do this. Basically, I think I need to do this:

`armortotal = (t[1] + t[2] + t[3] + t[4] + t[5] + t[6] + t[7] + t[8] + t[9] + t[10]) / 10`

Except I have no way of knowing how many values will actually be inside the table. The table gets nil'd out when I change targets and starts adding new values after I start hitting that target, so I might not have 10 values in the table when I call for the armortotal variable. I'm assuming that if I have less than 10 values inside, the above armortotal variable will probably fail to work properly.

So what do I need to do to get the values out of the table, and is there a better way to do this overall?
Posted in: Lua Code Discussion
• 0

posted a message on SpellStatus-1.0
Same error here... Also while being zerged in PvP, incidentally...
Posted in: Libraries
• 0

posted a message on Battle Chat (SCT/SCD in log form)
Actually, I just went into the xml and reduced all the 20s to 15s and that shrunk the icons and compacted the text very nicely.

Cropping the textures is a great idea, though. Gotta try to impliment that.

Edit: Changing the 20s to 15s compacted everything up, but also shrunk the scrollable area... Probably still could be made to work, I'm just an XML nub.
• 0

posted a message on Battle Chat (SCT/SCD in log form)
Yeah, the spaces between the text definitely needs to be more compact, irregardless of what size the frame is.
• 0

posted a message on XRaidStatus
Well, in a few more months you'll need to track paladin stuff for Horde-side, too! :D
• 0

posted a message on Battle Chat (SCT/SCD in log form)
Except for possibly putting the name of the target on the very top, seperate from the scrolling text (the column header, if you will) I agree that having names clutters it up.
• 0

*looks left and right, to see if Industrial is around*

*coughshttp://www.wowace.com/forums/index.php/topic,1654.0.htmlcoughs*

Might just wanna do a forum search before ya ask next time, lest ye incur the wrath of the less forgiving than I. :)
• 0

posted a message on Battle Chat (SCT/SCD in log form)
As for sizing issues... Why not just let the user size the frame themselves and set the font sizes themselves? People could just fix all the sizes to suit their display and whatever custom fonts they may be using.

Edit: Removed the earlier chatframe related bits, I misunderstood :D
• 0

posted a message on Chat Frame Extender
Yarr!

```ExtendedChat = {}

function ExtendedChat:Enable()
local cf

for i = 1,7 do
cf = getglobal("ChatFrame"..i)
cf:SetMaxResize(10000,10000)
cf:SetMinResize(1,1)
end
end

ExtendedChat:Enable()```

Edit: Haven't actually tried this yet, don't blame me if it does nothing... Or explodes.
• 0

posted a message on Chat Frame Extender
Would like to see the same thing for the minimum width...

Anywho, you CAN actually do a little hack to get around this... Just go into your layout-cache.txt file and manually set the width you want. It's not pretty, but it works. Just don't unlock and try and manually change the size in the game, else it'll reset back to the old limits.

Maybe I'll poke around and see if I can come up with something simple, but the blizzard chat frames scare me and I'm kinda afraid to mess with them too much.
• 0

posted a message on ag_UnitFrames (Release 7/19/2006) alpha version
Actually, it's about 0.5s average reaction time, 0.5s before frames are updated, between 0.1s and 1.0s for latency, not to mention who knows how many idiosyncrasies hidden away inside the game's code and your own computer's performance. Point is, if you're not proactively healing, you're not healing properly anyway. Even for instant spells. And yes, I've spent the better part of the last year as a raid healer.

Ideally, I would want raidframes that update faster than 0.5s, but I'm stuck playing on an old machine, in 800x600 resolution, I have to use addons that won't bog me down. It seems to me a slider for changing update times is the best solution. Everyone can have their cake and eat it, too.

P.S. Bring on the 25 man raids! Can't wait to have some decent performance in a raid, at last.
Posted in: Unit Frames
• 0

posted a message on idUnitWatch
These tempt me with their cleanliness and shininess...
• 0

posted a message on ag_UnitFrames (Release 7/19/2006) alpha version
I think you're supposed to be creating branches when you're going to do a lot of changes... That way the original author can check it all out and merge it into the trunk if he likes it.
Posted in: Unit Frames
• 0

posted a message on UI Screenshots - Show us what you use!
That's what I was thinking... You might as well just use Viewport and hide the entire screen, except for a little box in the center. Then you can play in some insane resolution with an awesome framerate! :D
Posted in: General Chat
• 0

posted a message on UI Screenshots - Show us what you use!
Quote from Spellweaver »

unfortunatly its discord art :'(

Aileen, you can get the same look with just a small addon you can write yourself.

```	local sep = CreateFrame("frame", nil, UIParent)
sep:SetFrameStrata("BACKGROUND")
sep:SetWidth(UIParent:GetWidth() + 20)
sep:SetHeight(148)
sep:SetBackdrop({
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 }
})
sep:SetBackdropColor(0,0,0,0.5)
sep:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
sep:ClearAllPoints()
sep:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, -10)```

And that's about it. Just slap that in a .lua file, make the .toc file for it and stick it in the addon directory and it should work. You may need to adjust the colors, transparency and size to get it how you want it, of course.

Warning: I am not responsible for the possibility that this code may not work. May cause side effects including dry mouth, constipation, heart palpitations and death. Talk to your doctor to see if this code is right for you.
Posted in: General Chat