hi,
No tested, bu like that:
var result = new Dictionary<int, string>();
var r = Lua.LuaDoString<List<string>>(@"
local ClassyRaceAchievementIDs= {5163,5165,5160,6625,5161,5162,5164}
local Races = {""Blood Elf"",""Goblin"",""Orc"",""Pandaren"",""Tauren"",""Troll"",""Undead""}
local Classes = {""Death Knight"",""DemonHunter"",""Druid"",""Hunter"",""Mage"",""Monk"",""Paladin"",""Priest"",""Rogue"",""Shaman"",""Warlock"",""Warrior""}
local RaceAchievementIDs= {[5163]=""Blood Elf"", [5165]=""Goblin"", [5160]=""Orc"", [6625]=""Pandaren"", [5161]=""Tauren"", [5162]=""Troll"", [5164]=""Undead""}
local queries={}
for i=1,#ClassyRaceAchievementIDs do
local id = ClassyRaceAchievementIDs[i]
local numCriteria= GetAchievementNumCriteria(id)
local raceStr= RaceAchievementIDs[id]
for c=1,numCriteria do
local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(id,c)
local classStrif tContains(Classes,criteriaString) then for i= 1,#Classes do if Classes[i] == criteriaStringthen classStr=Classes[i] end end end
local query=""r-\""""..raceStr..""\"" c-\""""..classStr..""\"" 120""
if completed==false then tinsert(queries, id) tinsert(queries, query) end
end
end
return unpack(queries)
");
if (r.Count % 2 == 0)
{
for (int i = 0; i < r.Count; i += 2)
{
int q;
if (robotManager.Helpful.Others.ParseInt(r[i], out q))
result.Add(q, r[i+1]);
}
}