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 


AOBScan 2 results, more to come, all needed saved

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
AzKat
Newbie cheater
Reputation: 0

Joined: 06 Nov 2012
Posts: 14
Location: Romania

PostPosted: Wed Jul 24, 2019 3:32 am    Post subject: AOBScan 2 results, more to come, all needed saved Reply with quote

First off I have to mention that:
- I'm not at all familiar with programming or assembly or lua editing.


Now, for my question:
I have a game which I've managed to find an opcode which does something to all the values in the game, the 2 (will be more in future) values that I want also being accessed by that opcode.

I am using that opcode to find the values that I want, I browse the region do a few aobscans, redo them after closing / starting game a few times and I got it to correctly point at the values.

Now, I want to create an assembly / lua script which can automatically add the value of those AOB scans to the cheat engine table, and after a bit of googling I've found a basic way to do so:

Code:

[ENABLE]
// scan should take ~1 min
aobscan(hull, ?? ?? ?? ?? ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? 00 00 00 00 ?? ?? ?? 00 00 00 00 00 ?? 00 00 00 ?? ?? 00 00 ?? ?? ?? ?? ?? ?? ?? 40 ?? ?? ?? ?? ?? ?? ?? ?? 01 ?? ?? ?? ?? ?? ?? 00 C5 9D 1C 81 00 00 00 00 01 00 00 00 ?? ?? 00 00 D8 B0 ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 00 00 00 00 ?? 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 07 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 F0 BF 00 00 00 00 ?? ?? 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 01 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 F0 BF 00 00 80 3F ?? ?? 00 00 ?? ?? ?? ??)

label(player_hull)
registersymbol(player_hull)

// use player_hull to call the value in the table
hull:
player_hull:

[DISABLE]

unregistersymbol(player_hull)


The "problem" I have with above code is that if I search manually, it shows up as 2 results, both being valid, but the script only brings back the "first" result when I add the "player_hull" address to the cheat table.


Now, for a TL;DR:
- is it possible to save the aobscan into a symbol (or anything else), for ex player_hull1, do another scan and save the value from that, for ex player_hull2 and then call them both in the cheat table? Also in the future I will also need player_hull3 and most likely player_hull4.

Is what I want even possible or should I look into different ways of doing this?
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Wed Jul 24, 2019 8:12 am    Post subject: Reply with quote

While you could use multiple AA scripts, I'd look into using lua eg
Code:
{$lua}
[ENABLE]
-- returns a stringlist of the addresses
-- must be global not local so that it can be used in the disable section
-- names must therefore be unique for every script
global_found_results = AOBScan('?? ?? ?? ?? ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? 00 00 00 00 ?? ?? ?? 00 00 00 00 00 ?? 00 00 00 ?? ?? 00 00 ?? ?? ?? ?? ?? ?? ?? 40 ?? ?? ?? ?? ?? ?? ?? ?? 01 ?? ?? ?? ?? ?? ?? 00 C5 9D 1C 81 00 00 00 00 01 00 00 00 ?? ?? 00 00 D8 B0 ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 00 00 00 00 ?? 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 07 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 F0 BF 00 00 00 00 ?? ?? 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 01 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 F0 BF 00 00 80 3F ?? ?? 00 00 ?? ?? ?? ??')
if not global_found_results then error("Failed to find aob, preventing script from activating") end

for i=0, global_found_results.Count-1 do
  registerSymbol('player_hull' .. i, global_found_results[i], true --[[ do not save symbol in table]] )
end

[DISABLE]
for i=0, global_found_results.Count-1 do
  unregisterSymbol('player_hull' .. i)
end
global_found_results.destroy() -- let CE free the memory used to store the addresses

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
AzKat
Newbie cheater
Reputation: 0

Joined: 06 Nov 2012
Posts: 14
Location: Romania

PostPosted: Wed Jul 24, 2019 2:28 pm    Post subject: Reply with quote

FreeER wrote:
While you could use multiple AA scripts, I'd look into using lua eg
Code:
{$lua}
[ENABLE]
-- returns a stringlist of the addresses
-- must be global not local so that it can be used in the disable section
-- names must therefore be unique for every script
global_found_results = AOBScan('?? ?? ?? ?? ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? 00 00 00 00 ?? ?? ?? 00 00 00 00 00 ?? 00 00 00 ?? ?? 00 00 ?? ?? ?? ?? ?? ?? ?? 40 ?? ?? ?? ?? ?? ?? ?? ?? 01 ?? ?? ?? ?? ?? ?? 00 C5 9D 1C 81 00 00 00 00 01 00 00 00 ?? ?? 00 00 D8 B0 ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 00 00 00 00 ?? 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 07 00 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 00 00 ?? ?? ?? ?? ?? 7F 00 00 ?? ?? ?? ?? ?? ?? 00 00 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? 00 ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 F0 BF 00 00 00 00 ?? ?? 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? 7F 00 00 01 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 F0 BF 00 00 80 3F ?? ?? 00 00 ?? ?? ?? ??')
if not global_found_results then error("Failed to find aob, preventing script from activating") end

for i=0, global_found_results.Count-1 do
  registerSymbol('player_hull' .. i, global_found_results[i], true --[[ do not save symbol in table]] )
end

[DISABLE]
for i=0, global_found_results.Count-1 do
  unregisterSymbol('player_hull' .. i)
end
global_found_results.destroy() -- let CE free the memory used to store the addresses


Thanks a bunch, that's exactly what I was looking for Very Happy
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 Gamehacking 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