• 0

    posted a message on New to LUA
    Quote from Nandini
    if(select(2, UnitClass("player")) ~= "CLASSNAME") then return DisableAddOn("YourAddonName"); end

    Isn't the DisableAddOn call superfluous since you're not in a function to return anything?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Prot paladin libram swapping addon
    I was under the impression that Libram swapping in Combat initiated a GCD, thanks to Holy Pallies and Druids doing this back in Black Temple. Isn't the "ideal" Prot Pally rotation already too tight to allow for extra GCDs?
    Posted in: Addon Ideas
  • 0

    posted a message on Instant Messenger
    Never understood the need for this given whispers and private channels. If you really wanna chat online, hop on AIM/MSN/GTalk/Y!/Skype/ICQ/IRC/XMPP/etc/etc/etc and use that.
    Posted in: Addon Ideas
  • 0

    posted a message on SexyMap - A tiny bundle of minimap awesomeification
    This may have been posted already in this thread, but here's how to create a vehicle mover:

    Line 102 of General.lua is a table called `movables`. Change it to the following:
    local movables = { 
        ["DurabilityFrame"] = L["Armored Man"],  
        ["QuestTimerFrame"] = L["Quest Timer"],  
        ["QuestWatchFrame"] = L["Quest Tracker"], 
        ["AchievementWatchFrame"] = L["Achievement Tracker"], 
        ["VehicleSeatIndicator"] = "VehicleSeatIndicator", 
    }
    Posted in: Map/Minimap AddOns
  • 0

    posted a message on Tracking raid deaths
    I've been using a CLEU parser for a while now to output raid deaths in chat for me. I'm sure it could be improved a little, but it gets the job done:

    local function CLEU(_, _, eventType, _, _, _, _, dstName)
        if eventType ~= "UNIT_DIED" or (GetNumRaidMembers() == 0) then return end
        if UnitInRaid(dstName) and (not UnitInParty(dstName)) and UnitHealth(dstName) <= 1 then
            print(ClassColor[select(2,UnitClass(dstName))] .. dstName .. "|r |cffffff00has died.|r")
        end
    end
    ClassColor is just a table of color codes e.g. "|cffc41f3b" for DKs. I had to add in the health check because a Hunter's Feign Death will actually throw a UNIT_DIED event.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Escaping characters for a slash command
    Uggh, I even read over the WoWWiki page for GII... I probably read that line and ignored it.

    Thanks.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Escaping characters for a slash command
    The print function isn't the issue. GetItemInfo() isn't returning the item properly when there's an apostrophe.

    I assure you the belt is in my itemcache. I created a link from Wowhead first and viewed the tooltip the first time my function returned a nil. I'm also able to return a link using the belt's itemID.

    The link you provided doesn't touch on using strings to return info from GII(). The itemID method works just fine.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Escaping characters for a slash command
    SlashCmdList["MINER"] = function(input)
        _, link = GetItemInfo(input)
        if not link then 
            Print("Invalid item")
            return
        else
            Print(link)
        end
    end 
    A command like "/miner Warglaive of Azzinoth" or "/miner 45525" works just fine and prints the item link. Trying to run "/miner Relic Hunter's Cord" returns nil. I've checked the arguments that are being passed to the function and a string like "Relic Hunter's Cord" makes it there intact. The call "/print GetItemInfo("Relic Hunter's Cord")" returns nil as well.

    I doubt it matters, but Print is just a ripoff of AceConsole's Print function.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Escaping characters for a slash command
    Issue: I've written a mod that can take a string as an argument to a slash command. This string might contain apostrophes. Obviously, my slash command handler doesn't like this. More accurately, the input is being passed to GetItemInfo(), which is where the problem comes in.

    Question: What's the proper way to formalize the input? A simple gsub to escape the ' doesn't seem to be effective.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Vigilant - for Protection Warriors
    Vigilant aims to be a simplistic addon that provides awareness of Vigilance for Protection warriors.

    ===Features===
    * A timer bar showing your Vigilance target and remaining duration. Color the bar by target class or static color of your choice!
    * Provides an alert with channel output of your choosing when you apply Vigilance.
    * Shift-click the timer bar to re-announce your target.
    * Warnings for yourself (in the Raid Warning area) when Vigilance expires, is removed or overwritten.

    ===Known Issues===
    * Timer bars will not persist through reloading your UI and some odd behaviors (errors) may occur. Simple solution is to just reapply Vigilance after reloading.
    Posted in: General AddOns
  • 0

    posted a message on Quick math inquiry
    Quote from egingell
    1.#IND is math.sqrt(-x) (at least on the stand-alone Lua parser for Windows).
    1.#IND is also any number that is out of range (for my tests, I used 2^10000).
    1.#INF is x/0

    Odd, I get different returns on Linux.

    Both 2^10000 and 1/0 return 'inf'. math.sqrt(-1) returns 'nan'.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibSink output to private chat channels?
    As the topic says... From a coding perspective, is it possible to get LibSink to pour output into a private chat channel? Would this require some work on the library itself, or is there some sort of hack I could implement to give users that option from within an addon?
    Posted in: AddOn HELP!
  • 0

    posted a message on Instant Health
    Phanx has a typo in her bbcode. There's a plugin called Grid_QuickHealth for Grid and a Pitbull_QuickHealth for Pitbull.
    Posted in: AddOn HELP!
  • 0

    posted a message on UlduarAutoPilot
    Pushed a new beta. Fixes the localization issue and also solves issues with dying in no man's land areas including but not limited to the area between razorscale and ignis, or the second part of thorim's gauntlet.
    Posted in: General AddOns
  • 0

    posted a message on Changelogs for tagged Git repos
    Someone please correct me if I'm wrong about this, but at some point there was some work done on the Git end of things to pretty up the version numbers generated for untagged builds (not sure if others got the makeover). I guess it had to be at the same time that tagged releases in Git stopped including rollup changelogs. Is this a bug? A feature? Something I'm doing horribly wrong? This is something that appears to affect all of my projects.

    Any help or insight would be greatly appreciated.
    Posted in: General Chat
  • To post a comment, please or register a new account.