1. #1

    So I have this macro, but is there anyway to impose a cooldown on it?

    /script s={"Phrase 1","Phrase 2","Phase 3"};SendChatMessage(s[random(1,3)], "SAY")
    /cast SPELL


    is there anyway I can keep it from activating upon every button press? I tend to get spammy on my cooldowns.

  2. #2
    You could get after-cast which lets you say or run scripts after something successfully casts. (Or I'm sure treeston would be happy to get you a macro form that you put into a small addon that does it for you :P)

  3. #3
    Well you could only say it if the spell is off cooldown:
    /script if 0==GetSpellCooldown("SPELL") then s={"Phrase 1","Phrase 2","Phase 3"} SendChatMessage(s[random(1,3)]) end
    /cast SPELL

    or you could give it it's own cd (this one is a 4 second cooldown):
    /script t=GetTime() p=p or 0 if p+4<t then p=t s={"Phrase 1","Phrase 2","Phase 3"} SendChatMessage(s[random(1,3)]) end
    /cast SPELL

    edit: you don't need semicolons, and SAY is the default chat message destination so you can save space by not specifying it, and you also can use SAY or RAID etc. without quotation marks.

    ---------- Post added 2011-04-17 at 11:49 AM ----------

    Just tested it myself, the spell cooldown method might not work how you want because of the way the game queues spell casts, ie. the spell casts while the macro still thinks it's on cooldown so if you spam the button it will pretty much never say anything.
    Last edited by Larwood; 2011-04-17 at 03:31 AM.

  4. #4
    Like Larwood said, you can give it it's own cooldown
    PHP Code:
    /run local s={"Phrase 1","Phrase 2","Phrase 3"}if time()>(some_cd or 0)then some_cd=time()+4 SendChatMessage(s[random(3)])end 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •