Thank you to all three of you - @ValvePro, @SSlisa, @Zynes
It's really good to see all the responses, great community.
Thank you to all three of you - @ValvePro, @SSlisa, @Zynes
It's really good to see all the responses, great community.
------------------------------
If not me than who?
Anyone found some sort of guid for objects yet?
AgentId seem to be used as GUID, as it's passed to the server for some interaction with object. (Well, indeed it's not unique)
Yeah I was almost sure too that they have some kind of GUID, then I started writing clientless stuff and noticed that AgentId was using too in packet so ...
Ok this kind of working is new to me so it took me a while to work it all out but I figured I would post what I did work out, basically a translation of stuff already posted.
I work in .LUA and last time I tried to write it in the same format commonly used here I messed up a value, so I will just post it how I use it and let others rewrite it for their own usage.
I started writing this trying to explain everything for people to understand but it was getting long winded, the main point I found is that there is an offset of 0xC that I couldn't find mentioned anywhere. It looks like this in LUA and no I'm not going to try and explain it all, most people should be able to work out what the code means.
Player array is any player controlled characters in memory range, there are also some others in there aswell, I am guessing NPC but not 100% sure at this stage.Code:function playerstats(_arg1) lvl = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0x7C}) adjlvl = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0xA0}) power = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0x84}) precision = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0x88}) toughness = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0x8c}) vitality = memoryReadRepeat("intptr", proc, 0x169522C,{0x28,_arg1,0xC,0x128,0x90}) X = memoryReadRepeat("floatptr", proc, 0x169522C,{0x28,_arg1,0xC,0x44,0x1C,0x5C,0xB4}) Y = memoryReadRepeat("floatptr", proc, 0x169522C,{0x28,_arg1,0xC,0x44,0x1C,0x5C,0xB8}) Z = memoryReadRepeat("floatptr", proc, 0x169522C,{0x28,_arg1,0xC,0x44,0x1C,0x5C,0xBC}) return lvl, adjlvl, power, precision, toughness, vitality, X, Y, Z end function character() local proc = getProc() size = memoryReadRepeat("intptr", proc, 0x169522C, 0x30) print("The size of the array is "..size) for i = 1, size-1 do if memoryReadRepeat("intptr", proc, 0x169522C,{0x28,i*4}) ~= 0 then if memoryReadRepeat("intptr", proc, 0x169522C,{0x28,i*4,0xC}) ~= 0 then lvl, adjlvl, power, precision, toughness, vitality, X, Y, Z = playerstats(i*4) end end end end
So basically it is what is posted on first page but with the 0xC offset which I couldn't find mentioned anywhere.
The character array is similar but without the 0xC offset and using the char array and char array size offsets which are stated first post.
Hope this helps people.
Last edited by SSlisa; 10-10-2012 at 07:25 PM.
Hey guys,
I have a question. I am trying to read just the level from core stats and I understand I need to use multi level pointers to arrive at it. However, I am not sure if I am understanding correctly.
Based on this value from CE.
Level
[[Gw2.exe + 0129522C + 38] 128] 7C]
Am I doing this correctly in C#?
(Proof of concept code)
Code:public static int Level { get { var cliContext = Memory.Read<IntPtr>(new IntPtr(0x129522C), true); var cliCharacter = Memory.Read<IntPtr>(new IntPtr(0x129522C + 0x38), true); var cliCoreStats = Memory.Read<IntPtr>(IntPtr.Add(cliCharacter, 0x128), true); var level = Memory.Read<int>(IntPtr.Add(cliCoreStats, 0x7c), true); return level; } }
Last edited by Shadowhunter12; 10-10-2012 at 07:27 PM.
firstly C# isn't my thing but I do notice that you use the first offset of 38 and just add it to the 129522C but is should be a ptr, so do it the same way you do the clicharacter,0x128 and not + 0x38. You will probably find it will work after you do that.
so basically like this
Again C# isn't my thing lolCode:public static int Level { get { var cliContext = Memory.Read<IntPtr>(new IntPtr(0x129522C), true); var cliCharacter = Memory.Read<IntPtr>(IntPtr.Add(0x129522C, 0x38), true); var cliCoreStats = Memory.Read<IntPtr>(IntPtr.Add(cliCharacter, 0x128), true); var level = Memory.Read<int>(IntPtr.Add(cliCoreStats, 0x7c), true); return level; } }
Also this assumes that in your code the address is used with the game client start of 400000, so the actual address would be 0x169522C
Last edited by SSlisa; 10-11-2012 at 01:49 AM.
Project could be out-dated as I've swapped to C++, but this is what I used for testing stuff. Be warned, it doesn't have everything, but it's what I found bits by bit while it was still used (and some enums that were copy/pasta'd from here).
DatContext.zip
does someone has an idea if it is possible to rotate the character by writing the heading values? it seems i just can't get it to work.
i know it is possible to set the camera rotation using
but this only works if the char is standing still and the alignment of the camera is rather slow.Code:gw2.exe+0x11C4BB0 + 0x108 (left/right)
also,
does not work because the camera pans in the right direction, but once it is there it slowly pans back to where it started.Code:gw2.exe+0x11C4BB0 + 0x64 (left/right)
same for up/down
Code:gw2.exe+0x11C4BB0 + 0x40
Last edited by Keeiops; 10-11-2012 at 03:54 PM.
player name is easy, but for npc / mob / whatever, you will have to got deeper in reversing.
damn, but ok :/
thx JuJuBoSc
found some functions in your zip like:
is it possible to get the position under mousecursor with this?Code:public float MouseOverX { get { return Memory.Reader.Read<float>(Address + Offsets.AsContextClass.MouseOverX); } }
hmm wasnt able to transfer it to ce:
gw2.exe+0x129522C + 0xB8 this seems to be incorrect cause value is always "0"
would be nice if someone could give me a hint.
regards piotr
Last edited by piotr55; 10-11-2012 at 06:10 PM.
player movements are just a matter of changing an int value for the static addresses. 0 is not moving, 1 is moving.
addresses for current build 12th Oct.
Yeah still working on that part, nothing solid yet.Code:moveForward = 0x1696A20, moveBackward = 0x1696A24, turnLeft = 0x1696A30, turnRight = 0x1696A34,