Register for your free account! | Forgot your password?

You last visited: Today at 23:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Making a bot help

Discussion on Making a bot help within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
blackout617's Avatar
 
elite*gold: 68
Join Date: Feb 2011
Posts: 401
Received Thanks: 96
Wink Making a bot help

Hi i will try to make a bot i think to edit the udobot source for start but udobot it not safe and i fail to edit it can anyone give me a source or project file or anything for making a bot or auto bidder or skylab upgrader anything ?or only the login place source i try to make a login bot i will to login with id and pw but i can make only that its write id and pw and stops i cannot make that select server ?I Will start from an easy thing can anyone give me a source or project file that i can edit and make better )

Thankss.


And some questions what i need for making a bot ? I have vb6(c++,c# ....)and vb.net..

PLease no negative answers
blackout617 is offline  
Old 10/20/2012, 13:12   #2
 
ZzEndayZz's Avatar
 
elite*gold: 1
Join Date: Feb 2012
Posts: 642
Received Thanks: 378
Quote:
Originally Posted by blackout617 View Post
Hi i will try to make a bot i think to edit the udobot source for start but udobot it not safe and i fail to edit it can anyone give me a source or project file or anything for making a bot or auto bidder or skylab upgrader anything ?or only the login place source i try to make a login bot i will to login with id and pw but i can make only that its write id and pw and stops i cannot make that select server ?I Will start from an easy thing can anyone give me a source or project file that i can edit and make better )

Thankss.


