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 


Reading gold amount in an online game from memory

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

Joined: 27 Nov 2011
Posts: 2

PostPosted: Sun Nov 27, 2011 8:45 am    Post subject: Reading gold amount in an online game from memory Reply with quote

Hi,

I'm trying to write a small program that purchases items for you automatically, and I can't get through the issue of reading gold value from memory.

I located the memory address using Cheat Engine and then tried to follow pointers to find a base pointer. But after 4 pointer I end up getting the address value from the first one and can't find any way around this.

I looked for Cheat Engine tables for that online game, but the latest version I found was incompatible and it seems it is possible to locate gold value, yet it requires 3 pointers starting from a specific address and some offsets

Unfortunately it doesn't work for my version, only the last offset is the same.

Could anyone help me with that?
Back to top
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Sun Nov 27, 2011 1:15 pm    Post subject: Reply with quote

Hey,
try to use the built in pointer scan function from CE itself (rightlick on address-->pointer scan for this address).
Back to top
View user's profile Send private message
skrzydlic
How do I cheat?
Reputation: 0

Joined: 27 Nov 2011
Posts: 2

PostPosted: Mon Nov 28, 2011 10:03 am    Post subject: [Solved] Reply with quote

Thanks for the tip Acubra. I took me some time to figure out how it works, but the "Pointer Scan" is actually quite useful. I set it to max of 3 pointers, as this was the number of pointers from previous version of the game then reset the game couple of times and kept scanning.

I ended up with 64 pointers that didn't change, so I could have used any of them, but only 2 of them had the last offset 78, which was the offset I got by checking "find out what writes..." on the initial address with gold amount. I added those 2 pointers to CE and so far they work at all times.

BUT there are some maps where pointers fail to read anything (which is not a big problem as I write my program specifically for one map), yet there are CE tables for all maps for previous versions so it should be possible to get DEFINITE pointers.

So I guess I can say its SOLVED.

Now a new porblem Smile

When I try to access memory by my program:

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
WndHandle, Pid, Pidhandle, Address, v : integer;
size, car : cardinal;

begin
  v := 0;
  Address := $0BC61410;
  size := 4;
  car := 0;
  WndHandle := FindWindow(nil,'Warcraft III');
  if WndHandle <> 0   then
  begin
    GetWindowThreadProcessId(WndHandle,@Pid);
    Memo1.Lines.Add(IntToStr(GetLastError()));

    Pidhandle := OpenProcess(PROCESS_VM_READ,False,Pid);
    Memo1.Lines.Add(IntToStr(GetLastError()));

    ReadProcessMemory(Pidhandle, @Address, @v, size, car);
    Memo1.Lines.Add(IntToStr(GetLastError()));

    closehandle(Pidhandle);
    Memo1.Lines.Add(IntToStr(GetLastError()));
  end;


I get Access denied error :<. I read something about granting debug privileges to the application which has to be done for WC3, but only found one program in C++, not that good in it.
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