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 


Avanced code injection?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
hitmetwice
Advanced Cheater
Reputation: 0

Joined: 20 Nov 2012
Posts: 63

PostPosted: Sun Mar 24, 2013 7:56 am    Post subject: Avanced code injection? Reply with quote

There are tons of tutorials showing how to make a program increasing a value instead of decreasing it. Yeah, that works fine, but I'm looking for a tutorial which shows me how to execute commands like:
-shoot my gun
-swap my weapon
-press a button
-move my character
etc
Changing address-values is not doing the job, so I guess what I need is some kind of advanced code injection?
How would I do this?
Back to top
View user's profile Send private message
hitmetwice
Advanced Cheater
Reputation: 0

Joined: 20 Nov 2012
Posts: 63

PostPosted: Sun Mar 31, 2013 1:11 pm    Post subject: Reply with quote

Bump
edited the thread title and explained my problem more detailed
Maybe you can help me now? Smile
Back to top
View user's profile Send private message
hitmetwice
Advanced Cheater
Reputation: 0

Joined: 20 Nov 2012
Posts: 63

PostPosted: Thu Apr 04, 2013 7:56 pm    Post subject: Reply with quote

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

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 04, 2013 8:40 pm    Post subject: Reply with quote

Find the controller/keyboard addresses. For basic tasks, injection may not be required.
Back to top
View user's profile Send private message
Mohsen
Advanced Cheater
Reputation: 1

Joined: 04 Apr 2013
Posts: 69
Location: PE

PostPosted: Fri Apr 05, 2013 12:34 am    Post subject: Changing value doesn't work ? Reply with quote

If changing value doesn't work then you have to hook some address and then make a call to whatever you want.

Here is some example.

Game code :
Event OnKeyPress{
If it's Q then call function quit_game.
Else if it's SPACE then call function do_jump
Else if it's LeftMouseButtun then call function do_shoot(PosX, PosY).
}

Event OnPlayerJump{

}


Here is a list of actions to be made by you.
1. Find address of the event you are looking after.
2. Hook it
3. Call the function you want to.


Let's say we want to shoot whenever a player jump.

Find address of OnPlayerJump and hook it.
Now inject your code similar to this.
Push PosY
Push PosX
call Do_Shoot

You are done Wink
Remember passing wrong function signature might crash your game.
Want it to be more safe ? Save all registers and flags before any action in your hook and then restore them when you are done with calling your function.

If game is on x86 instruction set then you can simply use pushad pushfd popfd popad.
Back to top
View user's profile Send private message
hitmetwice
Advanced Cheater
Reputation: 0

Joined: 20 Nov 2012
Posts: 63

PostPosted: Fri Apr 05, 2013 7:02 am    Post subject: Reply with quote

Is there a tutorial available or could you explain me how to do it?
You said:
1. Find address of the event you are looking after.
2. Hook it
3. Call the function you want to.
But how do I find addresses of events? How do it "hook" it where do I find the function and how can I call it? Embarassed
Back to top
View user's profile Send private message
hitmetwice
Advanced Cheater
Reputation: 0

Joined: 20 Nov 2012
Posts: 63

PostPosted: Sun Apr 07, 2013 9:21 pm    Post subject: Reply with quote

How did you start it? I mean there must be some kind of tutorial or this, right? Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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