Moderator: MacroQuest Developers

Code: Select all
/call Cast "MezzSpell" gemX 5s Code: Select all
|Mezz.mac
|Call macro with the format: /mac Mezz "checkradius" "TankName"
|Example /mac Mezz 50 Scourge
#include spell_routines.inc
#Event MEZZWornOff "#*#MEZZ spell has worn off#*#"
Sub Main(int CR, string TANK)
/declare TEMPID int outer
/declare MEZZID int outer
/declare MEZZED timer outer 0
/declare MezzSpell string outer "Put Mezz Spell Here without quotations"
/declare Duration int outer "Put Duration of Mez Spell here in seconds times 10 without quotations. so 30s would be 300"
:loop
|Set Tank's Target
/if (${SpawnCount[npc radius ${CR}]} > 1) {
/assist ${TANK}
/delay 5
/varset TEMPID ${Target.ID}
/goto :Target
}
/delay 1s
/goto :loop
:Target
/if (${SpawnCount[npc radius ${CR}]} <= 1) /goto :loop
|Find target to Mezz
|Will check the nearest 2 spawns and then start the loop over if it can't find a target that should be mezzed.
/Target ${NearestSpawn[1 NPC radius ${CR}]}
/delay 5
/if (${Target.ID} != ${TEMPID} && !${Target.Type.Equal[Corpse]} && ${SpawnCount[npc radius ${CR}]} > 1) {
/varset MEZZID ${Target.ID}
/delay 5
/call Mezz
/goto :MezzCheck
}
/if (${Target.ID} == ${TEMPID} && ${SpawnCount[npc radius ${CR}]} > 1) {
/Target ${NearestSpawn[2 NPC radius ${CR}]}
/delay 5
/if (${Target.ID} != ${TEMPID} && !${Target.Type.Equal[Corpse]} && ${SpawnCount[npc radius ${CR}]} > 1) {
/varset MEZZID ${Target.ID}
/delay 5
/call Mezz
/goto :MezzCheck
}
}
/delay 1s
/goto :loop
:MezzCheck
|Check to see if Mezz has worn off.
/delay 5
/doevents
/delay 5
/if (!${MEZZED}) /goto :loop
/goto :MezzCheck
/return
Sub Mezz
:Loop
/call Cast "${MezzSpell}" gemX 5s
/echo Mezzing >> ${Target.DisplayName} <<
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset MEZZED ${DURATION}
/return
}
/goto :Loop
/return
Sub Event_MEZZWornOff
/varset MEZZED 0
/returnCode: Select all
"#*#MEZZ spell has worn off#*#"
"Put Mezz Spell Here without quotations"
"Put Duration of Mez Spell here in seconds times 10 without quotations. so 30s would be 300"
gemX
Code: Select all
/call Cast AEMez