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 


How I modify bytes with script if has 2 bytes equal?

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

Joined: 12 Sep 2011
Posts: 10

PostPosted: Fri Aug 03, 2012 6:17 am    Post subject: How I modify bytes with script if has 2 bytes equal? Reply with quote

I can modify bytes with script for a other game, I want test in other game now, but this game has 2 bytes equals forever...I can just modify the first excerpt, but I need modify second execerpt

My code is this...

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
aobscan(aobcode, 89 4A 18 8B 4D F0)

aobcode:
db 89 4A 18 8B 4D F0

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
aobscan(aobcode, E9 41 A1 EE FB 90)

aobcode:
db 89 4A 18 8B 4D F0


How I can access the second excerpt?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25832
Location: The netherlands

PostPosted: Fri Aug 03, 2012 7:07 am    Post subject: Reply with quote

Easiest method: Just execute your script twice. (copy/paste)

The other method is to use a lua script and the AOBScan() command in there.
It returns a stringlist object that contains all the results it found

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
lai32290
Newbie cheater
Reputation: 0

Joined: 12 Sep 2011
Posts: 10

PostPosted: Fri Aug 03, 2012 7:18 am    Post subject: Reply with quote

Great!!! I know what I can do now!! Thanks!
Back to top
View user's profile Send private message
lai32290
Newbie cheater
Reputation: 0

Joined: 12 Sep 2011
Posts: 10

PostPosted: Mon Aug 20, 2012 10:16 pm    Post subject: Reply with quote

well....I think I know what I can do.... but... I can't....
execute script twice... is this?

Code:

//Always win a card when spinning
[ENABLE]
aobscan(aobplace, 00 40 65 40)
aobplace:
db 00 00 78 40

aobscan(aobplace, 00 40 65 40)
aobplace:
db 00 00 78 40

[DISABLE]
aobscan(aobplace, 00 00 78 40)
aobplace:
db 00 40 65 40

aobscan(aobplace, 00 00 78 40)
aobplace:
db 00 40 65 40


because I can't get my object with this code
Back to top
View user's profile Send private message
Nvr22
Newbie cheater
Reputation: 0

Joined: 02 May 2012
Posts: 14

PostPosted: Tue Aug 21, 2012 12:33 am    Post subject: Reply with quote

Change the second aobscan(aobplace to aobscan(aobplace2.

If that doesn't work separate them into 2 different scripts.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25832
Location: The netherlands

PostPosted: Tue Aug 21, 2012 3:01 am    Post subject: Reply with quote

yes, you will need two separate scripts
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
lai32290
Newbie cheater
Reputation: 0

Joined: 12 Sep 2011
Posts: 10

PostPosted: Tue Aug 21, 2012 9:25 am    Post subject: Reply with quote

so... I perceive....has not just 2 bytes equals... has more and more...
but if I can set address limited and use aobscan, I think I can do my objective

But...has any means for limit address?
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3337

PostPosted: Tue Aug 21, 2012 8:46 pm    Post subject: Reply with quote

I've been meaning to ask these (as feature requests):
- start aobscan at a specific module (and offset). i.e. aobscan(a,8F,kernel32.dll+23000)
- tell an aobscan to use the Nth occurrence. i.e. aobscan(a,8F,#2)
Makes sense?
Any chance?
Back to top
View user's profile Send private message
lai32290
Newbie cheater
Reputation: 0

Joined: 12 Sep 2011
Posts: 10

PostPosted: Wed Aug 22, 2012 6:13 pm    Post subject: Reply with quote

How I can modify bytes with memory address??
I need modify modify this 00 40 65 40 to 00 00 78 40
And address of 00 40 65 40 is ecx+C8
so... I need modify bytes of ecx+C8 to 00 00 78 40



1.jpg
 Description:
Image
 Filesize:  221.95 KB
 Viewed:  6958 Time(s)

1.jpg


Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3337

PostPosted: Wed Aug 22, 2012 6:42 pm    Post subject: Reply with quote

I might be missing something, but why not create a code cave that does just that?
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Wed Aug 22, 2012 10:53 pm    Post subject: Reply with quote

I had one lol of a time trying to find a way to pack a "mov qword [ecx+0c8],4078000000000000" over 13 bytes and given the code on your screenshot, ended up with the following solution:
Code:
117b276e:
lea esp, [ecx+0D0]
push 40780000
push 0


@Csimbi: When you can avoid an allocation AND learned with tools that couldn't allocate memory into their target...Or just for aesthetics!
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3337

PostPosted: Thu Aug 23, 2012 4:39 pm    Post subject: Reply with quote

That's a good reason, but not always doable.
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