![]() |
keybd_event
Hi lads.
I'm making a simple bot and have the mouse working fine. The problem i'm having is using keybd_event . How can i send commands like move jump etc. Do i have to send them directly to the console ? I'm also wondering how to i open the console as the if i send the virtual keys for ~ it won't work maybe because of the regional codes? Thanks My code is as follows.. Code:
.DATA ; initialized data |
Re: keybd_event
Hmmm... I think you're trying to write an aimbot and that's EVIL!
No help here :P TIP: MSDN |
Re: keybd_event
You're not trying to make aimbots eh? :)
edit...I'm slow |
Re: keybd_event
It's impossible to write an aimbot by sending data to the window.
Read the api's i'm using and you will see what i'm doing. Btw an aimbot i assembly are you mad? Thanks |
Re: keybd_event
OK, if it's not an aimbot, so what's the point emulating keyboard&mouse for CS? Why not M$ wrod? You could make it write poems :)
My guess: YOu want to turn on teh bot when you're away so it makes you jump and stuff. (I think Cheating-Death checks for the stuff like that...) |
Re: keybd_event
Quote:
(And no I'm not mad...) |
Re: keybd_event
Hi lads.
The only language i know is asm. The question still stands tho. Thanks. |
Re: keybd_event
What kind of bot are you doing?
I'm just asking because they are _usually_ done server-side and not in a seperate client application. As for running commands, I doubt you could get console commands running through a second application. You could send window messages like WM_KEYDOWN, ect to the half-life window which would make the player move or do other things. The easiest way to do a client-side bot is with a dll hook but since VAC2 is out its not safe to do. Notice: The only client-side thing I had running was a clock, nothing else... Not only that I started using windowed mode so the clock became useless. Though I did learn alot about function hooking. [Added] Actually, if you somehow managed to get loaded into half-life's address space and remain undetected by VAC2 you could run console commands... - Hook cl_enginefuncs_t::pfnCmd_Args, pfnCmd_Argc, pfnCmd_Argv - In you pfnCmd_xxx functions simply return your custom command - Call pfnClientCommand I think, haven't touched the client in a long time. |
Re: keybd_event
Hi Lazy .
Your name contradicts itself :) Anyways man my bot is a cup of tea bot ;) It's all client side. Here's the basic things i'm doing. 1 Get handle to the cs window.--> FindWindow function 2 Make our game window show --> ShowWindow function 3 Make it the window to accept input --->SetForegroundWindow+EnableWindow All that is done. Plus mouse_event works perfectly. Now the thing is keybd_event simulates keystrokes right. window messages like WM_KEYDOWN Are you referring to the sendmessage function? Could i have an example please. Thanks for your time. |
Re: keybd_event
So your bot just moves around randomly so you don't get booted by auto afk kicking plugins?
As for sendmessage, lemme write something up really quick - it will be in C though but I'll comment it to make porting easier. |
All times are GMT +2. The time now is 05:24. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.