Old Resource List struct is invalid... I think

02/03/2014 20:00 R3D23R0#1
This used to work. I'm trying to pull up resource id's and names with it and it's not performing as it used to. Am I missing something?

Oh, and I'm using

Code:
Global $vBaseAdress = IniRead($SOFTWARE_CONFIG, $cfg_address_key, $cfg_vBaseAdress, "13067820")

$vpointer1 = _MemoryRead($vBaseAddress, $vOpen)
$vpointer2 = _MemoryRead($vpointer1, $vOpen) + 0x8
$vpointer3 = _MemoryRead($vpointer2, $vOpen) + 0x28
$pointer = _MemoryRead($vpointer3, $vOpen) + 0x18

for $i=0 to 768
Local $item_base1 = _MemoryRead($pointer, $vOpen) + $i*4
Local $item_base = _MemoryRead($item_base1, $vOpen) + 0x4

Local $ITEM_NAME1 = _MemoryRead($item_base, $vOpen) + 0x164
Local $ITEM_NAME = _MemoryRead($item_name1, 'wchar[30]') ;Item-Name
Quote:
Originally Posted by asgborges View Post
hmm ok.. we agreed with some points and your lists is same as mine...
but, let me explain how can i see this:

Players list (sequential):
Player-Struct = base_ptr + 0x8 + 0x20 + 0x90 + index*4
Player-Count = base_ptr + 0x8 + 0x20 + 0x14
Player-ID = Player-Struct + 44C
Player-Name = Player-Struct + 5F0 + 0

NPC/MOB list (sequential):
NPC-Struct = base_ptr + 0x8 + 0x24 + 0x50 + index*4
NPC-Count = base_ptr + 0x8 + 0x24 + 0x14
NPC-ID = Player-Struct + 11C
NPC-Name = Player-Struct + 23c + 0

Resource list (sequential):
Resource-Struct = base_ptr + 0x8 + 0x28 + 0x18 + index*4 + 4
Resource-Count = base_ptr + 0x8 + 0x28 + 0x14
Resource-ID = base_ptr + 0x8 + 0x28 + 0x18 + index*4 + 8
Resource-Name = Resource-Struct + 164 + 0

the Resource-Struct have an aditional +4 offset to make the correct sequential pointers. (simple as you can see)

i hope its help!! :)
Edit: Screw this, they can change at every new patch. I've got a better idea.
02/06/2014 19:28 Interest07#2
here i made a video for you on how to get the offsets for the item stuff :)

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

with the transcript if it was too hard to read:

02/07/2014 00:54 R3D23R0#3
Wow, thanks for the tutorial, Interest! I'm still having some trouble making my code pull the text name for the mats from the correct address... I have the address where the name of the herb/resource is located, but wchar and text and char just won't pluck the hex/ascii code from memory. The only thing it pulls are chinese characters when I use wchar.

I don't know if this will show up right or not:

Don't ask me how one herb can have two names in memory. i.e. nectar 3095

2014-02-06 18:15:48 : 11 ID: 3095 name: ⵸ᎳĀ㽭쿰ᜮ
2014-02-06 18:15:48 : 12 ID: 3095 name: ⵸Ꮃ
2014-02-06 18:15:48 : 13 ID: 3098 name: ㏰ᎳĀ-
2014-02-06 18:15:48 : 14 ID: 3098 name: ㏰ᎳĀ-
2014-02-06 18:15:49 : 15 ID: 3103 name: 㺸Ꮃ-
2014-02-06 18:15:49 : 16 ID: 3103 name: 㺸ᎳĀ-
2014-02-06 18:15:49 : 17 ID: 3536 name: 䔰Ꮃ-
2014-02-06 18:15:49 : 18 ID: 3536 name: 䔰Ꮃ-

Idea: why not create an ini (yes it's more work) with all the ids and just pull the name from that. Actually...could just put in the id's I want to grab, forget the rest if I don't want them. Better yet, an ini for each mining region.