Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: LukeJrs on July 30, 2006, 02:54 AM

Title: ReadProcessMemory & Sentkey
Post by: LukeJrs on July 30, 2006, 02:54 AM
I'm working on a new bot base on memory address what im trying to do is, ReadProccessMemory if value match 643 go to press this hotkey like f6 for hp pot

Is for a game

The poke is dynamic memory change everytime i open cleint

i defected dynamic memory

Poke 4A13E6 90 90

what i want to do is freeze dymanic memory, then readproccessmemory poke 584440 so i get the value if match 540 example hp is 2000 and i want use pot when hp is lower than 600 if lower than 600 press hotkey f6 for life point pot.

Ps. Im working on Delphi

Any template of this code? I made many change but my code doesn't work
Title: Re: ReadProcessMemory & Sentkey
Post by: Kp on July 30, 2006, 11:44 AM
You must suspend the thread(s) which are updating that memory location.  Otherwise, they might change the value after you read it.
Title: Re: ReadProcessMemory & Sentkey
Post by: LukeJrs on July 30, 2006, 12:18 PM
how can i do this? can you allocate me to somewere so i can read it the tuturial
Title: Re: ReadProcessMemory & Sentkey
Post by: Kp on July 30, 2006, 03:30 PM
Use OpenThread to obtain a handle with SUSPEND_RESUME access to the handle.  Then use SuspendThread to pause the thread and ResumeThread to reactivate it.  You will need some way to find the thread IDs, since they will usually change between runs.
Title: Re: ReadProcessMemory & Sentkey
Post by: LukeJrs on July 31, 2006, 02:58 AM
i'm still new to this any kind of code example? i dont understand it sorry need tutorial with ReadProcessMemory if match value byte or lower go to presshotkey