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 


Assert help

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

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Thu Dec 19, 2013 5:33 am    Post subject: Assert help Reply with quote

Does anyone know what's wrong with this code? I know that ASSERT is used to check if those bytes match, and if they do, it'll activate the code, if not, it won't be activated. So does anyone know what's wrong with this code?
Code:
define(game,"StateOfDecay.exe"+1112A0F)
define(bytes,CC 0F 11 80 AC 00 00 00)
define(newvalue,9999999999)
[ENABLE]
assert(game,bytes)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

push eax
mov eax,(float)newvalue
movd xmm0,eax
pop eax

originalcode:
//movss [eax+000000AC],xmm0

exit:
jmp returnhere

game:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
game:
movss [eax+000000AC],xmm0
//Alt: db CC 0F 11 80 AC 00 00 00

Cause it doesn't want to activate the cheat with that ASSERT. And I know I'm doing something wrong with the ASSERT, cause if I remove, the code works as it should.

_________________
Silence will fall when the question is asked...
Back to top
View user's profile Send private message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Thu Dec 19, 2013 6:03 am    Post subject: Reply with quote

Code:
define(game,"StateOfDecay.exe"+1112A0F)
define(bytes,CC 0F 11 80 AC 00 00 00)
//define(newvalue,(float)9999999999)
[ENABLE]
assert(game,bytes)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

alloc(newvalue,4)

newvalue:
dd (float)999999999

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

push eax
mov eax,[newvalue]
mov [eax+000000AC],eax
pop eax

originalcode:
//movss [eax+000000AC],xmm0

exit:
jmp returnhere

game:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
game:
movss [eax+000000AC],xmm0
//Alt: db CC 0F 11 80 AC 00 00 00
Back to top
View user's profile Send private message Send e-mail
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Thu Dec 19, 2013 1:32 pm    Post subject: Reply with quote

Still can't activate the code.
_________________
Silence will fall when the question is asked...
Back to top
View user's profile Send private message
Amami De Kaito
Expert Cheater
Reputation: 5

Joined: 06 Feb 2013
Posts: 110
Location: 3/44

PostPosted: Thu Dec 19, 2013 6:32 pm    Post subject: Reply with quote

This is code game " State of Decay ". I'm write script code example


StateOfDecay.CT
 Description:

Download
 Filename:  StateOfDecay.CT
 Filesize:  5.07 KB
 Downloaded:  670 Time(s)

Back to top
View user's profile Send private message Send e-mail
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Sat Dec 21, 2013 9:40 am    Post subject: Reply with quote

Sorry if this is a stupid question, but what are those other bytes separated with xxxxx? I see that the first one is the one in the disable section, but without spaces, but what are the other bytes?
EDIT: Actually, you can just ignore this topic, I just found out that if you're trying to make an AOB scan, you don't need assert. And I've been trying to do both, so I guess this is no longer required, cause aobscan is more important than assert.



AOBs.png
 Description:
 Filesize:  5.63 KB
 Viewed:  8270 Time(s)

AOBs.png



_________________
Silence will fall when the question is asked...
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