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 


Quick help with understanding how a script works

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

Joined: 21 Feb 2014
Posts: 3

PostPosted: Fri Feb 21, 2014 6:57 pm    Post subject: Quick help with understanding how a script works Reply with quote

I've recently started to get interested in wirting cheat engine scripts, and going through more videos and tutorials than i care to count, i cant figure out how whoever wrote this script made it work

Code:
[ENABLE]
label(damage)
registersymbol(damage)
aobscan(damage_address,96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02)

damage_address:
damage:
db 96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02

[DISABLE]
damage:
db 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02

unregistersymbol(damage)


This is a script for the binding of issac that changes your max damage to 10. i understand what each line does, but my problem is how the writer of this script changed the original aobscan into "db 96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02" line

Can someone explain what he did? becuase right now im going under the assumption he just randomly spouted numbers and somehow it worked
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Feb 21, 2014 7:34 pm    Post subject: Reply with quote

It's all hex. He searched for these bytes:

96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02

and then just changed them:

96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02
Back to top
View user's profile Send private message
finalsin
How do I cheat?
Reputation: 0

Joined: 21 Feb 2014
Posts: 3

PostPosted: Fri Feb 21, 2014 7:43 pm    Post subject: Reply with quote

Yes, but how did he know to change those 2 bytes and not any of the other ones?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Feb 21, 2014 7:49 pm    Post subject: Reply with quote

It's probably a value for something. He found the address that holds that value, first, by searching for the value. When he found the address, he browsed the hex viewer and determined that the surrounding values were static and could be used for his aobscan. Knowing which values to change at that point is easy.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 42

Joined: 09 Nov 2005
Posts: 2672

PostPosted: Fri Feb 21, 2014 10:15 pm    Post subject: Reply with quote

finalsin wrote:
Yes, but how did he know to change those 2 bytes and not any of the other ones?


This is not a good script by the way, the chance of that many values to be static across many computers is pretty nil considering it is DMA unless the address itself was static to begin with also if max damage was ever to change (upgrades etc.) the aob would not work.

But anyway, its like ++METHOS said. Let me explain it to you easy, go ahead load up your favorite game search ammo or whatever easy value you can find then copy the address. Go to memory viewer, in the hex viewer just copy a bunch of bytes starting from your ammo address, that is your aob.

Change your ammo and notice the hex next to your ammo address turn red and then change, if you notice the hex in memory viewer corresponds to the amount of ammo you change. So just note the hex and that is what your enable and disable script is. It is basically the hex value of your desired ammo value in decimal.

This is what he did, however what he saw could be completely different than what we can assume (without the game to play with), 24 40 (4024 due to little endian) doesn't equal 10 unless 4024h is 10 max damage in game.

By the way, to understand aob better and how instruction and its bytes work, read this tutorial i wrote few years back
http://deviatedhacking.com/index.php/topic/197-how-to-update-your-trainers-real-quick-and-easy/

Its about updating trainers but the same concept applies as aob(instruction bytes) are used and i made it pretty easy to understand. You will actually understand what aob is (the actual term for this is signature/bytes scanning)

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
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