![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| PC Games Error ! Errors and request on PC games |
![]() |
|
game BOT programming (function hook)
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
here my goal: create a bot programing engine for a game, let's say Starcraft. game would act similar to d2jsp, for those who don't know d2jsp it's a bot for Diablo and it's driven by script you can write yourself to change the behavior of the bot. so here my first question... I'm guessing I have to first get a HOOK into some function of the game. the first hook, *I guess* would be in the data reception subroutine... so I can read the Data it's receiving from the server ? I might be completely wrong about this... if not, How do I put a hook on a function of a program I did not made ? |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
1) Create a screen hook 2) Use object recognition to determine where you want simulated mouse clicks to happen or what events to use If you want clientless bots: 1) Get a copy of the controler *.dll files 2) Decompile these into ASM code or find someone who was nice enough to already generate the code for them. 3) Figure out what needs to be injected into the *.dll files to achieve the result you desire 4) Recompile the *.dll files back down and run your app using the controller dll's. Pretty much if you use the DLL approach you need to do a lot of decompiling and trial and error. Sometimes even down to registry editing and modification with a HEX tool. But then you create a way to fire the updated controls with the dll and make it start influencing the game. In games such as D2 you can use d2jsp to control these DLL hooks with a top side script and control character movement without simulating mouse clicks. :-) Hope that helps a bit in your research. |
|
|
|
|
|
#3 (permalink) |
|
Administrator
Posts: 321
Join Date: Jan 2006
Rep Power: 10
IM:
|
If you still think you can, you need to have atleast a debugger (I prefer SoftICE, some prefer OllyDbg), and you need to have a decent knowledge of ASM. A Disassembler like W32Dasm is also good to have. Well, if you have those tools, fire up your debugger, set breakpoints at function calls, watch their addresses and see what they are doing, then you can add some ASM code in between there, but keep in mind that when you're actually adding or removing bytes, you need to update all pointers in the file, which is a horrible task.. Tijnema ~EFM Admin ------------------ 2oo7 |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|