Fuhrmanator Posted August 19, 2006 Posted August 19, 2006 (edited) Hi,I wanted to write in reference to this thread, but it's closed : http://www.autoitscript.com/forum/index.ph...1&hl=DiabloSo, I've downloaded and installed the 3.2 version of AutoIt, and, although I get no errors using the code for the _Memory UDF's, none of the Diablo II examples seem to work correctly. That is, when I run the Name script, it displays nothing. When I run the Strength script, it displays 0, Edit: when I run the MaxHealth script, it pegs my CPU at 100% and never seems to finish I realize the documentation for the _Memory UDF's says it won't work without the Beta version of AutoIt. Will there be support for the 3.2 version of AutoIt, since this is the "stable" version of the Beta? Thanks in advance!Edit:Also, the following doesn't appear to work either - it only returns 0 no matter what values I put in...http://www.autoitscript.com/forum/index.ph...f=9&t=27111Could it be that...it is broken in AutoIt 3.2?it only works with d2loader?it doesn't work under Windows XP Edited August 19, 2006 by Fuhrmanator
NELyon Posted August 19, 2006 Posted August 19, 2006 Anything that requires the latest beta will run on the stable.
JSThePatriot Posted August 19, 2006 Posted August 19, 2006 When you are asking for support even for a topic that is currently in the Scripts and Scraps section you need to post the actual support topic in the support forum, and include a link like you did above. I read part of the thread, and towards the end it said some of his stuff wasnt working. Another thing. Search for _Mem() UDF's with w0uter as the screen name as in his first post he told that he got most of the functionality from him. @Moderator Please move this to the support forum. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Fuhrmanator Posted August 19, 2006 Author Posted August 19, 2006 When you are asking for support even for a topic that is currently in the Scripts and Scraps section you need to post the actual support topic in the support forum, and include a link like you did above.My bad. Thanks for being polite about it.I read part of the thread, and towards the end it said some of his stuff wasnt working.Yeah, I tried reading that whole thread, but the signal to noise ratio drops terribly at some point. Another thing. Search for _Mem() UDF's with w0uter as the screen name as in his first post he told that he got most of the functionality from him.Thanks - I'll check it out.
Fuhrmanator Posted August 20, 2006 Author Posted August 20, 2006 Could it be that...it is broken in AutoIt 3.2?it only works with d2loader?it doesn't work under Windows XPAnd the answer is...b. it only works with d2loader... The reason appears to be SeDebugPrivilege (d2loader doesn't require it to read memory, but vanilla Diablo II does).I was able to make some progress to get around this problem, and I am able to read a character's name without using d2loader, via a .dll posted here: http://www.autoitscript.com/forum/index.ph...ost&p=94875This .dll sets the SeDebugPrivilege for reading/writing.I'd like to know if it's possible to do this without having to use a .dll? I searched for seDebugPrivilege on this forum and didn't find much at all about how to set it... only some ppl asking if it's needed...
Fuhrmanator Posted August 20, 2006 Author Posted August 20, 2006 dug this up...(snip)I found it and tried it. I just called it with "SeDebugPrivilege" and, at least for one of the tests I tried (Name.au3 in the Examples for Diablo), it works!Thanks!
JSThePatriot Posted August 20, 2006 Posted August 20, 2006 Glad you got it sorted out. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Fuhrmanator Posted August 20, 2006 Author Posted August 20, 2006 Glad you got it sorted out.Thanks. Here is a .zip file that is a simple proof of concept: ExamplesSeDebugPrivilege.zip It's a modification to two of Nomad's original files to include the SetPrivilege() call before attempting to read Diablo II memory (needed without d2loader). I put SetPrivilege() (the one posted here by Larry) in the Memory.au3 (now called NomadMemory.au3) and I modified one example (Strength.au3) to use the call. This example works without d2loader. So, I'd suspect that an error should be returned somewhere along the line when attempting to read memory without the privilege to do so. Here's where I think the problem lies: DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '') Nomad checks for an error after this call, but none is generated if SeDebug privileges are not in place. The values returned are simply zero. Does anyone venture to guess where the fault for the hidden error lies? In fact, this is the reason I (we) lost so much time with this thing.
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