Pointers problem

09/30/2020 16:24 Hatz~#1
Hello dear community, I was playing with pointers and stuff in the game and i decided to make a simple program that displays some values like HP, MP, Player position, etc. My problem is that whenever I try to access to the Player Position adress i get instant crash when i inject the dll. The code i use for that is:
Code:
std::cout << "Player position: " << std::endl << "  X: " << *(UINT16*)(*(DWORD*)(0x703ab4) + 0xC) << "  Y: " << *(UINT16*)(*(DWORD*)(0x703ab4) + 0xE) << std::endl;
I tried accessing to the first pointer value who's another address with the following code and it worked but whenever i try to access the value i get crash
Code:
std::cout << "Player position: " << std::endl << "  X: " << (UINT16*)(*(DWORD*)(0x703ab4) + 0xC) << "  Y: " << (UINT16*)(*(DWORD*)(0x703ab4) + 0xE) << std::endl;
Any dev that can help me? :)
09/30/2020 19:21 WalrossGreat#2
And what are the pointer values that are printed out?
09/30/2020 19:49 Hatz~#3
Quote:
Originally Posted by WalrossGreat View Post
And what are the pointer values that are printed out?
These are the values

[Only registered and activated users can see links. Click Here To Register...]
09/30/2020 21:06 WalrossGreat#4
And when do you inject the dll? After you logged in and moved? If I remember correctly, the main player class is initialized just after you move your player for the first time, if you read values from this class instance (TPlayerObjManager) just try to inject it after you actually play (not in character selection screen or elsewhere).
09/30/2020 21:22 Hatz~#5
Quote:
Originally Posted by WalrossGreat View Post
And when do you inject the dll? After you logged in and moved? If I remember correctly, the main player class is initialized just after you move your player for the first time, if you read values from this class instance (TPlayerObjManager) just try to inject it after you actually play (not in character selection screen or elsewhere).
I tried before that and it was crashing too but now i tested it again and it's working! Ty so much for your help :). Also if i relog my character i get crashed, do you have any idea of how to avoid it?
09/30/2020 21:28 WalrossGreat#6
Firstly read *(DWORD*)(0x703ab4) and store the value somewhere. Before making any further reads check if the value is not zero.