Autoit + Memory Address

03/02/2008 04:33 UPSman2#1
So we all used [Only registered and activated users can see links. Click Here To Register...] and edited memory addresses, but how to use this in autoit you might ask?
-I will give you a simple walkthrough script and required files for this to work in autoit

Files in RED are included in the .rar file
Code in PINK is newly added


Step 1: Have [Only registered and activated users can see links. Click Here To Register...]
Step 2: Extract "NomadMemory.au3" into your "\AutoIt3\Include" folder
Step 3: Create a basic gui in autoit
For Example:
Code:
[COLOR="Magenta"]#include <GUIConstants.au3>
GUICreate("My GUI Button")
 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
GUISetState ()
While 1
     = GUIGetMsg()
    Select
        Case  = 
            ExitLoop
        Case  = 
    EndSelect
Wend[/COLOR]
Step 4: Find a memory address in cheatengine (or other related programs)...
for this i will be using one i have already found for conquer "0x004EC1E8" (current level)

Step 5: In your autoit script add "#include <NomadMemory.au3>" into you include region AND declare a variable to a memory address and the PID (Process ID) of the window you want to get the memory address from, [Conquer2.0] for me.

Code:
#include <GUIConstants.au3>
[COLOR="Magenta"]#include <NomadMemory.au3> ;because you need this for _memread functions[/COLOR]
GUICreate("My GUI Button")
 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
GUISetState ()

[COLOR="magenta"] = 0x004EC1E8 ;the conquer memory address for current level
 = WinGetProcess("[Conquer2.0]") ;the window to get PID[/COLOR]

While 1
     = GUIGetMsg()
    Select
        Case  = 
            ExitLoop
        Case  = 
    EndSelect
Wend
Step 6: Now we will make it so it opens and closes the procces to be read by useing the functions _MemoryOpen() and _MemoryClose() when we click the button

Code:
#include <GUIConstants.au3>
#include <NomadMemory.au3> ;because you need this for _memread functions
GUICreate("My GUI Button")
 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
GUISetState ()

 = 0x004EC1E8 ;the conquer memory address for current level
 = WinGetProcess("[Conquer2.0]") ;the window to get PID

While 1
     = GUIGetMsg()
    Select
        Case  = 
            ExitLoop
        Case  = 
            [COLOR="Magenta"] = _MemoryOpen();must open before you can read address
            _MemoryClose();close it afterwards[/COLOR]
    EndSelect
Wend
Step 7: Time to read that memory address by using the function _MemoryRead() (dont forget to save it to a variable so you can call back on the value)
Code:
#include <GUIConstants.au3>
#include <NomadMemory.au3> ;because you need this for _memread functions
GUICreate("My GUI Button")
 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
GUISetState ()

 = 0x004EC1E8 ;the conquer memory address for current level
 = WinGetProcess("[Conquer2.0]") ;the window to get PID

While 1
     = GUIGetMsg()
    Select
        Case  = 
            ExitLoop
        Case  = 
             = _MemoryOpen() ;must open before you can read address
            [COLOR="Magenta"] = _MemoryRead(, ) ;reads value at memory address[/COLOR]
            _MemoryClose() ;close it afterwards
    EndSelect
Wend
Step 8: Now that the memory address value is saved to a variable we can now do what we want to it, i will simply just make it update a Label
Code:
#include <GUIConstants.au3>
#include <NomadMemory.au3> ;because you need this for _memread functions
GUICreate("My GUI Button")
 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
[COLOR="magenta"] = GUICtrlCreateLabel("(lvl)",20, 60)[/COLOR]
GUISetState ()

 = 0x004EC1E8 ;the conquer memory address for current level
 = WinGetProcess("[Conquer2.0]")  ;the window to get PID
While 1
     = GUIGetMsg()
    Select
        Case  = 
            ExitLoop
        Case  = 
             = _MemoryOpen() ;must open before you can read address
             = _MemoryRead(, ) ;reads value at memory address
            _MemoryClose() ;close it afterwards	
            [COLOR="Magenta"]GUICtrlSetData(,) ; sets label to value of read memory[/COLOR]
    EndSelect
