• 0

    posted a message on Scanning tradeskills
    the old armory is not updateing with the most new info alota cata info is missing from the old feeds till we get new json ones we have to use an addon...
    Posted in: AddOn HELP!
  • 0

    posted a message on Scanning tradeskills
    ial look into this ... this addon is used by wow roster and people like the rostyer and since xml is shot they want an addon so im doing my best to get this working
    Posted in: AddOn HELP!
  • 0

    posted a message on Scanning tradeskills
    Hey all Im working on wowroster-profiler and upddated version of rpgo-characterprofiler and im using ace to build teh addon one thing im having trouble with is tradeskills i can scan them but there is allways data missing ...

    this is my code if any one has any sugestions please help..

    function wowroster:TRADE_SKILL_SHOW()
    	if(IsTradeSkillLinked() or IsTradeSkillGuild()) then
    		return nil;
    	end
    	scan_cache = true;
    
    	local skillLineName,skillLineRank,skillLineMaxRank=GetTradeSkillLine();
    	local numTradeSkills = GetNumTradeSkills();
    	local cnt = 0;
    	scan_tradename = skillLineName;
    
    	if (IsAddOnLoaded("AdvancedTradeSkillWindow") ) then
    		wowroster:Print("ATSW Detected, disabling cache");
    		scan_cache = false;
    	end
    
    	if (not wowroster.db["Cached"][scan_tradename]) then
    		wowroster.db["Cached"][scan_tradename]=false;
    
    		-- build cache functions
    		scan_numtradeskills = numTradeSkills;
    
    		if (scan_cache) then
    			wowroster:BeginCache();
    		end
    	end
    
    	stat["Professions"][skillLineName] = {};
    	if ( not wowroster.db["Professions"] ) then
    		wowroster.db["Professions"]={};
    	end
    	if ( not wowroster.db["Professions"] ) then
    		wowroster.db["Professions"]={};
    	end
    
    	local skills=wowroster.db["Professions"];
    	stat["Professions"][skillLineName]["ct"] = 0;
    	stat["Professions"][skillLineName]["errors"] = 0;
    
    	if(not skills[skillLineName] ) then
    		skills[skillLineName]={};
    	end
    
    	idxStart = 1;
    
    	for idx=idxStart,numTradeSkills do
    		skillName,skillType,_,_,serviceType=GetTradeSkillInfo(idx);
    		if( skillName and skillName~="" ) then
    			if( skillType=="header" ) then
    				lastHeaderIdx = idx;
    				skillHeader=skillName;
    				if( not skills[skillLineName][skillHeader] ) then
    					skills[skillLineName][skillHeader]={};
    				end
    				--pdb = skills[skillLineName][skillHeader];
    			elseif( skillHeader ) then
    				cooldown,numMade=nil,nil;
    				numReagents = GetTradeSkillNumReagents(idx);
    				description = GetTradeSkillDescription(idx)
    				reagentlist={};
    				reagentc = 0;
    				local numReagents = GetTradeSkillNumReagents(idx);
    				local skillLink = GetTradeSkillItemLink(idx);
    				local numMade = GetTradeSkillNumMade(idx);
    				for j=1, numReagents, 0 do
    					local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(idx, j);
    					local reagentLink = GetTradeSkillReagentItemLink(idx,j);
    
    					if(reagentName) then
    						itemName, itemLink, itemRarity, itemLevel, _, itemType, itemSubType, _,_, itemTexture,_ = GetItemInfo(reagentName);
    						local ritemColor,_,_,_=wowroster.GetItemInfo(reagentLink);
    
    						reagentID  = wowroster.GetReagentId( reagentLink );
    						GameTooltip:SetOwner(UIParent, 'ANCHOR_NONE')
    						GameTooltip:SetTradeSkillItem(idx,j); --SetTradeSkillItem(idx)
    						tooltip = wowroster.scantooltip2();
    						GameTooltip:Hide()
    						color = wowroster.scanColor(ritemColor);
    						itexture = wowroster.scanIcon(reagentTexture);
    						table.insert(reagentlist,{Name=reagentName,Icon=itexture,Tooltip=tooltip,Item=reagentID,Color=color,Count=reagentCount,link=reagentLink});
    						reagentc = reagentc+1;
    					end
    				end
    
    				if (reagentc < numReagents) then
    					--wowroster:Print("".. skillLineName ..":".. skillName .." partical scan. scan agian later");
    					stat["Professions"][skillLineName]["errors"] = stat["Professions"][skillLineName]["errors"]+1;
    				end
    
    				GameTooltip:SetOwner(UIParent, 'ANCHOR_NONE')  
    				GameTooltip:SetTradeSkillItem(idx) --SetTradeSkillItem(idx)
    				tooltip1 = wowroster.scantooltip2()
    				GameTooltip:Hide()
    				tooltip = tooltip1 or "";
    				local temColor,_,itemID,itemName=wowroster.GetItemInfo(GetTradeSkillItemLink(idx));
    				local Icon = GetTradeSkillIcon(idx) or "";
    				skills[skillLineName][skillHeader][skillName]={
    					RecipeID  = wowroster.GetRecipeId( GetTradeSkillRecipeLink(idx) ) or "",
    					Difficulty= skillType or "",
    					Color = wowroster.scanColor(temColor) or "",
    					numMade = GetTradeSkillNumMade(idx) or "",
    					itemLink= GetTradeSkillItemLink(idx) or "",
    					Reagentsnum = numReagents or "0",
    					Reagents = reagentlist or "",
    					Icon = wowroster.scanIcon(Icon) or "",
    					desc  = description or "",
    					Tooltip	= tooltip,
    				};
    				cnt = cnt+1;
    			end
    		end
    	end
    	stat["Professions"][skillLineName]["ct"] = cnt;
    	--wowroster.db = skills
    end
    Posted in: AddOn HELP!
  • 0

    posted a message on Get guild memebrs's list
    just wondering if you want this info for export or to use in a nother addon?
    Posted in: AddOn HELP!
  • 0

    posted a message on Profiles kinda with AceDBOptions-3.0
    i am sorry. i was making posts between coding the addon and running a raid.
    data is stored in a global sv file under the var cpProfile followed is the Server name (array),then "Guild" defined value always there (array as well), also is "Characters" same as guild.

    each of these store info an example is

    cpProfile = {
        ["profileKeys"] = {
            ["Lumineia - Zangarmarsh"] = "Lumineia - Zangarmarsh",
            ["Ulminia - Zangarmarsh"] = "Ulminia - Zangarmarsh",
        },
        ["Zangarmarsh"] = {
            ["Guild"] = {
                ["Honors Asylum"] = {
                    ["GuildXP"] = "7469189:19060811",
                    ["GuildXPCap"] = "4654078:0",
                    ["Locale"] = "enUS",
                    ["CPprovider"] = "wowr",
                    ["Motd"] = "I did some cleaning up if your alt got kicked from the guild please let me know!!! I will invite them back..!",
                    ["Server"] = "Zangarmarsh",
                    ["DBversion"] = "3.1",
                    ["NumMembers"] = 133,
                    ["Faction"] = "Alliance",
                    ["FactionEn"] = "Alliance",
    
                    ["GuildLevel"] = 7,
                    ["Info"] = "",
                    ["GuildName"] = "Honors Asylum",
                    ["ScanInfo"] = {
                        ["Character"] = "Ulminia",
                        ["IsGuildLeader"] = false,
                        ["HasOfficerNote"] = true,
                    },
                    ["timestamp"] = {
                        ["init"] = {
                            ["datakey"] = "us:4.0.3:13329",
                            ["TimeStamp"] = 1294989484,
                            ["Date"] = "2011-01-14 03:18:04",
                            ["ServerTime"] = "00:16",
                            ["DateUTC"] = "2011-01-14 07:18:04",
                        },
                    },
                    ["GPversion"] = "1.0.0",
                },
                ["Crusaders of Northrend"] = {
                    ["GuildXP"] = "0:16580000",
                    ["GuildXPCap"] = "0:6246000",
                    ["DBversion"] = "3.1",
                    ["FactionEn"] = "Alliance",
                    ["Locale"] = "enUS",
                    ["CPprovider"] = "wowr",
                    ["GPversion"] = "1.0.0",
                    ["GuildName"] = "Crusaders of Northrend",
                    ["GuildLevel"] = 1,
                    ["timestamp"] = {
                        ["init"] = {
                            ["datakey"] = "us:4.0.3:13329",
                            ["TimeStamp"] = 1294961653,
                            ["Date"] = "2011-01-13 19:34:13",
                            ["ServerTime"] = "16:32",
                            ["DateUTC"] = "2011-01-13 23:34:13",
                        },
                    },
                    ["Faction"] = "Alliance",
                    ["Server"] = "Zangarmarsh",
                },
            },
            ["Character"] = {
                ["Lumineia"] = {
                    ["ClassEn"] = "PRIEST",
                    ["HasRelicSlot"] = false,
                    ["Class"] = "Priest",
                    ["Locale"] = "enUS",
                    ["CPprovider"] = "wowr",
                    ["Server"] = "Zangarmarsh",
                    ["DBversion"] = "3.1",
                    ["Sex"] = "Female",
                    ["FactionEn"] = "Alliance",
                    ["Name"] = "Lumineia",
                    ["timestamp"] = {
                        ["init"] = {
                            ["datakey"] = "us:4.0.3:13329",
                            ["TimeStamp"] = 1294961653,
                            ["Date"] = "2011-01-13 19:34:13",
                            ["ServerTime"] = "16:32",
                            ["DateUTC"] = "2011-01-13 23:34:13",
                        },
                    },
                    ["Faction"] = "Alliance",
                    ["Cached"] = {
                    },
                    ["CPversion"] = "1.0.0",
                    ["ClassId"] = 5,
                    ["RaceEn"] = "Human",
                    ["SexId"] = 1,
                    ["Race"] = "Human",
                },


    this is how data is stored in my file server can be any server and can list the same info as this all in the same file

    but i think i have a work around...

    for k in pairs( cpProfile ) do
                            if (k ~= "profileKeys") then
                            
                                for c in pairs( cpProfile[k].Character ) do
                                    print("    Char: "..c.." "..k);
                                    t[c] = ""..c.." ("..k..")"
                                end
                            end
                        end

    this lists the characters and the servers they are on... and then i can nil out there values.
    Posted in: AddOn HELP!
  • 0

    posted a message on Profiles kinda with AceDBOptions-3.0
    ok this worked.. now a nother question how do i use a wild card is it not
    so say i wanted to list all the caracters no mater the server id use cpProfile
    .Character ? or am i wrong?
    Posted in: AddOn HELP!
  • 0

    posted a message on Profiles kinda with AceDBOptions-3.0
    basicly i need to make a dropdown list of the next key in the array after cpProfile this is allways the server and is allways an array key defind as cpProfile[GetRealmName()] now i could use the server name listed in profileKeys but i have no idea how to do this..
    Posted in: AddOn HELP!
  • 0

    posted a message on Profiles kinda with AceDBOptions-3.0
    ok im a dev at wow roster and we just launched beta of r2 and with that came our character profiler i have had a request made to me that i add the option of a gui purge function and im hoping this can be done ... basicly i want a drop down to select a key in an array say cpProfiler[SERVER]["Character"]["Ulminia"] to make it a null valuebut leave other players in there they also asked to eb able to do the same thing per server as well... any one have any ideas?
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    ag = LibStub("AceAddon-3.0"):NewAddon("autograts", "AceEvent-3.0");
    
    GLDG_ONLINE 	= ".*%[(.+)%]%S*"..string.sub(ERR_FRIEND_ONLINE_SS, 20);
    GLDG_OFFLINE	= string.format(ERR_FRIEND_OFFLINE_S, "(.+)");
    GLDG_JOINED	= string.format(ERR_GUILD_JOIN_S, "(.+)");
    GLDG_PROMO	= string.format(ERR_GUILD_PROMOTE_SSS, "(.+)", "(.+)", "(.+)");
    GLDG_DEMOTE	= string.format(ERR_GUILD_DEMOTE_SSS, ".+", "(.+)", "(.+)");
    ERR_FRIEND_OFFLINE_S = "%s has gone offline.";
    ERR_FRIEND_ONLINE_SS = "|Hplayer:%s|h[%s]|h has come online.";
    --ACHIEVEMENT_BROADCAST = "%s has earned the achievement %s!";
    ag_achi = ".*%[(.+)%]%S*"..string.sub(ACHIEVEMENT_BROADCAST, 20);
    
    GUILD_ACHIEVEMENT = "|Hplayer:%s|h[%s]|h has earned the achievement |h[%s]|h|r";
    
    pattern_ERR_FRIEND_ONLINE_SS 	= "^"..string.gsub(string.gsub(string.gsub(ERR_FRIEND_ONLINE_SS, "%%s", "(.+)", 1), "%%s", "(.+)%%", 1), "%[", "%%%[").."$";
    pattern_ERR_FRIEND_OFFLINE_S = "^"..string.gsub(ERR_FRIEND_OFFLINE_S, "%%s", "(.+)", 1).."$";
    
    
    
    local members={};
    
    function ag:OnEnable()
    	--self:RegisterEvent("GUILDBANKFRAME_OPENED")
    	self:RegisterEvent("CHAT_MSG_SYSTEM");
    	self:RegisterEvent("CHAT_MSG_GUILD_ACHIEVEMENT");
    	ag:Print("Auto grats Enabled!");
    end
    
    function ag:OnDisable()
    	LibStub("AceDB-3.0"):New("agrats",self.dab);
    end
    
    function ag:OnInitialize()
    
    	self.dab = LibStub("AceDB-3.0"):New("agrats");
    	
    	ag:Print("Auto grats loading");
    	ag.members={};
    	ag:getmembers();
    	
    end
    
    
    
    
    function ag:CHAT_MSG_GUILD_ACHIEVEMENT(eventName, msg)
    
    local ACHIEVEMENT_BROADCAST = "%s has earned the achievement %s!";
    local ACHIEVEMENT_pattern = ACHIEVEMENT_BROADCAST:format("(.*)", "(.+)");
    
        ag:Print("Achievement trigger");
        local t,b = msg:match(ACHIEVEMENT_pattern);
    	ag:Print("Achievement: t "..t.." -> b "..b.."");
        local a = t:match("%[(.*)%]");
    	ag:Print("Achievement: a "..a.."");
        if a then
            ag:Print("Achievement: "..a.." -> "..b.."");
    		if ( agrats["Members"][a] ) then
    			SendChatMessage("Grats on "..b.."! "..a.."", "GUILD");
    		end
        end
    end
    
    
    
    ag.regex = ERR_FRIEND_ONLINE_SS:gsub("%%s|h%[%%s%]","(.-)|h%%[.-%%]");
    ag.regex = ERR_FRIEND_ONLINE_SS:gsub("%%s","(.-)");
    
    
    function ag:CHAT_MSG_SYSTEM(event, arg1, ...)
    
    	local link = ...
    	
    	if ( arg1 == nil or arg1 == "" ) then
    		return false;
    	end
    	
    		local _, _, player = string.find(arg1, pattern_ERR_FRIEND_ONLINE_SS);
    	if ( player ~= nil ) then
    		ag:Print("gone online( "..arg1.." - "..player.." )");
    		if ( agrats["Members"][player] ) then
    			--ag:Print("player "..player.." is a member of our guild");
    			SendChatMessage("Seasons Greetings "..player.."!", "GUILD");
    		else
    			--ag:Print("player "..player.." isnot a member of our guild");
    		end
    		
    	end
    
    
    end
    
    function ag:getmembers()
    
    	local numGuildMembers, onlineMembers = GetNumGuildMembers();
    	local showOfflineTemp=GetGuildRosterShowOffline();
    		SetGuildRosterShowOffline(true);
    	local guildMemberTemp={};
    	agrats["Members"] ={};	
    	for idx=1,numGuildMembers do
    		local name,rank,rankIndex,level,class,zone,note,officernote,online,status,classEn,achievementPoints,achievementRank,isMobile=GetGuildRosterInfo(idx);
    		local lastonline;
    		if(name~=nil)then
    		--ag:Print(" - "..name.." ");
    			guildMemberTemp[name]={
    					Name=name,
    					Level=level,
    					AchPoints = achievementPoints,
    					AchRank = achievementRank,
    			};
    		end
    	end
    	agrats["COunt"] = numGuildMembers;
    	agrats["Members"] = guildMemberTemp;
    end
    
    function ag:Print(...)
    	print("|cff33ff88A-Grats|r:", ...);
    end
    



    this is the whole addon if you see any thing else wrong .... guild members comming online works no problem... just achievements are a pain
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    local ACHIEVEMENT_pattern = ACHIEVEMENT_BROADCAST:format("(.*)", "(.+)");
    
    function ag:CHAT_MSG_GUILD_ACHIEVEMENT(eventName, msg)
        ag:Print("Achievement trigger");
        local t,b = msg:match(ACHIEVEMENT_pattern);
    	ag:Print("Achievement: t "..t.." -> b "..b.."");
        local a = t:match("%[(.*)%]");
        if a then
            ag:Print("Achievement: "..a.." -> "..b.."");
    		if ( agrats["Members"][a] ) then
    			SendChatMessage("Grats on "..b.."! "..a.."", "GUILD");
    		end
        end
    end


    ag:Print("Achievement: t "..t.." -> b "..b..""); this returns %s -> and the achievement link a is never set....
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    i have tryed this function and im still getting %s returned as the player name...
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    ok i tryed this and all i get is %s returned as the players name...
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    function ag:CHAT_MSG_GUILD_ACHIEVEMENT(eventName, msg)
    	ag:Print("Achievement trigger");
    	local c,a,b = string.match(msg, ".*%[(.+)%]%S* has earned the achievement (.+)%!");
    
    	if a then
    		ag:Print("Achievement: "..a.." -> "..b);
    	end
    end


    this should be all i need i just cant get the regex for the proadcast.... msg is the axualy msg linked in chat the first veriabble i need is the player name which is a playet link .*%[(.+)%]%S* dosent seem to be working...
    Posted in: AddOn HELP!
  • 0

    posted a message on ACHIEVEMENT_BROADCAST event
    working on making an addon that fires when certon events happen one is achievements the broad cast has 2 parts the player link and the achievement link ... i need a weay to get the players name and the name of the achievement not the link any one have any ideas?

    this is my broken code...
    function ag:CHAT_MSG_GUILD_ACHIEVEMENT(eventName, msg)
    	ag:Print("Achievement trigger");
    	ACHIEVEMENT_BROADCAST = "%s has earned the achievement %s!";
    	local msgg = string.format(ag_achi, "(.+)", "(.+)");
    	ag:Print("Achievement: "..msgg);
    	local _, _, player, achiv = string.find(msgg, ag_achi);
    	if player then
    		ag:Print("Achievement: "..player.." -> "..achi);
    	end
    Posted in: AddOn HELP!
  • 0

    posted a message on slash command help
    perfect thank you
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.