View Single Post
02-03-20, 07:00 AM   #4
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 133
something like this

Originally Posted by Nodos7 View Post
Could you please add the example of code? Will it work in WoW Classic?
There are several ways of using this function.

C_Timer.After(duration, callback)
duration is in seconds

Code:
C_Timer.After(1, function () SendChatMessage("I need help!") end)
C_Timer.After(2, function () SendChatMessage("Somebody, help!") end)
C_Timer.After(3, function () SendChatMessage("Too late I'm dead!") end)
or

Code:
local function doSomething()
   SendChatMessage("The world says, hello")
end

C_Timer.After(1, doSomething)
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }

Last edited by Xruptor : 02-03-20 at 07:05 AM.
  Reply With Quote