Code: Select all
/declare spawnnum int outer 1
/declare targ int outer 0
/declare range int outer 20
Sub Harmony
|Auto-harmonies mobs within a certain range of your target
|Directions: have a mob targeted, run the snippet,
|by the end of the code all of the mobs should be harmonied and your
|target ready to pull.
/varset targ ${Target.ID}
/varset spawnnum 1
:harmonyLoop
/if ( ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}].ID} ) {
/target ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}]}
/call Cast "Harmony of Nature"
/delay 55
/varset spawnnum ${Math.Calc[${spawnnum}+1]}
/echo incremented, retargeting ${targ}
/goto :harmonyLoop
}
/target id ${targ}
/return
edit 8/13/2004 - added blueninja's suggestion to use ${Spawn[${targ}].NearestSpawn} rather than ${Target.NearestSpawn}
edit 8/12/2004 - Untested generalized version of code that did work (changed mob name to 'radius ${range}' to work at a camp other than my specific camp}
The mob must be targeted when this is called.
I'd be interested in any feedback anyone has. The version I tested had the meat of this placed into a sub, rather than as a sub itself.
I'm also not sure if ${Target.NearestSpawn[${spawnnum}, npc radius ${range}].ID} will 1. evaluate correctly, and 2. evaluate within a 20 unit radius of me, or of the mob. Initial testing makes me think the mob, but I'm not sure.
Feedback would be good.



