Vanilla WoW - VanillaGaming

Community => Addons => Topic started by: Ayag on October 24, 2016, 11:20:37 pm



Title: Whisper macro with an anti-spam
Post by: Ayag on October 24, 2016, 11:20:37 pm
Hello,

As the title suggests I would like to have a macro that whispers the targets but doesn't send the whispers on & on if I happen to use it multiple time. This could have multiple use but in my case it's to warn the people I'm casting Power Infusion on. It can be quite spammy if I smash my bind.

If it could only be sent on successful cast that would be even better.

Thanks for your help,
Cheers


Title: Re: Whisper macro with an anti-spam
Post by: marm _ on October 25, 2016, 01:18:59 am
/cast Power Infusion
/script if buffed("Power Infusion" , 'target') then SendChatMessage("Power Infusion on you","WHISPER", nil, UnitName"target") end
/script if buffed("Power Infusion" , 'target') then ClearTarget(); end

just wrote this out on phone in bed so havent tried it



Title: Re: Whisper macro with an anti-spam
Post by: Ayag on October 25, 2016, 01:40:55 am
The last line is just to ... clear the target ?

Thanks tho, it works. The only drawback is that I need to press it twice, the previous I had was only once, which was looking like :

/run if UnitExists"target"then SendChatMessage("POWER INFUSION ON YOU %T !!","WHISPER",nil,UnitName"target")end
/cast Power Infusion

Cheers


Title: Re: Whisper macro with an anti-spam
Post by: marm _ on October 25, 2016, 02:05:18 am
clearing the target was only way i think of so it didnt spam
if u only had to press once then u wouldnt be spamming o.o


Title: Re: Whisper macro with an anti-spam
Post by: baddestbad on October 25, 2016, 04:21:54 am
google "aftercast" addon
usable for stuff like  /cast tranq shot /aftercast /s tranq shot used


Title: Re: Whisper macro with an anti-spam
Post by: Alda on October 25, 2016, 01:51:41 pm
deeps pls come back u can be class leader


Title: Re: Whisper macro with an anti-spam
Post by: Luise on October 29, 2016, 01:39:05 am
Code:
/script t1 = GetTime() if not t2 or t1 > (t2 + 5) then t2 = GetTime() CastSpellByName("Power Infusion") SendChatMessage("Power Infusion on you","WHISPER", nil, UnitName"target") end

you can replace the 5 with the time in seconds when the whisper + spell should work again
this macro does not check if the spell was successful


Title: Re: Whisper macro with an anti-spam
Post by: Ayag on October 29, 2016, 12:29:04 pm
Seems to work like a charm, thanks Luise!