Here's a small bit of code to show the basics of what you need:
Lua Code:
local function UpdateInstanceInfo()
for index = 1, GetNumRFDungeons() do
local dungeonID = GetRFDungeonInfo(index)
local numEncounters, numCompleted = GetLFGDungeonNumEncounters(dungeonID)
if numCompleted > 0 then
local dungeonName = GetLFGDungeonInfo(dungeonID)
local completedEncounterText = "Encounters completed in " .. dungeonName .. ":\n"
for encounterID = 1, numEncounters do
local encounterName, _, isCompleted = GetLFGDungeonEncounterInfo(dungeonID, encounterID)
if isCompleted then
completedEncounterText = completedEncounterText .. encounterName .. "\n"
end
end
print(completedEncounterText)
end
end
end
local frame = CreateFrame('Frame')
frame:SetScript('OnEvent', function(self, event)
self:UnregisterEvent(event)
UpdateInstanceInfo()
end)
frame:RegisterEvent('UPDATE_INSTANCE_INFO')
RequestRaidInfo()
Keep in mind you should not call UpdateInstanceInfo without first calling RequestRaidInfo and waiting for the event UPDATE_INSTANCE_INFO or your results won't reflect any bosses killed since the last request.
And here is semlar's macro shrunk some for those that prefer macros in preparation for 4-digit dungeon IDs:
Lua Code:
/run local d={982,1,982,2,982,3,983,4,983,5,983,6,984,7,984,8,984,11,985,9,985,10,985,12,986,13}for i=1,#d,2 do local n,_,x=GetLFGDungeonEncounterInfo(d[i],d[i+1])print(GetLFGDungeonInfo(d[i])..':',n,(x and''or'not ')..'completed')end