User1 made an afkbot for Combat Arms. I imagine the idea is quite similar, except MS may have more botting defense since it is a rpg. So I guess you could ask him, but he coded his hack in VB.
If you wanted to code it in C++... yawn... typing this at 12:00am.... about to crash D:
Anyway like I was saying if you wanted to code it C++ you would just need to send simulated key strokes. I don't imagine there is any real need to get addresses unless you wanted to detect ur current hp, etc......
Yawn......But ur bot should develop and become more advance in each new version you make of it. let me see here there's tons of ways to send simulated key strokes I think HD pointed some out in the BD Source thread....
Yep he did here is his example:
Code:
// press DOWN "Alt-Tab"
keybd_event(VK_MENU, 0, 0, 0);
keybd_event(VK_TAB, 0, 0, 0);
::Sleep(1000);
// stop pressing "Alt-Tab"
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, 0);
Ofcourse you'll want to make sure these signals are being sent to the right application, but you can get to tha latter first make sure you figure all the keys you want to send... well you should be able to figure out how to design the program to make it do all the things you want. Then you can come back and we can worry about making the simulated keyboard events reach the right window...