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 


AOB multiple results

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

Joined: 21 Dec 2014
Posts: 7

PostPosted: Wed Apr 08, 2015 3:52 pm    Post subject: AOB multiple results Reply with quote

Hey guys,

I'm having some trouble making my trainer. I'm quite unexperienced with Lua.

I have an AOB. It gives me two base-adresses as result. I need both adresses! So no autoassembler possible Sad.

From those adresses I add the offset 340 (to both) in order to get to the adresses I want to edit. From their on it is rather easy. On Keypress1 change both adresses to a given value, on Keypress2 to another value.

Maybe someone could give me some advices. Sorry for the bad English Wink.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Wed Apr 08, 2015 5:40 pm    Post subject: Re: AOB multiple results Reply with quote

masterjango wrote:
Hey guys,

I'm having some trouble making my trainer. I'm quite unexperienced with Lua.

I have an AOB. It gives me two base-adresses as result. I need both adresses! So no autoassembler possible Sad.
...


It is possible.
http://forum.cheatengine.org/viewtopic.php?p=5567760&highlight=#5567760
the scanning is not as efficient as lua tho.

But using lua inside AA script is a possible solution.
Check http://forum.cheatengine.org/viewtopic.php?p=5578680&highlight=#5578680
Others suggestion may be easier to follow.

For the second part, suppose the found symbol from above scanning are aob1,aob2 and they are registered. Then make a script like:

Code:

[ENABLE]
_aob1+340:
dd value_1_on  // your appropriate value and type
_aob2+340:
dd value_2_on
[DISABLE]
_aob1+340:
dd value_1_off
_aob2+340:
dd value_2_off

finally, set the [ENABLE]/[DISABLE] to a hotkey definition by right-click the script's memory record, click 'set/change hotkey'. Assign 2 hotkey to 'enable script' 'disable script' respectively instead of 'toggle script'.
Back to top
View user's profile Send private message
masterjango
How do I cheat?
Reputation: 0

Joined: 21 Dec 2014
Posts: 7

PostPosted: Wed Apr 08, 2015 5:59 pm    Post subject: Reply with quote

Thanks for the answer but to be honest I don't understand quite a lot.

My AOB is 96 06 8B 7C E7 8A C8 3F 00 ?0 0? 00
offset is +340.

I can't simply use more Bytes as the second adress is a copy of the first. Basically it's a racing game and I want to change the grip on the tires. First value for the left side, second for the right side. They are identical in differen memory areas :/.

Lua scripting is new for me. Before I used pointers but this doesn't help in this example...Sad

So maybe you can help me even a tiny bit more? :p
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Wed Apr 08, 2015 8:54 pm    Post subject: Reply with quote

I make a test script, please copy and paste as file for your own script, and change the appropriate offset value and modify value, and key assign to see if it work.

To test:
1) attach a process
2) click '*scan'
3) It should cross the 3 entries under the '*scan'
4) open memory view and input address as 'GRIP'. There are 2 instance of your aob for testing purpose.
5) press '1' '2' (not numpad) to see if the values change

For your actual script,
1) remove/comment the 2 AOB inside '*scan'
2) input appropriate offset and values in the hotkey script.
3) right-click hotkey script, click 'set/change hotkey' to fit your need.
4) attach to your game process, '*scan' and test if actual work.

btw, ... 3f 00 ?0 0? 00 will be interpreted as ... 3f 00 ?? ?? 00, where ?? means wildcard, which match any byte value. plz check if there is typo



testGrip.CT
 Description:
test grip, for test, must change to appropriate values.

Download
 Filename:  testGrip.CT
 Filesize:  4.18 KB
 Downloaded:  624 Time(s)

Back to top
View user's profile Send private message
masterjango
How do I cheat?
Reputation: 0

Joined: 21 Dec 2014
Posts: 7

PostPosted: Thu Apr 09, 2015 8:09 pm    Post subject: Reply with quote

thanks a lot, this worked for me Smile


However I have another problem. I just found out that the game isn't only seperating left / right but also front / rear, so four adresses ;(.

New AOB (in order to find the 4 Adresses) would be:
?? ?? ?? ?? ?? ?? ?? 3F 00 ?0 0? 00 ?? ?? ?? ?? 00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 09 00

Is the same method also possible with four results?
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