 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
selina88 How do I cheat?
Reputation: 0
Joined: 21 Jun 2025 Posts: 3
|
Posted: Sat Jun 21, 2025 3:48 pm Post subject: Get Coords from another Script |
|
|
Hello,
i'm struggeling a bit right now. I'm still learning, don't judge
I wanna take my coordinates from another script (activated) to a new script.
I want that enemies teleport infront of my location but i really don't know
how to do it right
This works fine!
Code: |
newmem:
mov [rdi+14],(float)200 //x
mov [rdi+1C],(float)120 //y
mov [rdi+10],(float)12 //z
jmp return
|
But this not works (can't work, I know):
Code: |
newmem:
mov [rdi+14],[GetPlayerCoords+4] //x
mov [rdi+1C],[GetPlayerCoords+0] //y
mov [rdi+10],[GetPlayerCoords+8] //z
jmp return
|
I tried this one:
Code: |
newmem:
push eax
mov eax,[GetPlayerCoords+4]
mov [rdi+14],eax //x
mov eax,[GetPlayerCoords+0]
mov [rdi+1C],eax //y
mov eax,[GetPlayerCoords+8]
mov [rdi+10],eax //z
pop eax
jmp return
|
But does not work too..
Reading from the script with [GetPlayerCoords] is no problem.
The Pointers shows my x, y, z coordinates.
Any idea?
Never did that before..
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25762 Location: The netherlands
|
Posted: Sat Jun 21, 2025 4:33 pm Post subject: |
|
|
use another register
Code: |
newmem:
push rax
mov eax,[GetPlayerCoords+4]
mov [rdi+14],eax //x
mov eax,[GetPlayerCoords+0]
mov [rdi+1C],eax //y
mov eax,[GetPlayerCoords+8]
mov [rdi+10],eax //z
pop rax
jmp return
|
using eax instead of rax as it's 4 byte data
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
selina88 How do I cheat?
Reputation: 0
Joined: 21 Jun 2025 Posts: 3
|
Posted: Sat Jun 21, 2025 4:53 pm Post subject: |
|
|
I tried but does not work.
[GetPlayerCoords] are float Values. I hoped that works but I failed
Is there another way?
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4690
|
Posted: Sat Jun 21, 2025 4:54 pm Post subject: |
|
|
Also, the code in the other script that writes to GetPlayerCoords must be executed by the game before any code that reads the same data. If that injection is run every frame, then it's probably not an issue; otherwise, you might want to make another variable that indicates whether or not the coordinates have been initialized with a valid value.
You can always set a breakpoint and check the values of registers or memory addresses at any point.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
selina88 How do I cheat?
Reputation: 0
Joined: 21 Jun 2025 Posts: 3
|
Posted: Sun Jun 22, 2025 5:46 am Post subject: |
|
|
Okay now it works but.. strange problem now...
Why the hell the Mobs just teleport to my location if i DEACTIVATE the script.. ?
Activate set them to my location but the mobs are on another position it looks like, but they are exactly at the position they should, not visible. If i deactivate, they are visible on the location they should.
If i give them just coordinates like yesterday, they do the same. I just restarted the pc nothung more, never changed the simple script with the direkt locations i set into the script directly.
EDIT: I'm stupid... forgot that the game needs to read the new location.... Sorry
|
|
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
|
|