[OpenSource] AionInfo Library (For programmers) (4.0 NA 32 bit offsets)

08/07/2013 02:16 illegible#1
I wanted to share the library I've written to ease the reading and writing to Aion memory.

The projects has most up to date NA offsets that I've found.


Code:
        internal enum ChainsManager
        {
            Pointer = 0x1129F20,
            ArrayStart = 0x490,
        }

        internal enum Chain
        {
            AbilityId = 0x3F4,
            IsElapsed = AbilityId + 0x5C,
        }

        internal enum Game
        {
            Tickcount = 0x10ABB19,
        }

        internal enum Inventory
        {
            Pointer = 0x1129B34,
            CubesArray = 0x4C4, // []:uint - Cube pointers
        }

        internal enum Cube
        {
            InventoryItemsArray = 0x39C // []:uint - Item pointers
        }

        internal enum InventoryItem
        {
            ID = 0x9C,
            Count = 0xA8,
            ItemNode = 0x48,
        }

        internal enum ItemNode
        {
            Item = 0x4
        }

        internal enum Item
        {
            NextItem = 0x0,
            Name = 0x4
        }

        internal enum AbilityList
        {
            Pointer = 0x10A1534,
            FirstItem = 0x9FC
        }

        internal enum AbilityArrayItem
        {
            Pointer1 = 0x0,
            Pointer2 = 0x4,
            Pointer3 = 0x8,
            AbilityID = 0xC,
            AbilityPointer = 0x14,
            AbilityAcquired = 0x18
        }

        internal enum AbilityPointers
        {
            First = 0x0,
            Second = 0x14,
            Third = 0x4,
            Final = 0x8
        }

        internal enum Ability
        {
            ID = 0x8,
            Name = 0x1C,
            NameLength = 0x2C,
            LastUseTimestamp = 0x44,
            Cooldown = 0x48,
            CooldownEnd = 0x4C,
            CastTime = 0x60
        }

        internal enum EntityList
        {
            Pointer = 0x10ACF48,
            Array = 0x48
        }

        internal enum EntityArrayItem
        {
            NextArrayItem = 0x0,
            PreviousArrayItem = 0x4,
            EntityNode = 0xC
        }

        internal enum EntityNode
        {
            IsDead = 0x4,
            X = 0x34,
            Y = X + 0x4,
            Z = X + 0x8,
            Type = 0x13E,
            Entity = 0x254,
        }

        internal enum Entity
        {
            EntityNode = 0x4,
            Attitude = 0x1C,
            ObjectId = 0x24,
            Level = 0x36,
            HealthPercent = 0x38,
            Name = 0x3A,
            Type = 0x1CC,
            Class = 0x214,
            Stance = Class + 0x8C,
            Movement = Stance + 0x4,
            TargetObjectId = Stance + 0x98,
            AttackSpeed = TargetObjectId + 0x1BA,
            Health = 0x1228,
            MaxHealth = Health + 0x4
        }

        internal enum LocalPlayer : uint
        {
            TargetEntityNode = 0xC2C5E0,
            HasTarget = TargetEntityNode + 0x8,

            CamX = X - 0x420,
            CamY = CamX - 0x8,

            Movement = X - 0x43C,
            X = Name - 0x428,
            Y = X + 0x4,
            Z = X + 0x8,

            ObjectId = Name - 0x4,
            Name = Level - 0x214,
            Legion = Name + 0xB0,
            Level = 0x10A2A60,

            MaxHealth = Level + 0x24,
            Health = MaxHealth + 0x4,
            MaxMana = Level + 0x2C,
            Mana = MaxMana + 0x4,
            Class = Level + 0x9C,
            Experience = Level + 0x18,
            MaxExperience = Experience - 0x10,
            RecoverableExperience = MaxExperience + 0x8,
            MaxDivinePower = Level + 0x34,
            DivinePower = MaxDivinePower + 0x2,

            MaxFlight = Level + 0x8FB0,
            FlightRemainer = MaxFlight + 0x4,
            FlightType = MaxFlight + 0x8,
            FlightCooldown = FlightRemainer + 0x100
        }
