[C] Player Structure [PW-MS]

03/05/2010 02:01 xsh#1
Hi everyone. Just wanna share the stuff i found out when reversing the game.

Assuming you are using dll injectiong and you have the base pointer to all player stats, you can simply access all the data from a nice and userfriendly structure.

Here how to read from memory:
Code:
VARBASE *Stats = 0xBASEPOINTER;
printf("Player HP: %d/%d", Stats->p_Player->Current_HP, Stats->p_Player->Maximum_HP);
And here the structure you need to make this available:
Code:
typedef unsinged char BYTE;




typedef struct _PLAYER				// Player structure
{
	BYTE  Unknown01[0x45C];			// 0x0000	Unknown part

	DWORD Level;					// 0x045C	Player level

	DWORD Unknown03;				// 0x0460	Unknown

	DWORD Current_HP;				// 0x0464
	DWORD Current_MP;				// 0x0468

	DWORD Exp;						// 0x046C	Current experience points
	DWORD Fury;						// 0x0470	Number of spark/fury points
	DWORD Attribute_Points;			// 0x0474	Attribute points left for distribution
	DWORD Vigor;					// 0x0478

	DWORD Unknown06;				// 0x047C
	DWORD Unknown07;				// 0x0480

	DWORD Con;						// 0x0484
	DWORD Int;						// 0x0488
	DWORD Str;						// 0x048C
	DWORD Agi;						// 0x0490

	DWORD Maximum_HP;				// 0x0494
	DWORD Maximum_MP;				// 0x0498

	DWORD Unknown10;				// 0x049C
	DWORD Unknown11;				// 0x04A0
	DWORD Unknown12;				// 0x04A4

	DWORD Speed;					// 0x04A8

	DWORD Unknown14;				// 0x04AC
	DWORD Unknown15;				// 0x04B0
	DWORD Unknown16;				// 0x04B4
	DWORD Unknown17;				// 0x04B8
	DWORD Unknown18;				// 0x04BC
	DWORD Unknown19;				// 0x04C0
	DWORD Unknown20;				// 0x04C4
	DWORD Unknown21;				// 0x04C8
	DWORD Unknown22;				// 0x04CC
	DWORD Unknown23;				// 0x04D0
	DWORD Unknown24;				// 0x04D4
	DWORD Unknown25;				// 0x04D8
	DWORD Unknown26;				// 0x04DC
	DWORD Unknown27;				// 0x04E0
	DWORD Unknown28;				// 0x04E4
	DWORD Unknown29;				// 0x04E8
	DWORD Unknown30;				// 0x04EC
	DWORD Unknown31;				// 0x04F0
	DWORD Unknown32;				// 0x04F4

	DWORD Def_Metal;				// 0x04F8
	DWORD Def_Wood;					// 0x04FC
	DWORD Def_Water;				// 0x0500
	DWORD Def_Fire;					// 0x0504
	DWORD Def_Earth;				// 0x0508
	DWORD Def_Physical;				// 0x050C

	BYTE  Unknown33[0x110];			// 0x0510

	DWORD Position_X;				// 0x0620
	DWORD Position_Y;				// 0x0624

	BYTE  Unknown34[0x500];			// 0x0628

	DWORD Money;					// 0x0B28	Money in inventory

} PLAYER;




typedef struct _VARBASE				// Statistics base
{
	BYTE		 Unknown[0x20];		// 0x0000
	PLAYER		*p_Player;			// 0x0020	Player structure

} VARBASE;

If you have anything to add/comment/whatsoever, feel free to post your oppinion ;-) (Btw, everything is done from scratch, and wasn't tested yet. I'm pretty sure its still valid information)

Greetings,
xsh
03/09/2010 02:10 xsh#2
*updated*

1. Update structures (fixed offsets of some values in the PLAYER structure).
2. Added VARBASE structure (easier handling).
3. Seems like nobody is interested by PW-MS stuff Ôo?
03/09/2010 04:46 dwar#3
Quote:
3. Seems like nobody is interested by PW-MS stuff Ôo?
Where the difference between PW-MS and PWI / PW Russian? If there are no any major differences (I mean in game engine e.g.), then you did empty work, 'coz most of the game structures are already analyzed and described. For more data just look through the russian thread, you will find what you want
03/11/2010 00:32 xsh#4
well, PWI has more add-ons than PW-MS. Therefor, offsetes aren't correct, and no PWI bot works for PW-MS.

And what do you meant with russian thread?
03/11/2010 02:11 dwar#5
[Only registered and activated users can see links. Click Here To Register...]
03/16/2010 22:04 DC-man#6
i play pw-ms but i dont know what you have post???
or for what i need this have you a working PW-MS BOT?