IfThen

IfThen

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.

Examples:

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 13, 2014 at 14:11 UTC - 0 likes

    Version 1.9.1 is now released. It supports Patch 6.0.2 (Warlords)

    • New function: IsQuestCompleted()
    • The %GuildLevel% variable has been removed since guild levels are no more.
    • A few bugfixes.
    • The text-cursor should no longer jump around if you type non-english charaters (like ü, ë and so on) while Syntaxcoloring is enabled (reported by chamann81).

    See the changelog for all the changes.

  • Avatar of Jarod24 Jarod24 Mar 18, 2014 at 10:44 UTC - 0 likes

    @baldricinoz: Go

    Ok, version 1.9.0 now got %EnabledEquipmentSet% variable implemented.

    Last edited Mar 22, 2014 by Jarod24
  • Avatar of baldricinoz baldricinoz Mar 18, 2014 at 03:50 UTC - 0 likes

    Hello Jarod,

    Great addon, thanks for your hard work.

    Could we please have a variable for the name of the currently enabled equipment set? i.e. %enabledequipmentset%

  • Avatar of Jarod24 Jarod24 Mar 18, 2014 at 01:28 UTC - 0 likes

    Version 1.8.9 is now released with a few fixes and additions.

    • New function: IsAddonLoaded()
    • New variables: %BattleTag%

    See the changelog for all the changes.

  • Avatar of Jarod24 Jarod24 Oct 14, 2013 at 15:58 UTC - 0 likes

    Version 1.8.7 is now released.

    • IsBoss() has been improved and there is a new %BossName% variable.
    • New variables: %DeathName%, %DeathSpell%, %DeathAmount%, %DeathOverkill%
    • New functions: DBMPull(), IsClassified()

    See the changelog for all the changes.

  • Avatar of Jarod24 Jarod24 Oct 06, 2013 at 22:37 UTC - 0 likes

    @0xygen: Go

    Hehe, already done it.
    I've hooked into those DBM functions and got a system for getting out the npc'id's from that.
    The 'Galakras' type scenario should be covered by that.
    Just need to make sure my hooks don't break DBM should my code ever crash.

    I'm also thinking there might be even more improvements done by using the combatlog/chat system; BOSS_EMOTE, ENCOUNTER_ and such. (you dont happen to know of a good approach to confirm that a boss_emote is actually triggered by a boss or not do yo). That way it might even work without targeting world bosses. (might do this some other time)

    Also, %BossName% will not work in scenarios.

    Last edited Oct 14, 2013 by Jarod24
  • Avatar of 0xygen 0xygen Oct 06, 2013 at 11:27 UTC - 0 likes

    @Jarod24: Go

    Well, that is to be expected. You will probably need some kind of lookup table for those fights. What DBM does is check for all NPCs and loop through boss1..boss5 to see if they are there.

    mod:SetCreatureID(72311, 72560, 72249, 73910, 72302)--Boss needs to engage off friendly NCPS, not the boss.
    
  • Avatar of Jarod24 Jarod24 Oct 02, 2013 at 21:21 UTC - 0 likes

    @0xygen: Go

    Don't celebrate yet; it seems that "BossN" does not always return the name of the boss as listed in the enocunter journal, for example the Galakras fight it retuns the name of the King, Jaina etc.... That way it's getting more difficult to find the actual encounter-name.

    Last edited Oct 02, 2013 by Jarod24
  • Avatar of 0xygen 0xygen Oct 02, 2013 at 19:34 UTC - 0 likes

    @Jarod24: Go

    You, sir, are awesome.

    OnEvent("Dead") AND NOT IsPVP("player") AND InRaid() THEN Chat( "RAID", "%DeathName% killed me with %DeathSpell%! %DeathAmount% damage (%DeathOverkill% overkill)." );
    
    Last edited Oct 02, 2013 by 0xygen
  • Avatar of Jarod24 Jarod24 Sep 27, 2013 at 16:52 UTC - 0 likes

    @0xygen: Go Got a few new variables for the next version of the addon:

    %DeathName%, %DeathSpell%, %DeathAmount%, and %DeathOverkill%

    They will output the name, ability and amount of damage that last killed the player.
    The variables uses the combatlog to get the data. Just need to test that its working properly.
    Right now the numbers aren't matching up with the combatlog (maybe absorb or something i need to take into account)

    Update:
    Working on a %BossName% variable that will output the name of the boss you're currently in combat with.

    Last edited Oct 01, 2013 by Jarod24

Facts

Date created
Oct 06, 2011
Categories
Last update
Oct 26, 2014
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
IfThen
Downloads
7,025
Recent files

Authors