C# Code ahoy.
RapidShare: Easy Filehosting
This code will give you a bunch of information on the spacial orientation of two objects relative to each other (i.e. Player & Target).
Currently it gives the following information:
X, Y, Z;
Rotation (radians)
Faction, Health, Mana, Name, Type, Reaction;
Direction Horizontal and Vertical of Object 2 from the view of Object 1 (in radians);
Rotational difference (radians) (the difference between Object 2's position relative to Object 1 calculated against the rotation of Object 1. Basically whether or not Object 1 is facing object 2). ETA: This returns a float between -pi and pi (pi being 180 degrees). If the number is positive, Object 2 is to the right of the way object 1 is facing, if negative Object 2 is to the left of object 1.
Rotational difference from the POV of Object 2 as well (radians) - Whether Object 1 is to the left or right of Object 2, for example.
if Object 2 is above or below Object 1 (bool);
if Object 2 is behind or in front of Object 1 (bool).
Distance between Object 2 and Object 1 (3d). (yards)
Speed of both objects (yards/second)
Velocity of Object 2 with regards to Object 1 (ie. you can tell how quickly Object 2 is approaching or receding from Object 1).
Perfect for those of you who want to make a rogue bot that goes around and eats people's babies
Credits: Shynd, Kynox, the guy who did the WoWDefines library (sorry, name slipping my mind), MMOWned, and anyone else I stole code and/or offsets from.