 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
rcxintorax How do I cheat?
Reputation: 0
Joined: 14 Jan 2025 Posts: 1
|
Posted: Tue Jan 14, 2025 3:05 pm Post subject: Set Value on Script Toggle |
|
|
Hello,
I have the following script which works great:
Code: |
[ENABLE]
alloc(newmem,2048,22B7C93594C)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov ecx,#39321
originalcode:
mov [rax],ecx
mov rcx,rbp
exit:
jmp returnhere
22B7C93594C:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
22B7C93594C:
db 89 08 48 8B CD
//mov [rax],ecx
//mov rcx,rbp
|
The script sets the value to 39321 when the specific event is triggered, but how do I set the value of the address "22A173349C8" to 39321 in the same script beforehand, just once on toggle, because it needs that value before the event? Thanks! |
|
Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3321
|
Posted: Tue Jan 14, 2025 3:14 pm Post subject: |
|
|
Believe me when I say, you don't want to use a fixed address. |
|
Back to top |
|
 |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Thu Jan 23, 2025 8:04 am Post subject: |
|
|
I'm not exactly sure what you want to do, and these addresses will change when you restart the game, but for the base question of "I want to set the value at address "22A173349C8" to the decimal 32-bit value "39321", the first lines here will do it. It sets the address of the assembler to that address and just writes that value as a 'dd' or doubleword 32 bit value.
Code: |
[ENABLE]
// set value directly when enabling
22A173349C8:
dd #39321
alloc(newmem,2048,22B7C93594C)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov ecx,#39321
originalcode:
mov [rax],ecx
mov rcx,rbp
exit:
jmp returnhere
22B7C93594C:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
22B7C93594C:
db 89 08 48 8B CD
//mov [rax],ecx
//mov rcx,rbp
|
|
|
Back to top |
|
 |
|
|
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
|
|