Collision Data in Memory menu

User Tag List

Results 1 to 14 of 14
  1. #1
    matamore's Avatar Member
    Reputation
    6
    Join Date
    Dec 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collision Data in Memory

    thats all i have...

    TerrainManagement.au3:

    Code:
    ; ----------------------------------------------------------------------------
    ; ----------------------------------------------------------------------------
    ;
    ; Author:
    ; 	Malu05 aka. Mads Hagbart Lund <[email protected]>
    ;
    ; Script Function:
    ; 	Application _ TerrainManagement (public)
    ;	Version: 0.01
    ; ----------------------------------------------------------------------------
    ; ----------------------------------------------------------------------------
    
    
    ;;--------------------------------------------------------------------------------
    ;;Includes;
    ;;--------------------------------------------------------------------------------
    #Include <NomadMemory.au3>
    #Include <GuiListBox.au3>
    #include <WindowsConstants.au3>
    #Include <Array.au3>
    #Include <GuiListView.au3>
    #Include <Misc.au3>
    #Include <GuiScrollBars.au3>
    #include <ScrollBarConstants.au3>
    ;;--------------------------------------------------------------------------------
    ;;Variable Definition;
    ;;--------------------------------------------------------------------------------
    
    ;-3.0.9 !!!!!!!!!!!!!!!!!!!!!!
    
    $Debug = 0 									;-Set to 1 For more Advanced Indo
    
    ;//PlayerBase Structures:
    Global $PlayerBaseStatic 	= 0x0127F13C 	;-Static Offset for the Playerbse
    Global $PlayerXyz 			= 0x7D0 		;-Offset from Playerbase to the X position
    
    ;//ADT Structures:
    Global $OffsetADTInfo 		= 0x1286720		;-Static Adress for Info About The Loaded WDT
    Global $OffsetAbegin 		= 0x01292A20 	;-Offset to gather ADT info for the SUB Chunks
    Global $TerrainGeneral 		= 0x00FED3CC 	;-Staric Offset for the Generel Chunk
    
    ;//OBJECT Structures:
    Global $OffsetM2Static 		= 0x012CF63C 	;Static Offset Pointing to the first object in the linked list
    Global $OffsetWMOStatic 	= 0x012CF614 	;Static Offset Pointing to the first object in the linked list
    Global $MouseSelectEnabler 	= 0x012E965C
    
    ;//Prefedined Variables Related to ADT Section
    dim $ADT[5000][500], $RDHMbase[19999], $closer[19999], $MCNKindex[19999]
    dim $ADTdata[5000][500], $finalX[91999], $finalY[19999], $finalZ[19999]
    dim $MCNKinden[5000], $MCNKPosX[19999], $MCNKindenOffs[19999], $MCNKPosY[19999], $MCNKPosZ[19999]
    dim $begin, $MCINoffs, $MCNKoffs[19999], $Basevaluepointer, $countANA
    
    ;//Prefedined Variables Related to OBJECT Section
    dim $m2data[89099][9], $dataokM2[89999], $OBJname[89999]
    dim $WMOdata[9000][9], $dataokWMO[9000], $_m2uniqueID[89999]
    global $M2NameIndex = 0, $M2listitem[89999]
    dim $M2count,$WMOcount, $Listammountm2, $Listammountwmo, $transyn = 0
    SetPrivilege ("SeDebugPrivilege", 1)
    $dll = DllOpen ("user32.dll")
    
    $DllInformation = _memoryopen (WinGetProcess ("World of Warcraft"))
    $lvl1Pointer = _MemoryRead ($PlayerBaseStatic, $DllInformation, 'ptr')
    $lvl2Pointer = _MemoryRead (($lvl1Pointer + 0x30), $DllInformation, 'ptr')
    $PlayerBase = _MemoryRead (($lvl2Pointer + 0x28), $DllInformation, 'ptr')
    $X = $PlayerBase + $PlayerXyz
    $Y = $PlayerBase + $PlayerXyz + 0x4
    $Z = $PlayerBase + $PlayerXyz + 0x8
    
    
    ;;--------------------------------------------------------------------------------
    ;;Sample Hotkey Defenition;
    ;;--------------------------------------------------------------------------------
    HotKeySet ("{Numpad1}", "OffsetTerrainUP")
    HotKeySet ("{Numpad2}", "OffsetTerrainDown")
    HotKeySet ("{Numpad3}", "SelectM2")
    ;;--------------------------------------------------------------------------------
    ;;GUI Creation;
    ;;--------------------------------------------------------------------------------
    $MainGUI = GUICreate ("WoW Terrain Manager 0.2 by Malu05", 900, 800)
    GUISetState ()
    $GUIList = GUICtrlCreateList ("", 0, 0, 300, 300, bitor ($WS_BORDER, $WS_VSCROLL))
    $GUIListSub = GUICtrlCreateList ("", 300, 0, 300, 300, bitor ($WS_BORDER, $WS_VSCROLL))
    $GUIListSubM2 = GUICtrlCreateListView("UniqueID   |File Path |X               |Y               |Z               ", 0, 300, 900, 500, bitor ($WS_BORDER, $WS_VSCROLL))
    _GUICtrlListView_SetColumnWidth($GUIListSubM2, 1, 480)
    
    ;;--------------------------------------------------------------------------------
    ;;Main App;
    ;;--------------------------------------------------------------------------------
    _report("Welcome to Malu05's Terrain Manager")
    TrayTip("Malu05's Terrain Manager","Please Wait While I'm Grappin the Dataz!",5,2)
    TerrainManagement()
    ObjectManagement()
    TrayTip("Malu05's Terrain Manager","Ready to Rock!",5,2)
    
    ;;================================================================================
    ;;TerrainManagement()
    ;;--------------------------------------------------------------------------------
    ;;//This fucntion is used to index all the sub chunks.
    ;;================================================================================
    func TerrainManagement()
    	_report("")
    	_report("===ADT TERRAIN MANAGEMENT===")
    	_report("Initializing ADT load")
    	_report(_MemoryRead ($OffsetADTInfo, $DllInformation, 'char[60]'))
    	Global $ChrunkCountANA
    	Global $bas = 0
    	Global $ChrunkCount = 0
    	$posX = _MemoryRead ("0x" & hex ($X), $DllInformation, 'float')
    	$posy = _MemoryRead ("0x" & hex ($Y), $DllInformation, 'float')
    	_report("My Position is: " & floor ($posX) & " . " & floor ($posy))
    	sleep (3000)
    	;// To Explain the Following, for every 533,3333 coords from the Physical 0,0 WoW Will load a new ADT
    	;// However since its in both the X and Y axis the system works like this:
    	;
    	;// For Every +X New ADT the new offset will be located at 0x100 after the last one
    	;// For Every +Y New ADT the new offset will be loacted at 0x4   after the last one
    	;
    	;// So the first thing we do here is find the Physical 0,0 (32*533,3333-posx and y)
    	;// Then to find the ADT's located around US and not just from our position and up we will go down 3 ADT's (+533.3333*3)
    	;
    	;// Most TBC and WOTLK Areas loads a maximum of 8x8 (64) ADT's at its current stage but this can very likely change with new patches
    	;// PRE TBC Zones Only load upto 5x5 (25) ADT's at a time
    	;// Note that this changes depending on your View Distance
    	$OffsetAfloor = floor ((32 * 533.3333 - floor ($posX + (533.3333 * 4))) / 533.3333) ;Don't Ask!!! ^^
    	$OffsetAfloorY = floor ((32 * 533.3333 - floor ($posy + (533.3333 * 4))) / 533.3333)
    	$OffsetA = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY)
    	$OffsetB = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x100
    	$OffsetC = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x200
    	$OffsetD = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x300
    	$OffsetE = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x400
    	$OffsetF = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x500
    	$OffsetG = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x600
    	$OffsetH = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x700
    	$OffsetI = ($OffsetAbegin + (0x100 * $OffsetAfloor)) + (0x4 * $OffsetAfloorY) + 0x800
    	$OffsAPoint = _MemoryRead ("0x" & hex ($OffsetA), $DllInformation, 'int')
    	$OffsCPoint = _MemoryRead ("0x" & hex ($OffsetC), $DllInformation, 'int')
    	$OffsEPoint = _MemoryRead ("0x" & hex ($OffsetE), $DllInformation, 'int')
    	For $n = 1 to 9 Step + 1
    		if $n = 1 Then $go = $OffsetA
    		if $n = 2 Then $go = $OffsetB
    		if $n = 3 Then $go = $OffsetC
    		if $n = 4 Then $go = $OffsetD
    		if $n = 5 Then $go = $OffsetE
    		if $n = 6 Then $go = $OffsetF
    		if $n = 7 Then $go = $OffsetG
    		if $n = 8 Then $go = $OffsetH
    		if $n = 9 Then $go = $OffsetI
    		$add = 0x0
    		For $i = 1 to 9 Step + 1
    			$subOffs = _MemoryRead ("0x" & hex ($go + $add), $DllInformation, 'int')
    			$subOffs2 = _MemoryRead ("0x" & hex ($subOffs + 0x238), $DllInformation, 'int')
    			if hex ($subOffs2) > "00000000"  Then _report("ADT MCIN Chunk Loaded at: " & hex ($subOffs2),1)
    			if _MemoryRead ("0x" & hex ($subOffs2 + 0xC), $DllInformation, 'char[4]') = "RDHM"  Then
    				;// Here we are inside the ADT file itself.
    				;// Go have a look at www.madx.dk/wowdev/wiki for information about the ADT structure so you can see what possibilities you have get with this.
    				$ChrunkCountANA = $ChrunkCountANA + 1
    				$ADT[$n][$i] = "0x" & hex ($subOffs2)
    				$RDHMbase[$bas] = "0x" & hex ($subOffs2)
    				$MCINoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x18), $DllInformation, 'int')))
    				$MTEXoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x1c), $DllInformation, 'int')))
    				$MMDXoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x20), $DllInformation, 'int')))
    				$MMIDoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x24), $DllInformation, 'int')))
    				$MWMOoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x28), $DllInformation, 'int')))
    				$MWIDoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x2c), $DllInformation, 'int')))
    				$MDDFoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x30), $DllInformation, 'int')))
    				$MODFoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x34), $DllInformation, 'int')))
    				$MFBOoffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x38), $DllInformation, 'int')))
    				$MH2Ooffs = hex ((_MemoryRead ("0x" & hex ($subOffs2 + 0x3c), $DllInformation, 'int')))
    				
    				;//MFBO CHUNK Locator - http://www.madx.dk/wowdev/wiki/index.php?title=ADT#MFBO_chunk
    				if $MFBOoffs > 0 Then
    					_report("Found FLightbox") ;Example of a suboffset
    				EndIf
    				
    				;//MMDX CHUNK Indexing - http://www.madx.dk/wowdev/wiki/index.php?title=ADT#MMDX_chunk
    				$M2NameNR = 0
    				$MMDXindex = 0
    				Do
    					$name = _MemoryRead ("0x" & hex (($subOffs2 + 0x1c) + ("0x" & $MMDXoffs) +$MMDXindex), $DllInformation, 'char[200]')
    					if $name = "" or StringInStr($name,"DIMM",1) > 0 then ExitLoop
    					
    
    					$OBJname[$M2NameNR] = $name
    					$MMDXindex = $MMDXindex + StringLen($name)+1
    					$M2NameNR = $M2NameNR + 1
    				until 1 = 2
    				
    				
    				;//MDDF CHUNK Indexing http://www.madx.dk/wowdev/wiki/index.php?title=ADT#MDDF_chunk
    				$MDDFIndex = 0
    				$OffsetIndex = "0x" & hex (($subOffs2 + 0x1c) + ("0x" & $MDDFoffs))
    				$length = ((($subOffs2 + 0x1c) + ("0x" & $MODFoffs)) - (($subOffs2 + 0x1c) + ("0x" & $MDDFoffs))) / 24
    				for $u = 1 to $length
    					$_m2ID = _MemoryRead ("0x" & hex ($OffsetIndex), $DllInformation, 'int')
    					if StringInStr($_m2ID,"1297040454",1) > 0 then ExitLoop
    					$_m2uniqueID[$M2NameIndex] = _MemoryRead ($OffsetIndex + 0x4, $DllInformation, 'int')
    					$_m2X = _MemoryRead ($OffsetIndex + 0x8, $DllInformation, 'float')
    					$_m2Y = _MemoryRead ($OffsetIndex + 0xc, $DllInformation, 'float')
    					$_m2Z = _MemoryRead ($OffsetIndex + 0x10, $DllInformation, 'float')
    					_report($_m2uniqueID[$M2NameIndex]& "|" & $OBJname[$_m2ID]& "|" & $_m2X& "|" & $_m2Y& "|" & $_m2Z,2)
    					$OffsetIndex = "0x" & hex (($subOffs2 + 0x1c) + ("0x" & $MDDFoffs)+$MDDFIndex)
    					$MDDFIndex = $MDDFIndex + 0x24
    					$M2NameIndex = $M2NameIndex + 1
    					
    				Next
    				;//MCNK CHUNK Indexing - http://www.madx.dk/wowdev/wiki/index.php?title=ADT#MCNK_chunk
    				$MCINintOfs = 0
    				For $m = 1 to 256 Step + 1
    					$MCNKoffs[$ChrunkCount] = _MemoryRead ("0x" & hex (($subOffs2 + 0x1c) + ("0x" & $MCINoffs) + $MCINintOfs), $DllInformation, 'int')
    					$MCNKindenOffs[$m] = "0x" & hex (($subOffs2 + 0x0) + ("0x" & hex ($MCNKoffs[$ChrunkCount])))
    					$MCNKinden[$m] = _MemoryRead ($MCNKindenOffs[$m], $DllInformation, 'char[4]')
    					$MCNKPosX[$m] = $MCNKindenOffs[$m] + 0x70
    					$MCNKPosY[$m] = $MCNKindenOffs[$m] + 0x74
    					$MCNKPosZ[$m] = $MCNKindenOffs[$m] + 0x78
    					$MCNKindex[$ChrunkCount] = $MCNKindenOffs[$m]
    					$finalX[$ChrunkCount] = _MemoryRead ("0x" & hex ($MCNKPosX[$m]), $DllInformation, 'float')
    					$finalY[$ChrunkCount] = _MemoryRead ("0x" & hex ($MCNKPosY[$m]), $DllInformation, 'float')
    					$finalZ[$ChrunkCount] = _MemoryRead ("0x" & hex ($MCNKPosZ[$m]), $DllInformation, 'float')
    					if $Debug = 1 Then _report(floor ($finalX[$ChrunkCount]) & " - " & floor ($finalY[$ChrunkCount]) & " - " & floor ($finalZ[$ChrunkCount]), 1)
    					$MCINintOfs = $MCINintOfs + 0x10
    					$ChrunkCount = $ChrunkCount + 1
    				next
    				$bas = $bas + 1
    			EndIf
    			$add = $add + 0x4
    		Next
    	Next
    	_report("Terrain Details:")
    	_report("ADT's Loaded = " & $bas)
    	_report("Chrunk's Loaded = " & $ChrunkCount)
    	Return
    EndFunc   ;==>TerrainManagement
    
    
    ;;================================================================================
    ;;ObjectManagement()
    ;;================================================================================
    func ObjectManagement()
    _report("")	
    _report("===OBJECT MANAGEMENT===")	
    	;---------------------
    	;M2 INDEX
    	;---------------------
    	$m2LISTCOUNT = 1;OFFS:OFFS:EMPT:OFFS:OFFS
    	$ExtchoM2pre = "0x" & hex(_MemoryRead($OffsetM2Static, $DllInformation, 'int')) ;Find Base Pointer
    	;Stack Entry
    	$M2count = -1
    	$searchAdressM2 = $ExtchoM2pre
    	$ExtchoM2 = _MemoryRead("0x" & hex($searchAdressM2), $DllInformation, 'int')
    	;M2 Gathere
    	$i = -1
    	while $ExtchoM2 > 0
    				$i = $i + 1
    				$KnownXm2 = ($ExtchoM2pre + 0x110)
    				$m2data[$i][1] = _MemoryRead($KnownXm2, $DllInformation, 'float')
    				$m2data[$i][2] = _MemoryRead($KnownXm2 + 0x4, $DllInformation, 'float')
    				$m2data[$i][3] = _MemoryRead($KnownXm2 + 0x8, $DllInformation, 'float')
    				$m2data[$i][5] = $ExtchoM2pre + 0xc
    				$m2data[$i][7] = $KnownXm2
    				$m2data[$i][8] = $i
    				$searchAdressM2 = $searchAdressM2 + 0xAC
    				$m2LISTCOUNT = $m2LISTCOUNT + 1
    				$ExtchoM2pre = _MemoryRead("0x" & hex($searchAdressM2), $DllInformation, 'int')
    				$ExtchoM2 = _MemoryRead("0x" & hex($ExtchoM2pre), $DllInformation, 'int')
    				$searchAdressM2 = "0x" & hex($ExtchoM2pre)
    				$M2count = $M2count + 1
    	WEnd
    	$ExtchoM2 = _MemoryRead("0x" & hex($searchAdressM2), $DllInformation, 'int')
    	_report("M2 Files Loaded :" & $M2count)	
    	
    	;---------------------
    	;WMO INDEX
    	;---------------------
    	$WMOLISTCOUNT = 1;OFFS:OFFS:EMPT:OFFS:OFFS
    	$ExtchoWMOpre = 0x & _MemoryRead($OffsetWMOStatic, $DllInformation, 'int')
    	$WMOcount = -1
    	$searchAdressWMO = $ExtchoWMOpre
    	$ExtchoWMO = _MemoryRead("0x" & hex($searchAdressWMO), $DllInformation, 'int')
    	;WMO Gathere
    	$i = -1
    	while $ExtchoWMO > 0
    				$i = $i + 1
    				$KnownXWMO = ($ExtchoWMOpre + 0xA0)
    				$WMOdata[$i][1] = _MemoryRead($KnownXWMO, $DllInformation, 'float')
    				$WMOdata[$i][2] = _MemoryRead($KnownXWMO + 0x4, $DllInformation, 'float')
    				$WMOdata[$i][3] = _MemoryRead($KnownXWMO + 0x8, $DllInformation, 'float')
    				$WMOdata[$i][5] = $ExtchoWMOpre + 0xc
    				$WMOdata[$i][7] = $KnownXWMO
    				$WMOdata[$i][8] = $i
    				$searchAdressWMO = $searchAdressWMO + 0x34
    				$WMOLISTCOUNT = $WMOLISTCOUNT + 1
    				$ExtchoWMOpre = _MemoryRead("0x" & hex($searchAdressWMO), $DllInformation, 'int')
    				$ExtchoWMO = _MemoryRead("0x" & hex($ExtchoWMOpre), $DllInformation, 'int')
    				$searchAdressWMO = "0x" & hex($ExtchoWMOpre)
    				$WMOcount = $WMOcount + 1
    	WEnd
    	$ExtchoWMO = _MemoryRead("0x" & hex($searchAdressWMO), $DllInformation, 'int')
    	_report("WMO Files Loaded :" & $WMOcount)
    	Return
    EndFunc   ;==>ObjectManagement
    
    
    ;;================================================================================
    ;;Offsterrain
    ;;--------------------------------------------------------------------------------
    ;; Here we have the sample code, this is not required.
    ;;================================================================================
    func OffsetTerrainUP()
    	OffsetTerrain(1.2)
    EndFunc   ;==>OffsetTerrainUP
    func OffsetTerrainDown()
    	OffsetTerrain(-1.2)
    EndFunc   ;==>OffsetTerrainDown
    Func OffsetTerrain($_input)
    	
    	;//First of all we want to figure what ADT and Sub Chrunk we want to affect by the Terrain Mover since we don't want to offset ALL terrain loaded
    	$posX = _MemoryRead ("0x" & hex ($X), $DllInformation, 'float')
    	$posy = _MemoryRead ("0x" & hex ($Y), $DllInformation, 'float')
    	if $ChrunkCount > 10 Then
    		redim $closer[$ChrunkCount + 1]
    		for $i = 0 to $ChrunkCount step + 1
    			if $finalX[$i] > $posX Then
    				if $finalY[$i] > $posy Then
    					$closer[$i] = Sqrt (($finalX[$i] - $posX) ^ 2 + ($finalY[$i] - $posy) ^ 2)
    				Else
    					$closer[$i] = 9999999999999
    				EndIf
    			Else
    				$closer[$i] = 99999999999
    			EndIf
    		Next
    
    		$minadress = _ArrayMinindex ($closer, 1)
    		$baseChrunk = "0x" & hex ($MCNKindex[$minadress] + 0x90)
    		;// Now we have found the baseChrunk we are standing at
    		;// We then edit the 145 SUBchrunks with Its current offset +/- the $_input
    		for $i = 0 to 145 step + 1
    			$currentValue = _MemoryRead ("0x" & hex ($baseChrunk), $DllInformation, 'float')
    			_MemoryWrite ("0x" & hex ($baseChrunk), $DllInformation, $currentValue + $_input, 'float')
    			$baseChrunk = $baseChrunk + 0x4
    		next
    	Else
    		TerrainManagement()
    	EndIf
    EndFunc   ;==>OffsetTerrain
    
    ;;================================================================================
    ;;SelectM2
    ;;================================================================================
    func SelectM2()
    	HotKeySet ("{Numpad3}")
    	if $M2count < 1 Then
    		ObjectManagement()
    	EndIf
    	Dim $radpointX = $MouseSelectEnabler + 0x98
    	dim $radpointY = $radpointX + 0x4
    	dim $radpointZ = $radpointX + 0x8
    	
    	_MemoryWrite($MouseSelectEnabler, $DllInformation, 64, 'byte')
    	_MemoryWrite($MouseSelectEnabler +0x4, $DllInformation, 170691528, 'int')
    	sleep(40)
    	$radpointXpos = _MemoryRead($radpointX, $DllInformation, 'float')
    	$radpointYpos = _MemoryRead($radpointY, $DllInformation, 'float')
    	$radpointZpos = _MemoryRead($radpointZ, $DllInformation, 'float')
    	redim $closer[$M2count + 1]
    	for $i = 0 to $M2count step +1
    		$closer[$i] = Sqrt(($m2data[$i][1] - $radpointXpos) ^ 2 + ($m2data[$i][2] - $radpointYpos) ^ 2)
    	Next
    	$minadress = _ArrayMinindex($closer, 1)
    	$testTOTAL = $m2data[$minadress][7]
    	$minadress = _ArrayMinindex($closer, 1)
    	$testTOTAL = $m2data[$minadress][7]
    	$testTOTAL4 = $testTOTAL - 0x78
    
    	$radpointXpos = _MemoryRead($radpointX, $DllInformation, 'float')
    	$radpointYpos = _MemoryRead($radpointY, $DllInformation, 'float')
    	$radpointZpos = _MemoryRead($radpointZ, $DllInformation, 'float')
    
    
    	;ConsoleWrite(" " &hex($testTOTAL) & " " &hex($testTOTAL2) &@CRLF)
    	While _IsPressed("63", $dll)
    		;ConsoleWrite("M2 Selected "& @CRLF)
    		
    		;ConsoleWrite("Next Step" & @CRLF)
    			Sleep(5)
    			$radpointXpos = _MemoryRead($radpointX, $DllInformation, 'float')
    			$radpointYpos = _MemoryRead($radpointY, $DllInformation, 'float')
    			$radpointZpos = _MemoryRead($radpointZ, $DllInformation, 'float')
    			if _MemoryRead("0x" & hex($testTOTAL4), $DllInformation, 'float') < 2.0 Then
    				lightup($testTOTAL4)
    			EndIf
    			;sleep(5)
    			redim $closer[$M2count + 1]
    			for $i = 0 to $M2count step +1
    				$closer[$i] = Sqrt(($m2data[$i][1] - $radpointXpos) ^ 2 + ($m2data[$i][2] - $radpointYpos) ^ 2)
    			Next
    			$minadressbef = $minadress
    			$minadress = _ArrayMinindex($closer, 1)
    			if $minadressbef <> $minadress Then
    				lightdown($testTOTAL4)
    			EndIf	
    			$testTOTAL = $m2data[$minadress][7]
    			$testTOTAL4 = $testTOTAL - 0x78
    			
    	WEnd
    	lightdown($testTOTAL4)
    	$UniqueID = _MemoryRead("0x" & hex($testTOTAL4 + 0x4), $DllInformation, 'int')
    	$Index = _ArraySearch($_m2uniqueID,$UniqueID)
    	if $Index = -1 then 
    		msgbox(0,"Error " & @error,"This Object Have Not Been Indexed: " & $UniqueID)
    	Else
    		
    		_GUICtrlListView_SetSelectedColumn($GUIListSubM2,$Index)
    		_GUICtrlListView_SetItemFocused($GUIListSubM2,$Index)
    		_GUICtrlListView_EnsureVisible($GUIListSubM2, $Index)
    		GUICtrlSetState($GUIListSubM2, $GUI_FOCUS)
    		GUICtrlSetColor($M2listitem[$Index], 0xff0000)
    	EndIf
    
    	_MemoryWrite($MouseSelectEnabler, $DllInformation, 0, 'int')
    	_MemoryWrite($MouseSelectEnabler +0x4, $DllInformation, 0, 'int')
    	HotKeySet ("{Numpad3}", "SelectM2")
    	Return
    EndFunc   ;==>SelectM2
    
    func lightup($LightVarInput)
    	ConsoleWrite(hex($LightVarInput - 0x98) &@CRLF)
    		For $i = _MemoryRead("0x" & hex($LightVarInput), $DllInformation, 'float') to 2.5 Step +0.1
    			_MemoryWrite("0x" & hex($LightVarInput), $DllInformation, $i, 'float')
    			sleep(1)
    		Next
    
    	Return
    EndFunc   ;==>lightup
    func lightdown($LightdwnVarInput)
    		For $i = _MemoryRead("0x" & hex($LightdwnVarInput), $DllInformation, 'float') to 0.5 Step -0.1
    			_MemoryWrite("0x" & hex($LightdwnVarInput), $DllInformation, $i, 'float')
    			sleep(1)
    		Next
    	Return
    EndFunc   ;==>lightdown
    
    
    
    ;;================================================================================
    ;;_report()
    ;;================================================================================
    func _report($_report, $sub = 0)
    	if $sub = 0 Then
    		_GUICtrlListBox_AddString ($GUIList, $_report)
    		ConsoleWrite (" --- Report: " & $_report & @crlf)
    	Elseif $sub = 1 Then
    		_GUICtrlListBox_AddString ($GUIListSub, $_report)
    		
    	ElseIf $sub = 2 Then
    		$M2listitem[$M2NameIndex] = GUICtrlCreateListViewItem($_report,$GUIListSubM2)
    		if $Debug = 1 Then ConsoleWrite(" --- Report: " &$_report &@crlf)
    	EndIf
    EndFunc   ;==>_report
    ;;================================================================================
    ;;End Loop
    ;;================================================================================
    while 1
    	$msg = GUIGetMsg ()
    	Select
    		Case $msg = $GUI_EVENT_CLOSE
    			Exit
    	EndSelect
    	sleep (10)
    WEnd
    WMO_Indexing2.au3:

    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') ;- 3.1.3  !!!!!!!!!!!!!!!!!!!!!!
        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

    WMO_Indexing.au3:

    Code:
    #RequireAdmin
    ;;================================================================================
    ;;SETTINGS 3.2.2b !!!!!!!!!!!!!!!!!!!!!!
    ;;================================================================================
    global $WMOIndexOffset         = 0x01318678     ;//This offset is the Only thing you need to change every patch.
    global $detailMOGI            = 0             ;//Output Flag Data
    global $detailMODN             = 1             ;//Output M2 file names
    
    ;;================================================================================
    ;;INCLUDE DEFINITION
    ;;================================================================================
    #include <NomadMemory.au3>
    #include <ListboxConstants.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    
    ;;================================================================================
    ;;BASIC WOW APP START
    ;;================================================================================
    Opt("GUIOnEventMode", 1)
    GUISetOnEvent($GUI_EVENT_CLOSE, "exitnow")
    global $Listview
    dim $WMOsetname_M2[1]
    $MainGUI = GUICreate("WMO INDEXER by Malu05",700,500)
    $ListView = GUICtrlCreateList("",0,0,700,500, bitor($WS_BORDER, $WS_VSCROLL))
    GUISetState()
    GUISetOnEvent($GUI_EVENT_CLOSE, "exitnow")
    
    ;;================================================================================
    ;;PRE PREPERATION
    ;;================================================================================
    SetPrivilege("SeDebugPrivilege", 1)
    $list = ProcessList("wow.exe")
    if $list[0][0] = 0 Then
        MsgBox(0,0,"Unable to detect WoW.exe running")
        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---" & "")
    $mainWMOindex = _MemoryRead($WMOIndexOffset, $wow, 'ptr')
    WriteOutput("")
    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')
            WriteOutput("#######################################################################################################" &"")
            WriteOutput("Loading WMO Nr. " & $i & "")
            WriteOutput("Located at: " & $mainWMOindex & "")
            WriteOutput("FileName: " & $_WSName & "")
            WriteOutput("Number Of SUB WMO's: " & $_WSNoOfNames &"")
            WriteOutput("Number of Models: " & $WMOm2Nnr &"")
            WriteOutput("Model Set Name: " & $WMOm2setname &"")
            WriteOutput("Number of set models: "  & $WMOm2setnr &"") ;Flags from MOGI
            WriteOutput("-------------------------------------------------------------------------------------------------------" &"")
    
    ;//==================================================
    ;// Look through the MODN list and index filenames.
    ;//==================================================
            redim $WMOsetname_M2[$WMOm2Nnr+1]
            writeoutput("List of filenames for M2 models that appear in this WMO." &"")
            writeoutput("")
            if $WMOm2Nnr = 0 Then WriteOutput("//This file does not contain any M2 Objects "&"")
            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]  &"")
                $_WSLinkToWmoMODN = $_WSLinkToWmoMODN + stringlen($WMOsetname) +$plaus
            Next
            writeoutput("" &"")
    
    ;//==================================================
    ;// Look through the MOGN list and index filenames.
    ;//==================================================
            writeoutput("_______________________________________________________________________________________________________" &"")
            writeoutput("Data for SUB WMO's." &"")
            writeoutput("")
            if $_WSNoOfNames = 0 Then WriteOutput("//This file does not contain any SUB WMO's "&"")
            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
                ;//Announce Data
                WriteOutput("SubWMO Located at: " & $_WSLinkToWmoMOGI & " " & @tab & " IndexName: " &$WMOeditorname &"")
                if $detailMOGI = 1 Then WriteOutput(@TAB & "*Flags: " & " " & @tab & $valueFlags &"") ;Flags from MOGI
                $_WSLinkToWmoMOGI = $_WSLinkToWmoMOGI + 0x20
            Next
            WriteOutput("")
            WriteOutput("=======================================================================================================" &"")
            WriteOutput("")
            $mainWMOindex =    _MemoryRead($mainWMOindex + 0x14, $wow, 'ptr')
        EndIf
    Next
    EndFunc  
    
    Run("Notepad.exe " & @scriptdir&"/WMO_Output.txt", "")
    while 1
    WEnd
    
    func WriteOutput($_input)
        if $_input = "" then $_input = " "
        GUICtrlSetData($ListView, stringreplace($_input,@TAB,""))
        ConsoleWrite($_input &@CRLF)
        FileWriteLine("WMO_Output.txt",$_input)
    EndFunc
    
    func ExitNow()
        Exit
    endFunc
    M2_Dumper.au3:

    Code:
    ; ----------------------------------------------------------------------------
    ; ----------------------------------------------------------------------------
    ;
    ; Author:
    ;     Malu05 aka. Mads Hagbart Lund <[email protected]>
    ;
    ; Script Function:
    ;     World Of Warcraft - Memory Location Extracter (M2 Struc Edition)
    ; ----------------------------------------------------------------------------
    ; ----------------------------------------------------------------------------
    ;;================================================================================
    ;;Includes;
    ;;================================================================================
    #RequireAdmin ;for Vista Users!
    #include <NomadMemory.au3>
    ;;================================================================================
    ;;InputSet -----------!!!!!
    ;;================================================================================
    $ExtractAdress = 0x01051FF4 ;The adress to be extracted    01 05 1F F4      F4 1F 05 01
    
    ;;================================================================================
    ;;Variable Definition;
    ;;================================================================================
    dim $Listammount = 0
    
    ;;================================================================================
    ;;Process front
    ;;================================================================================
    Opt("WinTitleMatchMode", -1)
    SetPrivilege("SeDebugPrivilege", 1)
    Global $ProcessID = WinGetProcess("World of Warcraft","")
    Local $DllInformation = _MemoryOpen($ProcessID)
    If @Error Then
        MsgBox(4096, "ERROR", "Failed to open memory for process;" & $ProcessID)
        Exit
    EndIf
    
    ;;================================================================================
    ;;Follow static
    ;;================================================================================
    $ExtractAdress = "0x" & hex(_MemoryRead($ExtractAdress, $DllInformation, 'int'))
    $ExtractAdress = $ExtractAdress + 0x8
    
    ;;================================================================================
    ;;Run
    ;;================================================================================
    while $ExtractAdress <> -4
        $ExtractAdress = "0x" & hex(_MemoryRead($ExtractAdress, $DllInformation, 'int'))
        ConsoleWrite("Object Located at: " & hex($ExtractAdress) & " - X Y Z Adress: 0x" & hex($ExtractAdress+0xD8) & " - " & floor(_MemoryRead($ExtractAdress+0xD8, $DllInformation, 'float'))& " , " & floor(_MemoryRead($ExtractAdress+0xDC, $DllInformation, 'float'))& " - " & floor(_MemoryRead($ExtractAdress+0xE0, $DllInformation, 'float')) &@crlf)
        $ExtractAdress = $ExtractAdress - 0X4
    WEnd
    Exit

    But the structures changed a bit...

    struct _ADT
    {

    DWORD CHUNK_X; // 0x54
    DWORD CHUNK_Y; // 0x58

    DWORD ADT_FILE_POINTER; // 0x98
    DWORD ADT_OBJ_FILE_POINTER; // 0x9C
    }

    struct _M2
    {

    DWORD FULL_FILENAME; // 0x40
    DWORD M2_FILE_POINTER; // 0x154
    }

    struct _WMO
    {
    DWORD WMO_GROUP_COUNT; // 0x30
    DWORD[] WMO_GROUP_FILE_POINTERS; // 0x34

    DWORD FULL_FILENAME; // 0x850
    DWORD WMO_FILE_POINTER; // 0x954
    }



    One hint: look for the first 16 bytes to find *.adt-files, the same for m2 and wmo-files.


    I just have one problem...
    The WMO-Groups seem not always to be the right ones.
    Or some are missing.

    I cant see its a linked list, so im stuck..
    Anyone has an idea?

    Collision Data in Memory
  2. #2
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have the answer, but I started poking around today. You can find the pointer to where wow creates the map object list by checking out the ObjectAlloc function.

    From there you're able to determine how many objects are in the list. Check out like CMap::AllocMapObjDef, this calls ObjectAlloc (which contains a pointer to the entire list). The AllocMapObjDef will contain a pointer to the # of items in the list, for that object type.

    I know it's not much, but it's a starting point, and it's where I'm at right now.

    Note: I'm on a mac, so I can't provide offsets for you, sorry.
    https://tanaris4.com

  3. #3
    matamore's Avatar Member
    Reputation
    6
    Join Date
    Dec 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, actually i found the functions for M2 and WMO dumping.

    Mac and windows versions seem to be a bit different in that point.

    Wow 4.3.0.15050

    The ADT Pointer seems to be in battle.net.dll.
    battle.net.dll + 0034E0F0

    ADT:

    I just cant find a better way to dump..

    Code:
                IntPtr _address = Memory.GetModule("Battle.net.dll").BaseAddress;
    
                Int32 OffsetAbegin = Memory.Read<Int32>((IntPtr)(_address.ToInt32() + 0x0034E0F0), "");
    
                NewObject("OffsetAbegin " + OffsetAbegin.ToString("x8"));
                NewObject("");
    
                for (Int32 i = 0; i < 2500; i++)
                {
                    Int32 subOffs = Memory.Read<Int32>((IntPtr)(OffsetAbegin + i * 4), "");
                    if (subOffs > 0)
                    {
                        //NewObject("subOffs " + subOffs.ToString("x8"));
    
                        Int32 file_pointer = Memory.Read<Int32>((IntPtr)(subOffs + Offset), "");
                        if (file_pointer > 0)
                        {
                            Int32 chunk_x = Memory.Read<Int32>((IntPtr)(subOffs + 0x54), "");
                            Int32 chunk_y = Memory.Read<Int32>((IntPtr)(subOffs + 0x58), "");
    
                            //NewObject("subOffs2 " + subOffs2.ToString("x8"));
    
                            if (Memory.ReadCString((IntPtr)(file_pointer), 4, "") == "REVM")
                            {    
    
                                String dd_ = Memory.ReadCString((IntPtr)(file_pointer), 4, "");
                                //NewObject("Chunk" + dd_);
    
                                NewObject("i: " + (i * 4).ToString("x3") + " " + dd_ + " at " + file_pointer.ToString("x8") + " ( " + subOffs.ToString("x8") + " ) for " + chunk_x + " : " + chunk_y);
    
                            }
                        }
                    }
                }

    WMO:

    Code:
    void __cdecl CMapObj::ClearCache()
    {
      int v0; // ebx@1
      int v1; // eax@6
      int v2; // esi@8
    
      v0 = dword_E75524;
      if ( dword_E75524 & 1 || !dword_E75524 )
        v0 = 0;
      while ( !(v0 & 1) && v0 )
      {
        v1 = *(_DWORD *)(dword_E7551C + v0 + 4);
        if ( !(v1 & 1) && v1 )
          v2 = *(_DWORD *)(dword_E7551C + v0 + 4);
        else
          v2 = 0;
        if ( !*(_WORD *)(v0 + 0xA) )
        {
          TSHashTable<ACCOUNTIDCACHE_HASHKEY_DWORD>::Ptr(v0);
          CGEquipmentManager::ShutdownGame(v0);
        }
        v0 = v2;
      }
    }

    M2:

    Code:
    int __usercall sub_810010<eax>(__int128 a1<xmm0>, __int128 a2<xmm2>, double a3<st5>, double a4<st4>, double a5<st3>, double a6<st2>, double a7<st1>, double a8<st0>, const char *Str2)
    {
      int result; // eax@1
      int v10; // ebx@2
      int v11; // esi@3
      int v12; // edi@4
      void *v13; // [sp+0h] [bp-4h]@1
    
      result = LoadJoystickConfig(&dword_EBC358, Str2);
      v13 = (void *)result;
      if ( result )
      {
        v10 = dword_EBC358;
        if ( dword_EBC358 )
        {
          do
          {
            v11 = *(_DWORD *)(v10 + 0x28);
            if ( v11 )
            {
              do
              {
                v12 = *(_DWORD *)(v11 + 4);
                if ( !strcasecmp(*(const char **)(*(_DWORD *)(v11 + 0x2C) + 0x144), Str2) )
                  OsJoystickGetName(v10, a1, a2, a3, a4, a5, a6, a7, a8, v11, v13);
                v11 = v12;
              }
              while ( v12 );
            }
            v10 = *(_DWORD *)(v10 + 4);
          }
          while ( v10 );
          result = (int)v13;
        }
        result = M2Cache(result, a3, a4, a5, a6, a7, a8);
      }
      return result;
    }

    The WMOGroups (WMO_GROUP_FILE_POINTERS)
    are incomplete (some null-pointers) or simply wrong.

    The WMO-File in memory is correct.
    And if the WMOGroups are loaded from *.mpq files,
    everything is fine.

    struct _WMO
    {
    DWORD WMO_GROUP_COUNT; // 0x30
    DWORD[] WMO_GROUP_POINTERS; // 0x34

    DWORD FULL_FILENAME; // 0x850
    DWORD WMO_FILE_POINTER; // 0x954
    }

    struct _WMO_GROUP
    {
    DWORD WMO_GROUP_FILE_POINTER; // 0x434
    }

  4. #4
    xialo's Avatar Member
    Reputation
    1
    Join Date
    Oct 2009
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh wow, are you remaking the terraing management UDF? :O

  5. #5
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has anyone posted the full object structure for CMap and CMapObj?

    Or should this be an exercise to the reader?

    I'm trying to loop through the objects to find the dynamic objects (like the posts in stormwind on the way to the flight path). Curious of the best method to do this.
    https://tanaris4.com

  6. #6
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    Has anyone posted the full object structure for CMap and CMapObj?

    Or should this be an exercise to the reader?

    I'm trying to loop through the objects to find the dynamic objects (like the posts in stormwind on the way to the flight path). Curious of the best method to do this.
    These are game objects. Check the GetWorldMatrix and GetModel vfuncs. With those you can get all the information you need for adding game objects to your mesh.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  7. #7
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wouldn't object matrix only give me coordinates of a cube? it's not the exact object shape, is it?

    Do you add it like that :
    Code:
    while walking along generated path
        if new GameObject pop in memory
            get object matrix
            add it in current mesh
            rebuild mesh
            rebuild path
       end if
    end while
    I think this consume to much resources to be efficient.

  8. #8
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    These are game objects. Check the GetWorldMatrix and GetModel vfuncs. With those you can get all the information you need for adding game objects to your mesh.
    I'm a bit confused by this. Things like mailboxes and lamp posts are definitely game objects, and I can access those + ignore easily enough. I mean more like part of a wall, such as:


    In game the gate juts out a bit, it doesn't when dumping the info from wowmapper though. (Or am I dumb in how I'm dumping data from wowmapper?)
    https://tanaris4.com

  9. #9
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by guizmows View Post
    wouldn't object matrix only give me coordinates of a cube? it's not the exact object shape, is it?

    Do you add it like that :
    Code:
    while walking along generated path
        if new GameObject pop in memory
            get object matrix
            add it in current mesh
            rebuild mesh
            rebuild path
       end if
    end while
    I think this consume to much resources to be efficient.
    The world matrix describes scaling, rotation and translation. Coupled with the model it gives all the information required. Also, we don't rebuild it at runtime - we have the capability of dumping all game objects in an area (like Orgrimmar or Stormwind) and adding them to the mesh.

    Originally Posted by Tanaris4 View Post
    I'm a bit confused by this. Things like mailboxes and lamp posts are definitely game objects, and I can access those + ignore easily enough. I mean more like part of a wall, such as:


    In game the gate juts out a bit, it doesn't when dumping the info from wowmapper though. (Or am I dumb in how I'm dumping data from wowmapper?)
    I haven't had any of these problems with my own parser. Game objects give me all dynamic objects. I also don't see anything on that screenshot?
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  10. #10
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    I haven't had any of these problems with my own parser. Game objects give me all dynamic objects. I also don't see anything on that screenshot?
    Look at where my toon is standing, it juts out from the wall a little. But in Recast that isn't shown. I also have an issue w/the posts that appear on the ramp walking UP towards the flight master, they don't appear in my obj dump from wowmapper.

    Did you have to make a lot of changes to wowmapper before the correct data was dumped? My only change was making sure just the correct doodad set was dumped
    https://tanaris4.com

  11. #11
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, we don't rebuild it at runtime - we have the capability of dumping all game objects in an area (like Orgrimmar or Stormwind) and adding them to the mesh.
    really ? How do you do that ?
    Does it mean you've a kind a DB with all dynamic object per zone, and you're adding them in your mesh building system?
    This taht's case how can you handle temporally objects like "Darkmoon Faire" ?

  12. #12
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by guizmows View Post
    really ? How do you do that ?
    Does it mean you've a kind a DB with all dynamic object per zone, and you're adding them in your mesh building system?
    This taht's case how can you handle temporally objects like "Darkmoon Faire" ?
    Darkmoon Faire objects we have in the mesh all the time. Does not cause any problems.
    We don't use a DB - we mesh GO's in popular and common areas - such as cities and towns.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  13. #13
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes but in order to know where GO need to be added, you've to have store it somewhere.

    BTW, I like this idea.

  14. #14
    andy012345's Avatar Active Member
    Reputation
    59
    Join Date
    Oct 2007
    Posts
    124
    Thanks G/R
    0/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tanaris4: For the walls, it seems like the data dump you have isn't including detailed data, easy way to check is to find a set of stairs, if it's just 2 triangles, detailed geometry isn't being included.

Similar Threads

  1. [Tutorial] Overwatch assembly aimbot (memory data)
    By adesiron in forum Overwatch Chat
    Replies: 5
    Last Post: 12-14-2016, 05:00 AM
  2. Find mob data in memory
    By vivendi in forum GW2 Memory Editing
    Replies: 2
    Last Post: 01-18-2013, 07:36 AM
  3. WMO Collision data (MOBN/MOBR)
    By omni123 in forum WoW Memory Editing
    Replies: 3
    Last Post: 04-12-2010, 07:49 AM
  4. List of the place of the data in the memory
    By krisallyde in forum MMO Exploits|Hacks
    Replies: 4
    Last Post: 03-02-2009, 06:06 AM
  5. How do you find memory offsets in the game?
    By koalaz2004 in forum World of Warcraft General
    Replies: 0
    Last Post: 08-18-2006, 09:40 PM
All times are GMT -5. The time now is 06:34 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search