Monday, October 14, 2013

Linux Today Article About SST's Open Source Release

From:  http://www.linuxtoday.com/developer/2001031001320NWGMSW :




Starship Traders Linux web game released

Mar 10, 2001, 17:39 (0 Talkback[s]
(Other stories by Ray Yeargin)
[ Thanks to Ray Yeargin for this link. ]
Starship Traders, a Linux-based multiplayer strategy game, is now available for downloadhere and is free for non-commercial use. Starship Traders is a Star Trader genre game, a group that includes the various Trade Wars variants, and will run on almost any Linux PC, requiring only inetd, a static IP address, and as little as 12 megabytes of disk space to host a single game. SST supports both WWW and telnet connections. The SST Linux binary package is a tar file of 420K bytes.

Wednesday, October 9, 2013

Game Parlor Online Review of Starship Traders

From:  http://web.archive.org/web/20010628025735/http://www.gameparloronline.com/article1002.html :



Game Spotlight: Starshiptraders.com
by Jaded

Starshiptraders.com is a free online multiplayer starship trading strategy game. While simplistic in appearance, the game provides a wide variety of addictive gameplay that can range from simple trading mechanics to complex political schemes.
The basic premise of this free online only strategy game is to attempt to capture the #1 ranking, with either a solo ship or a team of ships, by either trading goods, destroying your opponents or some combination of the two. Each player can play up to eight different starships, which are represented in game by a text display of a player chosen ship name and team call sign (if you have one). By utilizing a telnet or web-based interface, players can move their starships amongst various numbered sectors in a multitude of different galaxies. The galaxies come in a variety of shapes and sizes and are filled with various resources and obstacles for the players to encounter.

At first glance Starshiptraders.com doesn’t look like it would be a whole lot of fun. There are no graphics and the gameplay is fairly simplistic. However, there is much more to this game than meets the eye.

Starships can be customized at various trading posts. Additional holds, protective shields or computers that increase offensive ability can be purchased. Boosters for inter-galactic travel and homing devices for keeping track of your competition are also available.

Trading consists of either purchasing goods from various trading ports or picking up some free goods off planets that are scattered amongst the galaxies and then transporting the goods in your starship to another trading port that needs to buy them. The prices offered by ports fluctuate according to supply and demand, so the basic object is to acquire goods at the cheapest rate and sell them to the ports offering the highest prices. However, the ships must also take into account the fuel cost of transporting their goods, if they wish to make the highest profits.

The war aspect of the game is much like a game of hide and seek. While an unprotected ship remains visible to all who pass through its sector, players can construct defensive starbases that hide their starships from view. Choosing sectors that are difficult to access and/or infrequently visited also plays a large role in defensive strategy. On the offensive side of things, players can build fighter ships to attack other players’ starships and starbases. Attack starbases, which sit in an individual sector and attack any non-team ships that enter, can also be constructed.

By far one of the most intriguing aspects of this game is the political maneuvering that often accompanies the team competitions. An in-game radio and out-of-game message board system facilitates communication between players. The strategizing and political manipulations involved with the inevitable conflict between competing teams is surprisingly complex and entertaining.

Starshiptraders.com is one of those rare games that can be either as simple or as complex as you choose to make it. Playing sessions can last minutes or hours, depending on individual playing style. You can choose to play solely for individual rank or join up with a team or spend all your time flying around and socializing on the radio. The game is as simply addictive to play as it is simple to pick up.

The Website of X Starship Traders (Xsst) Developer Noel Davis

http://rootprompt.org




# RootPrompt.org  Nothing but Unix.[Home] [Features] [Programming] [Mac OS X] [Search]

Block crackers with 3 locks to your SSH door
Security always requires a multi-layered scheme. SSH is a good example of this. Methods range from simple sshd configuration through the use of PAM to specify who can use SSH, to application of port-knocking techniques, or to hide the fact that SSH access even exists. Applying these techniques can make life much harder for possible intruders, who will have to go past three unusual barriers.
"Learn 3 ways of hardening SSH access to your system to block would-be crackers"

( Permalink: Block crackers with 3 locks to your SSH door      Submitted by Noel Mon Oct 18, 2010 )
Bazaar: source control system
Bazaar is used to produce the Ubuntu Linux distribution, which is an enormous software project with thousands of components. If you're using a UNIX or Linux system, chances are that your distribution offers a pre-built Bazaar package. Bazaar is flexible enough to accommodate Subversion - a centralized system and Git - a decentralized system. This article introduces you to Bazaar's many appealing features.
"Intro to Bazaar, a great place to keep your code"
( Permalink: Bazaar: source control system      Submitted by Noel Fri Oct 15, 2010 )
User space memory access from the Linux kernel
As the kernel and user space exist in different virtual address spaces, there are special considerations for moving data between them. Explore the ideas behind virtual address spaces and the kernel APIs for data movement to and from user space, and learn some of the other mapping techniques used to map memory.
"An introduction to Linux memory and user space APIs"
( Permalink: User space memory access from the Linux kernel      Submitted by Noel Wed Oct 13, 2010 )
Techniques for migrating Perl to Python
Python programmers shouldn't get too smug. While many people agree that Python is designed in a way that makes it a highly readable language, there can still be problems with legacy, untested Python code too. Porting legacy Perl to Python can be a daunting task. In this article, learn some of the theory behind dealing with legacy code, including what not to do.
"Techniques for migrating legacy, untested Perl to Python"
( Permalink: Techniques for migrating Perl to Python      Submitted by Noel Mon Oct 11, 2010 )
New AIX 7 capabilities for virtualization
The IBM AIX operating system provides a highly scalable IT infrastructure for client workloads. Learn about the latest version, AIX 7.1, an open standards-based UNIX operating system, that includes significant new capabilities for virtualization, security features, availability features, and manageability.
"Learn about the latest version of AIX 7.1 - an open standards-based UNIX operating system"( Permalink: New AIX 7 capabilities for virtualization      Submitted by Noel Fri Oct 8, 2010 )
Introduction to PowerHA
PowerHA for AIX is the new name for HACMP (High Availability Cluster Multiprocessing). HACMP is an application that makes system fault resilient and reduces downtime of applications. This article introduces PowerHA and provides a detailed explanation of how to configure a two node cluster. This document is very useful for understanding PowerHA and setting up a two node cluster.
"Get Power high availability by Configuring a PowerHA cluster"
Introduction to PowerHA( Permalink: Introduction to PowerHA      Submitted by Noel Wed Sep 1, 2010 )
Yeah - Learn Linux: Maintain the integrity of file
Learn how to check the integrity of your Linux filesystems, monitor free space, and fix simple problems. Use the material in this article to study for the Linux Professional Institute (LPI) 101 exam for Linux system administrator certification or just to check your filesystems and keep them in good working order, especially after a system crash or power loss. Today's world relies heavily on technology, and at times technology can fail us. That is why, unlike traditional methods of storage such as office cabinets, it would be necessary to back up your electronic file systems.
"Here's an easy way to keeping track of your Linux disk space"
Yeah - Learn Linux: Maintain the integrity of filesystems( Permalink: Yeah - Learn Linux: Maintain the integrity of file      Submitted by Noel Mon Aug 30, 2010 )
Live Kernel Patches with Ksplice
Ksplice applies kernel patches on-the-fly - no reboot required — in a fraction of a second. Here's a hands-on guide to performing painless system updates. Learn how to patch a live kernel and give reboots the boot.
"Avoid reboots of your system with live Kernel updates using Ksplice"
Live Kernel Patches with Ksplice( Permalink: Live Kernel Patches with Ksplice      Submitted by Noel Wed Aug 11, 2010 )
vi tips and tricks: Ten cool commands
Amaze your friends with cool vi tips and tricks that will improve the efficiency of your file editing. This article takes you through ten of the less well-known vi commands that should form part of any serious vi user's toolkit.
"Become a vi editing wizard with these 10 tips"
vi tips and tricks: Ten cool commands( Permalink: vi tips and tricks: Ten cool commands      Submitted by Noel Mon Aug 2, 2010 )
Understanding ZFS & ZFS ARC/L2ARC
Great article describing level one and two memory caching in zfs.
"L2ARC is a new layer between Disk and the cache (ARC) in main memory for ZFS. It uses dedicated storage devices to hold cached data. The main role of this cache is to boost the performance of random read workloads. The intended L2ARC devices include 10K/15K RPM disks like short-stroked disks, solid state disks (SSD), and other media with substantially faster read latency than disk."
Understanding ZFS & ZFS ARC/L2ARC( Permalink: Understanding ZFS & ZFS ARC/L2ARC      Submitted by Noel Mon Jul 26, 2010 )
Creates a whole new painting tool for GIMP
The GNU Image Manipulation Program (GIMP) is a robust application for editing and manipulating digital images. In this article, you will learn how to get started with the GIMP code, how to build the project from the Git repositories, and how to find your way around the code tree. And you will build an example application that creates a whole new painting tool for the program.
"Dive into the code base of the GNU Image Manipulation Program and add to it"
( Permalink: Creates a whole new painting tool for GIMP      Submitted by Noel Fri Jul 23, 2010 )
Gourmet Java technology for Android applications
Java language is the tool of choice for Android developers. The Android runtime uses its own virtual machine, Dalvik, which is not the usual Java virtual machine that most Java developers are used to. In this article you will learn advanced Java features and how they are implemented on Android. This includes features such as concurrency, networking, and database access.
" Implement concurrency, networking, and database access in Android"
http://www.ibm.com/developerworks/library/x-gourmetandroid/index.html?ca=dgr-lnxw01DalvikJavadth-JV( Permalink: Gourmet Java technology for Android applications      Submitted by Noel Wed Jul 21, 2010 )
More powerful Python testing techniques
Look at how the leading Python testing frameworks provide robust auto-discovery of your application tests. Make sure your applications are written right the first time, and that they stay working through months and years of further tweaks and improvements.( Permalink: More powerful Python testing techniques      Submitted by Anonymous Tue Jul 20, 2010 )
Distributed data processing with Hadoop
In Part 1 learn to Install and configure a simple cluster and discover ways to monitor and manage Hadoop using its core Web interfaces. In Part 2 Install configure a multinode cluster and dig into the management aspects of Hadoop.
"How to use Hadoop in a single-node and multinode cluster"
http://www.ibm.com/developerworks/linux/library/l-hadoop-1/index.html?ca=dgr-lnxw01HadoopP1dth-LX( Permalink: Distributed data processing with Hadoop      Submitted by Noel Mon Jul 19, 2010 )
Creating mobile Web applications with HTML5
In this five-part series, you will take a closer look at several new technologies that are part of HTML5, that can have a huge impact on mobile Web application development.
  • Part 1: Combine HTML5, geolocation APIs, and Web services to create mobile mashups
  • Part 2: Unlock local storage for mobile Web applications with HTML5
  • Part 3: Make mobile Web applications work offline with HTML5
  • Part 4: Using Web Workers to speed up your mobile Web applications
  • Part 5: Develop new visual UI features in HTML 5

"HTML 5 is a very hyped technology, but with good reason. It promises to be a technological tipping point for bringing desktop application capabilities to the browser"
( Permalink: Creating mobile Web applications with HTML5      Submitted by Noel Thu Jul 15, 2010 )
Featured Articles:
Unix and Linux Podcasting GuideExpect and SSH
The Linux Enterprise Cluster
Book Review: Podcasting: Do-It-Yourself Guide
Remote Backups With Rsync
Weakness and Security
Essential CVS
Spring Into Technical Writing
Other News:
Biodiesel Resources
Older News
Anatomy of the Linux virtual file system switch or donate; car & computer technology
(Tue Jul 13, 2010)UNIX network performance analysis
(Mon Jul 12, 2010)
Speak UNIX fluently with the best tools available
(Sun Jul 11, 2010)
Worry-free Linux power-downs with Anacron
(Sat Jul 10, 2010)
Guide to porting from Solaris to Linux on POWER
(Thu Jul 8, 2010)
HOW TO: Teach your old Mutt some new tricks
(Thu Jul 1, 2010)
Unix turns 40
(Mon Jun 8, 2009)
Using PHP directly from the command line on Linux 
(Fri Jun 5, 2009)
Anatomy of a Linux hypervisor
(Fri Jun 5, 2009)
Boost Linux performance on old hardware
(Mon Jun 1, 2009)
Comparing UNIX inovation 
(Fri May 29, 2009)
Modify xorg.conf for better performanc
(Tue May 26, 2009)
Puppet and Subversion in Fifteen Minutes
(Mon May 25, 2009)
Build your first Android application: Create anything from wedding invitations designer to caloric calculator
(Tue May 19, 2009)
Who has better virtualization
(Tue May 19, 2009)
Fedora 11 Screenshot Tour
(Mon May 18, 2009)
Cheap, Readable, Low-Power Displays
(Thu May 14, 2009)
MySQL Clustering in a Sandbox
(Wed May 13, 2009)
MOC: Text based audio player
(Tue May 12, 2009)
Scripting the Vim editor with Vmscript
(Mon May 11, 2009)
VirtualBSD Review--Inside and Out
(Thu May 7, 2009)
Cloud computing with Linux thin clients
(Wed May 6, 2009)
Build Your Own Multitouch Surface Computer
(Tue Apr 28, 2009)
Oracle brass coax Sun troops with tough love
(Mon Apr 27, 2009)
Migrate to a virtual Linux environment with Clonez
(Thu Apr 23, 2009)
Realities of open source Cloud Computing with PHP 
(Thu Apr 23, 2009)
Michael Widenius on Sun purchase
(Wed Apr 22, 2009)
Oracle Buys Sun - No not April fools
(Tue Apr 21, 2009)
Memcached Performance on Sun's Nehalem System
(Tue Apr 21, 2009)
AIX secure flavor of FTP based on OpenSSL 
(Mon Apr 20, 2009)
[Older News]

Our content can be syndicated: Main Page Mac Page
(Validate RSS code)

Copyright 1999-2005 Noel Davis. Noel also runs web sites about sailing and kayaking.
All trademarks are the property of their owners.
All articles are owned by their author

X Starship Traders (Xsst) Website

http://xsst.sourceforge.net



""

A client for Starship Traders written using the GTK+ Toolkit.

What is it?
A X Window client for connecting to Starship Traders created using the the GIMP ToolKit (GTK+).
Starship Traders is a game written by Ray Yeargin. You can play over the web at http://www.starshiptraders.com.



SourceForge
                                                      Logo

SourceForge: X Starship Traders (Xsst)

http://sourceforge.net/projects/xsst/



X Starship Traders (Xsst) Alpha
Brought to you by: noeld
Summary
Files
Reviews
Support
Wiki
Tickets ▾
News
Code
★ 5.0 Stars (2)
 1 Download (This Week)
 Last Update: 2013-02-21
   
Download
Xsst-0.0.4.tar.gz
Browse All Files
BSD Linux
Description
A GTK+ based client for Starship Traders (www.starshiptraders.com)

X Starship Traders (Xsst) Web Site
Categories
Multi-User Dungeons (MUD), Real Time Strategy
License
GNU General Public License version 2.0 (GPLv2)

Windows Client

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



Starship Traders Resource Site

Your source for TLR and TLF



Windows client

I've written a demonstration client based on the windows client I've been using for nearly 3 years now. It has a 4096 line scrollback buffer, as well as a 4096 character radio and news buffer. There is also a starbase construction chart for the current game values in the last resort. The client connects on the client port of the server on port 666 and is essentially a telnet client, with buttons for movement to adjacent sectors, a radio mode to help keep track of your channel and a few buffers to keep track of events in the games, such as news. The telnet commands are easy to remember, and are available in the game by just pressing '?'. To use the client, your ship has to be configured with telnet hotkeys turned on. This is the default for new ships created in the game. The client connects to the last resort, but by recompiling the code you can get it to connect to any game by changing the appropriate values.

The executable with source can be downloaded here sstclient.zip. The program was compiled using LCC by creating a project which you add the sstmain.c and sstmain.rc files. Depending on other compilers used, you may have to link in the windows common controls library used by the tabbed window control and winsock2 library. Makefile.v is the makefile created by VIDE for the Borland free compiler, while makefile.win is the makefile created by dev-cpp using gcc compiler.

Finally fixed the thumbtrack bug!


Updated Sun Apr 24 13:53:29 EDT 2005

Space Tyrant Client

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



Starship Traders Resource Site

Your source for TLR and TLF



Space Tyrant Client

Space tyrant is the new open source game being developped by Ray Yeargin. The index page for all articles about the game, which links to future articles, is available at this link space tyrant. To try the space tyrant beta just click here telnet interface. Check back often, as new features are being added frequently. Please note, that everytime a new version is started, or the server is restarted, you start new.

An initial windows and a linux client using GTK-2 will be available shortly to allow those who wish to try space tyrant and connect to the server using something other than the telnet connection. For those wishing to try telnet connection, you can connect via windows by opening a command prompt via the accessories menu and typing "telnet ioresort.com 9999" in the command prompt box. Once there, just follow the prompts and when logged in, hit "?" for a list of available commands.

An experimental windows client is now available for download with source. You can get it here: wintyrant.zip. It's primarily designed for players used to a browser, since it provides clickable buttons for just about everything you would normally do in a game. There are still a few things that need to be done via the keyboard.

TLR Client

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


Starship Traders Resource Site

Your source for TLR and TLF



TLR Client

Many people have been asking that I release the client I used to play the current round of TLR. I've decided to release it "as is" in order to force me to get a new version written in C# for my personal use. The client being released was for my personal use and has never been released to anyone. As it was for my personal use, there are no instructions on how to use it. Features found in it have been added over a period of 3 years, and some features have not been used since CoC, so may not work in TLR or TLF. The actual executable is 71 KB in size and should run on any windows system from 98 and up, or Windows 95 provided the winsock 2 support download from Microsoft is installed. I would like to make it clear, this is not a BOT! Don't expect to start it and have it run unattended, it doesn't work that way. The navigation script for example will attempt to visit each sector in a galaxy, but it will stop everytime it sees something and in structured galaxies will run in a specific pattern that visits all sectors just once provided there are no obstacles. Below, is a screenshot of a running client.



The program connects to ioresort.com on port 666 by default. If you wish to connect to another game or port for testing or playing, you can create a shortcut and pass the ip address and port on the target line like this: "tlrclient.exe 192.168.0.18:666". The program executable is available here tlrclient.zip and is released "AS IS". All files should be placed in a single folder and run from there. The wave files are optional, and program will run without them; however, you will only get the default window's sound if you don't have the files in the executable's installation directory.

Mono/.NET 2.0 Client

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



Starship Traders Resource Site

Your source for TLR and TLF



Mono/.NET 2.0 Client

Below, is a screenshot of the .NET 2.0 client. Source code will be released shortly with both the .NET 2.0 project and the monodevelop project for running on linux with gtk-sharp. The mono project will also compile and run under mono on windows if the references to gtk-html are commented out. The mono client has an identical look and feel to the .NET 2.0 client with the exception of better looking buttons since gtk-sharp has native support for stock items for buttons.

Linux gtk+ Client

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



Starship Traders Resource Site

Your source for TLR and TLF



Linux gtk+ client

Program is nearly identical to the windows version of the client also released here. For a description of the client, check the description on the windows page. To compile the linux client, you will need gtk+-2 and pkg-config installed, as well as X11 (for those running OS X). If you're running OS X, it may require a bit of work to get things working from what I've found. I don't have a mac, so I'm only going on what I've seen googling on gtk and OS X. These are the defaults for most current linux distributions. The program source is available here gtkclient.zip 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. The client was compiled on slackware 9.1 and 10.1 using gcc with the following on the command line: gcc -Wall -o sstclient gtkmain.c `pkg-config --cflags --libs gtk+-2.0`



GNU General Public License Version 2, June 1991

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


Starship Traders Resource Site

Your source for TLR and TLF


GNU GENERAL PUBLIC LICENSE
         Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

       Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.
 
      GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)
 
These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
 
  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
 
  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

       NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

       END OF TERMS AND CONDITIONS
 
     How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

Easybot Source

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



Starship Traders Resource Site

Your source for TLR and TLF





/*******************************************************************************
*
* easybot V1.0 Utilising the sst structure and modified readnet routine from
*               Kat's sst client.  The free LCC compiler is used for compiling
*               source on windows machine, while gcc is used on linux platform.
*               This is a demonstration program for making a client connection.
*
* Copyright (C) 2005 Brian Estabrooks
*
* Comments can be sent to: sstdevelopment@videotron.ca
*
* Visit my Starship Traders Resource Site for updates and source code
* at http://pages.videtron.com/sst
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License. Full license
* can be found in gpl.txt
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
* Portions of code based on Kirellii.c
* (Adapted/Modified by David Johnson)
*
* Kirellii.c, copyright 2003, David Johnson
* this software is released under the terms
* of the GPL v.2.  See http://www.gnu.org/
* for details and a copy of the license.
*
* Which is based on:
* sst graphical client, vsn 0.12 (5/31/2001)
* --- sst.c, copyright 2001, Ray Yeargin ---
* this software is released under the terms
* of the GPL v.2.  See http://www.gnu.org/
* for details and a copy of the license.
*
*******************************************************************************/

