hi need help save UniqueID from return result to configs.ini
i try this not write value to config.ini
IniWrite ("configs.ini", "UniqueID", "Teleporter of Towers", return ($array))
return ($array) still blank in configs.ini
Func test()
NPC_E1_ID_Name('Teleporter of Towers')
EndFunc
Func NPC_E1_ID_Name($Filter)
$GAME_TITLE = "1"
$pid = WinGetProcess($GAME_TITLE)
$GAME_PROCESS = _MemoryOpen($pid)
$POINTER_BASE = _MemoryRead(_MemoryRead($ADDRESS_BASE, $GAME_PROCESS) + 0x1C, $GAME_PROCESS)
$SORTEDLIST = _MemoryRead($POINTER_BASE + 0x14, $GAME_PROCESS)
$NPCBASE = _MemoryRead($SORTEDLIST + $NpcListOffset, $GAME_PROCESS)
$NPCCOUNT = _MemoryRead($NPCBASE + $NpcCounterOffset, $GAME_PROCESS)
If $NPCCOUNT = 0 Then Return
$NPCLIST = _MemoryRead($NPCBASE + $sortedNpcListOffset, $GAME_PROCESS)
Dim $ARRAY[$NPCCOUNT][3]
For $i = 0 To $NPCCOUNT - 1
$NPC = _MemoryRead($NPCLIST + $i*4, $GAME_PROCESS)
If ($NPC <> 0 And _MemoryRead($NPC + $NpcUIDOffset, $GAME_PROCESS)) Then
$ARRAY[$i][0] = _MemoryRead($NPC + $NpcUIDOffset, $GAME_PROCESS) ; unique ID
$ARRAY[$i][1] = _MemoryRead($NPC + $NpcIDOffset, $GAME_PROCESS) ; ID
$ARRAY[$i][2] = _MemoryRead(_MemoryRead($NPC + $NpcNameOffset, $GAME_PROCESS), $GAME_PROCESS, 'wchar[100]')
;$ARRAY[$i][3] =
EndIf
Next
For $i = ($NPCCOUNT - 1) To 0 Step -1
If StringInStr($array[$i][2], $Filter) = 0 Then
_ArrayDelete($array, $i)
EndIf
Next
IniWrite ("configs.ini", "UniqueID", "Teleporter of Towers", return ($array))
Return $ARRAY
EndFunc