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 


freezing a array of byte

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
zakusa
Cheater
Reputation: 0

Joined: 09 Sep 2015
Posts: 48

PostPosted: Wed Sep 09, 2015 8:35 pm    Post subject: freezing a array of byte Reply with quote

hi i need help i have a array of byte (AE BA EA 2A 57 8C 93 9A 4C A6 1C 59) and i want it to freeze like make it active

this is the memory scan option i want in the script
Start: 17000000
Stop: 1F000000

im trying to learn ce lua but i dont see many tutorials on google
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Sep 09, 2015 9:18 pm    Post subject: Reply with quote

This is not exactly something you would use Lua to accomplish.
I suppose you could setup a timer to keep writing a value to the address to mimic the "freeze".

But I would just use straight AA:
Code:
[ENABLE]
aobscan(myvar,AE BA EA 2A 57 8C 93 9A 4C A6 1C 59)
registersymbol(myvar)
[DISABLE]
unregistersymbol(myvar)

You can now add an entry to your table with the address defined as "myvar".
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Wed Sep 09, 2015 9:42 pm    Post subject: Reply with quote

But do note that CE's "freeze" doesn't actually freeze the address, it just keeps writing the same thing to it over and over, but it's not perfect. If you want the address to not ever truly change, you need to find what writes to it and change that.

(Though for many cases a freeze is fine, the fact that this is an AOB makes me wonder.)

_________________
Back to top
View user's profile Send private message
zakusa
Cheater
Reputation: 0

Joined: 09 Sep 2015
Posts: 48

PostPosted: Thu Sep 10, 2015 2:45 pm    Post subject: ok Reply with quote

ya but i have this script below it changes the array of byte but instead i want to make it active i tried adding replace.active to the script and many different things with this but it wont work i tried and i dont know if its possible to add memory scan option can someone edit it



local scan = '40 02 04 04';
local replace = '05 02 03 05';
local replace_table = {};
for byte in string.gfind(replace, "[^%s]+") do
table.insert(replace_table, tonumber('0x'..byte));
end
local data = AOBScan(scan);
if (data) then
local count = data.getCount();
for i=0, count-1 do
local address = data.getString(i);
writeBytes(address, replace_table);
end
end
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 Lua Scripting 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