Post by Neffi
#showtooltip
/use Charge
/run local n=GetTime() if n-(mv1 or 0)>
180 then SendChatMessage(],'YELL') mv1=n end
The underlined number is the timeout in seconds, so as-is it will only go off at most once every 3 minutes (180 seconds). The second underline part is the message you want to yell. Change only the underlined parts; the symbols around them must stay as-is.
You might also consider using
SpeakinSpell, which is an addon designed to do just this type of stuff. It's much more flexible than a simple one-line script.
Edit: Here's an added bonus. This will set the timeout to a random value between two values. In other words, as-is, this will say it at most once every 2 minutes, and at least once every 3 minutes. It will pick a random amount of time between the two values to wait before saying it again. Change the two underlined numbers to change that range.
#showtooltip
/use Charge
/run local n=GetTime() if n-(mv1 or 0)>random(
120,
180) then SendChatMessage(],'YELL') mv1=n end
The first underlined number is the least amount of time it can wait; the second is the most amount of time it can wait. The first underlined number must be smaller than the second one.