Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created October 25, 2009 02:44
Show Gist options
  • Select an option

  • Save tekkub/217856 to your computer and use it in GitHub Desktop.

Select an option

Save tekkub/217856 to your computer and use it in GitHub Desktop.
local f = CreateFrame("frame")
f:SetScript("OnEvent", function(self, event, ...) if self[event] then return self[event](self, event, ...) end end)
f:RegisterEvent("PLAYER_LOGIN")
function f:PLAYER_LOGIN()
self:RegisterEvent("QUEST_QUERY_COMPLETE")
QueryQuestsCompleted()
self:UnregisterEvent("PLAYER_LOGIN")
self.PLAYER_LOGIN = nil
end
function f:QUEST_QUERY_COMPLETE()
local x = GetQuestsCompleted()
print("GetQuestsCompleted()", next(x))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment