apocalypticx Posted December 19, 2010 Share Posted December 19, 2010 (edited) I have got some code off these forums forgot who posted it but thanks, all i want to do is read the total unit count which in Cheat Engine looks like this: CvGameCoreDLL.dll+33A3FC + 98 = Total Units for Player 1 All i get is 0 and i read somewhere on these forums about Dll's cause problems when your reading memory. #include <NomadMemory.au3> $ID = ProcessExists("Civilization4.exe") Global $Offset[2] = [0, 0x98] ; your multilevel offsets -- enter hex here $StaticOffset = 0x0202A3FC ;your static offset or green address $openmem = _MemoryOpen($ID) $baseADDR = _MemoryGetBaseAddress($openmem, 1) $finalADDR = "0x" & Hex($baseADDR + $StaticOffset) ;this gives you "app.exe+941318" $r = _MemoryPointerRead($finalADDR, $openmem, $Offset) ;this gives you the final address to read from _MemoryClose($openmem) ;Test if value is correct MsgBox(0, "Info", $r[1]) ;or try the other one w/o [1] MsgBox(0, "Info", $r) ;check w/c one gives you the correct value The weird thing is i can read the above address and offset using Nomad's old memory script (2006 i think). Any help on how to read it using NomadMemory.au3. Edited December 19, 2010 by apocalypticx Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 19, 2010 Moderators Share Posted December 19, 2010 apocalypticx,I take it you missed this before posting. You will get plenty of help here if you post permissible questions, but not for ones like this. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts