|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Goat Engine Cheater Reputation: 0
Joined: 13 Aug 2018 Posts: 44
|
Posted: Thu Apr 21, 2022 2:16 pm Post subject: Mov value of label in addresslist into address w/AA? |
|
|
How can I get the value of [hp] which is a label I can edit in my addresslist, into an address or var I created in AA? Tried a few methods of both. 1st was making a var to put the value into, and 2nd and 3rd examples were just trying to put the value straight into addresses.
"HP" exists in my addresslist as a label that gets turned on when I activate my script, but here's where I am running into the problems...
Code: | addy1:
dd "WWE2K19_x64.exe"+25C1210
addy2:
dd "WWE2K19_x64.exe"+1E95670
mov [addy1],[hp]
mov [addy2],[hp] |
Code: | mov "WWE2K19_x64.exe"+25C1210,[hp]
mov "WWE2K19_x64.exe"+1E95670,[hp] |
Code: | mov ["WWE2K19_x64.exe"+25C1210],[hp]
mov ["WWE2K19_x64.exe"+1E95670],[hp] |
The first example here doesn't work, and the second two aren't accepted by AA when trying to assign to the table. How do I write the code to just take whatever the current value of "HP" is and mov it into an address to make it that address' new value? Sorry if my wording is poor.
I keep the hp in brackets because I am trying to get the value of its temporarily assigned address in the addresslist when I activate the script, not take its temporarily assigned address into the new target.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4299
|
Posted: Thu Apr 21, 2022 2:32 pm Post subject: |
|
|
In general, you can't do memory-to-memory moves. You have to do it through a register.
Code: | push rax
mov eax,[hp]
mov ["WWE2K19_x64.exe"+25C1210],eax
mov ["WWE2K19_x64.exe"+1E95670],eax
pop rax |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Goat Engine Cheater Reputation: 0
Joined: 13 Aug 2018 Posts: 44
|
Posted: Thu Apr 21, 2022 3:00 pm Post subject: |
|
|
ParkourPenguin wrote: | In general, you can't do memory-to-memory moves. You have to do it through a register.
Code: | push rax
mov eax,[hp]
mov ["WWE2K19_x64.exe"+25C1210],eax
mov ["WWE2K19_x64.exe"+1E95670],eax
pop rax |
|
Thanks! I got it working but had to use rdx instead of rax. It was ignoring the value or it wasn't being passed through. Any idea why? Do you think it's ok to leave it using rdx or could that interfere with something somewhere?
Here's what I currently have it looking like: Code: |
push rdx
mov edx,[hp]
mov ["WWE2K19_x64.exe"+25C1210],edx
mov ["WWE2K19_x64.exe"+1E95670],edx
pop rdx |
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4299
|
Posted: Thu Apr 21, 2022 3:19 pm Post subject: |
|
|
There's a different opcode the "mov" mnemonic could use particular to eax (0xA3), but that shouldn't make any difference. I'd guess something else was going on. Maybe another script was interfering or something.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
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
|
|