And some questions what i need for making a bot ? I have vb6(c++,c# ....)and vb.net..

PLease no negative answers
BP updated their packets so don't even bother making a bot now..
ZzEndayZz is offline  
Old 10/20/2012, 13:27   #3


 
linksus's Avatar
 
elite*gold: 60
Join Date: Apr 2011
Posts: 7,894
Received Thanks: 3,067
Sorry, but i think, when you so start to ask how you code a bot, than you don't need to start with a bot....
All ppl who think so, don't finish the own bot...
You must have experience with programming in the language and specific packets.....

I think you should start with tools....
linksus is offline  
Old 10/20/2012, 13:32   #4
 
elite*gold: 0
Join Date: Jan 2012
Posts: 63
Received Thanks: 23
Code:
			void getBaseInfo(std::string& url)
			{
				net::HTTPRequest req("GET", Poco::URI(url).getPathEtc());
				sess_.sendRequest(req);
				net::HTTPResponse resp;
				std::istream& resp_body_strm = sess_.receiveResponse(resp) >> std::noskipws;
				std::string resp_body = std::string(std::istream_iterator<char>(resp_body_strm), std::istream_iterator<char>());
				resp.getCookies(cookies_);

				if (resp.has("Location"))
				{
					sess_.sendRequest(*makeRequest("GET", "/indexInternal.es?action=internalMapRevolution"));
					net::HTTPResponse resp2;
					resp_body = std::string(std::istream_iterator<char>(sess_.receiveResponse(resp2) >> std::noskipws), std::istream_iterator<char>());
				}

				if (!Util::getBetween(resp_body, std::string("ionID\": \""), std::string("\","), SID_)) 
				{
					error_ = true;
		#ifdef _DEBUG
					std::ofstream f("getBaseInfo.html", std::ios::binary);
					f << resp_body;
		#endif
					return;
				}

				std::string uid_str;
				if (!Util::getBetween(resp_body, std::string("erID\": \""), std::string("\","), uid_str))
				{
					error_ = true;
		#ifdef _DEBUG
					std::ofstream f("getBaseInfo.html", std::ios::binary);
					f << resp_body;
		#endif
					return;
				}
				UID_ = UID(uid_str);

				std::string mapid_str;
				if (!Util::getBetween(resp_body, std::string("apID\": \""), std::string("\","), mapid_str))
				{
					error_ = true;
#ifdef _DEBUG
					std::ofstream f("getBaseInfo.html", std::ios::binary);
					f << resp_body;
#endif
					return;
				}
				mapID_ = atoi(mapid_str.c_str());


				std::string game_id;
				if (!Util::getBetween(resp_body, "\"pid\": \"", "\",",  game_id))
				{
					error_ = true;
#ifdef _DEBUG
					std::ofstream f("getBaseInfo.html", std::ios::binary);
					f << resp_body;
#endif
					return;
				}
				gameID_ = atoi(game_id.c_str());

				
			}
This is what I use to get needed information for the gameclient login. It takes the URL that you get for an active instance login.
To get this URL I do this:
Code:
			bool Authenticate(const std::string& username, const std::string& pw)
			{
				std::string username_enc, pw_enc; // Encode username & pw
				Poco::URI::encode(username, "=&+;", username_enc);
				Poco::URI::encode(pw, "=&+;", pw_enc);

				std::ostringstream req_body_content_strm; // prepare post body
				req_body_content_strm << "loginForm_default_username=" << username_enc << "&loginForm_default_password=" << pw_enc << "&loginForm_default_login_submit=Login";
				std::string req_body_content = req_body_content_strm.str();
		
				net::HTTPRequest req("POST", "/?locale=en&aid=0"); // send request
				req.setContentType("application/x-www-form-urlencoded");
				req.setContentLength(req_body_content.length());
				sess_.sendRequest(req) << req_body_content;
		
				net::HTTPResponse resp; // receive response
				std::istream& resp_body_strm = sess_.receiveResponse(resp);
				resp_body_strm >> std::noskipws;
				std::string resp_body  = std::string(std::istream_iterator<char>(resp_body_strm), std::istream_iterator<char>());
		
				if ((int)resp_body.find("serverSelection_ini ini_active", 0) < 1) // are we logged in?
				{
					/*std::ofstream f("login.html", std::ios::binary);
					f << resp_body;*/
					return false;
				}
		
				authenticated_ = true;
		
				int off = 0; // parse response body
				int found = 0;
				while((found = resp_body.find("serverSelection_ini ini_active", off)) > 0)
				{
					off += found + 2;
					std::string::size_type link_begin_pos = resp_body.find("target=\"", found) + 8;
					std::string::size_type link_end_pos = resp_body.find("\" onclick=", link_begin_pos);
					std::string link = resp_body.substr(link_begin_pos, link_end_pos - link_begin_pos);
					std::string servername = link.substr(7, link.find(".", 0) - 7);
					map_[servername] = link;
				}
				return true;
			}
This is all C++ using the awesome Poco libraries.
This code is not worth copy pasting, to anyone who thinks of doing that, believe me. But you can see how it basically works.
Also note, that this worked a few days ago. I don't know if it still does with the new update.
Also note that this might not be secure in terms of banning. This is optimized to reduce traffic, not for security.

Hope it helps.
bossfong is offline  
Thanks
3 Users
Reply


Similar Threads Similar Threads
Making a bot
07/10/2012 - DarkOrbit - 15 Replies
Any one know how to make a bot. Am starting to learning java, so i hope the end of this year i can make some :mofo::mofo: http://i.epvpimg.com/Kxjlh.png
making 1->99
05/12/2009 - RF Online - 1 Replies
So im not sure u want to share this on public so could some1 send me in pm how can i make 99 excelsior from 1 (without farming xD ). So i can pick up one make it 99 and sell them . Well i hope some1 will give me some info/hints on this. Tx in advance
Bot making!!!
04/30/2007 - Conquer Online 2 - 3 Replies
Hmmmmmmm even though i have no posts or anything i was looking through bots and hacks and i noticed that they were made out of the simple computer programming languages that we use today such as Visual Basic witch i believe is used in "COSpeedhack" Anyways i just wanted to know if anyone could just make a simple intrusction on how to make bots.... just like the basics that you would need into making your own so that many more bots would be made on each patch so more people would have a...
Making
01/02/2006 - Conquer Online 2 - 1 Replies
well im trying to make a pixel bot with AutoItv3 I aint got very far on it yet im a newb to using it trying to learn as I go but if I ever get it completed I will up load it here..btw does any 1 know much about AutoItv3?



All times are GMT +2. The time now is 23:23.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.