|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub AquireTarget
:targetspot
/if (${targetspotted}>${locstospot}) {
/varset targetspotted 1
/varset FightTimer 1m
/keypress esc
/call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
/return
}
/keypress esc
/delay 20
/call MoveToLoc ${SpawnYloc[${targetspotted}]} ${SpawnXloc[${targetspotted}]}
/target ${NearestSpawn[NPC]}
/face fast
/delay 1s
/if (${NearestSpawn[NPC].Distance}>160) {
/varset targetspotted ${Math.Calc[${targetspotted}+1]}
/goto :targetspot
} else {
/ranged
/delay 3s
/call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
:waitfortarget
/if (${Target.Distance}<30) {
/attack on
/return
}
/goto :waitfortarget
}