WoW:Parsing event messages: Difference between revisions

m
No edit summary
 
Line 17: Line 17:
   if(event == "CHAT_MSG_COMBAT_HONOR_GAIN") then
   if(event == "CHAT_MSG_COMBAT_HONOR_GAIN") then
     start, end, killed, rank, honor =
     start, end, killed, rank, honor =
       string.find(arg1, ".+ dies, honorable kill Rank: .+ %(Estimated Honor Points: .+%)");
       string.find(arg1, "(.+) dies, honorable kill Rank: (.+) %(Estimated Honor Points: (.+)%)");
     if(start) then
     if(start) then
       MyHonorTrackingFunction(killed, rank, honor);
       MyHonorTrackingFunction(killed, rank, honor);
Line 32: Line 32:
   if(event == "CHAT_MSG_COMBAT_HONOR_GAIN") then
   if(event == "CHAT_MSG_COMBAT_HONOR_GAIN") then
     if(GetLocale() == "enUS") then
     if(GetLocale() == "enUS") then
       pattern = ".+ dies, honorable kill Rank: .+ %(Estimated Honor Points: .+%)";
       pattern = "(.+) dies, honorable kill Rank: (.+) %(Estimated Honor Points: (.+)%)";
     elseif(GetLocale() == "deDE") then
     elseif(GetLocale() == "deDE") then
       pattern = ".+ german-for-dies, german-words: .+ %(more-german: .+%)";
       pattern = "(.+) german-for-dies, german-words: (.+) %(more-german: (.+)%)";
     elseif(GetLocale() == "frFR") then
     elseif(GetLocale() == "frFR") then
       pattern = "french-words .+ french-words .+ french-words .+";
       pattern = "french-words (.+) french-words (.+) french-words (.+)";
       -- notice that the parameters are not necessarily always in the same order in all languages
       -- notice that the parameters are not necessarily always in the same order in all languages
     else
     else
Anonymous user