Jump to content
Sign in to follow this  
martyn10

Looking for help with Nomadmemory

Recommended Posts

martyn10

hey all. i was wondering if it would be possible to read the current value of an address and if that value was = to a certain value then such and such would happen and if it was = to a different value then something else would happen. sorry if this is poorly worded not exactly sure how to put it. heres an example of the script im making.

#include <NomadMemory.au3>

$id = WinGetProcess("Game.exe", "")
Global $Paused  
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
MsgBox(4096, "Trainer","Start", 30)
Sleep(2000)

                         $AttRangeAddress = 0x0190A62C
                         $AttRangeNewValue = 20
            $AttRangeRealValue = 17
            $AttRange1Address = 0x03DD3318
            $AttRange1NewValue = 20
            $AttRangeReal1Value = 17
            $AttSpeedAddress = 0x03DD331C
            $AttSpeedNewValue = 1
            $AttSpeedRealValue = 12
            $NewAddress = 0x0163E2E4 ; This is the address i would like to find the value of
            
Func enable()            ;This is the function i would like to run if $NewAddress = 0
$memory = _MemoryOpen($id)
_MemoryWrite($AttRangeAddress, $memory, $AttRangeNewValue, "float")

_MemoryWrite($AttRange1Address, $memory, $AttRange1NewValue, "float")

_MemoryWrite($AttSpeedAddress, $memory, $AttSpeedNewValue)
_MemoryClose($memory)
EndFunc

Func disable()          ;and This is the function i would like to run if $NewAddress is greater than 0
$memory = _MemoryOpen($id)
_MemoryWrite($AttRangeAddress, $memory, $AttRangeRealValue, "float")

_MemoryWrite($AttRange1Address, $memory, $AttRangeReal1Value, "float")

_MemoryWrite($AttSpeedAddress, $memory, $AttSpeedRealValue)
_MemoryClose($memory)
EndFunc

  
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
    WEnd
EndFunc 

Func Terminate()
    Sleep(1000)
    Exit 0
EndFunc

thanks for any help :blink:

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.