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 


How Does Scan Work

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

Joined: 03 Jun 2009
Posts: 3

PostPosted: Sat Sep 05, 2009 11:28 am    Post subject: How Does Scan Work Reply with quote

Hey guys im currently making a script for a game. Since I couldn't find a pointer that I needed I thought of making a script that will scan a range of addresses and save a few that have a needed value. Im using lua right now and my current code is working very slow. Here it is:

Code:
function search_address()
  local add = {};
  for k = 1, 6 do
    add[k] = 0;
  end
  for i = 150994944, 218103808 do
    check = memoryReadInt (proc, i);
    if (check == 17164) then
      for j = 1, 6 do
        if (add[j] == 0) then
          add[j] = i;
          break;
        end;
      end
    end;
  end
end


Im scanning a small amount of addresses but it still takes so long. Is there a way to make it as fast as the scan on cheat engine.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Sat Sep 05, 2009 12:04 pm    Post subject: Reply with quote

rewrite memoryReadInt so it doesn't have to call the windows api each time it's called

How ce does it:
It first makes a copy of the game's memory using as few api calls as possible (aided by virtualqueryex to find out the locations of memory)
then the compare routine check the search value against the memory in the buffer.

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Sep 05, 2009 4:45 pm    Post subject: Reply with quote

Dark Byte wrote:
rewrite memoryReadInt so it doesn't have to call the windows api each time it's called

How ce does it:
It first makes a copy of the game's memory using as few api calls as possible (aided by virtualqueryex to find out the locations of memory)
then the compare routine check the search value against the memory in the buffer.

does ce copy the memory to file or to the engine's memory ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Sat Sep 05, 2009 5:28 pm    Post subject: Reply with quote

engine's memory
Also, it doesn't always copy the whole memory. Usually only chunks of 2MB, unless unknown initial value is used

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
craka
How do I cheat?
Reputation: 0

Joined: 03 Jun 2009
Posts: 3

PostPosted: Tue Sep 08, 2009 1:55 pm    Post subject: Reply with quote

Ok thx dark byte ill try 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 -> Cheat Engine Source 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