martyn10 Posted July 4, 2010 Share Posted July 4, 2010 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. expandcollapse popup#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 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