I'm not at the point where I can understand all of Genbot and raiddruid and some of the other macros to use/modify to fit my needs.
Currently, I have it check to see if it's snared since based upon if it is an NPC, % of health (for testing I used lower than 99%...) and checking the variable. When any mob dies, it resets the variable and only when a mob dies (or it wears off, which is extremely rare).
Which creates a few problems. If a mob elsewhere dies within notify range, it will resnare - not too big of a deal.. doesn't hurt to have a mob snared twice...
Bigger problem: If I pull 2 mobs, first one gets snared, then I switch. The second one won't get snared unless first one dies.
I'm looking for some education and possibly some example code with comments.
Here is the working code I currently have for this:
Code: Select all
#include spell_routines.inc
#Event EnsnareWornOff "#*#ensnare spell has worn off#*#"
#Event Exp "#*#party experience!#*#"
#Event Exp "#*#gain experience!#*#"
#Event Exp "#*#slain#*#"
Sub Main
/echo 1...
/declare Ensnared bool outer FALSE
:loop
|Snare check
|/assist <<<<tank name>>>>
/if (${Target.ID} && ${Target.PctHPs}<99 && !${Ensnared}) /call Ensnare
/doevents
/delay 1s
/goto :loop
/return
Sub Ensnare
/call Cast "Ensnare" gem3 10s
/if (${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_IMMUNE]}) /varset Ensnared TRUE
/return
Sub Event_Exp
/varset Ensnared FALSE
/return
Sub Event_EnsnareWornOff
/varset Ensnared FALSE
/return



