Thread Tools Display Modes
11-28-06, 04:03 AM   #1
svartalve
A Deviate Faerie Dragon
 
svartalve's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 11
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.
  Reply With Quote
12-11-06, 05:18 PM   #2
Flickerstreak
A Deviate Faerie Dragon
Join Date: Dec 2006
Posts: 19
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help Retooling function for WoW 2.0


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off