Quote:
Originally Posted by Mystery Joe
Hello,
thx for your post it was really enlightening xD. I think i understood most now. So let me make something sure.
[[[[player + 0xC50] + 0xC] + i * 0x4] + 0x40]
as you posted this is the adress for the description in the item list for pwi.
Player – adress of the playerstruct
0x40 – the offset that points to the describtion
0xc50 – the offset that points to the inventory
0xc - the offset of the real base adress
i - the inventory slot
0x4 - idk (maybe the bytes?^^ however should be 0x4 always anyway right?)
|
Well, it's actually:
player = [[[realBaseAddress] + 0x1C] + 0x20]
itemDescription[i] = [[[[player + 0xC50] + 0xC] + i * 0x4] + 0x40] + 0x0
0x1C - Structures
0x20 - Player
0xC50 - Inventory
0xC - List (0x10 instead of 0xC would point to max amount of slots)
This results in a list of pointers (so 4 byte values) to each of the items in inventory, sorted based on inventory slot so:
i * 0x4 - pointer to item i, i.e. item 0 is at 0, item 1 is at 0x4, item 2 at 0x8, etc
0x40 - item description pointer (is only updated after you've hovered over the item, its just an example to check if you found the right pointer for item)
0x0 - as with all strings, the actual characters will be found at the string pointer
Quote:
so in my case the actionstruct adress would be 0x0092764c + 20
the 'i' and the '0x4' should be clear also but how do i search for the adress for the inventory list and the one for the describtion?
|
First of all, actionstructs are not your player struct. They can be found inside the playerstruct. (In PWI they'd be found at [player + 0xFF4]). What you are looking at is the player struct (I Hope :D) Try and use the 'realBaseAddress' though when getting to your player struct, as this will prevent confusion when calling certain ingame functions.
The best way to find the inventory offset would be to look up the itemId of an item you place in slot 0 (top left) of your inventory. Search for it in CE. Then move the item out of the top left inv slot (don't replace with another item) and search for 0. Repeat this process till you have one address left, then start working your way back. The first offset you'll meet will be 0x8 if all things are correct. This offset is very unlikely to be different on your version. Then 0x0 and same for the 0xC. The offset after that will probably be quite a bit lower than 0xC50, as your version is older, and less variables have been squeezed in between.
Another way to find it (providing you have the correct address for your player struct), is to simply look at
itemId of item in top left slot = [[[[player + X] + 0xC] +0] + 0x8]
starting with X = 0xC50, then decreasing X by 0x4 until you find the correct itemId.
Quote:
|
And about the sending packets thing: can i just edit the baseadress and sendpacketfuncadress and put the rest to the include folder to use those funcs it in my scripts? That just sounds too simple^^
|
Providing the packets are the same format for your version of PW, then yes, all you need is the proper base address and sendpacket address. It is likely that most of the packets will be the same, with perhaps one or two exceptions. This very much depends on how much your private server has been modified (which is usually not the case, as the people running private servers tend to leave it as is, for easier updates when new pirated content becomes available)
Quote:
yes ofc i put the elementclient.exe in the same folder as the offset finder but it shows me the following error: 'subscript used with non-array variable' in line 13
tried nooob's offset retriever also but it gets the wrong adresses.
Joe
|
Hmmm yeah, your private version uses a modified or really old version of PW then. Sorry, had to ask, a certain someone who I will not name failed to do this :D