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 


Converting a player teleport fly XYZ to a true 'no-clip'

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
SteveAndrew
Master Cheater
Reputation: 30

Joined: 02 Sep 2012
Posts: 323

PostPosted: Mon Mar 18, 2013 1:26 pm    Post subject: Converting a player teleport fly XYZ to a true 'no-clip' Reply with quote

There's something I don't quite understand, and that's how to achieve a true 'no-clip' hack!

The way I've been doing my fly hacks up until this point is just modifying the XYZ coordinates by hotkeys (adding to them or subtracting to them at a set rate)

With the Z coordinate it's a little easier, as you know when adding to it you'll move up, or when subtracting from it you'll move down (unless it's reversed, but I've yet to see a game do that)... However with the X and Y coordinates its not so clear cut which way you'll move when adding and subtracting from them. So although my script works, it's a little weird to use as you can't just press the forward to to move forward, or the left key to move left, etc... Also based on which direction your facing it could get confusing on which one to press to move in which direction (since it's changing the coordinates based off the map, rather then which direction your facing)

So I feel like there is maybe a second set of coordinates or address I need to find (camera? view angle?) then perform some sort of math to figure out how to add to the X and Y coordinates to move you forwards/left/right/backwards based on what direction your facing rather then the map... This would create a much more natural feeling teleport fly hack (in which case I would probably just call it no-clip instead)

So what else do I need for my script to achieve this? And help me understand the math so it would make sense to me how it works... Even the game itself knows how to move you through the world properly, moving forward always moves you forward no matter which direction your facing! So it can't be that complicated!

Like in my latest script that I've done for Crysis 3 for example how can I turn this into a true 'no-clip' as they call it:
Code:

//Crysis 3
//Teleport Fly Hack
//Steve Andrew
[enable]
alloc(TeleportFly,128)
alloc(KeyHandlerThread,256)
aobscan(TeleportFlyAddress,8b 4e 74 8b 56 78 8b 46 7c 89 4d ? 89 55 ? 89 45)
label(TeleportFlyAddy)
label(ExitKeyHandler)
label(ToggleOnOff)
label(TeleportFlyFullyDisabled)
label(TestKeyAndIncreaseDecreaseIfNeeded)
label(IncreaseIt)
label(NotPressed)
label(InitialLiftAmount)
label(FlySpeed)
label(TeleportFlyEnabled)
label(CurrentCoords)
label(AlreadyGotCoords)
label(TeleportRet)
createthread(KeyHandlerThread)
registersymbol(TeleportFlyAddy)
registersymbol(TeleportFlyFullyDisabled)
registersymbol(CurrentCoords)
registersymbol(FlySpeed)

TeleportFly:
mov edx,[esi+78]
mov eax,[esi+7c]
cmp [esi+d4],2 //Not player if it's not 2
jne TeleportRet
cmp [TeleportFlyEnabled],1
jne TeleportRet
cmp [CurrentCoords],0
jne AlreadyGotCoords

mov [CurrentCoords],ecx   //X
mov [CurrentCoords+4],edx //Y
mov [CurrentCoords+8],eax //Z

fld dword ptr [CurrentCoords+8]
fadd dword ptr [InitialLiftAmount] //Lift you up a little bit to start ;)
fstp dword ptr [CurrentCoords+8]

AlreadyGotCoords:
mov ecx,[CurrentCoords]
mov edx,[CurrentCoords+4]
mov eax,[CurrentCoords+8]
jmp TeleportRet

KeyHandlerThread:
push 0a
call Sleep

cmp [TeleportFlyFullyDisabled],1
je ExitKeyHandler

push 70 //F1
call GetAsyncKeyState
test ax,ax
jne ToggleOnOff

cmp [TeleportFlyEnabled],1
jne KeyHandlerThread

push CurrentCoords //X
push 1 //increase it if key is down
push 'D' //Key: 'D'
call TestKeyAndIncreaseDecreaseIfNeeded

push CurrentCoords //X
push 0 //decrease it if key is down
push 'A' //Key: 'A'
call TestKeyAndIncreaseDecreaseIfNeeded

push CurrentCoords+4 //Y
push 1
push 'W'
call TestKeyAndIncreaseDecreaseIfNeeded

push CurrentCoords+4 //Y
push 0
push 'S'
call TestKeyAndIncreaseDecreaseIfNeeded

push CurrentCoords+8 //Z
push 1
push a0 //Key: 'left shift'
call TestKeyAndIncreaseDecreaseIfNeeded

push CurrentCoords+8 //Z
push 0
push a2 //Key: 'left control'
call TestKeyAndIncreaseDecreaseIfNeeded
jmp KeyHandlerThread

ToggleOnOff:
xor eax,eax
mov [CurrentCoords],eax
xor [TeleportFlyEnabled],1
push 96
call Sleep
jmp KeyHandlerThread

ExitKeyHandler:
ret

//void __stdcall TestKeyAndIncDec(int Key, bool IncOrDec, float *pFloatValue)
TestKeyAndIncreaseDecreaseIfNeeded:
push [esp+4] //Key
call GetAsyncKeyState
test ax,ax
je NotPressed

mov eax,[esp+0c] //Address of the coordinate
fld dword ptr [eax]

cmp [esp+8],1 //Increase or decrease it?
je IncreaseIt

fsub dword ptr [FlySpeed]
fstp dword ptr [eax]
jmp NotPressed

IncreaseIt:
fadd dword ptr [FlySpeed]
fstp dword ptr [eax]

NotPressed:
ret 0c

TeleportFlyEnabled:
dd 0

TeleportFlyFullyDisabled:
dd 0

FlySpeed:
dd (float)0.2

InitialLiftAmount:
dd (float)5

CurrentCoords:
dd 0 0 0

TeleportFlyAddress+3:
TeleportFlyAddy:
jmp TeleportFly
nop
TeleportRet:

[disable]

TeleportFlyAddy:
mov edx,[esi+78]
mov eax,[esi+7c]

TeleportFlyFullyDisabled:
dd 1

dealloc(TeleportFly)
unregistersymbol(TeleportFlyAddy)
unregistersymbol(TeleportFlyFullyDisabled)
unregistersymbol(CurrentCoords)
unregistersymbol(FlySpeed)


Thanks! I'll be researching this trying to find the answer in the mean time! Very Happy

_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Mar 18, 2013 2:28 pm    Post subject: Reply with quote

By no-clip, do you mean no clipping (no frame skipping), or do you mean no collision (e.g. walk through walls etc.)?
Back to top
View user's profile Send private message
SteveAndrew
Master Cheater
Reputation: 30

Joined: 02 Sep 2012
Posts: 323

PostPosted: Mon Mar 18, 2013 3:11 pm    Post subject: Reply with quote

GNIREENIGNE wrote:
By no-clip, do you mean no clipping (no frame skipping), or do you mean no collision (e.g. walk through walls etc.)?


actually neither! but move through walls is closer... However I don't care if it collides (your player still gets hurt if I move him through a wall (in Crysis 3 the game I'm trying to get this for) but I don't mind that as I have infinite health... Since i'm forcing the player coordinates to whatever value he'll go through the wall whether he likes it or not...