Wend
Step 9: open up the program you wish to read value from, Conquer for me (note i have to log in), then click the button and it should read the value...now have fun


Side note: some memory address will somtimes be text or other formats (instead of the defualt 4-byte) thus you will need to declare them, read more into this in the "NomadMemory.au3" file

Also: i dont take credit for "NomadMemory.au3" and would like to give props to Nomad, wOuter, Autoit team, cheatengine team, and people i read posts from :p

Also Also... theres a "_MemoryWrite" functions for those interested

Also Also Also... admin privilege might be required
03/02/2008 11:42 leavemealone#2
Nice guide, It will most likely create a huge outbreak of questions for you to answer xD
03/02/2008 18:37 UPSman2#3
eh i have some free time, so bring it on ;)


on a side note...
if your gona use a VB memory address (example: &H4EB6A4) you have to convert the "&H" into "0x00" (0x004EB6A4)

ALSO

values straight off of cheatengine need "0x" added to it (004EB6A4 into 0x004EB6A4)


Joek's memory table (ma-global) is written in visual basic format
03/03/2008 03:16 cjainy#4
can you give an example of how to use the memorywrite function?
03/03/2008 04:16 Acidburncx#5
UPSman2 got any cheat engine for memory?
03/03/2008 05:22 UPSman2#6
@Cjainy, more about it in "nomadmemory" file but an example would be like...

_MemoryWrite($Mem_Address,$Mem_Open,130)

which added to my example script would change you client sided (note not server sided) level to 130


@vegetasupersaiyan6 im guessing what you are saying since i dont know for certain... but you can find conquer memory addresses at Joek's memory table [Only registered and activated users can see links. Click Here To Register...] ...remember to change the "&H" into "0x00" (read 3rd post...)
04/22/2008 14:32 BiiBii#7
Hi,

I've try autoint with your code.
I used cheat engine to find HP adress.

It work nice, but when I restart Conquer it's don't work.

I tryed the same thing with the pointer address of HP address...
same results, my code only work once.

How can I find a memory address that always works ? (with one or more occurence of Conquer)

Sorry for my poor english, hope you'll understand me XD
(I'm french, and use french version of Conquer2.0)
04/22/2008 14:56 Hiyoal#8
HP is DMA. Meaning Dynamic Memory Allocation. The address always changes when Conquer starts up.

Try using a Static memory address like stamina or XP Bar.
Look at Joeks Memory Tables, they are the latest memory addresses for the latest client.

Hiyoal :p
04/22/2008 15:18 BiiBii#9
Thanks,

But how using stamina or xp bar can help me to find my HP ?
I tryed with CharXP=&H53E010 (==> 0x0053E010) from the latest ma-global file, this don't work.
I used the french Conquer (last french patch 1056)


*** Edit ***
I tryed with level, this one work (CharLV=&H53DFF0 ==> 0x0053DFF0)
But how existing bots find hp ? (there some bots that heal character when HP<xxx)
04/22/2008 16:12 joek#10
Yeah the other language versions do have some different address locations,
currently my UHF tables only support the English version.

I am prepared to do tables for other languages but this does require involvement from technically motivated people who run these other versions and at this point there has been no interest.

EDIT:Yep a week passes and no interest is shown; so guess what, no alternate language tables will be available in the foreseeable future :D
05/01/2008 18:22 Powerblaster#11
Hey, i understand the whole concept and everything. But when i press the button i get an error:
$Mem_Open = _MemoryOpen()
$Mem_Open = ^ERROR

Error: Incorrect number of parameters in function call.

I use it for Sho Online, i included the NomadMemory and i have put that file in the \include folder.

How can i fix this?
Thanks.

EDIT: NVM i found it out.
05/03/2008 07:31 Hiyoal#12
lol, u need the PID of the process XD as your parameter.
05/03/2008 14:42 UPSman2#13
i wish that elitepvpers wouldn't take out the "$" in code lines >.>
05/04/2008 02:06 Hiyoal#14
You can, just have to select: Dont Parse Links and media.

Hiyoal XD
05/04/2008 02:19 UPSman2#15
ahh... never knew that, useful to know if i ever post anything again : \