Code:
;;--------------------------------------------------------------------------------
;; Maps snos containg a lvl to the item with that snoid
;;--------------------------------------------------------------------------------
Func MapItemWithLvl($items,$snowithlvl,$indexForBGID)
Local $newItems = $items
ReDim $newItems[UBound($items,1)][UBound($items,2)+UBound($snowithlvl,2)+8] ;add size for some new variables
for $i = 0 TO UBound($items) - 1 Step 1
for $j = 0 TO UBound($snowithlvl) - 1 Step 1
if $snowithlvl[$j][0] = $items[$i][$indexForBGID] Then
$newItems[$i][$indexForBGID+1] = $snowithlvl[$j][1] ;lvl
$newItems[$i][$indexForBGID+2] = $snowithlvl[$j][2] ;min dmg
$newItems[$i][$indexForBGID+3] = $snowithlvl[$j][3] ;;max dmg
$newItems[$i][$indexForBGID+4] = $snowithlvl[$j][4] ;;min armor
$newItems[$i][$indexForBGID+5] = $snowithlvl[$j][5] ;max armor
$newItems[$i][$indexForBGID+6] = $snowithlvl[$j][6] ;min dmg modifier
$newItems[$i][$indexForBGID+7] = $snowithlvl[$j][7] ;max dmg modifier
$newItems[$i][$indexForBGID+8] = $snowithlvl[$j][8] ;gold
$newItems[$i][$indexForBGID+9] = $snowithlvl[$j][9] ;weapon speed
;;some extra attributes
$newItems[$i][$indexForBGID+10] = IterateActorAtribs($newItems[$i][0],$Atrib_Item_Quality_Level) ;quality lvl
$newItems[$i][$indexForBGID+11] = IterateActorAtribs($newItems[$i][0],$Atrib_Strength_Item) ;str
$newItems[$i][$indexForBGID+12] = IterateActorAtribs($newItems[$i][0],$Atrib_Vitality_Item) ;vit
$newItems[$i][$indexForBGID+12] = IterateActorAtribs($newItems[$i][0],$Atrib_Intelligence_Item) ;int
$newItems[$i][$indexForBGID+13] = IterateActorAtribs($newItems[$i][0],$Atrib_Dexterity_Item) ;dex
$newItems[$i][$indexForBGID+15] = IterateActorAtribs($newItems[$i][0],$Atrib_Resistance_All) ;all res
$newItems[$i][$indexForBGID+16] = Round(IterateActorAtribs($newItems[$i][0],$Atrib_Gold_Find)*100) ;gf in %
$newItems[$i][$indexForBGID+17] = Round(IterateActorAtribs($newItems[$i][0],$Atrib_Magic_Find)*100) ;mf in %
$newItems[$i][$indexForBGID+18] = Round(IterateActorAtribs($newItems[$i][0],$Atrib_Hitpoints_Max_Percent_Bonus_Item)*100) ;life %
ExitLoop
EndIf
Next
Next
return $newItems
EndFunc ;==>MapItemWithLvl
;;--------------------------------------------------------------------------------
;; Gets levels from Gamebalance file, returns a list with snoid and lvl
;;--------------------------------------------------------------------------------
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][10]
$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') ;lvl
$snoItems[$j][2] = _MemoryRead($ofs_address+0x1C8, $d3, 'float') ;min dmg
$snoItems[$j][3] = $snoItems[$j][2]+_MemoryRead($ofs_address+0x1CC, $d3, 'float') ;max dmg
$snoItems[$j][4] = _MemoryRead($ofs_address+0x224, $d3, 'float') ;min armor
$snoItems[$j][5] = $snoItems[$j][4]+ _MemoryRead($ofs_address+0x228, $d3, 'float') ;max armor
$snoItems[$j][6] = _MemoryRead($ofs_address+0x32C, $d3, 'float') ;min dmg modifier
$snoItems[$j][7] = $snoItems[$j][4]+ _MemoryRead($ofs_address+0x330, $d3, 'float') ;max dmg modifier
$snoItems[$j][8] = _MemoryRead($ofs_address+0x12C, $d3, 'int') ;gold price
$snoItems[$j][9] = _MemoryRead($ofs_address+0x2D4, $d3, 'float') ;wpn speed
$j += 1
Next
EndIf
return $snoItems
EndFunc ;==>MapItemWithLvl
;;--------------------------------------------------------------------------------
;; Getting Backpack Item Info, extended to show some more info
;; $bag = 0 for backpack and 15 for stash
;;--------------------------------------------------------------------------------
Func IterateBackpackExtendedWithLvl($bag = 0)
$list = IndexSNO($gameBalance) ; $gameBalance=0x015A6008
$armorOffs = 0
$weaponOffs = 0
$otherOffs = 0
for $j = 0 TO UBound($list) - 1
;19750 = armor, 19754 = weapon, 1953 = other
if($list[$j][1] = 19750) Then
$armorOffs = $list[$j][0]
EndIf
if($list[$j][1] = 19754) Then
$weaponOffs = $list[$j][0]
EndIf
if($list[$j][1] = 19753) Then
$otherOffs = $list[$j][0]
EndIf
Next
Local $armorItems = GetLevels($armorOffs)
Local $weaponItems = GetLevels($weaponOffs)
Local $otherItems = GetLevels($otherOffs)
Local $DATA = IterateBackpack($bag)
Local $armorItemsWithLvl = MapItemWithLvl($DATA,$armorItems,8)
Local $weaponItemsWithLvl = MapItemWithLvl($DATA,$weaponItems,8)
Local $otherItemsWithLvl = MapItemWithLvl($DATA,$otherItems,8)
Local $allItems[UBound($armorItemsWithLvl,1)][UBound($armorItemsWithLvl,2)]
For $i = 0 To UBound($allItems)-1 Step 1
if $armorItemsWithLvl[$i][9] <> "" Then
;copy from $armorItemsWithLvl to all items
For $j = 0 To UBound($armorItemsWithLvl,2)-1 Step 1
$allItems[$i][$j] = $armorItemsWithLvl[$i][$j]
Next
ElseIf $weaponItemsWithLvl[$i][9] <> "" Then
;copy from $weaponItemsWithLvl to all items
For $j = 0 To UBound($weaponItemsWithLvl,2)-1 Step 1
$allItems[$i][$j] = $weaponItemsWithLvl[$i][$j]
Next
ElseIf $otherItemsWithLvl[$i][9] <> "" Then
;copy from $otherItemsWithLvl to all items
For $j = 0 To UBound($otherItemsWithLvl,2)-1 Step 1
$allItems[$i][$j] = $otherItemsWithLvl[$i][$j]
Next
EndIf
Next
return $allItems
EndFunc
Its pretty slow (1~2s for me) but you shouldnt need to use it that often