Allows you to create your own IF THEN statements that will dynamically change the function of a button.

This addon is intended for people that have a basic understanding of programming. Specifically conditional If-Then statements.

The addon allows you to write your own if-then statements that will be evaluated and run whenever you press a button, or they can trigger on certain events ingame.
It provides a simple text editor, a fully documented API and some simple If-Then syntax so that you can string together almost anything you want to react to.


IF HasOpenQuest("My daily fishing quest") AND InZone("Stormwind") 
THEN Cast("Fishing");
OnEvent("GroupInvite") AND InLFGQueue() 
THEN DeclineInvite() AND Reply("Sorry, I am already in the LFG queue");

Look at the FAQ page for the most asked questions, and the Examples page for examples.

Please post bugreports and feature requests on the Curseforge.com project page

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Jarod24 Jarod24 Oct 21, 2016 at 09:47 UTC - 0 likes

    @b14d3r11: Go

    If you want to you could use AND NOT... but i would use Cooldown() since its shorter.
    Determine how long each buff lasts and use a value that matches that.

    Read the documentation on Cooldown()

  • Avatar of b14d3r11 b14d3r11 Oct 21, 2016 at 03:25 UTC - 0 likes

    @Jarod24: Go

    Yeah, that would work the problem is that there are 6 buffs, when you use Roll the Bones you get 1 of 6, 2 of 6, 3 of 6 or 6 of 6. So there is a plethora of combinations.

    Would i have to use AND NOT HasBuff with each and every combination or?

    Also i have a sound i would like played, you can use the script /script PlaySoundFile("Sound\ \Creature\ \HeadlessHorseman\ \Horseman_Laugh_01.ogg")

    to play it but it won't play using Horseman_Laugh_01 under PlayAudio("Horseman_Laugh_01")

    Last edited Oct 21, 2016 by b14d3r11
  • Avatar of Jarod24 Jarod24 Oct 20, 2016 at 10:46 UTC - 0 likes

    @b14d3r11: Go

    Can you have both buffs at the same time?

    If so, then the first line will be true as well as the second one at the same time. In those cases the first one will be run only.

    You can add CoolDown() to a line to prevent it from triggering too often (less spammy output). Or add a NOT HasBuff("Jolly Roger") to the first line to prevent it from triggering.

    OnEvent("Buff") AND HasBuff("Shark Infested Waters") AND NOT HasBuff("Jolly Roger") AND Cooldown("2") THEN RaidMessage("Shark Infested Waters", "Rogue");
  • Avatar of b14d3r11 b14d3r11 Oct 18, 2016 at 19:06 UTC - 0 likes

    @Jarod24: Go

    When i write it like that it shows Shark Infested Waters as a raid message, but when Jolly Roger shows up it doesn't

  • Avatar of Jarod24 Jarod24 Oct 15, 2016 at 10:24 UTC - 0 likes

    @b14d3r11: Go

    A bit hard to understand what the problem based on your post...
    Lines are evaluated from top to bottom and the first one where all the arguments evaluate to true will be processed, and the rest will be ignored.

    OnEvent("Buff") AND HasBuff("Shark Infested Waters") THEN RaidMessage("Shark Infested Waters", "Rogue");
    OnEvent("Buff") AND HasBuff("Jolly Roger") THEN RaidMessage("Jolly Roger", "Rogue");

    I dont know if these buffs are stack-able and if you are you asking about when that happens.

    In those cases, then HasBuff() has a Count argument that defaults to 1. Look into using that.

  • Avatar of b14d3r11 b14d3r11 Oct 14, 2016 at 15:20 UTC - 0 likes

    I am attempting to make a message pop up when i gain certain roll the bones buffs but this is going horribly. I am using this <<code OnEvent("Buff") AND HasBuff("Shark Infested Waters") THEN RaidMessage("Shark Infested Waters", "Rogue");>>

    <</code>> for the first buff which it shows just fine but when it comes to other buffs it doesn't output anything

  • Avatar of Jarod24 Jarod24 Oct 08, 2016 at 07:46 UTC - 0 likes

    @HavocsCall: Go

    The button in the mounjournal is marked as secure by blizzard. That means it can do some things that addon's can't (as long as the calling path has not been altered).

    An alternative approach in the addon to calling C_MountJournal.SummonByID() directly would be to create a /click <...SummonRandomFavoriteButton>, refering to the button name in the default UI. However if any other addon alters the UI, or if the user has not opened the UI at least once in that playsession (since login/reload) then the function would fail (Blizzard_Collections is a load-on-demand addon). The later approach is not one I favor since its got too many potential pitfalls. Also the Blizzard UI will display a error message to the user. I do not consider this a bug.

    Source: File: AddOns\Blizzard_Collections\Blizzard_MountCollection.xml
    Line: <Button name="$parentSummonRandomFavoriteButton" parentKey="SummonRandomFavoriteButton" inherits="SecureFrameTemplate">

    You can use the /fstack command ingame and then mouseover the button ingame to see its exact name. Then use the RawMacro() command to make it do a /click <buttonname>, or simply create a "normal" macro you bind to some key on your toolbar.

    Last edited Oct 10, 2016 by Jarod24
  • Avatar of HavocsCall HavocsCall Oct 07, 2016 at 22:41 UTC - 0 likes

    @Jarod24: Go

    I see that the command C_MountJournal.SummonByID(0) is the issue. The button for Summon Favorite mount in the journal works without issue, but when called upon with C_MountJournal.SummonByID(0) through macro or addon, it does not. Sorry for jumping the gun and posting before finishing my own testing. Hopefully, we can get a fix for it soon.


  • Avatar of Jarod24 Jarod24 Oct 07, 2016 at 18:29 UTC - 0 likes

    @HavocsCall: Go

    As the error says: You cant summon mounts while shapeshifted.

    To clarify; the error comes from the game, not the addon.

    Last edited Oct 07, 2016 by Jarod24
  • Avatar of HavocsCall HavocsCall Oct 07, 2016 at 15:53 UTC - 0 likes

    First, thanks for this addon. it's great and fun. I recently got it, so my scripts are not as complex as some on here...yet

    I apologize if this has been asked. I looked through the comments, but couldn't find it. Is there an issue with SummonMount while in a druid form? It just says in error text "You are in Shapeshift form".

    Further clarification: This issue only happens in Cat, bear, and stag form. Travel, moonkin, and tree are not affected. I can get around this by putting the summon mount button on an action bar and ClickActionBar("")ing it.

    Last edited Oct 07, 2016 by HavocsCall


Date created
Oct 06, 2011
Last update
Oct 07, 2016
Development stage
  • enUS
All Rights Reserved
Curse link
Recent files