Jump to content
Sign in to follow this  
alaa777

Memory reading

Recommended Posts

alaa777

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

Share this post


Link to post
Share on other sites
bo8ster

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]

Share this post


Link to post
Share on other sites
alaa777

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

Share this post


Link to post
Share on other sites
JRowe

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.