from the following code, some quick observations that'd cause problems...
I believe Subs are required to /return. no clue what would happen if thats left out though.
#event slow "yawns#*#" is wrong. that would need to be something like "#*#yawns." or whatever the text would be. To include both types of slow messages, just add another #event
#event slow "#*#yawns"
#event slow "#"#body slows down."
etc
the Subs are all wrong. should be...
Sub Event_slow and Sub Event_exp
/if (${slowed}<1) :goto main is not correct since you dont have ":main" anywhere. probably bad form to use /call main from within main since you'd probably either run out of memory eventually or outright dump the macro.
Code: Select all
#include spellcast.inc
#event exp "You have gained#*#"
#event slow "yawns#*#"
sub main
/declare slowed int outer
/delay 1s
/assist maintank
/call cast "Torgor's Insects"
/doevents
/delay 1s
/goto :checkcast
/return
:checkcast
/if (${slowed}>0) :goto waitforexp
/doevents
/return
:waitforexp
/doevents
/delay 1s
/doevents
/if (${slowed}<1) :goto main
:goto waitforexp
/return
Sub Exp
/varset slowed 0
Sub Slow
/varset slowed 1
now, if I were to do this keeping it as simple as possible....
Macro kinda sucks since it doesn't allow the slower to do anything but slow, but its a start and a bit simpler then the above one. I haven't tested, or even run this, so no clue if it works.
Code: Select all
#include spellcast.inc
sub main
/declare slowspell string outer Togor's Insects
/declare mainassist string outer myassistsname
/declare prevtargetid int outer 0
:Loop
/delay 1s
/assist ${mainassist}
/delay 5
/if (${Target.ID}==${prevtargetid}) /goto :Loop
/varset prevtargetid ${Target.ID}
:castspell
/call cast ${slowspell}
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
/echo ${Target.Name} Slowed
/goto :Loop
}
/if (${Macro.Return.Equal["CAST_IMMUNESLOW"]}) {
/echo ${Target.Name} Immune
/goto :Loop
}
/goto :castspell
/endmac
Now to have this really working right, you might want to add back in the #event exp, but that doesn't always work since out of range mobs dont give exp, nor do green mobs. I think if I were going to use something like this for myself, I'd throw in some soft of check with ${Spawn[${prevtargetid}]} to make sure the mob is still in the zone, its not a corpse, and is a npc.