#ifdef _WIN32

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <winsock2.h>

WSADATA *WsaData;

/* closesocket() is required to close a socket in windows */

#define close(x) (closesocket((x)))

#else

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>

/* Linked on linux using: gcc -Wall -o easybot easybot.c */

#endif

/*****************************************************************************/
int socfd;

void myInit(void);

void readnet(void);
void get_buff(void);

void sendcommand(char *string);
void sendstring(char *string);
void sendnumber(unsigned long number);

int login(char *name, char *pass);
void logout(void);

#define TIMEOUT 630

/******************************************************************************
* Kat's defines
******************************************************************************/

#define TEST_IP "192.168.0.18"
#define TEST_PORT 4022         /* starshiptraders.com port 1222 4022 */
#define DEST_PORT_COC 1222 /* Continuum of Chaos Game old SST port */

//#define DEST_IP "199.44.248.254"

#define DEST_IP "69.55.229.31" // ioresort.com
#define DEST_PORT_TLF 1866     // ioresort.com port The Last Frontier Game
#define DEST_PORT_TLR  666 // ioresort.com port The Last Resort Game

/******************************************************************************
* Kat's globals
******************************************************************************/

unsigned char inbuf[65536];

/******************************************************************************
* Bot globals
******************************************************************************/

char lineout[100];

