Agro Radius
Posted: Sat Jul 10, 2004 6:28 pm
I'm writing and auto pull routine. I was wondering if anyone had any information on a way to determine agro radius. Is there a way formula or otherwise to determine it from the current struct. I see fields like melee range etc. I'm adding logic to soothe (Pacify, Calm, Harmony, lull) any MOBS within a certain range of to target. Now I just need to determine what that range would be. For now I am going with a user settable flag.
Code: Select all
Sub Do-Pull
/declare PullTimeOut timer local 600
/declare addCount int local 0
/declare targetToPull int local ${Target.ID}
/echo "Moving to ${PullRange} from ${Target.CleanName}"
/call MoveToTarget ${PullRange}
/echo At Pull Range: ${Target.Distance}
/if (${DoCalmOnPull}) {
| Sooth Possible adds
/declare calmTarget int local 0
|If more than 5 to crowded to pull
/for mobCount 1 to 5
/varset calmTarget ${Target.NearestSpawn[addCount, npc radius ${AggroRadius}].ID}
/if (!${calmTarget}) /goto :finishedCalming
/squelch /target id ${calmTarget}
/call Cast ${CalmSpell}
/next mobCount
:finishedCalming
/if (${mobCount}==5) {
/call MoveToAnchor
/return LostTarget
}
/target id ${targetToPull}
}
/if (${isPuller}) {
/if (${DoCastOnPull}) {
/call do-CastOnPull
} else {
/ranged
}
/echo Target at ${Target.Distance}
/call MoveToAnchor
/face fast
:WaitOnTarget
|Nuke until it is close
/if (!${Target.ID} || ${PullTimeOut}<1 ) {
|/call ResetSub
/return LostTarget
}
|/if (${Healer}==1) /call AutoHeal
/call do-AutoSlow
/call do-CombatCast
|/pet back
/delay 1s
|/call do-ChainDot
/if (${Target.Distance}>=${Target.MaxRange}) /goto :WaitOnTarget
/varset CombatTargetID ${Target.ID}
} else {
/call ChatOut 1 ${MasterName} "Sorry, I'm not the puller."
}
/return