See my video here to see how it's currently working (although it shows the enemy vac as well):
http://www.youtube.com/watch?v=WGi2kAe96Yc

The point really isn't to move through walls though, it's more to get to places without going the normal route or even get to places you weren't supposed to go...


I shouldn't of described it as no-clip... I just meant that instead of awkward movement (as you see in the vid) it would move you forward through the world, in the direction your facing by pressing forward, etc... rather then moving you + certain coordinates relative to the map...

I hope you can understand what I mean... Technically my player is still colliding with everything I'm just forcing his coordinate so it doesn't matter... I suppose the enemy vac hack could stay the way it is now, but the player fly has to be more natural.

_________________
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Mar 18, 2013 3:26 pm    Post subject: Reply with quote

I haven't played this game, so I'm not entirely sure what I should be looking for.

Whenever I do a fly cheat, I don't even mess with the x/z coordinates; I only bother with modifying the y (vertical) coordinate. This only works for games that allow you some control while in the air, obviously. Oftentimes, I have to modify one of the instructions that handles the player gravity/fall, otherwise, the character can be 'glitchy', as though the game is trying to force the character back to the ground. It's easier this way, and the player only has to worry about hitting a hotkey (or gamepad) to fly higher/lower while the game handles the other values as normal.

As far as collision goes, this value can sometimes be applied to all objects (including the floor/map), so take notice if this address is shared.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Mon Mar 18, 2013 6:23 pm    Post subject: Reply with quote

I think you should find view angle.
And store it in allocated memory..

And then check if view angle is higher then 0 and smaller then 90 (just an example), if it is jump to the offest that will increase the X coord by your value...
And if its not, do another check if view angle is between 90 or 180.. and etc.


Hope this some how helps.. D:
Never actually tried to make hack like the one you wanted, but did made lots of teleport hacks..

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
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