WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Simple Chat msg for guild recruiting. (https://www.wowinterface.com/forums/showthread.php?t=58992)

Nova320 11-29-21 11:59 PM

Simple Chat msg for guild recruiting.
 
Trying to send chat message through addon when I am only and only every 20 min
code:
local flag = 1
sleep(60)
While 1 do
hour,minute = GetGameTime();
if flag == 1 or hour >= phrs+1 or minute >= pmin+11 then
SendChatMessage("Looking to do High-level keys or trying to form a raid team? Looking for help with keys? Then we are your guild", "CHANNEL", nil,2);
RunMacro("Guild");
phrs, pmin = hour, minute
flag = 2
end
end

But this does not work. Can anyone help?

Kanegasi 11-30-21 05:05 AM

sleep isn't a valid function.

SendChatMessage is hardware protected when using the CHANNEL option, which means code cannot call it unless a keystroke or mouse click was used to execute the code. In the case of delayed repetitive code manually entered in chat or in a macro, the first time is the hardware execution, each delayed execution after that is not.


All times are GMT -6. The time now is 08:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI