I'm trying to write a extremely simple addon for WoW. I need to know if it is possible at all to delay a function for 30sec or a minute and then call a different function.
I tried to do a hack job with the following:
SLASH_PORTS1 = '/ports';
function pretalk()
if currentTime==currentTime+1 then
talk();
else
talkagain();
end
end
function talk()
SendChatMessage("selling PORTS 9g ea. 1g cheaper than the rest! PST." ,"CHANNEL" ,"COMMON" ,"2");
pretalk();
end
function SlashCmdList.PORTS()
currentTime = GetGameTime();
talk();
end
function talkagain()
pretalk();
end
But it doesn't work. It will send the first chat message and then won't manage to get the second one.