 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
kanakis Cheater
Reputation: 0
Joined: 19 Feb 2015 Posts: 28
|
Posted: Sun Jan 31, 2016 6:23 am Post subject: code injection |
|
|
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 |
|
 |
mgostIH Expert Cheater
Reputation: 3
Joined: 01 Jan 2016 Posts: 159
|
Posted: Sun Jan 31, 2016 8:06 am Post subject: Re: code injection |
|
|
| 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.
_________________
|
|
| 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
|
|