Lin's post for pet buffs looks pretty good, and Aab uses the same concept for dots that I used, but I wrote mine in MQ2's language. A brief sample of dot timers and usage would be:
Code: Select all
#include spell_routines.inc
Sub Main
|----Declare your variables here----
/declare Dot1 string outer "name of dot"
/declare Lifetap string outer "name of lifetap"
/declare DotTimer1 timer outer 0
Is basically the head of your potential macro. You include any external files necessary, start your Sub Main, and declare your variables that you wish to use later in the macro. If you want to use "/call cast" commands you *must* include the spell_routines.inc file. Notice the format used here:
/declare [name of variable] [type of variable. Is it a string, integer, timer?] [where this variable applies within the macro] [value of the macro]
Code: Select all
|----Set your main loop and call your subs here----
:Loop
/call DPS
/goto :Loop
You can add more Subs later as you get more advanced, but for now this will call your DPS sub routine over and over until you tell it to end (or as I include in the next segment, I tell it to end if the target goes NULL (aka no target).
Code: Select all
|----Set your DPS commands and parameters----
Sub DPS
/if (${Target.ID} == NULL) /end
/if (${DotTimer1}==0) /goto :Dot1
/if (${DotTimer1}>0) /call cast ${Lifetap}
/return
This the sub that is called in your main loop. It reads from top to bottom. When you start the macro it will check that you have a target, then check if your timer is down to 0 (which we declared it to start at, by default). The last check sees if your dot successfully landed and is counting down, and if so will spam your lifetap until the dot timer reaches 0 again.
Code: Select all
|----Dots----
:Dot1
/call cast ${Dot1}
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset DotTimer1 1154
}
/return
If your DotTimer1 variable counts down to 0, then your macro will jump down to ":Dot1" and cast the dot. If it is resisted, the client will not return the successful cast message, and the timer will remain at 0. When your loop hits the /if for the dot again, it will see it's still 0 and try again. Remember, MQ2 timers are in deciseconds. 60 seconds = 600 deciseconds.
You should be able to piece together these 4 parts, fill in the blanks, and then have a working (but very basic) macro to test out. Hopefully this can help you build up your own necro macro.
*Note, I never saw any real difference between "/goto : Dot1" and "/call Dot1", so AFAIK they're functionally the same. I, however; am no expert with this, so just take my advice with a grain of salt