FILE *lp; // pointer to the log file if used

int hotkeys=1,exitgame=0;

// *****************************************************************************
struct sectorlayout
{
  unsigned char head; // 239,240,...
  unsigned char headx; //
  unsigned char heady; //
  unsigned char headz; //
  struct flaglayout1 // miscellaneous flags to be renamed, used as needed
  {
      //ooops... 0, every eighth bit after must be unused to avoid tripping trailer byte!
      unsigned int unused1:1; //avoid tripping trailer byte check

      unsigned int statmod:1;
      unsigned int scooper:1;
      unsigned int plfinder:1;
      unsigned int supercomp:1;
      unsigned int scoutl:1;
      unsigned int scanner:1;
      unsigned int orbiter:1;

      unsigned int unused9:1;

      unsigned int navmod:1;
      unsigned int tractor:1;
      unsigned int hdlauncher:1;
      unsigned int f13:1;
      unsigned int yesno:1;
      unsigned int inteam:1;
      unsigned int incomm:1;

      unsigned int inpref:1;

      unsigned int onplanet:1;
      unsigned int inhwdepot:1;
      unsigned int ingreenport:1;
      unsigned int inrockmine:1;
      unsigned int intradingpost:1;
      unsigned int autopilot:1;
      unsigned int fixed:1;

