Drew Posted January 14, 2008 Share Posted January 14, 2008 I'm || to just snapping. I'm trying to use NomadMemory, but I can't even get the example scripts to work... let alone trying to get started on my own.Heres the overall page: http://www.autoitscript.com/forum/index.php?showtopic=28351Heres the error I'm receiving:>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Andrew\Desktop\D2 AutoIt\MaxHealth.au3" C:\Documents and Settings\Andrew\Desktop\D2 AutoIt\MaxHealth.au3 (79) : ==> Unknown function name.: Local $DllInformation = _MemoryOpen($ProcessID) Local $DllInformation = ^ ERROR>Exit code: 1 Time: 0.555Its saying it doesn't know the function... ( Even though I know that the example script works, I'm going to include it so you'll won't have to download it just to try and help me. )expandcollapse popup;====================================================================== ; AutoIt Version: 3.1.127 (beta) ; Language: English ; Platform: Win9x/NT or newer ; Author: Nomad ; Requirements: ; This function will only work with beta and my _Mem() functions. ;====================================================================== ; Purpose: ; A demonstration of how to use my Mem() functions. ; This script changes a Diablo II player's Max Health. ; Note: ; This only changes one of the primary max health addresses, and ; there are many which cross-check each other for accuracy. So ; it will not permanently change the health value because as soon ; as anything which would impact your life occurs, the value is ; auto-corrected by Diablo II. This particular address also does ; not show on the Diablo II display screen. It was pointless for ; me to track down the pointers to the display screen values, so ; if you would like to visually see the change in the game, use ; a memory tool like Cheat Engine to find the address you need ; and use _MemWrite() to change it. You can check the value using ; _MemRead, which is easier, and I do it in this script anyway. =P ;====================================================================== ; Additional: ; Please remember to credit accordingly for any use of this script. ;====================================================================== ;################################## ;Include my Mem() functions ;################################## #include <Memory.au3> ;################################## ;Get the process ID. ;If you get an incorrect reading, ;then you may need administrative ;rights enabled. ;################################## Opt("WinTitleMatchMode", 4) Global $ProcessID = WinGetProcess("ClassName=Diablo II","") If $ProcessID = -1 Then MsgBox(4096, "ERROR", "Failed to detect process.") Exit EndIf #cs run this to check if you have administrative rights. If Not IsAdmin() Then Msgbox(4096, "Administrative Rights", "You do not have administrative rights.") EndIf #ce ;################################## ;Call the function for reading ;your Max Health. ;################################## Read_Diablo_Memory () Exit ;################################## ;Function ;################################## Func Read_Diablo_Memory () ;################################## ;Define Local Variables ;################################## Local $Value, $Pointer_1, $Pointer_2, $Pointer_3 Local $Offset1 = 56 Local $Offset2 = 200 Local $Offset3 = 40 ;################################## ;Open the Diablo II process using ;the Process ID retrieved from ;ProcessExists above. ;################################## Local $DllInformation = _MemoryOpen($ProcessID) If @Error Then MsgBox(4096, "ERROR", "Failed to open memory.") Exit EndIf ;################################## ;Read the process and add the ;necessary offsets in the chain ;of pointers to get to the ;Player data structure. ;################################## $Value = _MemoryRead(0x6FBCBB60, $DllInformation) If @Error Then MsgBox(4096, "ERROR", "Failed to read memory.") Exit EndIf $Pointer_1 = '0x' & hex($Value + $Offset1) $Value = _MemoryRead($Pointer_1, $DllInformation) $Pointer_2 = '0x' & hex($Value + $Offset2) $Value = _MemoryRead($Pointer_2, $DllInformation) $Pointer_3 = '0x' & hex($Value + $Offset3) $Value = _MemoryRead($Pointer_3, $DllInformation) ;################################## ;Looking for Max Health Structure ;################################## While ($Value <> 458752) $Pointer_3 = '0x' & hex($Pointer_3 + 8) $Value = _MemoryRead($Pointer_3, $DllInformation) WEnd $Pointer_3 = '0x' & hex($Pointer_3 + 5) ;################################## ;Write 5000 to Max Health ;################################## _MemoryWrite($Pointer_3, $DllInformation, 5000) If @Error Then MsgBox(4096, "ERROR", "Failed to write memory.") Exit EndIf ;################################## ;Check to see what was written ;since it doesn't show on the ;Diablo II display screen. ;################################## MsgBox(4096, "Max Health", _MemoryRead($Pointer_3, $DllInformation)) ;################################## ;Close the process ;################################## _MemoryClose($DllInformation) If @Error Then MsgBox(4096, "ERROR", "Failed to close memory.") Exit EndIf EndFuncIt's going to drive me insane. I've looked up #include in the help file and stuff. Is the NomadMemory.au3 or just Memory.au3 supposed to be located in a particular place so i knows where to find it? I've searched the forum for related problems, but seems I'm the only one; further persuading me to think I'm completely off base , or missed something simple and I'm over-thinking it. I'm sorry if this turns out to be a waste of anyones time but my own. =(*Dreu Link to comment Share on other sites More sharing options...
GaryFrost Posted January 14, 2008 Share Posted January 14, 2008 Memory.au3 is part of the standard includes, which doesn't have any of the nomadmemory functions in it. You'll need to get the nomad memory include file, and change your #include statement to that file. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Drew Posted January 14, 2008 Author Share Posted January 14, 2008 Yes, I went into the program files -> include and looked at it. I tried changing the #include statements to nomad's, but it still didn't work. I tried putting the NomadMemory.au3 file in the Program Files-> AutoIt -> Include , and in the ScriptDir with it. Neither ways will it recall the function. Link to comment Share on other sites More sharing options...
Drew Posted January 14, 2008 Author Share Posted January 14, 2008 Alright I figured that part out. New problem. All works fine, ( what I mean by that is that it finds/opens the files.), but it can't return the information in the MsgBox's. For MaxHealth, it just sits there and never finishs. For Strength it returns "0". And for name, its blank. Link to comment Share on other sites More sharing options...
Drew Posted January 31, 2008 Author Share Posted January 31, 2008 Bump Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 3, 2008 Share Posted February 3, 2008 Maybe this will help......OK, maybe it won't. Credit to Randall Munroe at xkcd.com Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now