It can read alot of information about the character:
[Only registered and activated users can see links. Click Here To Register...]

Read info about character's target:
[Only registered and activated users can see links. Click Here To Register...]

Inventory items:
[Only registered and activated users can see links. Click Here To Register...]

Abilities:
[Only registered and activated users can see links. Click Here To Register...]

Also you can iterate all nearby entities.
It is easy to get if there is available chain skill after current attack.


Not the whole code in the project is written by me. I've refactored code from Blastradius tutorials about reading entities.

This library is written in .Net Framework v3.5 C#.
The library is not commented very well, but there is a simple GUI that uses it as example.
You can see the code for every function. :-)
(Visual Studio 2012 Solution)
08/07/2013 13:25 Cicciolo79#2
Can u explain how to find Offsets?
I want found all 3.9 EU and 4.0 EU (coming at 2013-08-28) offsets.

Tnx for contribution.
08/09/2013 07:29 Storb#3
how do you tell if a player is friend or foe? THe attitude always comes up as 38 which is friend no matter if they are asmo or ely

NVM their node type is 0, thats what i was doing wrong
08/09/2013 10:37 Cicciolo79#4
Some 3.9 EU offsets

Code:
            X = Name - 0x420, /* 3.9 */
            Y = X + 0x4, /* 3.9 */
            Z = X + 0x8, /* 3.9 */

            ObjectId = Name - 0x4,
            Name = Level - 0xA4, /* 3.9 */
            Legion = Name + 0xB0, /* 3.9 */
            Level = 0xFB4340, /* 3.9 */

            MaxHealth = Level + 0x8E9C, /* 3.9 */
            Health = MaxHealth + 0x4, /* 3.9 */
            MaxMana = Level + 0x8EA4, /* 3.9 */
            Mana = MaxMana + 0x4, /* 3.9 */
            Class = Level + 0x9C, /* 3.9 */
            Experience = Level + 0x8E90, /* 3.9 */
            MaxExperience = Experience - 0x10, /* 3.9 */
            RecoverableExperience = MaxExperience + 0x8, /* 3.9 */
            MaxDivinePower = Level + 0x8EAC, /* 3.9 */
            DivinePower = MaxDivinePower + 0x2, /* 3.9 */
08/10/2013 11:55 Cicciolo79#5
Uhm... What is Entity.Type? How to check if it is correct?
08/10/2013 13:52 illegible#6
I use it in combination with the others.

For example combination of nodeType and entityType:
Code:
var isEntityUser = nodeType == AionInfo.Core.Enums.AionEntityNodeType.User;
var isEntityNPC = nodeType == AionInfo.Core.Enums.AionEntityNodeType.NPC;
var isEntityAttackable = entityType == 12;

var isHostileUser =  isEntityUser && isEntityAttackable;
var isFriendlyUser = isEntityUser && attitude == AionInfo.Core.Enums.AionAttitude.Friendly;
var isMob = isEntityNPC  && isEntityAttackable;
var isNPC = isEntityNPC  && !isMob;
Sometimes for dead or unavailable entities:
Code:
var isEntityDead = entityType == 39 || stance == Enums.AionStance.LyingOnTheGround;
For gatherables:
Code:
var isCollectable = entityType == 42;
Means you have enough points (essence or aether tapping) to collect them.

I use entityType != 43 in one place in my code for auto gathering, but don't remember why I put it there, just forgot. :-)
08/11/2013 11:33 vmv#7
What about 64bit version of Aion, is this good ?
08/11/2013 11:50 illegible#8
Quote:
Originally Posted by vmv View Post
What about 64bit version of Aion, is this good ?
Nope it will not work.
In 64 bit the pointers (entities, abilities, inventory, chains, player info..) are not on these offsets. You have to search for them again.

The structures are the same but their offsets are also misplaced, cause memory pointers, integers are represented with 8 bytes instead of 4.

It is a lot of work again. :P
Better to just start Aion from the 32 bit folder using a shortcut.
08/11/2013 12:11 vmv#9
Quote:
Originally Posted by illegible View Post
Nope it will not work.
In 64 bit the pointers (entities, abilities, inventory, chains, player info..) are not on these offsets. You have to search for them again.

