Jump to content
Sign in to follow this  
bf2forlife

bot to game

Recommended Posts

bf2forlife

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?

Share this post


Link to post
Share on other sites
SwordHunter4Ever

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

Share this post


Link to post
Share on other sites
bf2forlife

Now i just need to know whats the hide command and how u can send packets to game?

Share this post


Link to post
Share on other sites
Dampe

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

Share this post


Link to post
Share on other sites
Golbez

look into the control functions in the helpfile.. {controlsend and others}

Share this post


Link to post
Share on other sites
bf2forlife

WinSetTitle ("Game window title", "", @SW_HIDE)

That doesnt hide it, it just sets the title to "0"

Share this post


Link to post
Share on other sites
bf2forlife

and btw can u controlsend to hidden window?

Share this post


Link to post
Share on other sites
Gillboss

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")

Share this post


Link to post
Share on other sites
bf2forlife

is there way to put multiple bots in the same game?

Share this post


Link to post
Share on other sites
TerarinKerowyn

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

Share this post


Link to post
Share on other sites
SwordHunter4Ever

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.

Share this post


Link to post
Share on other sites
bf2forlife

yes bots working together thats what i mean, but is there more "control" commands than controlsend and controlclick?

Share this post


Link to post
Share on other sites
AdmiralAlkex

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..... :P:P

Share this post


Link to post
Share on other sites
bf2forlife

well i checked the helpfile but didnt find nothing intresting just "ControlFocus" but i dunno what that do -.-

Share this post


Link to post
Share on other sites
jokke

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.

Share this post


Link to post
Share on other sites
Nevin

Sounds like you're in over your head on this anonymous game bot project.

Share this post


Link to post
Share on other sites
bf2forlife

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?

Share this post


Link to post
Share on other sites
bf2forlife

ok it works fine but only problem is that u get kicked for "too many connections from same host" lol

Share this post


Link to post
Share on other sites
TehWhale

Doesn't that tell you something?

Don't bot?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.