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 


Changing value of something by using cheat table value

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

Joined: 07 Dec 2020
Posts: 2

PostPosted: Tue Dec 29, 2020 1:19 pm    Post subject: Changing value of something by using cheat table value Reply with quote

I'd like to make a script (with assembly) that could set a variable, in my case esi+64 to the value given in the cheat table, but I can't figure out how to do it.

If it needs me to use Lua I won't really care that much, I just need to figure out how to set it to the value given in the cheat table. I have already set up everything in the script, so I don't need help with making the rest of the script.

Yes, I know, I might be dumb for not knowing this, so you don't have to tell me.

_________________
okiay
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Tue Dec 29, 2020 3:04 pm    Post subject: Reply with quote

Code:
aobscan(INJECT,...)
alloc(newmem,2048)
alloc(val,4)
label(return)

registersymbol(INJECT)
registersymbol(val)

newmem:
  push rax
  mov eax,[val]
  mov [esi+64],eax
  pop rax
  // original code...
  jmp return

val:
  dd 0

INJECT:
  jmp newmem
  nop...
return:

Manually add the address "val" to the address list, click and drag it onto the script, right click the script, and click "hide children when deactivated".

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Lua Scripting 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