Topic [RESOLVED] Challenging Roar Chat Message Problem
Edited by Navitas on 27/06/12 15:38 (BST)
I've got an addon which checks for people using various taunts, and sends a chat message to party or raid whenever one is used. However, Challenging Roar is proving to be a nuisance.
It works ... but it sends a chat message for every target affected by it. For example, if you used it on a pack of dragonkin in Grim Batol, three messages would be sent to your party.
How do I make it so that only one message is sent?
This is the code I have just now:
I thought that by doing it like this, only one message would be sent. It didn't work.
Any and all help is appreciated!
1) put in a time delay if possible. If challenging roar message has been sent in the last 60s, then don't send it again.
In your initialisation bit record the time (e.g. as tau).
if tau+60s > time function, stop routine.
then set tau as the new time.
2) record the previous spell id used, and compare it to the current. e.g.
-- 5209: Challenging Roar
You will have to check the syntax as I don't know it that well.
Also it might be an idea to store lastspell in an array of all party/raid members.