API CheckInteractDistance

Checks whether you are in range to perform a specific interaction with a specified unit. inRange = CheckInteractDistance("unit", distIndex);

Arguments

 * unit : String - Unit to compare distance to.
 * distIndex : Number - A value from 1 to 5:
 * 1 = Compare Achievements, 28 yards
 * 2 = Trade, 8 yards
 * 3 = Duel, 7 yards
 * 4 = Follow, 28 yards
 * 5 = ???, 7 yards

Returns

 * inRange : Flag - 1 if you are in range to perform the interaction, nil otherwise.

Example
if ( CheckInteractDistance("target", 4) ) then FollowUnit("target"); else -- we're too far away to follow the target end