Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 2
Posts: 7
Join Date: Jun 2008
Object spacial orientation -
06-29-2008
C# Code ahoy.
[Only registered and activated users can see links. ]
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.
Last edited by Bobnovak; 07-02-2008 at 11:02 AM.
Reason: Updating post to include link, etc
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 2
Posts: 7
Join Date: Jun 2008
07-01-2008
Well since there was overwhelming demand :| here it is..
[Only registered and activated users can see links. ]
Has functionality for
Direction horizontal/vertical (Radians)
distance(Yards),
rotational difference for both objects (Radians) (if object 1 is facing object 2; if object 2 is facing object 1),
Speed (yards/second)
Velocity (yards/second)( change in difference in distance between the two objects; negative = receding, positive = approaching )
Standard things like X, Y, Z location, unit faction, unit name, reaction, type
[Only registered and activated users can see links. ]
Thanks to you Shynd for your Memory library, it's good stuff, as well as your code for determining the unit reaction.
Very impressive, and you just made me want to almost completely re-write my memory library because of how ugly it is to have to type .ReadUInt(0... every time. My original thought process was that it'd make it easier to read memory from two different clients (another game, I was botting multiple clients together using one program and only one instance of the memory library instead of an array of them... stupid).
Thanks for all of the example code, though. Definitely
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 2
Posts: 7
Join Date: Jun 2008
07-01-2008
Well I can understand where you're coming from with the idea, but I would probably make an array that stores connection objects rather than having the array in the connection object. I should rep you for the memory library though, it's very good even though it could use a little tweaking.