      unsigned int inmessage:1;

      unsigned int nudgewarp:1;
      unsigned int inmenu:1;
      unsigned int inatakmenu:1;
      unsigned int inbunker:1;
      unsigned int inradio:1;
      unsigned int radio:1;
      unsigned int news:1;
      } flags;
  unsigned char type; // sector type... 0,1,3 ... 1=Nebula, 3=Black Hole x-3=Starbase #
  unsigned char porttype; // 0,1,2,3,4  (0 for none, 1 for rockmine, 2 for greenport, 3 for hardware, 4 for tradingpost?)
  unsigned char bcode; // 0,253,254
  unsigned char fcode; // 0,253,254

  unsigned char galnumb; // 1-255
  unsigned char debris; // 0-255
  unsigned char worm; // count ... read # times worm struct in loop:
  unsigned char planet; // 1==planet here

  //unsigned char fownername[25]; // 0 or 1 of these
  unsigned char shiptype; //0-18
  unsigned char shields;  //shields, 0-10
  unsigned char ccs;      //combat computers, 0-10
  unsigned char boosters; //0-25

  unsigned char hdevices; //0-25
  unsigned char ssttlr; //0-1... 0=Space, 1=TLR World
  unsigned char sparec2;
  unsigned char sparec3;

  unsigned int  myfighters; // fighters with ship

  unsigned short mynumber; // player number of player
  unsigned short spares0; // spare short int

  unsigned char sparec0[12]; // more spares...

  unsigned char portletter[6];//a-z, A-Z, $, ^, *, blank
  unsigned char sparec4[2];// spare chars
  unsigned char sign[20]; // empty or sector beacon
  signed short portprod[3]; // commodity productivities of port
  unsigned short ship; // count ... read # times ship struct in loop:
  signed short planprod[3]; // commodity productivities of planet
  unsigned short sauthor; // owner of graffiti -- for kill purposes
  unsigned short fowner; // owner of fighters/starbase in sector
  unsigned short spares; // spare short int
  unsigned long warp[6]; // hard warps 1-6 to other sectors
  unsigned long fighters; // number of fighters deployed in sector
  unsigned long number; // sector number
  unsigned long anti; // antimatter left
  unsigned long cash; // cash on hand
  unsigned char iron; // iron in holds
  unsigned char alc; // alcohol in holds
  unsigned char eqp; // hardware / equipment in holds
  unsigned char holds; // spare short int
}
sstsector; // 136 bytes long

// *****************************************************************************
struct shiplayout // loaded by loop of reads
{
  unsigned short size;
  unsigned short number;
  unsigned short holds;
  unsigned char ccs;
  unsigned char shields;
}
sstship[256];
// 8 (56?) bytes long (14K total?) ... eventually, this needs to occur more
// since up to 1600 ships(!) can be in a single sector

// *****************************************************************************
struct sstwormlayout // loaded by loop of reads
{
  unsigned long destin;
  unsigned long origin;
  unsigned long type;
}
sstworm[28];
// 12 bytes long
//  (eventually, this won't be an array, but will be looped through

// *****************************************************************************
void myInit()
{
  struct sockaddr_in dest_addr;

#ifdef _WIN32
  unsigned long data=1; // Value other than 0 will set socket to non-blocking
#endif

  if(socfd) close(socfd);

  printf("\nConnecting...\n");
  socfd=socket(AF_INET, SOCK_STREAM, 0);

#ifndef _WIN32
  fcntl(socfd, F_SETFL, O_NONBLOCK);
#else
  ioctlsocket(socfd, FIONBIO, &data); // Changes socket to non-blocking
#endif

  dest_addr.sin_family= AF_INET;
  dest_addr.sin_port= htons(DEST_PORT_TLR);

#ifdef TEST
  dest_addr.sin_addr.s_addr= inet_addr(TEST_IP);
#else
  dest_addr.sin_addr.s_addr= inet_addr(DEST_IP);
#endif

  memset(&(dest_addr.sin_zero),'\0',8);
  connect(socfd,(struct sockaddr *)&dest_addr,sizeof(struct sockaddr));
}

#ifdef _WIN32
/*<---------------------------------------------------------------------->*/
/* --- The following code comes from g:\lcc\lib\wizard\tcpini.tpl. */
// WSADATA *InitWS2(void)
// Routine Description:
//
// Calls WSAStartup, makes sure we have a good version of WinSock2
//
//
// Return Value:
//  A pointer to a WSADATA structure - WinSock 2 DLL successfully started up
//  NULL - Error starting up WinSock 2 DLL.
//
WSADATA *InitWS2(void)
{
  int           Error;              // catches return value of WSAStartup
  WORD           VersionRequested;   // passed to WSAStartup
  static WSADATA WsaData;            // receives data from WSAStartup
  BOOL           ReturnValue = TRUE; // return value flag

  // Start WinSock 2.  If it fails, we don't need to call
  // WSACleanup().
  VersionRequested = MAKEWORD(2, 0);
  Error = WSAStartup(VersionRequested, &WsaData);
  if (Error) {
      fprintf(stderr,"Could not find high enough version of WinSock");
      ReturnValue = FALSE;
  } else {

      // Now confirm that the WinSock 2 DLL supports the exact version
      // we want. If not, make sure to call WSACleanup().
      if (LOBYTE(WsaData.wVersion) != 2) {
        fprintf(stderr,"Could not find the correct version of WinSock");
        WSACleanup();
        ReturnValue = FALSE;
      }
  }
  if (ReturnValue)
      return &WsaData;
  return(NULL);

} // InitWS2()
#endif

// *****************************************************************************
void readnet()
{
  static int nlen=0;
  int bytesin=0,blen=0,ilen=0,slen=0,stop=0,termflag=241;
  time_t stime,etime;

  while(1) {
    stime = time(NULL);
    do {
      bytesin=recv(socfd,&inbuf[slen],65534-slen,0);
      if(bytesin>0) {
        slen+=bytesin;
        termflag=(int)inbuf[slen -1];
      }
      if(slen>=65534) {
        printf("readnet:Buffer overflow occured...\n");
        break;
      }
      etime = time(NULL) - stime;
      if(etime > TIMEOUT) {
        printf(" Timeout has occurred\n");
        exitgame = 1;
        stop = 1;
        break;
      }
    }
    while (termflag!=241);

    // This will log everything to a file
    if(lp && (slen-blen)) fwrite(&inbuf[blen],sizeof (char),slen-blen,lp);
    blen = slen;
    inbuf[slen]=0;

    if(slen) {
      while(ilen<slen) {
        while(inbuf[ilen] && inbuf[ilen]!=13 && nlen<98 &&
              inbuf[ilen]!=240 && inbuf[ilen]!=239) { // escape codes here...
          if (inbuf[ilen]==8) { // Backspace code

            ilen++;
            if (nlen>0) nlen--;
          } else if (inbuf[ilen]<239 && inbuf[ilen]>31) // escape code lower limit and control codes

            lineout[nlen++]=inbuf[ilen++];
          else
            ilen++;
        }
        lineout[nlen] = '\0';
        if(inbuf[ilen]==240) { //sstsector struct follows.
          if ((slen-ilen) < 136) {
            printf(" Read error: sstsector struct(%d) \x7",slen-ilen);
            break;
          }
          memcpy(&sstsector,&inbuf[ilen],sizeof(sstsector));
          ilen+=sizeof(sstsector);
          if(sstsector.ship) {
            if((slen-ilen) < (8*sstsector.ship)) break;
            memcpy(&sstship[0],&inbuf[ilen],8*sstsector.ship);
            ilen+=8*sstsector.ship;
          }
          if(sstsector.worm) {
            if((slen-ilen) < (12*sstsector.worm)) break;
            memcpy(&sstworm[0],&inbuf[ilen],12*sstsector.worm);
            ilen+=12*sstsector.worm;
          }
          stop = 1;
        } else if (inbuf[ilen]==239) { // nonsector struct follows...
          if ((slen-ilen) < 8) break;
          memcpy(&sstsector,&inbuf[ilen],sizeof(sstsector.flags)+4);
          ilen+=sizeof(sstsector.flags)+4;
          stop = 1;
        } else {
          if (inbuf[ilen]==0 || inbuf[ilen]==13) ilen++;
          //if (inbuf[ilen]==13)
          nlen = 0;
          //printf("%s\n",lineout);
        }
      }
    }
    if(stop || exitgame || slen >=65534) break;
    termflag = 0;
  }
}

