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 


Stuck on tutorial 9

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

Joined: 02 Jun 2020
Posts: 33

PostPosted: Wed Jun 24, 2020 4:52 pm    Post subject: Stuck on tutorial 9 Reply with quote

I've watched many tutorials on how to do this, but I still can't manage to get my script to work.

Code:
The script as follows:
label(code)
label(return)
label(compare)
label(player)

compare:
  cmp [ebx+0C],1   //1 is the value that differs from player and pc
  je player
  jmp code
player:
  sub [ebx+04],0
  jmp return
code:
  mov [ebx+04],eax
  fldz
  jmp return

INJECT:
  jmp newmem
return:
registersymbol(INJECT)


anything I'm doing wrong here?
Back to top
View user's profile Send private message
happyTugs
Cheater
Reputation: 0

Joined: 23 Apr 2020
Posts: 26

PostPosted: Wed Jun 24, 2020 9:11 pm    Post subject: Reply with quote

Are you sure you used the right compare? I think you forgot to de-reference each address before dissecting structs, hence you got offset C.

As such, I believe offset 10 is the correct choice for the compare.

Code:
...
  cmp [ebx+10],1   
  je player
  jmp code
...


Moroever, the below code will throw an exception since you forgot to add fldz.

Code:
...
player:
  sub [ebx+04],0
  jmp return
code:
...


A way to remedy that is through this.

Code:
...
player:
  fldz -- add this since it was part of the original code (it's also important in this context) 
  jmp return
code:
...

_________________
This is a block of text that can be added to posts you make. There is a 300 character limit
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