 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
embas10 How do I cheat?
Reputation: 0
Joined: 26 Nov 2024 Posts: 5
|
Posted: Tue Nov 26, 2024 10:00 pm Post subject: Set and place byte as registered memory in ASM |
|
|
Hello everyone, i'm a bit new to tweaking cheat engine especially scripting.
Ok, my aim is to set a few byte as registered memory so i can change the value easily from cheat table, im using byte because im using 2 different command (add & sub). But the problem is i'm not certain how to put it as the address that we registered.
Code: |
[ENABLE]
aobScanRegion(Durability,7FF000000000,7FFFFFFFFFFFFFFF,0F 88 05 00 00 00 E9 xx xx xx FF 8B 0D xx xx xx xx 81 C1 38 91 FF FF F3 0F 10 44 0D 00 F3 0F 10 0D xx xx xx xx 66 0F 7E C9 66 0F 7E C0 C1 E9 17 C1 E8 17 81 E1 FF 00 00 00 25 FF 00 00 00 29 C1 83 F9 19 7D 24 83 F9 00 7F 2F 74 50 83 F9) // should be unique
alloc(newmem,$1000,Durability)
label(code)
label(return)
alloc(DbMultiplier,10,Durability)
registersymbol(DbMultiplier)
DbMultiplier:
db 83 C0 00 //(add eax,0)
newmem:
[DbMultiplier] //Error Here
code:
sub ecx,eax
cmp ecx,19
jmp return
Durability+3E:
jmp newmem
return:
registersymbol(Durability)
[DISABLE]
Durability+3E:
db 29 C1 83 F9 19
unregistersymbol(*)
dealloc(*)
|
And here my dropdown list that i want to set for "Durability"
83 E8 0E:Infnity
83 E8 0D:1.5x
83 E8 0C:1.25x
83 C0 00:1x (Normal)
83 C0 1A:0.5x
83 C0 1B:0.25x
83 C0 1C:0.125x
83 C0 1D:0.062x
83 C0 32:OFF
At least this is what come to my mind, if anyone had any better solution i'm greatly appreciate. thanks
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 150
Joined: 06 Jul 2014 Posts: 4641
|
Posted: Wed Nov 27, 2024 1:35 am Post subject: |
|
|
IMO what you're doing is unnecessarily convoluted. If you really insist on doing that, `DbMultiplier` should be a label placed immediately after `newmem:`
Example of a typical multiplier script for some change in an integer value:
Code: | aobscan(inject,xx xx xx)
alloc(newmem,2048,inject)
alloc(multiplier,8,inject)
multiplier:
dq (double)1
newmem:
cvtsi2sd xmm0,eax
mulsd xmm0,[multiplier]
cvttsd2si eax,xmm0
// original code:
add [esi+4C],eax
jmp return
inject:
jmp newmem
return:
registersymbol(inject)
registersymbol(multiplier) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
embas10 How do I cheat?
Reputation: 0
Joined: 26 Nov 2024 Posts: 5
|
Posted: Thu Nov 28, 2024 11:46 am Post subject: |
|
|
ParkourPenguin wrote: | IMO what you're doing is unnecessarily convoluted. If you really insist on doing that, `DbMultiplier` should be a label placed immediately after `newmem:`
Example of a typical multiplier script for some change in an integer value:
Code: | aobscan(inject,xx xx xx)
alloc(newmem,2048,inject)
alloc(multiplier,8,inject)
multiplier:
dq (double)1
newmem:
cvtsi2sd xmm0,eax
mulsd xmm0,[multiplier]
cvttsd2si eax,xmm0
// original code:
add [esi+4C],eax
jmp return
inject:
jmp newmem
return:
registersymbol(inject)
registersymbol(multiplier) |
|
Somehow the address that i got to instruct the multiplier kinda odd, that's why im using add & sub. In the end i solve it with mov command before.
But the second method you suggest is something new to me, i didn't know that we can covert value types and make a better calculation intead using integer. So i end up using it but into float type, It's really usefull and extending the multiplier command that im using above, thanks.
|
|
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
|
|