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 


[C#] Wondering how to capture/repeat action of game

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Epz
Newbie cheater
Reputation: 0

Joined: 01 Jul 2012
Posts: 23

PostPosted: Wed Dec 04, 2013 2:08 pm    Post subject: [C#] Wondering how to capture/repeat action of game Reply with quote

Hey there. I've been wondering so long how do I capture some kind of action in game? Well... I mean action as some game move in example if I open some menu so -> ("OPEN MENU"). How do I capture that and I make my C# trainer open that menu without sending any keys to game itself?

I'm asking, because I don't have any kind of clue what it's called for or what keywords I can use to search some examples / tutorials.

Thanks!
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Dec 04, 2013 2:23 pm    Post subject: This post has 1 review(s) Reply with quote

You would need to scan the memory of the game for the menu related data and see if you can force open the menu by writing something to the memory of the game.

In some cases the menu index could be a good place to start finding where the menu data is stored. By that, I mean if there is a menu with multiple options try scanning for 0 or 1 as the first option, then add 1 for each menu you go down.

For example, this games menu looks like this:


Missions could be offset 0 or 1, Quests could be offset 1 or 2 and so on.

So for this game you would highlight Missions, search for 0.
Go down to Quests and research for 1.
Go down to Key Items and research 2 for.

And so on to see if you could find the menu data. Then around that might be a flag to state if the menu is open or not that you can write a value to and open the menu with.

You can also trace what writes to the menu info that you find to see if you can find a function in the game to open the menu. Then you could use CreateRemoteThread to invoke the function.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Epz
Newbie cheater
Reputation: 0

Joined: 01 Jul 2012
Posts: 23

PostPosted: Wed Dec 04, 2013 2:49 pm    Post subject: Reply with quote

Well. I find the memory in Memory Viewer that changes when menu appears on game and so on, but I have no clue how to make it simple. It changes array of bytes between like 50 lines of array of bytes. Changes is shown as red glow under memory viewer's bottom thing. Is that something correct relating to appear? I tried to search menu open and closed trigger like "0 and 1" -> "closed and open"
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Wed Dec 04, 2013 3:18 pm    Post subject: Reply with quote

If you can browse the imports to find some relevant bits that handle input, you can set a breakpoint and step out until you find the logic code. Ultimap works pretty well for finding this stuff, too.

Quote:

Well. I find the memory in Memory Viewer that changes when menu appears on game and so on, but I have no clue how to make it simple. It changes array of bytes between like 50 lines of array of bytes. Changes is shown as red glow under memory viewer's bottom thing. Is that something correct relating to appear? I tried to search menu open and closed trigger like "0 and 1" -> "closed and open"

It sounds like you might be looking at the bitmap that changes to display the menu instead of the logic that handles menu items.[/quote]
Back to top
View user's profile Send private message
Epz
Newbie cheater
Reputation: 0

Joined: 01 Jul 2012
Posts: 23

PostPosted: Wed Dec 04, 2013 4:55 pm    Post subject: Reply with quote

Well. I found one call function in Memory View that calls the function for open a dialog (Notepad++) if I set a breakpoint there and I try to open the dialog in Notepad++ it will not open it, because of breakpoint. So I think it's correct place, but... how do I make sure how long way I have to copy the assembler code before I have to stop that I can make Thread of it without crashing?


ePlbR5j.png
 Description:
 Filesize:  65.93 KB
 Viewed:  11668 Time(s)

ePlbR5j.png


Back to top
View user's profile Send private message
Epz
Newbie cheater
Reputation: 0

Joined: 01 Jul 2012
Posts: 23

PostPosted: Fri Dec 06, 2013 8:16 pm    Post subject: Reply with quote

E: Bump

(Changed to normal notepad)

Edit 2: I got it work without crash. If I open a notepad. I simply attach the Cheat Engine on it. If I click "Help -> About Notepad" I get Window opened up. I have several problems with it now that I figured out (figured out the reason how it crashes, but I don't still have solved how to fix the crash)

1. If I don't have manually opened the Window once and left it on and I execute the "Create Thread" on it. It will open more windows of that and it works, but if I close one of the windows the Notepad crashes.

2. If I don't have opened the window already manually then it crashes immediately when I execute the Create Thread thing.

NOTEPAD.EXE+1BA8 <- Start of calling the external window open in my notepad.

Edit 3: http://i.imgur.com/xEMFqmj.png
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 programming 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