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 


code injection

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

Joined: 19 Feb 2015
Posts: 28

PostPosted: Sun Jan 31, 2016 6:23 am    Post subject: code injection Reply with quote

I've made an .exe in c++, that reads some variables in aoe2.

Then it creates a loop and every 25 seconds it simulates some keystrokes based on conditions. To simulate the keystrokes I am using windows API.

Example:

Code:
Every 25 seconds:
{
PRESS H
PRESS C
PRESS H
PRESS C
}


However this is not convenient since every 25 seconds it changes the camera and it hurts my micromanagment badly.

What I want to learn how to do is exchange the keypresses, to assembly commands so that I don't lose the camera.

So essentially change the
Code:
{
PRESS H
PRESS C
PRESS H
PRESS C
}


to the same functionality using code injection.

More specifically I need to identify how I can cycle through my buildings, recognizing that each building is unique. And how to use a building's function like create villager.
Back to top
View user's profile Send private message
mgostIH
Expert Cheater
Reputation: 3

Joined: 01 Jan 2016
Posts: 159

PostPosted: Sun Jan 31, 2016 8:06 am    Post subject: Re: code injection Reply with quote

kanakis wrote:
I've made an .exe in c++, that reads some variables in aoe2.

Then it creates a loop and every 25 seconds it simulates some keystrokes based on conditions. To simulate the keystrokes I am using windows API.

Example:

Code:
Every 25 seconds:
{
PRESS H
PRESS C
PRESS H
PRESS C
}


However this is not convenient since every 25 seconds it changes the camera and it hurts my micromanagment badly.

What I want to learn how to do is exchange the keypresses, to assembly commands so that I don't lose the camera.

So essentially change the
Code:
{
PRESS H
PRESS C
PRESS H
PRESS C
}


to the same functionality using code injection.

More specifically I need to identify how I can cycle through my buildings, recognizing that each building is unique. And how to use a building's function like create villager.


One way to do this is by finding the function of the button "create villager" and then calling it in a remote creathed thread.
If that's a flash game, don't expect it to be easy, I would suggest creating data packets and sending them to the server instead.

Anyway, you can locate the function by finding what accesses the number of villagers active or by using ultimap and finding the function that activates on the press of the button and backtracing it.
Once done, you can post the asm x86 code of the function being called here, so we can help you further.

If the game is online, CE forum isn't allowed to give you help.

_________________
Do you need to ask me something? Feel free to join my discord server at: https://discord.gg/At4VZXA or ask me something in my YouTube channel: https://www.youtube.com/c/mgostIH
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
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