YEAAAAAH!! Finaly. Got it
Code:
Func MapItemWithLvl($items,$snowithlvl)
Local $newItems[UBound($items)][4]
for $i = 0 TO UBound($items) - 1 Step 1
for $j = 0 TO UBound($snowithlvl) - 1 Step 1
if $snowithlvl[$j][0] = $items[$i][2] Then
$newItems[$i][0] = $items[$i][0]
$newItems[$i][1] = $items[$i][1]
$newItems[$i][2] = $items[$i][2]
$newItems[$i][3] = $snowithlvl[$j][1] ;lvl
ExitLoop
EndIf
Next
Next
; Move backwards through the array deleting the blank lines
For $i = UBound($newItems) - 1 To 0 Step -1
If $newItems[$i][0] = "" Then
_ArrayDelete($newItems, $i)
EndIf
Next
return $newItems
EndFunc
Func GetLevels($offset)
if $offset <> 0 Then
$ofs = $offset + 0x218;
$read = _MemoryRead($ofs, $d3, 'int')
while $read = 0
$ofs += 0x4
$read = _MemoryRead($ofs, $d3, 'int')
WEnd
$size = _MemoryRead($ofs+0x4, $d3, 'int')
$size -= 0x5F0
$ofs = $offset + _MemoryRead($ofs, $d3, 'int')
$nr = $size/0x5F0
Local $snoItems[$nr+1][3]
$j = 0
for $i = 0 To $size Step 0x5F0
$ofs_address = $ofs+$i
$snoItems[$j][0] = _MemoryRead($ofs_address, $d3, 'ptr')
$snoItems[$j][1] = _MemoryRead($ofs_address+0x114, $d3, 'int')
$j += 1
Next
EndIf
return $snoItems
EndFunc
Func Stats()
$list = IndexSNO($gameBalance)
$armorOffs = 0
for $j = 0 TO UBound($list) - 1
if($list[$j][1] = 19750) Then ;19750 = armor, 19754 = weapon
;armor offset found!
DEBUG("SNOID" & $list[$j][1] & " OFFSET : " & $list[$j][0])
$armorOffs = $list[$j][0]
EndIf
if($list[$j][1] = 19754) Then ;19750 = armor, 19754 = weapon
;wpn offset found
$weaponOffs = $list[$j][0]
ExitLoop
EndIf
Next
$armorItems = GetLevels($armorOffs)
$weaponItems = GetLevels($weaponOffs)
;;;;iterate things
$CurrentOffset = $_LocalActor_3
$_Count = _MemoryRead($_LocalActor_Count, $d3, 'int')
Global $DATA[$_Count + 1][3]
For $i = 0 To $_Count
$DATA[$i][0] = _MemoryRead($CurrentOffset, $d3, 'ptr')
$DATA[$i][1] = _MemoryRead($CurrentOffset + 0x4, $d3, 'char[64]')
$DATA[$i][2] = _MemoryRead($CurrentOffset + 0x0B4, $d3, 'int')
$CurrentOffset = $CurrentOffset + $ofs_LocalActor_StrucSize
Next
$armorItemsWithLvl = MapItemWithLvl($DATA,$armorItems)
$weaponItemsWithLvl = MapItemWithLvl($DATA,$weaponItems)
_ArrayDisplay($armorItemsWithLvl)
_ArrayDisplay($weaponItemsWithLvl)
EndFunc
Now some sleep then make something usefull from the code tomorrow At least it shows items and their level.