Druid Heal Macro Help!

louzer

Premium Member
Joined
Feb 26, 2007
Messages
35
Reaction score
1
Points
8
Hi guys, I'm not quite as knowledgeable how to customize Bot and when I use Bot on my druid, the character is useless. I really just want him to heal based off his extended target list. I have written this macro in a few different ways and always have a problem - a different problem every time. This is where I am. It stops immediately after starting it and gives me these lines:


/next without matching /for
druidheal.mac@54 (Target): /next B
druidheal.mac@16 (Main): /if (!${Target.ID}) /call Target

Here's what I got and I'm sure there's more things I need to take into consideration. Even possible errors I'll run into after fixing this. But for some reason I'm having such an issue with the /declare, /for, /next. I have other macros I've written with almost the same exact lines that work fine, this one for some reason not so much. Thanks in advance for any help you can provide!


Code:
Sub Main


/declare A int outer
/declare B int outer
/declare Tank int outer 1
/for A 1 to ${Me.XTarget}
/for B 1 to ${Me.XTarget}

	:MainLoop

		/if (${Target.Type.Equal[NPC]}) /target clear
		/if (!${Target.ID}) /call Target
		/if (${Target.ID} && ${Target.Type.Equal[PC]}) /call Heal
		/goto :MainLoop



Sub Target


	:Target

		/if (${B} > ${Me.XTarget}) {
			/next A
			/for B 1 to ${Me.XTarget}
			/goto :Target
			}
		/if (${A} > ${Me.XTarget}) {
			/for A 1 to ${Me.XTarget}
			/for B 1 to ${Me.XTarget}
			}
		/if (${Me.PctHPs} < 75) {
			/target ${Me}
			/return
			}
		/if (!${Me.XTarget[${Tank}].PctHPs} < 50 && !${Me.PctHPs} < 75 && ${Me.XTarget[${A}].PctHPs} < 80 && !${SpawnCount[${Me.XTarget[${A}].Name}'s corpse]}) {
			/if (${Me.XTarget[${A}].PctHPs} < ${Me.XTarget[${Tank}].PctHPs} && !${SpawnCount[${Me.XTarget[${Tank}].Name}'s corpse]}) {
				/xtar ${A}
				/return
				}
			/if (${Me.XTarget[${A}].PctHPs} < ${Me.XTarget[${B}].PctHPs} && !${SpawnCount[${Me.XTarget[${B}].Name}'s corpse]}) {
				/xtar ${A}
				/return
				}
			}
		/next B
		/goto :Target

Sub Heal



	:Heal

		/if (${Target.PctHPs} < 50 && ${Me.SpellReady[Resurgence Rk. II]}) {
			/cast "Resurgence Rk. II"
			/delay 1s
			/target clear
			/goto :Casting
			}
		/if (${Target.PctHPs} < 50 && !${Me.SpellReady[Resurgence Rk. II]} && ${Me.SpellReady[Adrenaline Torrent Rk. II]}) {
			/cast "Adrenaline Torrent Rk. II"
			/delay 1s
			/target clear
			/goto :Casting
			}
		/if (${Me.SpellReady[Panavida Rk. II]}) {
			/cast "Panavida Rk. II"
			/delay 1s
			/target clear
			/goto :Casting
			}
		/return

	:Casting
	/delay 0.5s
		/if (${Me.Casting.ID}) /goto :Casting
		/for A 1 to ${Me.XTarget}
		/for B 1 to ${Me.XTarget}
		/return
 
I'll give you the rough outline of how I would handle a very simple extended target healer.

There will likely be syntax errors and maybe some logic errors but it should get you close.


Code:
/declare ID int  0 |- This is the ID of the thing you want to heal
/declare A int 0  |- variable to loop over targets

:MainLoop
/delay 1 
/varset ID 0 


/for A 1 to 13 
  /if ( ${Me.XTarget[${A}].PctHPs}<75 && ${Me.XTarget[${A}].TargetType.NotEqual[Auto Hater]}) /varset ID ${Me.XTarget[${A}].ID}

/next A 

/if (${Me.PctHPs}<75) /varset ID ${Me.ID}
|-- At this point ID should be set to the person we want to heal 
/if (!${ID}) /goto :MainLoop

/if (${Target.ID} != ${ID}) {
    /target id ${ID}
    /delay 2
}

|-- Do what ever you use to cast the heal


/goto :MainLoop
 
I'll give you the rough outline of how I would handle a very simple extended target healer.

There will likely be syntax errors and maybe some logic errors but it should get you close.


Code:
/declare ID int  0 |- This is the ID of the thing you want to heal
/declare A int 0  |- variable to loop over targets

:MainLoop
/delay 1 
/varset ID 0 


/for A 1 to 13 
  /if ( ${Me.XTarget[${A}].PctHPs}<75 && ${Me.XTarget[${A}].TargetType.NotEqual[Auto Hater]}) /varset ID ${Me.XTarget[${A}].ID}

/next A 

/if (${Me.PctHPs}<75) /varset ID ${Me.ID}
|-- At this point ID should be set to the person we want to heal 
/if (!${ID}) /goto :MainLoop

/if (${Target.ID} != ${ID}) {
    /target id ${ID}
    /delay 2
}

|-- Do what ever you use to cast the heal


/goto :MainLoop


There were no errors when running this, however for some reason it heals multiple people on extended target, while others even though they are below the 75, it would not switch to them and heal them. Even if they were the ONLY one under 75% hp. The varset ID stays at 0.