• 0

    posted a message on [code review] SmartRes2 in progress
    http://pastey.net/115959

    Is this better? I haven't had a lot of time to code, which is why the long response time.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibBars-1.0 docs?
    I've searched this forum, looked at addon code (helpful, but still a bit frustrating) and even turned to the trusty Google, and found nothing. So, the question becomes: is someone writing the API docs for LibBars-1.0?

    Yeah, yeah, I'm a noob. I live with it! :p
    Posted in: Libraries
  • 0

    posted a message on AliveFU
    In my sleepy state, I think I missed this. In the code OrionShock and Tristanian used, the first line reads

    local ldb = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("[B]AliveCount[/B]", {type = "data source", label = "Alive Report", text = "0/0 Alive", icon = "Interface\\PVPFrame\\\PVP-ArenaPoints-Icon"})


    And shouldn't it be

    local ldb = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("[B]FuBar_AliveFu[/B]", {type = "data source", label = "Alive Report", text = "0/0 Alive", icon = "Interface\\PVPFrame\\\PVP-ArenaPoints-Icon"})


    or something like that? Note the bolded text.
    Posted in: Addon Ideas
  • 0

    posted a message on AliveFU
    For the Fubar_AliveFu.toc you would want:

    ## Interface: 30100
    ## Author: OrionShock
    ## Name: FuBar_AliveFu
    ## Notes: FuBar plugin showing #dead/party or raid
    ## X-Category: Raid, Party
    
    ## OptionalDeps: LibDataBroker-1.1
    
    #@no-lib-strip@
    Libs\LibStub\LibStub.lua
    Libs\LibDataBroker-1.1.lua
    #@end-no-lib-strip@
    
    FuBar_AliveFu


    And for the FuBar_AliveFu.lua you want:
    local ldb = LibStub("LibDataBroker-1.1"):New("AliveCount", {
        text = "0/0 Alive"
        icon = ""
        })
    local frame = CreateFrame("Frame")
    local delay, interval = 0, 5
    frame:SetScript("OnUpdate", function(f, e)
        delay = delay + e
        if delay > interval then
            local dead, party, raid = 0, GetNumPartyMembers(), GetNumRaidMembers()
            if raid > party then
                for i = 1, raidCount do
                    if UnitIsDead("raid"..i) then
                        dead = dead + 1
                    end
                end
                ldb.text = ("%d/%d Alive"):format(dead, raid)
            else
                for i = 1, partyCount do
                    if UnitIsDead("party"..i) then
                        dead = dead + 1
                    end
                    if UnitIsDead("player") then
                        dead = dead + 1
                    end
                end
                ldb.text = ("%d/%d Alive"):format(dead, party)
            end
            delay = 0
        end
    end)


    I have attached the full addon, and hopefully it works; I have not tested it. You can get fancier, but this is KISS.
    Posted in: Addon Ideas
  • 0

    posted a message on GatherMate: Offical Thread
    Quote from lakers1125
    The nodes wont show up for me.

    Does anyone know why?


    Did you use the Import feature? They won't show until you do.
    Posted in: General AddOns
  • 0

    posted a message on dura addon
    Look into oRA2, but everybody would have to get it installed.
    Posted in: AddOn HELP!
  • 0

    posted a message on [code review] SmartRes2 in progress
    http://pastey.net/115147

    Right, questions:
    1. How do I get the db to save the bar texture?
    2. The massive function at the end is trying to res chars in a specific order. Did I get it correct?
    3. I need to allow the user to move/resize the bars, but I am lost
    4. Should the addon force users to use the Interface Options pane or keep both that and slash commands?
    5. I know I bungled LibCandyBar-3.0 but I can't see it.
    6. Is this truly disabled in combat, or is something left hanging?
    7. I don't want to see the Druid spell "Rebirth" and hopefully it isn't here
    8. I know math.rand is used in creating random messages to chat, but how do I convert math to strings?
    9. Is my code for LibSharedMedia-3.0 working, or missing something. I am trying to use AceGUIWidgets
    10. Anything else I am missing, or added needlessly that would drive users (or follow up coders) nuts?

    EDIT** If anyone can point out efficiency flaws, either in the code, or when the code would run and slowwwwww down WoW, that would also be appreciated. Also, I thought (after the original post) that I don't have the 2 keybindings. I will have to look into how to create those in Cladhaire's and Kaelten's book, since I have no idea off the top of my head. :(

    If anybody's head explodes looking at my code, I apologize now, will call an ambulance, and think nice thoughts of and for you.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Fresh install, Ace addons not working
    If you use the Curse Client, click Manage Games at the left, and select either with libs or without. Methinks you have it set to no libs, and I have found the odd addon here and there that doesn't grab the libraries separately, and I have to download the libs manually.
    Posted in: AddOn HELP!
  • 0

    posted a message on hook AddMessage problem
    I believe you want to replace this.XXX with self.XXX since you reference "self" in the function. "self" ~= "this" .... Doesn't matter which one you use, just be consistent.
    Posted in: AddOn HELP!
  • 0

    posted a message on Decursive 2.0 (official thread)
    I know the external libs issue has been discussed on page 9 or so, but just a head's up: using external libs in the Curse Client, Decursive throws two errors on character login.
    1. Ace2 is out of date
    2. DewDrop is out of date
    User fix: tell the CC to update those two as Alpha
    Developer fix: Update the .pkgmeta file to force the newest versions, or recode using Ace3 and not using DDL?

    I know the user fix works, but not sure if the .pkgmeta idea will work, and recoding can get ugly.
    Posted in: General AddOns
  • 0

    posted a message on SmartRes2 unknown units and organized lists
    Quote from DathRarhek
    Line 130:
    if not targetName or targetName == "unknown" or targetName == "" then 


    You don't need to do this. ResComm_ResStart will never return unknown as targetName. It will have done the tooltip scanning for you.

    The whole point of LibResComm is the tooltip scanning. It's the reason that we need a communication library to do do resurrection communication.

    If a resser is not using CTRA, oRA2 or an addon embedding LibResComm there is NO possible way of knowing who he is ressing if it is a released target.


    You sir, are a genius, and I thank you. I wasn't at all certain if LRC did or did not return unknowns, but now knowing that it does, makes me feel even more indebted to you.
    Posted in: Lua Code Discussion
  • 0

    posted a message on free premium account for addon authros?
    Welcome to the big leagues! :p *ahem* No, I did not forget to whom I am addressing LOL!!

    Myrroddin of Llane, Moderator of Curse's boards, noob of addon development...
    Posted in: General Chat
  • 0

    posted a message on SmartRes2 unknown units and organized lists
    I thought of that, and did have almost the exact code, but then I realized a possible problem: since we are talking about ghosts, then how would that code know that the corpse you are clicking on is actually that player? Furthermore, say two healers click on two different corpses, again, how would it know? The idea is for the player with SmartRes2 to know all ressing targets, regardless of dead or ghost status, and regardless of whom is casting the res spell, and regardless whether or not other players have SR2.

    As I said, the original SmartRes could make that distinction, but the related code is... beyond confusing. Not to mention buggy at this point.

    If it helps, SR2 has two res keys. Press the autokey, and it will res a non-ghost player who has not been ressed already, and the manualkey gives you the hand cursor to target a corpse. In both cases, using either LibBars-1.0 or LibCandyBar-3.0 (I haven't decided which one to use) it puts bars on the screen that say "resser is ressing targetName" with optional chat output of same.

    Released ghosts would say "resser is ressing unknown" which is precisely what I don't want.

    Thank you for the suggestion, however. :-D
    Posted in: Lua Code Discussion
  • 0

    posted a message on Mountain Dew Contest
    You have 45+ Exalted Factions? No wonder there are so few Chuck Norris facts – you have no time to code!

    BTW, I'm in Edmonton, so hello to your part of Canada!!
    Posted in: General Chat
  • 0

    posted a message on SmartRes2 unknown units and organized lists
    First, apologies for the unfinished code; I am coding around the missing functions, but really want to get these in. They are bugging me.

    http://pastey.net/114425

    At line 130, I will call a function Addon:UnknownToKnown() that will scan tooltips to get the names of released, ghost characters, and properly add that info to targetName. I looked at the original SmartRes code, but it seems needlessly complex, not commented should someone take over SR2 from me, is just a headache.

    At least I think I should be scanning tooltips. Suggestions, howtos?

    Also, line 202 begins the dead list function for ressing using the autokey (not coded yet) but I want players ressed in a specific order, and not willy-nilly like SR1 does. Specifically:
    • All dead Priests
    • All dead Paladins
    • All dead Shamans or Druids
    • Any order of other Mana using classes
    • Any order of the rest of the classes
    Yeah, so I am trying to make SmartRes2 smarter than the original. Unfortunately, I am not as smart as even that.

    One last question, about localizing. My slash commands I want localized, as not everybody has an English language compatible keyboard. In the Ace3 info I have found, it suggests my 4 /xx commands be written as you see them, and in the localization file, have

    local L = LibStub("AceLocale-3.0"):NewLocale("SmartRes2", "enUS", true)
    
    if L then
       -- chat commands
       L["sr"] = true
       L["sr2"] = true
       L["smartres"] = true
       L["smartres2"] = true
    end


    Wow, I hope I got that correct. Oh, and I am not looking for bug-squashing yet, as you can see, there is a great deal of missing code. I can see the light at the end of the tunnel, however, and so are looking for some help now.

    Thank you.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.