macro fails

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

drodaan
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Jan 04, 2011 11:43 pm

macro fails

Post by drodaan » Sat Sep 03, 2011 1:39 pm

#event recast "The light breeze fades."

Sub Main

/cast 7
/delay 5
/cast 7
/delay 5
/cast 7

:cleric
/if (${Target.PctHPs}<50) /goto :heal
/doevents
/return

:heal
/if (!${Me.SpellReady[Pious Light]}) /goto :cleric
/cast 1
/delay 5
/cast 1
/delay 5
/cast 1
/goto :cleric

Sub Event_recast
/cast 7
/delay 5
/cast 7
/delay 5
/cast 7
/return



this macro ends after it casts spell#7 and i don't know why

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: macro fails

Post by dewey2461 » Sat Sep 03, 2011 3:46 pm

I think that if your Target.PctHPs > 50 then your if statement doesn't happen and it falls through to the /return and ends.

I think this is what your trying to do .

Code: Select all


#event recast "The light breeze fades."

Sub Main 

:MainLoop
/doevents

/if (${Target.PctHPs}<50) /call DoHeal

/delay 5
/cast 7

/goto :MainLoop
/return


Sub DoHeal
/if (!${Me.SpellReady[Pious Light]}) /return 
/cast 1
/delay 5
/return

Sub Event_recast
/cast 7
/delay 5
/return