Recommended Posts

I've been thinking of writing a helper program for a game. I mean it should be looking for monsters with lower health and select them to attack. But I dont know how to approach.There are healthbars above monsters, my first idea is to take a screenshot and process it. But it is too vague because healthbars might override sometimes.

Other idea is something I am not familiar with..I don't even know if this is possible but what about hooking into memory and functions of the game and get the data I want from there?

I have no idea how to attack though. It should right click on the monster.I am not sure if right clicking right below the healthbar would work.

It is not an online game or kind of that.So I don't think there are many security things to make this project harder.

Language is not a problem I can do this project with C++ C# or VB.net according to the approach I'll take. If I'll hook into memory I'd probably should use c++ i.e.

Thanks

0

Share this post

Link to post

Share on other sites

Using screenshots could work, but it will be damn memory and cpu intensive if this is a real-time game. Hooking the memory is the way usually used. In fact, there's already a program for nearly every commercial games out there. They are called trainers and are often released by pirate groups because the method to do them is similar to those of cracks. Of course, I personally don't know how.

On another note, there was a thread here not long ago about doing this for Starcraft and Diablo2.

[Edited by - Dunge on July 18, 2010 12:52:23 AM]

0

Share this post

Link to post

Share on other sites

It's pretty easy to take a fast screenshot with GDI, should be workable for real time without issue. Select a memory DC into a DIB section then blit the game DC to your memory DC. Your DIB section will have a pointer to the raw data now which you can manipulate however.

Trainers are a pretty far cry from cracks though. If you want to use memory, get comfortable with the Windows debugging functions, namely WriteProcessMemory() / ReadProcessMemory(). The reverse engineering is up to you.

0

Share this post

Link to post

Share on other sites

I couldn't make this picture seen in the forum but here is the link.http://img833.imageshack.us/img833/1766/healthbars.png

I started the project I am now able to examine pixels and it is fast enough for me at the moment.But as you can see the healthbars don't contain only one type of pixel so I don't know how to move on. I thought about counting the black pixels from right to get the health of the monster but I realized that the healthbars have slightly different widths.I've been thinking of some kind of blending algorithm which might make things clearer.So what can you suggest me to do? Thanks.