Looking for a spot of help. I'm *trying* to write a macro that builds off of functionality present in CyberTech's MQ2Twist plugin, and Tonio's MQ2MoveUtils plugin (specifically the /circle command). My goal is to simply target a new mob when I receive the "You must first select a target for this spell!" message. I also have some other bells and whistles present in the other chant macros.
I believe my problem to be in the "lets run this macro forever department" as I'm trying to get it to continuously check for the specific events. I say this, because when I start 'er up, I get a Macro Ended message.
If you can take a look at my approach, and provide feedback, I'd appreciate it greatly.
Code: Select all
| Target.mac
|
#event NeedTarget "You must first select a target for this spell!"
#event Died "You have entered#*#"
#event Tell "#*#tells you#*#"
#event CampCheck "#*#Camp Check#*#"
#event HPChk "#*#YOU for#*#"
Sub Main(string Cchk)
|------------------Declare & Set Variables-------------------|
/declare intNeedTarget int outer
/varset intNeedTarget 0
/declare intDied int outer
/varset intDied 0
/declare intTell int outer
/varset intTell 0
/declare intCampCheck int outer
/varset intCampCheck 0
/declare intHPChk int outer
/varset intHPChk int 0
/declare intMinHPS int outer
/varset intMinHPS 85
|----------------------NeverEnding Loop----------------------|
:Main
:NeedTarget
/If (${intNeedTarget}>=1) {
/keypress F8
/echo Kiting ${Target.CleanName}
/varset intNeedTarget 0
/goto :Main
}
:Died
/If (${intDied}>=1) {
/delay 10
/sit
/echo Camping to desktop.
/delay 10
/camp desktop
/endmacro
}
:Tell
/If (${intTell}>=1) {
/beep
/delay 10
/beep
/delay 40
/goto :Main
}
:CampCheck
/If (${intCampCheck}>=1) {
/beep
/delay 4s
/beep
/ooc I'm kiting ${Cchk}
/varset intCampCheck 0
/goto :Main
}
/If (${Me.PctHPs}<${MinHPs}) {
/twist 8 12
/echo Healing to ${Me.MaxHPs} hitpoints.
/delay ${Math.Calc[${[${Math.Calc[${Math.Calc[${Me.MaxHPs}-${Me.CurrentHPs}]}/100]}*6.02]}
/twist 4 5 6 7 8 11
/varset intHPChk 0
/goto :Main
}
/goto :Main
|---------------------------Events---------------------------|
Sub Event_NeedTarget
/varset intNeedTarget ${Math.Calc[${intNeedTarget}+1]}
/goto :NeedTarget
/return
Sub Event_Died
/varset intDied ${Math.Calc[${intDied}+1]}
/goto :Died
/return
Sub Event_Tell
/varset intTell ${Math.Calc[${intTell}+1]}
/goto :Tell
/return
Sub Event_CampCheck
/varset intCampCheck ${Math.Calc[${intCampCheck}+1]}
/goto :CampCheck
/return


