Go to Page... |
Updated: | 06-30-11 01:16 PM |
Created: | 10-12-09 02:10 AM |
Downloads: | 18,954 |
Favorites: | 113 |
MD5: |
Proof of concept plugin for LitePanels, which you will need installed.
To install, rename config_default.lua to config.lua.
/litestats (/lstats) - In-game functionality help.
Another stats mod? Why?
This addon was initially created to test LitePanels to make sure it was bug free. There are a lot of addons like this out there, but none that had the capabilities that I wanted from an addon of this type.
Missing a nifty feature X from stats mod Y?
Ask and ye shall receive!
~ modules ~
#Memory: Right click collects Lua garbage. Max number of addons can be set in the config.
#Durability: Armored man can be configured to be hidden or shown. Armor durability percentages scale from green (100%) to yellow (50%) to red (0%). Auto-repair may be toggled by right-clicking the text, guild funds can be configured in the config. Shift-click or Middle-click opens an equipment set switching menu.
#Gold: Saves data on the amount of gold you have server-wide. Right-clicking the text toggles auto-vendoring trash loot. A junk exceptions list can be configured via the /junk command.
#Clock: Left-click toggles the game calendar, right-click toggles time manager. Time manager settings apply.
#Location/Coords: Player coords are displayed on the tooltip or as a separate module. Clicking toggles the world map. Shift-click inserts the coordinates into chat.
#Ping: Displays a class colored text with who pinged the minimap!
#DPS: May be configured to show/hide on activity.
#Guild/Friends: Online count text including members/friends online tooltip with right-click sorting (guild only). Holding alt shows notes and ranks.
#Talents: Talent spec display with ability to right-click to cast dual spec.
#Character Stats: User's choice of stats configured in a [tag] format. Dual spec support.
#Experience/Played/Reputation: A three-in-one module with XP tracking, playtime tracking, and a reputation text display. The three modes can be cycled through by right-clicking.
Also: Latency, FPS, Mail, and Bag space.
Note that some modules may be disabled by default. Simply head to the config file and enable as you see fit!
» locales
Comment Options |
11-03-09, 12:58 AM | |
|
ampm = false, -- Set to false to use the 24-hour clock.
i set to false and it doesn't change the clock format? do i need to change any ingame settings? |
|
alimjocox |
View Public Profile |
Send a private message to alimjocox |
Find More Posts by alimjocox |
Add alimjocox to Your Buddy List |
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-29-09, 11:20 PM | ||
|
Bug fixed, thanks.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-29-09, 11:38 AM | |
A Defias Bandit
Forum posts: 3
File comments: 198
Uploads: 0
|
[2009/10/30 01:33:09-221-x5]: LiteStats-0.9.3\core.lua:489: bad argument #4 to 'format' (string expected, got nil)
LiteStats-0.9.3\core.lua:489: in function <Interface\AddOns\LiteStats\core.lua:482> when i change talent, i got this error message
Last edited by shinchih2001 : 10-29-09 at 01:20 PM.
|
|
shinchih2001 |
View Public Profile |
Send a private message to shinchih2001 |
Find More Posts by shinchih2001 |
Add shinchih2001 to Your Buddy List |
10-28-09, 03:28 PM | ||
|
Because otherwise, I'd have to rewrite the whole thing. Litepanels makes it easy to edit and add new things. You can embed it yourself if you want, it just needs to load before Litestats.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-28-09, 02:19 PM | |
Guest
Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
|
why do we need LitePanels? no way to get this as standalone?
|
|
10-26-09, 02:42 PM | ||
|
Nice call on the icon tag, and I was meaning to add a filter for the spam. Looks good!
Last edited by Katae : 10-26-09 at 02:43 PM.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-26-09, 01:29 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 9
Uploads: 0
|
first thx for your work i really appreciate it.
slowly replacing all my FuBar and LDB addons for this single one. so whilst editing & configuring i thought it would be neat to have an icon for the talents module so heres my suggestion add this to the list of "tags" for the talent module (in the OnEvent function of it) replace the onevent with this: Code:
local function OnEvent(self, event) if event == "PLAYER_ENTERING_WORLD" then self:RegisterEvent'PLAYER_TALENT_UPDATE' elseif event == "PLAYER_LEAVING_WORLD" then self:UnregisterEvent'PLAYER_TALENT_UPDATE' else if GetNumTalentTabs() == 0 then return end self.talents = {{},{}} for i = 1, GetNumTalentGroups() do local tal, pts, name = self.talents[i], -1 for tree = 1, GetNumTalentTabs() do tinsert(tal, {GetTalentTabInfo(tree,nil,nil,i)}) if tal[tree][3] ~= 0 and tal[tree][3] > pts then name, icon, pts = {tal[tree][1],tree}, tal[tree][2], tal[tree][3] end end if not name then name = {"No Talents"} icon = "Interface\\Icons\\INV_Misc_QuestionMark" end tinsert(tal, name) if i == GetActiveTalentGroup() then self.text:SetText(modules.Talents.fmt:gsub("%[(.-)%]", { name = name[1], shortname = name[1]:gsub(".*",talent_subs), spec = format(modules.Talents.spec_fmt,tal[1][3],tal[2][3],tal[3][3]), icon = format("\124T%s:" .. s.size * 1.3 .. "::0:-2\124t",icon) })) tinsert(tal, 1) end end end end AND i am working on the ability to supress the spam (with an On & Off switch) ================================================================ EDIT: Got the spam filtering to work I'm just gonna spam the whole Talent Module cuz it's the easiest ^^ Feel free to implement if you like it. Don't forget to define modules.Talents.hide_spam in the config of the modules! Locals and Functions needed Code:
-- ================= Talent Spam Filter Stuff ================ -- Dual Spec Spell Names local SpecSpellPrimary = GetSpellInfo(63645) local SpecSpellSecondary = GetSpellInfo(63644) -- Time variables for the temporary Supressing local SpecSwitchStart = 0 -- Spam patterns local SpecSpam1 = string.gsub(ERR_LEARN_ABILITY_S:gsub('%.', '%.'), '%%s', '(.*)') local SpecSpam2 = string.gsub(ERR_LEARN_SPELL_S:gsub('%.', '%.'), '%%s', '(.*)') local SpecSpam3 = string.gsub(ERR_SPELL_UNLEARNED_S:gsub('%.', '%.'), '%%s', '(.*)') -- Our chat filter function. local function FilterTalentSpam(self, event, msg) -- You have unlearned soandso. -- You have learned a new spell: soandso. -- You have learned a new ability: soandso. if (SpecSwitchStart > GetTime() - 8) and (msg:find(SpecSpam1) ~= nil or msg:find(SpecSpam2) ~= nil or msg:find(SpecSpam3) ~= nil) then return true end end -- ================================================================ The Module (with the Icon Tag already implemented) Code:
-- Talents m = modules.Talents; if m and m.enabled then local function OnEvent(self, event, ...) if event == "PLAYER_ENTERING_WORLD" then self:RegisterEvent'PLAYER_TALENT_UPDATE' elseif event == "PLAYER_LEAVING_WORLD" then self:UnregisterEvent'PLAYER_TALENT_UPDATE' elseif event == "UNIT_SPELLCAST_START" then local unit, spellName = ... if unit == "player" and (spellName == SpecSpellPrimary or spellName == SpecSpellSecondary) then SpecSwitchStart = GetTime() end else if GetNumTalentTabs() == 0 then return end self.talents = {{},{}} for i = 1, GetNumTalentGroups() do local tal, pts, name = self.talents[i], -1 for tree = 1, GetNumTalentTabs() do tinsert(tal, {GetTalentTabInfo(tree,nil,nil,i)}) if tal[tree][3] ~= 0 and tal[tree][3] > pts then name, icon, pts = {tal[tree][1],tree}, tal[tree][2], tal[tree][3] end end if not name then name = {"No Talents"} icon = "Interface\\Icons\\INV_Misc_QuestionMark" end tinsert(tal, name) if i == GetActiveTalentGroup() then self.text:SetText(modules.Talents.fmt:gsub("%[(.-)%]", { name = name[1], shortname = name[1]:gsub(".*",talent_subs), spec = format(modules.Talents.spec_fmt,tal[1][3],tal[2][3],tal[3][3]), icon = format("\124T%s:" .. s.size * 1.3 .. "::0:-2\124t",icon) })) tinsert(tal, 1) end end end end lpanels:CreateLayout("Talents", {{ name = "Talents", anchor_frame = m.anchor_frame, anchor_to = m.anchor_to, anchor_from = m.anchor_from, x_off = m.x_off, y_off = m.y_off, strata = "HIGH", level = 99,-- height = 11, text = { font = s.font, color = s.color, size = s.size, alpha = s.alpha, outline = s.outline, shadow = s.shadow }, OnLoad = function(self) self:RegisterEvent'PLAYER_LOGIN' self:RegisterEvent'PLAYER_TALENT_UPDATE' self:RegisterEvent'CHARACTER_POINTS_CHANGED' self:RegisterEvent'PLAYER_ENTERING_WORLD' self:RegisterEvent'PLAYER_LEAVING_WORLD' self:RegisterEvent'UNIT_SPELLCAST_START' if modules.Talents.hide_spam then ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", FilterTalentSpam) end end, OnEvent = OnEvent, OnUpdate = function(self) if GetNumTalentTabs() ~= 0 then self:SetScript("OnUpdate",nil); OnEvent(self) end end, OnEnter = function(self) if UnitLevel'player' >= 40 then GameTooltip:SetOwner(self, modules.Talents.tip_anchor) GameTooltip:ClearLines() GameTooltip:AddLine("Talent Specs",tthead.r,tthead.g,tthead.b) GameTooltip:AddLine' ' for i = 1, GetNumTalentGroups() do local tal = self.talents[i] local tree = tal[4][2] local name, icon, talents = tal[tree][1], tal[tree][2], format("%d/%d/%d",tal[1][3],tal[2][3],tal[3][3]) if tal[5] then r,g,b = 0.3,1,0.3 else r,g,b = 0.5,0.5,0.5 end GameTooltip:AddDoubleLine(format("\124T%s:19\124t %s %s", icon, name:gsub(".*",talent_subs), talents),i==1 and "Primary" or "Secondary",1,1,1,r,g,b) end GameTooltip:Show() end end, OnLeave = HideTT, OnClick = function(_,b) if b == "LeftButton" and GetNumTalentGroups() > 1 then SetActiveTalentGroup(3-GetActiveTalentGroup()) elseif b == "RightButton" then ToggleTalentFrame() end end }}) end ------------------------------------------ PS: If it's coded bad, i'm sorry. I've just started to fool around with lua/addons since 2 weeks and i've been going through loads of Code to learn as much as I can.
Last edited by donjon : 10-26-09 at 02:48 PM.
|
|
donjon |
View Public Profile |
Send a private message to donjon |
Find More Posts by donjon |
Add donjon to Your Buddy List |
10-25-09, 10:27 PM | ||
|
The font config is made for convenience, you can easily go down to the modules you want to customize directly and, in the instance of the Location outline, change outline = s.outline to outline = 1.
Other things, such as size, color, etc., can be changed much the same way.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-25-09, 10:03 PM | |
|
thx alot for the update anyway to outline certain things? lets say Location or Clock? without outlining the rest of the stats?
Last edited by alimjocox : 10-25-09 at 10:03 PM.
|
|
alimjocox |
View Public Profile |
Send a private message to alimjocox |
Find More Posts by alimjocox |
Add alimjocox to Your Buddy List |
10-25-09, 08:04 PM | |
|
Added guild/friends, bag space, and talent spec modules with 0.9.3. Sorry about not adding XP and mail yet, but I promise that it's coming
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-24-09, 04:14 PM | ||
|
That's intentional, but I could add an option to repair all or only equipped.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
10-24-09, 09:08 AM | |
|
Something i've noticed about the auto-repair feature is that it doesn't repair the equipments you have in your inventory, only what you have on yourself. This is specially useful for hybrid classes that has more than one role in a raid (like a shaman, you can be invited as dps, but then be forced to go healer at some point).
|
|
Dajova |
View Public Profile |
Send a private message to Dajova |
Find More Posts by Dajova |
Add Dajova to Your Buddy List |
10-23-09, 11:06 AM | |
|
thx again
That did the trick. I cant figure out how to make the hour number on the clock stay white though.
|
|
omnidirectional |
View Public Profile |
Send a private message to omnidirectional |
Find More Posts by omnidirectional |
Add omnidirectional to Your Buddy List |
10-22-09, 07:51 PM | ||
|
Re: thx
You'll need to go to the modules you want to class color, and change the text's s.color config to "CLASS". You can then color the number a different color.
For example: fmt = "|cffFFFFFF%s|rFPS" -- 'FPS' would be class colored and the number will be white.
Last edited by Katae : 10-22-09 at 07:52 PM.
|
|
|
Katae |
View Public Profile |
Send a private message to Katae |
Find More Posts by Katae |
Add Katae to Your Buddy List |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.