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 


[Beginner] Step 9 - What's wrong in this code ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Stregum
Advanced Cheater
Reputation: 0

Joined: 17 Jun 2014
Posts: 56
Location: We make baguettes there !

PostPosted: Tue Jun 17, 2014 4:01 pm    Post subject: [Beginner] Step 9 - What's wrong in this code ? Reply with quote

Hello there, i'm a beginner (everyone started as a beginner right ? :p) and i'm kinda blocked on the step 9, here's my code:

Code:

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
cmp [ebx+10],1
je exit

originalcode:
mov [ebx+04],eax
fldz

exit:
jmp returnhere

"Tutorial-i386.exe"+27E76:
jmp newmem
returnhere:

[DISABLE]
dealloc(newmem)
"Tutorial-i386.exe"+27E76:
mov [ebx+04],eax
fldz


When i assign this code to the table and i check the box to execute it, i change the health of any player and the tutorial crashes.

Any help would be appreciated, this is my 2nd scripting attempt (the 1st was on assault cube, if you're a beginner and you're reading this, i recommend this game, easy to hack, it's freeware and even open source ! :p)
Thanks Smile

_________________
Rhaa Stregum Vitae Smile
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Tue Jun 17, 2014 5:25 pm    Post subject: Reply with quote

I think it's because you're skipping the fldz. My code looks something like this:

Code:

[ENABLE]
//step 9 = 31337157
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(skip_damage)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
cmp [ebx+10],1
je skip_damage
originalcode:
mov [ebx+04],eax
skip_damage:
fldz

exit:
jmp returnhere

"Tutorial-i386.exe"+27E76:
jmp newmem
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+27E76:
mov [ebx+04],eax
fldz
//Alt: db 89 43 04 D9 EE

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Stregum
Advanced Cheater
Reputation: 0

Joined: 17 Jun 2014
Posts: 56
Location: We make baguettes there !

PostPosted: Tue Jun 17, 2014 5:35 pm    Post subject: Reply with quote

Hey thanks for the tip, that was the problem, it works now, i'll pay more attention next time
_________________
Rhaa Stregum Vitae Smile
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