alaa777 Posted April 2, 2009 Share Posted April 2, 2009 i`m trying to make a health and mana monitor for a game i scanned the memory got the address and every thing is fine but when i run it on different pc or close the game and run it again it doesn't read the correct value any help ? #include<NomadMemory.au3> $ID=_MemoryOpen(ProcessExists("sro_client.exe")) $hpmax=_MemoryRead(0x00D3866C,$ID) $mpmax=_MemoryRead(0x00D38670,$ID) Do Sleep(50) $MP=_MemoryRead(0x06ADC454,$ID) Sleep(20) $HP=_MemoryRead(0x06ADC450,$ID) Sleep(20) $hpp=Int($HP*100/$hpmax) Sleep(20) $mpp=Int($MP*100/$mpmax) Sleep(20) ToolTip("HP="&$HP&" , MP="&$MP&@lf&"HP="&$hpp&"%"&" ,MP="&$mpp&"%") Sleep(20) $z=ProcessExists("sro_client.exe") Until $z=0 Link to comment Share on other sites More sharing options...
bo8ster Posted April 2, 2009 Share Posted April 2, 2009 It would appear that it is dynamic. You can't it expect it to be the same every time - you'll have to scan, get the reference then read each time. How did you get the reference before? Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
alaa777 Posted April 2, 2009 Author Share Posted April 2, 2009 It would appear that it is dynamic. You can't it expect it to be the same every time - you'll have to scan, get the reference then read each time. How did you get the reference before?i`m using cheat engine for scaning Link to comment Share on other sites More sharing options...
JRowe Posted April 2, 2009 Share Posted April 2, 2009 Cheat engine allows you to find pointers. You'll need to check out Dynamic Memory Allocation, or DMA, and how to work with it. A variable is usually part of a struct. A struct is a grouping of variables. If a pointer points to a struct, then each variable will be located a specific distance away from the base address. This distance is known as your offset, and looks like 58C, 22B, or the like. If a pointer points to a variable, then you simply read from the dynamic address. Basically, there's going to be a static variable that stores a dynamic address. You need to convert that dynamic address from an int to hex, then read memory at that address, or at that address plus your offset, if the static pointer is pointing to a struct. Read up on their forums, and also do a search for "DMA tutorials" on google. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] 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