• 0

    posted a message on Just started coding Addons
    Find a part of the UI you'd like to improve or find a simple addon that's abandoned or missing a feature and tinker with it to add it.
    That's the best I can offer. :)

    The simplest to begin with the better.
    Posted in: Need Help?
  • 0

    posted a message on GuildInvite() API Help
    Check out CHAT_MSG_WHISPER_INFORM (or not I always get incoming/outgoing mixed up and have to test in-game to find which is which)

    If it's not that it might require a hardware event (like when you press Enter at chat) and can't be done fully automated from addon.

    In that case you'd need to popup a button when someone whispers you or make a clickable link to do the actual invite.
    Posted in: Lua Code Discussion
  • 0

    posted a message on useful table functions
    If you want other authors to interact with your addon the proper way is to export API.

    If you want to share functionality not specific to your addon with other authors the proper way is to wrap that functionality in a library that authors can embed in their addon (or not).

    What's definitely not the proper way is to make sweeping decisions about what's the expected functionality of the Lua environment and force it on me.

    That is unless you enjoy hostility and want to force addon authors to bitch at users to disable your addon if detected or forcibly disable it themselves.

    PS. I don't know the details of your implementation or if what you described is even possible, I'm speaking of the intention.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Cross-realm grouping tool (like oQueue)
    Regardless any issues with the addon code, that's not the way to request an alternative.
    Posted in: Addon Ideas
  • 0

    posted a message on Equipment Manager Question
    Server side indeed.
    Posted in: General AddOns
  • 0

    posted a message on easy way to post a list of strings for localization?
    The easiest way to answer that is to enter a couple test phrases manually and then do 'Export' selecting one of the 3 formats in the dropdown.
    What you get in the output is how you'd format your input for the respective 'Import' option.

    Edit:
    If the project in question is oQueue, you obviously don't need to enter test phrases you've already enabled the localization app and have existing entries there.
    You can just do an export with the format selection you prefer and the output will show you how you'd format your import text.
    Posted in: General AddOns
  • 0

    posted a message on easy way to post a list of strings for localization?
    The localization app on wowace/curseforge can do that.

    You make your full file in one of the formats it understands and Import it in one go.
    Posted in: General AddOns
  • 0

    posted a message on Addon like CCreporter
    My LoseControl Options Fix can do that.

    It works off the default Loss of Control Alerts so if you don't want a specific kind of cc to announce you have to uncheck it there.
    Posted in: Addon Ideas
  • 0

    posted a message on how to get the UnitName with only the NPC id
    To my knowledge yes, and asking the question many times won't yield a more favorable answer :P

    A look into your Cache folder (under your World of Warcraft or virtual store folder) will convince you.

    You'll notice the folder and file structure follows this scheme.
    Cache\WDB\enGB\creaturecache.wdb|npccache.wdb etc
    Posted in: Lua Code Discussion
  • 0

    posted a message on how to get the UnitName with only the NPC id
    Afaik you can't.
    If it's not in the cache it's not in the cache.

    That was pointed out on that thread I linked and I don't know of any way to programmatically do a refresh / populate the creature cache like you can do for items.

    Edit
    To expand a little on what I said, this behavior is what rare scanners like SilverDragon and _NPCScan rely upon to augment their detection routines.
    SilverDragon's description puts it in a few more words.

    Maybe you could make it self-learning? Store discovered localized names to your variables.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Slash commands
    afaik arg1 is empty string if you pass no arguments.
    Put an else after the elseif to be covered.
    Posted in: Lua Code Discussion
  • 0

    posted a message on how to get the UnitName with only the NPC id
    I'm pretty sure he can find the 'thread' link up top :P

    I was trying to be helpful by pointing him at the post that summarizes the discussion, since there's alot of irrelevant ideas at the first few posts (some of them mine)
    Posted in: Lua Code Discussion
  • 0

    posted a message on how to get the UnitName with only the NPC id
    This discussion might be relevant.
    Posted in: Lua Code Discussion
  • 0

    posted a message on zone number help
    Quote from A_Nolan
    ok i am trying to get the zone area number to print
    i'v tried in these two ways
    function HelloWorld()             
        local hw = CreateFrame("FRAME");    
        hw:RegisterEvent("ZONE_CHANGED_NEW_AREA")    
        hw:SetScript("OnEvent", function()    
            local mapName =  GetCurrentMapAreaID();
            print(mapName) 
        end)    --< you were missing the inner function() 'end'
    end
    ..\AddOns\HelloWorld\HelloWorld.lua line 7:
    unexpected symbol near ')'

    now what is wrong :)

    not too short
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hooking clicks in the Dungeon Journal
    Not sure about the 'best' part but this should work.

    local templates={
      ["EncounterInstanceButtonTemplate"]=true,
      ["EncounterBossButtonTemplate"]=true,
      ["EncounterItemTemplate"]=true,
      ["EncounterInfoTemplate"]=true,
    }
    local function getLink(self,button)
      if self.link and IsModifiedClick("CHATLINK") then
        -- do whatever with the link, example print it.
        print(self.link)
      end
    end
    local function createFrame(ftype,fname,fparent,template)
      if template and templates[template] then
        if not fname then return end
        local button = _G[fname].button or _G[fname]
        if button and button:IsObjectType("Button") then
          if button.hooked then return end
          button:HookScript("OnClick",getLink)
          button.hooked = true
        end
      end
    end
    hooksecurefunc("CreateFrame",createFrame)
    getLink runs after the default UI functions so it won't break the Encounter Journal or other addons.
    Posted in: Need Help?
  • To post a comment, please or register a new account.