CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on ArcHUD 2.2 (2007-06-11)
    Something I've really been missing in my attempts to slim down my UI is the ability to use ArcHUD for more than it's currently used for.

    For example, would it be feasible for it to do stuff like:

    * get information from Omen (or another threat meter) and show a bar with "% of main target's target's threat"
    * a "current DPS" bar?
    Posted in: General AddOns
  • 0

    posted a message on Saving to table
    Okay, I got polling to work the way I wanted, but now I'm stuck with something that feels really basic. Here's the code in question:

    user,craft = strsplit(" ",arg2);
    if not ArchaicCrafters[user] then ArchaicCrafters[user] = {} end
    if ArchaicCrafters[user][user.." "..craft] then return end;
    ArchaicCrafters[user][user.." "..craft] = true
    printMsg("[debug] Adding "..craft.." to "..user);


    This code is called every time a new tradeskill is received on the addon channel. The message itself looks like this:

    Greipur 30312

    The first being the user, the second being the spellID for the tradeskill. The string is split into "user" and "craft", we check if the user exists (create otherwise), then check if the key exists (break if it does), save the string, and then display a debug message to show that it has been added.

    Now, what I want is, in the debug-line, to add the name of the tradeskill using getTradeSkillInfo, but it expects an integer, all I have is the string 30312. I've been trying to convert it somehow, but I can't figure out how best to do this in lua. Is there a simple 'str2int'-type command to do this, or will I have to use some obscure workaround?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Saving to table
    I decided to go with Starinnia's suggestion.

    What happens now is that users open their tradeskill windows, and their own tradeskills get stored in their own SavedVariables. I chose not to let it spam the addon channel. As it's account based, all their alts get stored in the same file; so we get stuff like:

    ArchaicCrafters = {
    ["Taliahad"] = {
    [3420] = true,
    [3278] = true,
    [7934] = true,
    },
    ["Greipur"] = {
    [28555] = true,
    [33276] = true,
    [28575] = true,
    },
    }

    What I'm doing now is making a poll function. I've come so far as to be able to print out a debug message on my friend's screens saying "Greipur has requested a poll!", which is good, but I'm not sure how to proceed from here.

    How do you suggest I transmit the contents of the ArchaicCrafters table over the Addon channel and still carry the structure? I want the officers to receive and save information about everybody but non-officers only have themselves and their alts.

    Somehow the addon channel must say that "PlayerA" knows "123", "1234" and "12345" and "PlayerB" knows "122", "1223" and "1234", which is then saved in the abovementioned format.

    Any ideas? ;)

    Posted in: Lua Code Discussion
  • 0

    posted a message on Saving to table
    What I'd like it to do is to save everything like this, but I can't for the life of me figure out how best to code it to save that way:

     ["Greipur"] {
      ["2343"] = true,
      ["4235"} = true,
      ["4352"} = true,
    }
    Posted in: Lua Code Discussion
  • 0

    posted a message on Saving to table
    Last question for a while, I promise! :-) I've done some addon programming before, but I've never really had to get into playing around with the SavedVariables side of everything, so I'm having some problems with it right now. I've figured out how to save variables into the file and so on, but here's the catch.

    I'm saving a simple one-to-one relationship, except that there can be many different times that both sides of the table can appear.

    For those curious, this is for my guild crafting addon. I'm storing the name of the player who can craft the item along with the spellID of that particular craft. As every player can craft multiple things and as every thing (well, almost) can be crafted by multiple players, I need a good way of solving this.

    ArchaicCrafters[msgsender] = msg


    The above code just overwrites every line and only keeps the last line of what they sent, of course, leaving me with:

    	["Greipur"] = "11456", 


    When Greipur actually knows something like 150 different crafts.

    ... Any ideas?
    Posted in: Lua Code Discussion
  • 0

    posted a message on if guildRankIndex issue..
    Good point there. I'd tried using both "2" and 2, but I hadn't tried swapping the signs around. That fixed it. Thanks ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on if guildRankIndex issue..
    Hey'ya.

    Got a small issue. I'm writing an addon for the guild, and I need a few things to happen only if you're logged in as an officer (Guild rank Index 0, 1 or 2). So I assumed I could do this:

    local guildName, guildRankName, guildRankIndex = GetGuildInfo("player");

    if (guildRankIndex =< "2") then
    DEFAULT_CHAT_FRAME:AddMessage("You're an officer!")
    end

    ... But no. I'm able to display guildRankIndex, and it will display 0 for the guildleader, 1 for officers and 2 for officer alts, so that's not the issue ... so why ain't I able to use it in an if-statement like that?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Tradeskills in-guild
    The point in Officer-Only is that we will be pulling this information from the addon and using in a database on our guild homepage, so that people can, in the comfort of their living room, just browse the guild homepage and quickly see who can craft what.

    The reason for not broadcasting the information to everybody that has the addon is mainly to avoid getting huge files that need to be processed every time you log in. Having a relatively large high-end raiding guild where many people have alts leads to large databases, something that I'd like to avoid having to parse every time a person loads the game. I'd much rather put it somewhere else.
    Posted in: Addon Ideas
  • 0

    posted a message on Item ratings
    Okay, the formulae is on http://home.breki.se/formula.php

    Each cell contains a coefficient that you multiply with the stat in question. There are a few things in there that aren't in the formula, such as "baseline DPS" and so on, but for pieces of armor, the formula should work. Just don't try to apply it to weapons.

    An example of an item would be, for example, Belt of Seething Fury. It is plate, has 993 armor, 48 Strength, 37 Stamina, 38 Haste Rating. Multiply each of these values by the corresponding stat in the plate-classes, and you should find that the value for "Warrior - Arms&Fury" ends up on top, meaning that the item is best suited for that class. Items with the same iLevel and slot usually end up getting more or less the same 'value' no matter what type of item it is.

    Unfortunately, I can't give you the links to our parser scripts; we have a script where you just type in the itemID and it pulls the information from Wowhead and does all the calculations on-the-fly and spits out the finished calculations, but this should give you a general idea of where we're going with things.

    Since it's a guild implementation, some stats are weighted slightly differently. We want tanks to gear up faster than DPS-classes, so typical tank stats (Dodge, Parry, Shield Block, etc) are cheaper than they 'should' be.
    Posted in: Addon Ideas
  • 0

    posted a message on Item ratings
    Well, yes and no.

    The implementation is for our guild only, but if people are interested, I could always publish a copy of the coefficients.
    Posted in: Addon Ideas
  • 0

    posted a message on Tradeskills in-guild
    Some very good ideas there, Astaldo!

    If everything goes as planned with this, and I get it working the way I want, I could very well imagine creating a second addon based on this one where people type in a slash-command and get a box with information regarding their own Trade Skills which they can then paste onto a homepage that I can put up. This would then contain their server, faction and character name, making it easy to find exactly what you're looking for.

    Of course, it'd be very easy to exploit by just changing the copy/pasted information to contain somebody else's name and/or server, but I'll tackle problem that once I get there. :-)
    Posted in: Addon Ideas
  • 0

    posted a message on Tradeskills in-guild
    On some further thought, I figured that this was a bad way of handling things.

    Instead of listing the items that people can make, it is probably far better to link the ID of the spell that creates it. That way, one can simply list a series of numbers corresponding to the alchemy, enchanting, blacksmithing, etc _spell_ that creates the item or the enchant.
    Posted in: Addon Ideas
  • 0

    posted a message on Item ratings
    It's taken me almost an entire year to write an addon like the one that the original poster is describing, because I had to sit down and work out how good every single stat is for every single spec for every single class (balanced around PvE, not PvP). I have a total of 21 different 'roles' ranging from holy priest to moonkin to retribution paladin to combat sword rogue, and a value for every single attribute there is, ranging from stamina to armor penetration to spell crit to health regen to parry.

    It's working quite well now; you can throw an item at the addon and it says stuff like "This is a Bear Druid item!" and gives a value for how good it is for that spec, so you can compare it to other Bear Druid items. Every now and again (especially for rings and neckies) it gets a little confused and says "This is a Moonkin item!" when it might just as well be as good for a fire mage or a shadow priest, but you get my point.
    Posted in: Addon Ideas
  • 0

    posted a message on Tradeskills in-guild
    Hey all!

    I just sat down and plotted out a few ideas for an addon that I'm thinking of writing, but I thought I'd check here first in case anybody has any comments, ideas, or pointers. Maybe it's been done before, I wouldn't want to reinvent the wheel.

    Basically the idea works like this: The addon scans through your tradeskill windows every time you open them and spams an addon channel with everything you can create/build/do, ranging from your first aid recipes to your enchanting, cooking, alchemy, jewelcrafting, et cetera.

    If you have a certain rank in the guild (as I'm writing this for my guild only I can hardcode it), the addon doesn't only broadcast, but also listens to the addon channel. Using a slash command, the officers would be able to bring up a window with the information that it has picked up about people and copy it. We would then paste it into a webpage that parses the text and stores everything to a database. Then, on our guild homepage, one would be able to check who knows how to craft item X, what items person Y can craft, etc, etc.

    The syntax would be simple; something on the lines of:

    Greipur,[Elixir of Lion's Strength],[Elixir of Minor Defense],[Minor Healing Potion], et cetera.

    Where the first thing is the player's name, and the rest is items he/she can craft.

    So ... any suggestions? comments? ideas? Things I should think about before I get started?
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.