The structures are the same but their offsets are also misplaced, cause memory pointers, integers are represented with 8 bytes instead of 4.

It is a lot of work again. :P
Better to just start Aion from the 32 bit folder using a shortcut.
Yes but as you can see....soon, players will use the 64bit version...so, the future of 32bit hacks :),...
And aion 64bit is working better then 32bit.
08/11/2013 20:43 sweetlady#10
Anyone working with c++ injected dll that could gimme a hand on entities? Think I almost have it but I'm not the best coder with pointers. I know I could use engine but since I haven't unpacked the client I can't find the engine's iterator function so I use linked list.

Edit: Got the nodes list working. But still messing around with the entities pointers.
08/12/2013 18:47 Cicciolo79#11
I'm done with Entity traverse. Can i find "Inventory" in the EntityList? Or also "Skill List" ?
Using some fantasy i've found InventoryItemsArrayAddress for the 3.9 EU but when i try to find out the CubeAddress and the CubeArrayAddress i think the offsets are wrong (differences between 3.9 EU and 4.0 NA) and i can't find them :(
Can you tell me some tips that help me to reach my objective? :)

Thanks for all. You have done an awesome work.

PS. 4.0 EU realease date: 2013-08-28
08/12/2013 18:48 Synthan#12
Thanks for the code! Lifesaver! :D
08/12/2013 22:39 sweetlady#13
Quote:
Originally Posted by Cicciolo79 View Post
PS. 4.0 EU realease date: 2013-08-28
Ahh man! Gonna have to find all the new offsets again! Dammit! Almost having entity list working for 3.9!
08/13/2013 13:55 Cicciolo79#14
Quote:
Originally Posted by sweetlady View Post
Ahh man! Gonna have to find all the new offsets again! Dammit! Almost having entity list working for 3.9!
Can u share yuour 3.9 EU offsets? I've this for AionInfo library:

Code:
        internal enum EntityList
        {
            Pointer = 0xFBE5D8, /* 3.9 */
            Array = 0x48 /* 3.9 */
        }


         internal enum EntityNode
        {
            IsDead = 0x4,
            X = 0x34, /* 3.9 */
            Y = X + 0x4, /* 3.9 */
            Z = X + 0x8, /* 3.9 */
            Type = 0x13E, /* 3.9 */
            Entity = 0x254, /* 3.9 */
        }

         internal enum LocalPlayer : uint
        {
            TargetEntityNode = 0xB46EB4, /* 3.9 */
            HasTarget = TargetEntityNode + 0x8, /* 3.9 */

            CamX = X - 0x420,
            CamY = CamX - 0x8,

            Movement = X - 0x43C,
            X = Name - 0x420, /* 3.9 */
            Y = X + 0x4, /* 3.9 */
            Z = X + 0x8, /* 3.9 */

            ObjectId = Name - 0x4,
            Name = Level - 0xA4, /* 3.9 */
            Legion = Name + 0xB0, /* 3.9 */
            Level = 0xFB4340, /* 3.9 */

            MaxHealth = Level + 0x8E9C, /* 3.9 */
            Health = MaxHealth + 0x4, /* 3.9 */
            MaxMana = Level + 0x8EA4, /* 3.9 */
            Mana = MaxMana + 0x4, /* 3.9 */
            Class = Level + 0x8F14, /* 3.9 */
            Experience = Level + 0x8E90, /* 3.9 */
            MaxExperience = Experience - 0x10, /* 3.9 */
            RecoverableExperience = MaxExperience + 0x8, /* 3.9 */
            MaxDivinePower = Level + 0x8EAC, /* 3.9 */
            DivinePower = MaxDivinePower + 0x2, /* 3.9 */

            MaxFlight = Level + 0x8FB0,
            FlightRemainer = MaxFlight + 0x4,
            FlightType = MaxFlight + 0x8,
            FlightCooldown = FlightRemainer + 0x100
        }
08/13/2013 17:38 andyhug#15
ty