Can be used as a threat table for the unit, as it returns all targets that are causing any level of aggro, which can then be selected if need be.
NOTICE: This command is NOT working in ArcEmu's Lua Engine. No information as to why, probably just outdated, this command isn't used often anyways.
function AI_Select(Unit, Event) Unit:GetAITargets() --Don't forget to capitalize both letters in AI! end