View Single Post
03-31-17, 03:21 PM   #4
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
Here's the lovely C_Timer functions..

http://wow.gamepedia.com/API_C_Timer.After
http://wow.gamepedia.com/API_C_Timer.NewTimer
http://wow.gamepedia.com/API_C_Timer.NewTicker


Try to remember to give your frames unique names so it's easier to point out when further developing your addon. While naming the frame "frame" is alright with this small addon you should make it a habit to do the other.

Code:
local AchieveHandler = CreateFrame("Frame")
AchieveHandler:RegisterEvent("CHAT_MSG_GUILD_ACHIEVEMENT")
AchieveHandler:SetScript("OnEvent", function(self, event)

   C_Timer.After(10, function()
      SendChatMessage("oh wow grats", "GUILD")
   end)

end)
Change 10 to whatever delay you want.
  Reply With Quote