bf2forlife Posted July 26, 2008 Share Posted July 26, 2008 1. how u would put bot in a game in autoit? like how it would connect to game server in some game? 2. and how could u do that "silently" (no game window showing) so it would use less CPU? Link to comment Share on other sites More sharing options...
SwordHunter4Ever Posted July 26, 2008 Share Posted July 26, 2008 1. how u would put bot in a game in autoit? like how it would connect to game server in some game? 2. and how could u do that "silently" (no game window showing) so it would use less CPU?Well first you would need to use the hide window command (I don't know what it is) and as for the game server thing, do you want to have it send packets connecting to the game or log in like a human? If you want it to be as realistic as possible you'll want it to use mouse movement cords, you can base them on the size of the window and then position the mouse clicks relative to that window. Once you have the mouse click on login or whatever then have it click on the box where you type your user name and have it send your name. Then have it click on the password field and type your password. To get you started for mouse clicking use. MouseClick("left", x, y, #, #) The "left" defines that it will be a left click, the x is the x pixel position on the screen, y is the y pixel position on the screen, the first # is how many clicks and the second # is how fast. Then once you have it clicked where you need it to you'll want to have it type in your information. To do this use the Send command as follows. Send("text") Now if it needs a password you can have it tab by using Send("{TAB}") to get to the next field, or you can have it mouse click (some games don't accept tabbing). Use the Send("text") command again to type in your password. once your password is typed in you can either click the login button using the MouseClick command or you can type enter by using Send("{ENTER}") Hope that gets you started, thats the most basic of coding but should work. You'll need to figure out the command to hide the window and you'll also need to realize that some keystrokes require modifications for use in hidden mode. I personally never use hide mode or I would help you some more. All in all your code should look something like as follows to start. Run("game location") Sleep("1000");<-- defines how long to wait for the game to start MouseClick("left", 50, 50, 1, 1);<-- clicks login box Send("account name");<-- types account name. Send("{TAB}");<-- tabs to pw field Send("password");<-- types password Send("{ENTER}");<-- presses enter Link to comment Share on other sites More sharing options...
bf2forlife Posted July 26, 2008 Author Share Posted July 26, 2008 Now i just need to know whats the hide command and how u can send packets to game? Link to comment Share on other sites More sharing options...
Dampe Posted July 26, 2008 Share Posted July 26, 2008 Now i just need to know whats the hide command and how u can send packets to game? WinSetTitle ("Game window title", "", @SW_HIDE) As for packet sending, you would have to do some studying / reverse engineering on the games packets Have a look at the TCP functions in the help file Link to comment Share on other sites More sharing options...
Golbez Posted July 26, 2008 Share Posted July 26, 2008 look into the control functions in the helpfile.. {controlsend and others} Link to comment Share on other sites More sharing options...
bf2forlife Posted July 26, 2008 Author Share Posted July 26, 2008 WinSetTitle ("Game window title", "", @SW_HIDE) That doesnt hide it, it just sets the title to "0" Link to comment Share on other sites More sharing options...
bf2forlife Posted July 26, 2008 Author Share Posted July 26, 2008 and btw can u controlsend to hidden window? Link to comment Share on other sites More sharing options...
Gillboss Posted July 26, 2008 Share Posted July 26, 2008 first, it will work, you need WinSetState WinSetState("Game window title", "", @SW_HIDE) second, yes you can. learn this example: Run("notepad.exe") WinWait("Untitled") WinSetState("Untitled", "", @SW_HIDE) ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window") Sleep(1000) WinSetState("Untitled", "", @SW_SHOW) Sleep(5000) ProcessClose("notepad.exe") Link to comment Share on other sites More sharing options...
bf2forlife Posted July 27, 2008 Author Share Posted July 27, 2008 is there way to put multiple bots in the same game? Link to comment Share on other sites More sharing options...
TerarinKerowyn Posted July 27, 2008 Share Posted July 27, 2008 Like one bot checking your health and another checking your mana and so on? If so yes you can have as many as you'd like to have but remember to always have a sleeping with the Sleep(TIME) in the loop else you'll freeze your computer with so many bots. Also why use more then one bot? I am wondering is there a purpose for this making the BOT use more and more of your resources when playing your game. Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah Link to comment Share on other sites More sharing options...
SwordHunter4Ever Posted July 27, 2008 Share Posted July 27, 2008 is there way to put multiple bots in the same game?I'm not sure if this is what you mean, but do you mean have multiple copies of the game running on your computer and one bot controlling each of those copies?If that is the question then yes you can.If you mean have multiple bots working together on one copy of the game, then yes that is also possible.However with how fast auto it is, you could probably just have one bot do it all using loops and stuff. Link to comment Share on other sites More sharing options...
bf2forlife Posted July 27, 2008 Author Share Posted July 27, 2008 yes bots working together thats what i mean, but is there more "control" commands than controlsend and controlclick? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 27, 2008 Share Posted July 27, 2008 yes bots working together thats what i mean, but is there more "control" commands than controlsend and controlclick?I find it interesting that you ask that when it would have been quicker to check the helpfile yourself than posting on the forum..... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
bf2forlife Posted July 27, 2008 Author Share Posted July 27, 2008 well i checked the helpfile but didnt find nothing intresting just "ControlFocus" but i dunno what that do -.- Link to comment Share on other sites More sharing options...
jokke Posted July 27, 2008 Share Posted July 27, 2008 You would need to identify the games, either by PID or by window title. Then you can start sending controlsend acordingly to the game you want to controll. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Nevin Posted July 27, 2008 Share Posted July 27, 2008 Sounds like you're in over your head on this anonymous game bot project. Link to comment Share on other sites More sharing options...
bf2forlife Posted July 28, 2008 Author Share Posted July 28, 2008 You would need to identify the games, either by PID or by window title. Then you can start sending controlsend acordingly to the game you want to controll.where i can know what is the PID for the game? Link to comment Share on other sites More sharing options...
bf2forlife Posted July 28, 2008 Author Share Posted July 28, 2008 ok it works fine but only problem is that u get kicked for "too many connections from same host" lol Link to comment Share on other sites More sharing options...
TehWhale Posted July 28, 2008 Share Posted July 28, 2008 Doesn't that tell you something? Don't bot? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now