 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Wed Nov 19, 2014 1:05 pm Post subject: X/Y coords found! Somebody can share a teleporthack script? |
|
|
Hi
In some games (usually 2D games) I found X/Y coords of the player, if I edit tha values, the main character "teleport" instant, thats good.
Now, I need to learn how to code an auto-assemble script to store current coords (using a hotkey, for example) to be used lately for teleport my character at the stored location.
I know the basics of ASM, auto-assemble, CheatEngine, structures, etc... I think if I get a table with an example I can learn it.
Thanks!!
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Nov 19, 2014 1:54 pm Post subject: |
|
|
Here is a basic template that you can study. I have included an enemy vac option, also.
Description: |
|
 Download |
Filename: |
Teleport_Vac_Template.CT |
Filesize: |
4.31 KB |
Downloaded: |
1758 Time(s) |
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Wed Nov 19, 2014 3:06 pm Post subject: |
|
|
++METHOS wrote: | Here is a basic template that you can study. I have included an enemy vac option, also. |
What a nice example!! Thanks methos, I studied the code and I think I understand all. I will practice now with Hack,Slash,Loot game (HSL is my labtest game for everything).
If I have problems... may I ask for your help? btw you did a great contribution with your template
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Nov 19, 2014 6:39 pm Post subject: |
|
|
Sure, if you have any questions, just ask.
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Wed Nov 19, 2014 7:20 pm Post subject: |
|
|
++METHOS wrote: | Sure, if you have any questions, just ask. |
Yep, I understand your example/template, so now I'm trying to do it on another game (Hack Slash Loot), here is my script:
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(x_c)
label(y_c)
label(save_c)
label(load_c)
label(s_enable)
label(l_enable)
registersymbol(s_enable)
registersymbol(l_enable)
newmem:
cmp [s_enable],1
je save_c
cmp [l_enable],1
je load_c
jmp originalcode
save_c:
mov [s_enable],0
push eax
mov eax,[ebx]
mov [x_c],ebx
mov eax,[edi]
mov [y_c],eax
pop eax
jmp originalcode
load_c:
mov [l_enable],0
push eax
mov eax,[x_c]
mov [esi+18],eax
mov eax,[y_c]
mov [esi+1C],eax
pop eax
jmp exit
originalcode:
mov [esi+18],ebx //esi+18 is the address where X is stored
mov [esi+1C],edi //esi+1C is the address where Y is stored
exit:
jmp returnhere
x_c:
dd 0
y_c:
dd 0
s_enable:
dd 0
l_enable:
dd 0
"HackSlashLoot.exe"+14E5B5:
jmp newmem //Start injection
nop
returnhere:
[DISABLE]
dealloc(newmem)
"HackSlashLoot.exe"+14E5B5:
mov [esi+18],ebx
mov [esi+1C],edi
//Alt: db 89 5E 18 89 7E 1C |
I have one question: In what instruction I need to inyect your template script? I tried to inject at "HackSlashLoot.exe"+14E5B5. This instruction is executed when you move the character (I think this is not correct xD).
If I inject the code and move the player while s_enable = 0, the code is executed correctly, no errors are displayed.
If I move while s_enable = 1, then game closes because ACCESS_VIOLATION EXCEPTION (lol). Here some screens:
This is the original instruction:
This is the same instruction after injection:
(ok, this looks good, lets see the injected code newmem):
????????
If the s_enable is 0, the game works ok and nothing happens. The moment I put s_enable = 1 the game crash like a ubisoft 1.0 game hahaha.
Any suggestions? I don't want the solution, I want to LEARN how to manage this.
Thanks for your time
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Nov 19, 2014 9:47 pm Post subject: |
|
|
You need to inject the code using an instruction that handles your character coordinates. For example, in a 2D game, you have X/Y coordinates. When you find the X coordinate, the Y coordinate may be +4 bytes offset. Just inject the script using the instruction that handles the base coordinate address (i.e. the coordinate address with the smallest number).
You already know how to determine which address is your coordinate address by teleporting your character. Make sure you can teleport through objects to ensure that you have a good address to work with. You will also need to check if you are using an instruction that handles all character movements, or just hero coordinates.
EDIT:
Be sure to unregistersymbol at end of script. Also, it is good to check if coordinates have been stored before loading coordinates:
Code: | load_c:
mov [l_enable],0
cmp [x_c],0 //////////check if coordinates have been stored, otherwise, if you try to teleport without first storing coordinates, your character may be teleported off the map or something
je originalcode
push eax
mov eax,[x_c] |
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Thu Nov 20, 2014 3:32 am Post subject: |
|
|
++METHOS wrote: | You need to inject the code using an instruction that handles your character coordinates. For example, in a 2D game, you have X/Y coordinates. When you find the X coordinate, the Y coordinate may be +4 bytes offset. Just inject the script using the instruction that handles the base coordinate address (i.e. the coordinate address with the smallest number).
You already know how to determine which address is your coordinate address by teleporting your character. Make sure you can teleport through objects to ensure that you have a good address to work with. You will also need to check if you are using an instruction that handles all character movements, or just hero coordinates.
EDIT:
Be sure to unregistersymbol at end of script. Also, it is good to check if coordinates have been stored before loading coordinates:
Code: | load_c:
mov [l_enable],0
cmp [x_c],0 //////////check if coordinates have been stored, otherwise, if you try to teleport without first storing coordinates, your character may be teleported off the map or something
je originalcode
push eax
mov eax,[x_c] |
|
Thanks!! I finally did it!!
Here is the final code:
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(x_c)
label(y_c)
label(save_c)
label(load_c)
label(s_enable)
label(l_enable)
registersymbol(s_enable)
registersymbol(l_enable)
newmem:
cmp [esi+10],0 //If esi+10 = 0, then the enemy is moving
je originalcode
cmp [s_enable],1
je save_c
cmp [l_enable],1
je load_c
jmp originalcode
save_c:
mov [s_enable],0 //Erase saving state teleport
mov [x_c],ebx //move X coord to user-label
mov [y_c],edi //move Y coord to user-label
jmp originalcode //execute originalcode; because I saved the player coords
load_c:
mov [l_enable],0 //Erase loading state teleport
push eax
mov eax,[x_c] //move saved X coord into EAX
mov [esi+18],eax //move EAX (saved X coord) into X coord address
mov eax,[y_c] //move saved Y coord into EAX
mov [esi+1C],eax //move EAX (saved Y coord) into Y coord address
pop eax
jmp exit //exit; because the player is now on the saved coords
originalcode:
mov [esi+18],ebx
mov [esi+1C],edi
exit:
jmp returnhere
x_c:
dd 0
y_c:
dd 0
s_enable:
dd 0
l_enable:
dd 0
"HackSlashLoot.exe"+14E5B5:
jmp newmem
nop
returnhere:
[DISABLE]
unregistersymbol(s_enable)
unregistersymbol(l_enable)
dealloc(newmem)
"HackSlashLoot.exe"+14E5B5:
mov [esi+18],ebx
mov [esi+1C],edi
//Alt: db 89 5E 18 89 7E 1C |
The problem was located at "save_c" instructions, I did a stupid mov with []. Also I added a CMP to check if the hero is moving or not (esi+10 is 0 if an enemy if moving).
Now I think all is working. I will practice more doing the same thing on other games (The binding of Isaac).
Thanks you so much, I learned a lot with your template and comments.
rep+ for you, boss.
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Nov 20, 2014 4:21 am Post subject: |
|
|
Good work. Now you can build on this and add multiple save/teleport slots, various vac options, teleport to reticle/map marker etc., fly mode, ghost mode, super jump, immobilize, mass kill etc.. So much can be done with coordinates.
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Thu Nov 20, 2014 9:07 am Post subject: |
|
|
++METHOS wrote: | Good work. Now you can build on this and add multiple save/teleport slots, various vac options, teleport to reticle/map marker etc., fly mode, ghost mode, super jump, immobilize, mass kill etc.. So much can be done with coordinates. |
Thanks! Building additional slots for teleport sounds interesting, I will try.
When you speak about VAC options... do you mean Steam VAC Guard?
For flymode... I need to increment the "x_c" label into something like a FOR bucle?
If I can discrimine when the instruction is moving a NPC and setting the coords to the previos value, so enemies will stuck, right? Oooo great, this template open a lot of possibilities
With HackSlashLoot I can't test this, because its a turn-based game, I will move to another game to continue testing... thanks again. You helped me sooo much!
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Nov 20, 2014 4:56 pm Post subject: |
|
|
AikonCWD wrote: | When you speak about VAC options... do you mean Steam VAC Guard? | -Vac, as in vacuum. You can vac enemies and other objects (either by moving there and storing coordinates, shooting there, setting a marker there, etc.).
AikonCWD wrote: | For flymode... I need to increment the "x_c" label into something like a FOR bucle? | -It's a bit more complicated than that, and can really vary depending on the game. However, the basic idea is manipulating coordinate values while also disabling gravity/collision for hero player (sometimes, not even that complicated, especially for a 2D game). There are many different ways to approach this kind of script. Even a simple 'levitate' script to get you started might be fun to try.
AikonCWD wrote: | If I can discrimine when the instruction is moving a NPC and setting the coords to the previos value, so enemies will stuck, right? Oooo great, this template open a lot of possibilities | -Indeed. In fact, I wrote a vac script for Sleeping Dogs that allowed me to shoot my gun and vac peds to bullet location. Not only could I shoot at a building and they would be sucked to that spot, but I could also shoot out in to the ocean and they would fly out in to the ocean with the bullet haha. What's interesting with this, is, I could just as easily vac vehicles to my bullet so that when I fired my weapon, I could make it so I could shoot buses or cars at people (or whatever ammo I wanted) etc..
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Thu Nov 20, 2014 5:32 pm Post subject: |
|
|
aaaaaa nice, thanks for the clarifications. Never saw a vac cheat in action xD.
Maybe this things are a bit pr0 for my level. I'm proud because thanks to you I can code a teleporthack with different save/load slots. Also I tried to immovilize enemy NPC and it worked so well, now I have a lot of tools to work with.
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Nov 21, 2014 1:43 am Post subject: |
|
|
Yeah, vac cheats can be used for a lot of things. They are especially great for hack-and-slash games where enemies can move freely. You have to be careful, though, because some games will lag really badly and even cause the game to crash...especially if you throw a grenade in to the crowd or something. Other games, however, it's not an issue at all.
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Nov 22, 2014 6:43 am Post subject: |
|
|
I used something opposite to vacuum - I called it "the sphere" (also "forcefield").
In S.T.A.L.K.E.R. games it will move away all living creatures. (they can not scratch you, and can't toss objects at you)
_________________
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Nov 22, 2014 9:10 am Post subject: |
|
|
I can make "forcefield" option if you want. (I don't even have to have this game to do this)
_________________
|
|
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
|
|