Code:
;;================================================================================
;;INCLUDE DEFINITION
;;================================================================================
#include <NomadMemory.au3>
$detailMOGI = 0 ;Output Flag Data
$detailMODN = 1 ;Output M2 file names
dim $WMOsetname_M2[1]
;;================================================================================
;;PRE PREPERATION
;;================================================================================
SetPrivilege("SeDebugPrivilege", 1)
$list = ProcessList("wow.exe")
if $list[0][0] = 0 Then
MsgBox(0,0,"Error 01")
exit
EndIf
$wow = _memoryopen($list[1][1])
if FileExists("WMO_Output.txt") then FileDelete("WMO_Output.txt")
WMOINDEX()
;;================================================================================
;;WMO Indexing
;;================================================================================
Func WMOINDEX()
WriteOutput("---INGAME WMO INDEXER By MALU05---" & @CRLF)
$mainWMOindex = _MemoryRead(0x010E9F18, $wow, 'ptr')
WriteOutput(@crlf)
for $i = 0 to 30 step +1
if $mainWMOindex <> 0x00000000 Then
$_WSMainOffs = $mainWMOindex
$_WSName = _MemoryRead($mainWMOindex + 0x1C, $wow, 'char[700]')
;find number of names
$_WSLinkToWmoMOHD = _MemoryRead($mainWMOindex + 0x120, $wow, 'ptr')
$_WSLinkToWmoMOTX = _MemoryRead($mainWMOindex + 0x120, $wow, 'ptr') ;!!this one is wrong...
$_WSLinkToWmoMOMT = _MemoryRead($mainWMOindex + 0x124, $wow, 'ptr')
$_WSLinkToMOGN = _MemoryRead($mainWMOindex + 0x128, $wow, 'ptr')
$_WSLinkToWmoMOSB = _MemoryRead($mainWMOindex + 0x12C, $wow, 'ptr') ;lol?
$_WSLinkToWmoMOGI = _MemoryRead($mainWMOindex + 0x130, $wow, 'ptr') ;lol?
$_WSLinkToWmoMOPV = _MemoryRead($mainWMOindex + 0x134, $wow, 'ptr')
$_WSLinkToWmoMOPT = _MemoryRead($mainWMOindex + 0x138, $wow, 'ptr')
$_WSLinkToWmoMOPR = _MemoryRead($mainWMOindex + 0x13C, $wow, 'ptr')
$_WSLinkToWmoMOVV = _MemoryRead($mainWMOindex + 0x140, $wow, 'ptr')
$_WSLinkToWmoMOVB = _MemoryRead($mainWMOindex + 0x144, $wow, 'ptr')
$_WSLinkToWmoMOLT = _MemoryRead($mainWMOindex + 0x148, $wow, 'ptr')
$_WSLinkToWmoMODS = _MemoryRead($mainWMOindex + 0x14C, $wow, 'ptr')
$_WSLinkToWmoMODN = _MemoryRead($mainWMOindex + 0x150, $wow, 'ptr')
$_WSLinkToWmoMODD = _MemoryRead($mainWMOindex + 0x154, $wow, 'ptr')
$_WSLinkToWmoMFOG = _MemoryRead($mainWMOindex + 0x158, $wow, 'ptr')
$_WSLinkToWmoMCVP = _MemoryRead($mainWMOindex + 0x15C, $wow, 'ptr')
$_WSLinkToWmo = _MemoryRead($mainWMOindex + 0x1C8, $wow, 'ptr')
$_WSNoOfNames = _MemoryRead($_WSLinkToWmo + 0x18, $wow, 'int')
;find each subgroup
$WMOm2setname = _MemoryRead($_WSLinkToWmoMODS + 0x0, $wow, 'char[20]')
$WMOm2setindex = _MemoryRead($_WSLinkToWmoMODS + 0x14, $wow, 'int')
$WMOm2setnr = _MemoryRead($_WSLinkToWmoMODS + 0x18, $wow, 'int')
$WMOm2Nnr = _MemoryRead($_WSLinkToWmoMOHD + 0x10, $wow, 'int')
;MsgBox(0,0,$_WSLinkToWmoMOHD)
WriteOutput("#######################################################################################################" &@crlf)
WriteOutput("Loading WMO Nr. " & $i & @crlf)
WriteOutput("Located at: " & $mainWMOindex & @crlf)
WriteOutput("FileName: " & $_WSName & @crlf)
WriteOutput("Number Of SUB WMO's: " & $_WSNoOfNames &@crlf)
WriteOutput("Number of Models: " & $WMOm2Nnr &@crlf)
WriteOutput("Model Set Name: " & $WMOm2setname &@crlf)
WriteOutput("Number of set models: " & $WMOm2setnr &@crlf) ;Flags from MOGI
WriteOutput("-------------------------------------------------------------------------------------------------------" &@crlf)
;//==================================================
;// Look through the MODN list and index filenames.
;//==================================================
redim $WMOsetname_M2[$WMOm2Nnr+1]
writeoutput("________________________________________________________________________________________________________" &@crlf)
writeoutput("List of filenames for M2 models that appear in this WMO." &@crlf)
writeoutput(@crlf)
for $i2 = 1 to $WMOm2Nnr step + 1
$plaus = 1
$WMOsetname = _MemoryRead($_WSLinkToWmoMODN + 0x0, $wow, 'char[700]')
if $WMOsetname = "" or $WMOsetname = " "Then
$WMOsetname = _MemoryRead($_WSLinkToWmoMODN + 0x1, $wow, 'char[700]')
if $WMOsetname = "" or $WMOsetname = " "Then
$WMOsetname = _MemoryRead($_WSLinkToWmoMODN + 0x2, $wow, 'char[700]')
$plaus = 2
if $WMOsetname = "" or $WMOsetname = " "Then
$WMOsetname = _MemoryRead($_WSLinkToWmoMODN + 0x3, $wow, 'char[700]')
$plaus = 3
if $WMOsetname = "" or $WMOsetname = " "Then
$WMOsetname = _MemoryRead($_WSLinkToWmoMODN + 0x4, $wow, 'char[700]')
$plaus = 4
EndIf
EndIf
EndIf
EndIf
$WMOsetname_M2[$i2] = StringReplace($WMOsetname,"MDX","M2")
if $detailMODN = 1 Then writeoutput($_WSLinkToWmoMODN & @TAB & $WMOsetname_M2[$i2] &@crlf)
$_WSLinkToWmoMODN = $_WSLinkToWmoMODN + stringlen($WMOsetname) +$plaus
Next
writeoutput(@crlf &@crlf)
;//==================================================
;// Look through the MOGN list and index filenames.
;//==================================================
writeoutput("________________________________________________________________________________________________________" &@crlf)
writeoutput("Data for SUB WMO's." &@crlf)
writeoutput(@crlf)
for $i2 = 1 to $_WSNoOfNames step + 1
$flag = _MemoryRead($_WSLinkToWmoMOGI, $wow, 'int')
$valueFlags = _MemoryRead($_WSLinkToWmoMOGI, $wow, 'ushort')
$valueFlagName = _MemoryRead($_WSLinkToWmo, $wow, 'int')
$plaus = 1
$WMOeditorname = _MemoryRead($_WSLinkToMOGN + 0x0, $wow, 'char[700]')
if $WMOeditorname = "" or $WMOeditorname = " "Then
$WMOeditorname = _MemoryRead($_WSLinkToMOGN + 0x1, $wow, 'char[700]')
if $WMOeditorname = "" or $WMOeditorname = " "Then
$WMOeditorname = _MemoryRead($_WSLinkToMOGN + 0x2, $wow, 'char[700]')
$plaus = 2
if $WMOeditorname = "" or $WMOeditorname = " "Then
$WMOeditorname = _MemoryRead($_WSLinkToMOGN + 0x3, $wow, 'char[700]')
EndIf
EndIf
EndIf
$_WSLinkToMOGN = $_WSLinkToMOGN + stringlen($WMOeditorname) +$plaus
;MODS
;//Announce Data
WriteOutput("SubWMO Located at: " & $_WSLinkToWmoMOGI & " " & @tab & " IndexName: " &$WMOeditorname &@crlf)
if $detailMOGI = 1 Then WriteOutput(@TAB & "*Flags: " & " " & @tab & $valueFlags &@crlf) ;Flags from MOGI
$_WSLinkToWmoMOGI = $_WSLinkToWmoMOGI + 0x20
Next
WriteOutput("=======================================================================================================" &@crlf)
WriteOutput(@crlf)
$mainWMOindex = _MemoryRead($mainWMOindex + 0x14, $wow, 'ptr')
Else
EndIf
Next
EndFunc ;==>Action_RenderOPT
func WriteOutput($_input)
ConsoleWrite($_input)
FileWriteLine("WMO_Output.txt",$_input)
EndFunc