View previous topic :: View next topic |
Author |
Message |
craka How do I cheat?
Reputation: 0
Joined: 03 Jun 2009 Posts: 3
|
Posted: Sat Sep 05, 2009 11:28 am Post subject: How Does Scan Work |
|
|
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 |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Sat Sep 05, 2009 12:04 pm Post subject: |
|
|
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 |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Sep 05, 2009 4:45 pm Post subject: |
|
|
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 |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Sat Sep 05, 2009 5:28 pm Post subject: |
|
|
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 |
|
 |
craka How do I cheat?
Reputation: 0
Joined: 03 Jun 2009 Posts: 3
|
Posted: Tue Sep 08, 2009 1:55 pm Post subject: |
|
|
Ok thx dark byte ill try it
|
|
Back to top |
|
 |
|