WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Help Retooling function for WoW 2.0 (https://www.wowinterface.com/forums/showthread.php?t=7020)

svartalve 11-28-06 04:03 AM

Help Retooling function for WoW 2.0
 
With WoW 2.0 and The Burning Crusade just around the corner, I thought it time that I try to see if it's possible to rewrite functions that I've been using for the better part of the last few 1.x patches. First, some background: as a warlock, I've sought ways to streamline the DoT, DD rinse and repeat routine. I wrote a base macro that would cast DoTs in sequence as the key is pressed/clicked repeatedly. Then I thought of taking much of the boiler plate code out of the macros and incorporating them into a function library AddOn that I can then call from within WoW.

When I found DoTimer, I modified my functions to use DoT_IsPSpell()-one of DoTimer's built-in functions-to manage which DoT/spell is cast per keypress/mouseclick (My original functions used For to cycle through each spell). One of the functions I currently use in my macros is as follows:

Code:

function afflictChain(cName,nName)
if DoT_IsPSpell(cName) then
    if DoT_IsPSpell("Corruption") then
        if DoT_IsPSpell("Immolate") then
            if DoT_IsPSpell("Siphon Life") then
                CastSpellByName(nName);
            end;
        end;
    end;
end;
end;

This allows me to write macros that look like this in-game:
Code:

/script afflictChain("Curse of Shadow","Shadow Bolt");
Shorter, easier to read and leaves room for more code (like saying something in chat, for instance). If the system was not slated to change I could just as easily add Unstable Affliction and Incinerate to the function and have a full complement of DoTs and yet still use the same macro!

With WoW 2.0, the new /cast, /castsequence and other slash commands promises to duplicate much of this functionality, like so:
Code:

/castsequence reset=combat/target Unstable Affliction,Curse of Agony,Corruption,Siphon Life,Immolate,Incinerate
I wonder if its still possible to reimplement my functions in WoW 2.0-or will all my DoT macros have to use castsequence, with the attendant DoTs-Unstable Affliction, Corruption, Siphon Life, Immolate, and Incinerate-in addition to my curse of choice from now on.

Flickerstreak 12-11-06 05:18 PM

CastSpellByName() or anything like it is no longer available to macros, so you'll have to use /castsequence. It would be really nice if you could nest macro calls from within /castsequence (e.g. 'cast' a macro by name), but I don't think that works.


All times are GMT -6. The time now is 05:19 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI