Wednesday, October 9, 2013

Easybot

http://web.archive.org/web/20040914010300/http://pages.videotron.com/sst/




Starship Traders Resource Site

Your source for TLR and TLF



Easybot.c

Easybot is a demonstration program, designed to show how to make a connection to the starship traders game server. It will compile under windows, linux and OS X. On windows, the free LCC compiler is used, while the gcc compiler is used on linux and OS X. You will need at least basic 'C' programming skills to be able to use the provided source, and the program doesn't do much except connect to the server, login to the game and log back out. It does however, provide all the necessary building blocks to create your own great bot! The program source is available here easybot.c and compiling instructions follow. It is released under the terms of the GNU General Public License, version 2 of the License, a copy of which can be found here gpl.txt.
Windows using LCC


Create a new console application. That's the default for LCC, so defaults should be fine. When prompted to use the wizard to create skeleton application, just answer No. You'll then be asked to add source files to the project. Just add the downloaded file, and that's it. Just click next for all of the screens that follow accepting the defaults and compile to get a running console application. The latest version of LCC will link in the winsock2 library, so no need to even set that up. If you're using another compiler, you'll most likely need to add the winsock2 library inyour linker step. Check your compiler documentation.
Linux and OS X,using gcc


Just run the following on the command line where you've put the source file: "gcc -Wall-o easybot easybot.c". I'm assuming you have some basic knowledge of linux.




Depending on the interest, I may write some additional articles on enhancing the bot and may also release a basic windows client. Catch me in the game, and I may also answer questions there.

No comments:

Post a Comment