// *****************************************************************************
void get_buff() //this will keep reading until something is read

{
  do {
    readnet();
  }
  while(!(strlen(inbuf)));
}

/******************************************************************************
* It's very important to send only one command at a time to server otherwise
* the bot will get stuck waiting in the get_buff or you will not be testing
* for the correct prompt when checking the lineout string.  When you return
* from this function, lineout should contain the prompt for current condition
* of bot on the server.  If hotkeys is not enabled, append return to execute
* command.  Be sure to set hotkeys variable to 0, if you have hotkeys turned
* off for your ship.  The default for new ships in the game is hotkeys on, so
* hotkeys is set to 1 in this code.
*
******************************************************************************/
void sendcommand(char *string)
{
  char command[128];
  int len;

  if(hotkeys) {
    len = strlen(string);
    send(socfd,string,len,0);
  } else {
    sprintf(command,"%s\r",string);
    len = strlen(command);
    send(socfd,command,len,0);
  }
  get_buff();
}

// *****************************************************************************
void sendstring(char *string)
{
  char command[128];
  int len;

  sprintf(command,"%s\r",string);
  len = strlen(command);
  send(socfd,command,len,0);
  get_buff();
}

// *****************************************************************************
void sendnumber(unsigned long number)
{
  char command[128];
  int len;

  sprintf(command,"%lu\r",number);
  len = strlen(command);
  send(socfd,command,len,0);
  get_buff();
}

/******************************************************************************
* login returns -1 if error, 0 if everything is ok
******************************************************************************/
int login(char *name, char *pass)
{
  myInit();
  get_buff();

  exitgame = 0;
  printf("Logging in...\n");
  sendstring(name);
  // Please enter your password:
  if(strncmp(lineout,"Please",6) == 0) {
    sendstring(pass);
    if(strncmp(lineout,"Please",6) == 0) {
      printf("Invalid password entered for: %s\n",name);
      return -1;
    }
  } else {
    // BART is not in my files -- are you a new user?  (Y/N) [N]
    printf("%.*s\n\n",strlen(lineout)-34,lineout);
    return -1;
  }

  // Handle events (required if you don't enter messages upon login)
  while(strncmp(lineout,"Press (Enter) to continue:",26) == 0)
    sendstring("");

  if(strncmp(lineout,"(Conf",5) == 0) { // In comm menu?
    sendcommand("G"); // Enter game
  }

  // Handle events (required if you enter messages upon login)
  while(strncmp(lineout,"Press (Enter) to continue:",26) == 0)
    sendstring("");

  return 0;
}

// *****************************************************************************
void logout()
{
  printf("Logging out...\n");
  if(hotkeys) sendcommand("QY"); /* Exception to single command sent */

  close(socfd); /* Just closing the socket will also work for logging out */
}

// *****************************************************************************
int main(int argc,char *argv[])
{
  char logname[30];

  if(argc < 3) {
    printf("\nUsage : %s name password\n",argv[0]);
    return 1;
  }

#ifdef _WIN32
  WsaData = InitWS2();
  if(WsaData == NULL)
    return 0;
#endif

  sprintf(logname,"%s.000",argv[1]);
  lp = fopen(logname,"wb");

  login(argv[1],argv[2]);

  logout();

  if(lp) fclose(lp);

#ifdef _WIN32
  WSACleanup();
#endif

  return 0;

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.

The Last Resort Starbase Construction Chart

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


Starship Traders Resource Site

Your source for TLR and TLF



Size Cost Defensive Attack
1 19000 50 30
2 38000 100 60
3 76000 200 120
4 152000 400 240
5 304000 800 480
6 608000 1600 960
7 1216000 3200 1920
8 2432000 6400 3840
9 4864000 12800 7680
10 9728000 25600 15360
11 19456000 51200 30720
12 38912000 102400 61440
13 77824000 204800 122880
14 155648000 409600 245760

Note: Construction cost is cost to build level indicated

The Last Frontier Starbase Construction Chart

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




Starship Traders Resource Site

Your source for TLR and TLF



Starbase Construction Chart (TLF)

Size Cost Defensive Attack
1 15000 50 30
2 30000 100 60
3 60000 200 120
4 120000 400 240
5 240000 800 480
6 480000 1600 960
7 960000 3200 1920
8 1920000 6400 3840
9 3840000 12800 7680
10 7680000 25600 15360
11 15360000 51200 30720
12 30720000 102400 61440
13 61440000 204800 122880
14 122880000 409600 245760


Note: Construction cost is cost to build level indicated
or cost to upgrade to next level