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 


Teleport to cursor
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
ParkourPenguin
I post too much
Reputation: 155

Joined: 06 Jul 2014
Posts: 4775

PostPosted: Thu Dec 01, 2016 6:52 pm    Post subject: Reply with quote

Code:
mov eax,[mCord+4]
cvtss2sd xmm1,[eax]

Again, mCord is not the address of your mouse's coordinates. It stores the address of your mouse's coordinates. Assuming the Y coordinate is stored just after the X coordinate, you should add 4 to the address of the X coordinate.
Code:
mov eax,[mCord]
cvtss2sd xmm1,[eax+4]


Also, your injection points are literally right next to each other. You should just combine them into one script; otherwise, the aobscan for the X coordinate's script will fail if the Y coordinate's script is already enabled.

_________________
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
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Thu Dec 01, 2016 6:57 pm    Post subject: Reply with quote

At this point I just need to beat it into myself that mCord contains what I want but is not what I want. How would I go about trying to combine them into one? Btw: I am working on getting you those mouse to player cords so you can make something to align them (and I can look at it to learn how to do it in the future).

Thank's again for being so patient, I am new to all of this.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 155

Joined: 06 Jul 2014
Posts: 4775

PostPosted: Thu Dec 01, 2016 7:13 pm    Post subject: Reply with quote

I forgot to mention this, but using the same symbol ("INJECT") in the call to registerSymbol for both scripts will eventually result in failure if both scripts are enabled at the same time. If they're both enabled, the symbol INJECT will refer to the same address for both scripts. The script that was last enabled is correct will disable just fine, but the other one will use the other script's injection point, thus indirectly causing the game to crash.

To combine the scripts, use the X coordinate's script as a framework and merge your code in the Y coordinate's script into that. I'd also remove a lot of the comments and unnecessary whitespace, but that's just me. Leave the information on the injection point in- when/if the game updates, that information could be useful for you (or someone else) to update the script.
Code:
[ENABLE]
aobscanmodule(PlayerCoordinateTP,npp.dll,F2 0F 11 41 E8 F2 0F 11 49 F0 EB)
alloc(newmem,1024)
label(return)
registersymbol(PlayerCoordinateTP)

newmem:
  push eax
  mov eax,[mCord]
  cvtss2sd xmm0,[eax]
  cvtss2sd xmm1,[eax+4]  // the only instruction that needed to be added
  pop eax
  movsd [ecx-18],xmm0
  jmp return

PlayerCoordinateTP:
  jmp newmem
return:

[DISABLE]
PlayerCoordinateTP:
  db F2 0F 11 41 E8

unregistersymbol(PlayerCoordinateTP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "npp.dll"+2F010C

"npp.dll"+2F00DE: F2 0F 11 09                    -  movsd [ecx],xmm1
"npp.dll"+2F00E2: F2 0F 10 41 30                 -  movsd xmm0,[ecx+30]
"npp.dll"+2F00E7: F2 0F 58 C1                    -  addsd xmm0,xmm1
"npp.dll"+2F00EB: F2 0F 11 01                    -  movsd [ecx],xmm0
"npp.dll"+2F00EF: F3 0F 6F 41 E8                 -  movdqu xmm0,[ecx-18]
"npp.dll"+2F00F4: F3 0F 7F 41 08                 -  movdqu [ecx+08],xmm0
"npp.dll"+2F00F9: F2 0F 10 09                    -  movsd xmm1,[ecx]
"npp.dll"+2F00FD: E9 FE FE ED 08                 -  jmp 0FF00000
"npp.dll"+2F0102: F2 0F 58 41 F8                 -  addsd xmm0,[ecx-08]
"npp.dll"+2F0107: F2 0F 58 49 F0                 -  addsd xmm1,[ecx-10]
// ---------- INJECTING HERE ----------
"npp.dll"+2F010C: F2 0F 11 41 E8                 -  movsd [ecx-18],xmm0
// ---------- DONE INJECTING  ----------
"npp.dll"+2F0111: F2 0F 11 49 F0                 -  movsd [ecx-10],xmm1
"npp.dll"+2F0116: EB 03                          -  jmp npp.dll+2F011B
"npp.dll"+2F0118: 8B 55 98                       -  mov edx,[ebp-68]
"npp.dll"+2F011B: 0F 57 C9                       -  xorps xmm1,xmm1
"npp.dll"+2F011E: 8B 81 98 00 00 00              -  mov eax,[ecx+00000098]
"npp.dll"+2F0124: 66 0F 14 C9                    -  unpcklpd xmm1,xmm1
"npp.dll"+2F0128: 83 F8 09                       -  cmp eax,09
"npp.dll"+2F012B: 74 47                          -  je npp.dll+2F0174
"npp.dll"+2F012D: 83 F8 06                       -  cmp eax,06
"npp.dll"+2F0130: 74 42                          -  je npp.dll+2F0174
}

