ok lets look at it then:
Checking a Selfbuff:
Code: Select all
/if (!${Me.Buff[${SpellFocus}].ID} && ${Spell[${SpellFocus}].Stacks}) /call DoBuffs "${SpellFocus}" ${Me.ID}
You can exchange the /call Dobuffs (it's part of my shaman macro) with /call cast buffwanted gem# (read up on spell_routines.inc to see how the command works)
What that code does is to check if you have the spell on, and if no then it checks if it will stack, andif it stacks then it will "cast the buff"/"call the sub in my case to cast the buff"
That was easy huh?
Snaring the mob:
Code: Select all
/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} < 80 && ${Target.PctHPs} > 50 ) { INSERT YOUR CAST SNARE THING HERE }
Notice this code is not specifically for your snare, but it is to give you a hint on how to do it, you can remove or add more things to check, to make it do what you want, when you want.
You also want to add some code that checks that the snare landed (a snare EVENT <---- notice that word and look it up)
attacking the mob:
Code: Select all
/assist ${TheBoss}
/delay 1s
/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= 98 ) { DO YOUR STUFF HERE }
you can change that in a number of ways but it assists your MA and if they have a target then it will assist them when the mob is at 98% health or under, in the "do your stuff here" you could do /stick 10 behind (read the mq2moveutils thread" then it will automatically move you behind the mob and stay there.
when it sticks you want it to attack so you write /attack on all that is very simple, then you can put it into a combat loop and make it look through all the things you want it to do while in combat (could be snare the mob from above) so you /goto :combatloop.
then you have a the combatloop somewhere in your code, you have the snare check part in that loop and you also want a snippet to check if you still have a target and if you don't then /goto :mainloop
you can also check for adds hitting you i.e. you have a target, is the target npc? is the target under the hp% where you want to attack? if so then /stick /attack /goto :combatloop again
if it isn't an npc then /target clear and then assist again, and do the checks if its npc, hp% and so on, and after all that and no target to kill, then go to mainloop
if you find yourself stuck because someone trades with you (that gives a PC target, not a NPC target) you can then auto accept the trade if you want, or after a certain time with that target, just clear target and move on with the macro
I hope that gives you an idea of how to start, and the snippets I gave you above is from working code, you just need to fix it so it fits your macro and check the parameters you want checked before you attack and so on