yepp the data format ist only like
["B\195\162be"] or
["Dw\195\161yna"] = {
["DKP"] = 100.00
}
the data comes from
http://absence-gilde.com/eqdkp/getdkp.php eqdkp
the old addon "GetDKP" doesnt work, so i codet my own little "whisper to get dkp" addon.
it works fine, (with my very bad code *g*) but the utf8 problem let it only work for normal character names.
Code:
SLASH_DKP1 = "/dkp"
SlashCmdList["DKP"] = function(msg, editBox)
-- change the text on the editBox.
print("Du hast "..gdkp.players.Ikuria.DKP.. "DKP")
end
local function filter(self, event, msg, sender)
split = string.match(msg, " (%w+)")
if (split) then
firstchar = split:sub(1,1)
firstchar = firstchar:upper()
split = split:sub(2)
split = firstchar .. split
end
if (self:GetName() == "ChatFrame1") then
if (gdkp.players[split]) then
SendChatMessage(split.." hat "..gdkp.players[split].DKP.. " DKP aus ".. gdkp.players[split].rcount .. " gespielten Raids.", "WHISPER", nil, sender)
return true
else
if (msg == "!dkp" or msg == "?dkp") then
if (gdkp.players[sender]) then
SendChatMessage("Du hast "..gdkp.players[sender].DKP.. " DKP aus ".. gdkp.players[sender].rcount .. " gespielten Raids.", "WHISPER", nil, sender)
return true
else
SendChatMessage("Der Spieler "..sender.. " wurde nicht gefunden.", "WHISPER", nil, sender)
return true
end
end
end
end
if (self:GetName() == "ChatFrame5") then
if (gdkp.players[split] or msg == "!dkp" or msg == "?dkp") then
return true
end
end
end
local function HideOutgoing(self, event, msg, author, ...)
if (self:GetName() == "ChatFrame5") then
if (msg == string.match(msg, "Du hast %d+ DKP aus %d+ gespielten Raids.")) then
UIErrorsFrame:AddMessage(author.." fragte seine DKP ab.", 1.0, 0.0, 0.0, 53, 5);
return true
end
if (msg == string.match(msg, "%w+ hat %d+ DKP aus %d+ gespielten Raids.")) then
split = string.match(msg, "(%w+)")
firstchar = split:sub(1,1)
firstchar = firstchar:upper()
split = split:sub(2)
split = firstchar .. split
UIErrorsFrame:AddMessage(author.." fragte "..split.."'s DKP ab.", 1.0, 0.0, 0.0, 53, 5);
return true
end
if (msg == string.match(msg, "Der Spieler %w+ wurde nicht gefunden.")) then
return true
end
else
return true
end
end
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", HideOutgoing)
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", filter)