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 


[Help]Multiple AOB scans in script.

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

Joined: 24 Feb 2013
Posts: 41

PostPosted: Sun Oct 02, 2016 7:26 am    Post subject: [Help]Multiple AOB scans in script. Reply with quote

So I have multiple AOBs i want to scan for, about 20 or so.

I want all of these to be changed to the same thing.

Is there a simple way to write my script so that all it will change the bytes at each address instead of one at a time?

Secondly, if i wanted to offset that AOB could i do that as well?

For example:

Let's say this is my AOB.
Code:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8B 68 01 00 00 00 00 00 00


It starts at this address: 0056760D

The address is found from the AOB scan.

The section i need to edit starts at: 0055931D (8B 68 01)

Is there a way to use the address from the aobscan and offset it by 10?


If you can help with this I would really appreciate it, thank you.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4299

PostPosted: Sun Oct 02, 2016 8:40 am    Post subject: Reply with quote

Code:
-- can include protection flags and alignment requirements to improve scan speed
local res = assert(AOBScan("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8B 68 01 00 00 00 00 00 00"), "Could not find AoB signature")

for i=0, res.Count-1 do
  writeBytes(tonumber(res[i],16)+0x10, 0x8C, 0x69, 0x02)
end

res.destroy()

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Oct 02, 2016 3:08 pm    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=5620925
Back to top
View user's profile Send private message
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Mon Oct 03, 2016 3:25 am    Post subject: Reply with quote

Zanzer wrote:
http://forum.cheatengine.org/viewtopic.php?p=5620925


Thanks, this is great. Is it possible to scan multiple different AOB and change them all to the same aob with just one replace, or would i have to do a scan and replace for each aob i want to change?

Lets say I had 5+ more aobs i needed to scan, but all 5 would be changed to the same aob.
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 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