_________________
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
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Thu Dec 01, 2016 7:18 pm    Post subject: Reply with quote

The game was still crashing before I merged the two together? Now it works like a charm. No idea what that is about, but yeah, working on the cords now. This has been an insanely helpful topic. Not sure if you would be able to answer this given what I have given you, but if I manually enter cords for my player I can teleport through walls, but doing this I am not able to do so.

EDIT:

Your cord pairs:

PlayerX:MouseX
498:514
536:516
492:476
538:518
485:470
484:469

PlayerY:MouseY
566:611
134:214
422:480
230:302
518:566
38:126
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 155

Joined: 06 Jul 2014
Posts: 4775

PostPosted: Thu Dec 01, 2016 9:42 pm    Post subject: Reply with quote

The first data point for the X coordinates seems to be an egregious outlier, so I'll exclude it from the rest.
Code:
alloc(xModifiers,16)
alloc(yModifiers,16)

...

newmem:
  push eax
  mov eax,[mCord]
  cvtss2sd xmm0,[eax]
  cvtss2sd xmm1,[eax+4]
  mulsd xmm0,[xModifiers]
  mulsd xmm1,[yModifiers]
  addsd xmm0,[xModifiers+8]
  addsd xmm1,[yModifiers+8]
  pop eax
  movsd [ecx-18],xmm0
  jmp return

// player position as a function of mouse position
// p(m) = A*m + B
xModifiers:
  dq (double)1.1034123678308  // A
  dq (double)-33.451377763537 // B
yModifiers:
  dq (double)1.0885637119926  // A
  dq (double)-99.101328978498 // B

Look up "linear regression" for information on how I came up with those numbers.

I'm not certain why you can't teleport past a wall with this. The obvious difference between the two scenarios is that one changes instantaneously and the other continuously. The game could be programmed such that while you're trying to move into a wall you can't move past it, but I would have to take a look at the game to see.

_________________
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
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri Dec 02, 2016 12:29 am    Post subject: Reply with quote

Are you sure that your cursor coordinates are getting updated when moving beyond a wall? For example, those coordinates may not register if the location of the cursor is invalid for character movement (or however the game works). If this is the case, you may look at using a different value and/or injection location for your cursor coordinates, so that all cursor movement registers and can be used for teleportation.
Back to top
View user's profile Send private message
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Fri Dec 02, 2016 6:05 am    Post subject: Reply with quote

I have poked around and yes, the mouse coords are registered if beyond a wall.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri Dec 02, 2016 6:17 am    Post subject: Reply with quote

Is this a traditional, offline game?
Back to top
View user's profile Send private message
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Fri Dec 02, 2016 6:17 am    Post subject: Reply with quote

Well yes, but it's a paid game. I have just noticed that the required "Modifiers" change depending on the level?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri Dec 02, 2016 6:25 am    Post subject: Reply with quote

By paid, do you mean subscription-based? So, it's an online game, then?
Back to top
View user's profile Send private message
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Fri Dec 02, 2016 6:26 am    Post subject: Reply with quote

It's a steam game, that's a better way to put it.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4196

PostPosted: Fri Dec 02, 2016 6:29 am    Post subject: Reply with quote

PM sent.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 155

Joined: 06 Jul 2014
Posts: 4775

PostPosted: Fri Dec 02, 2016 8:40 am    Post subject: Reply with quote

If it changes depending on the level, then there should be some values stored somewhere in memory that give a relationship between the mouse's coordinates and the player's coordinates. Try searching for stuff like level size and level position.
_________________
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
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Fri Dec 02, 2016 8:42 am    Post subject: Reply with quote

Alright! This has been such a help, (will be releasing the script once I have it corrected soon)
Back to top
View user's profile Send private message
Kronogenics
Advanced Cheater
Reputation: 0

Joined: 01 Dec 2016
Posts: 82

PostPosted: Fri Dec 02, 2016 9:16 am    Post subject: Reply with quote

I wonder if I would be able to make it consistent if I played in full screen? Then mapping the cords that way?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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