Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AHK pointers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Devlix
How do I cheat?
Reputation: 0

Joined: 23 Nov 2010
Posts: 2
Location: US

PostPosted: Tue Nov 23, 2010 12:06 pm    Post subject: AHK pointers Reply with quote

I do not really get how it works. I am just trying the read the value.

Code:
ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

return, result 
}

WinWait, Plants vs. Zombies

;V Works give value 50,000 but is not static address
value := ReadMemory(0x071B6BE8, "Plants vs. Zombies")
MsgBox Value is %value%

;V Does not work gives value 7209079
value := ReadMemory(0x0183A15C+0x230, "Plants vs. Zombies")
MsgBox Value is %value%



CE.png
 Description:
 Filesize:  28.27 KB
 Viewed:  8381 Time(s)

CE.png


Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Nov 23, 2010 12:35 pm    Post subject: Reply with quote

Get the value at 0x0183A15C, add 0x230 to it, then read that for what you want
Back to top
View user's profile Send private message
Devlix
How do I cheat?
Reputation: 0

Joined: 23 Nov 2010
Posts: 2
Location: US

PostPosted: Tue Nov 23, 2010 12:44 pm    Post subject: Reply with quote

Thanks it works now Smile

Code:
ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

return, result 
}

WinWait, Plants vs. Zombies

value := ReadMemory(0x071B6BE8, "Plants vs. Zombies")
MsgBox Value is %value%

value := ReadMemory(0x0183A15C, "Plants vs. Zombies")
value2 := value + 0x230
value3 := ReadMemory(value2, "Plants vs. Zombies")
MsgBox Value is %value3%
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites