New transship

Though its not in the base code, the widely used version of this snippet was developed by Gavin Mogan.
We ( Greven and Gavin) have added some handy functionality to it. With the standard code, you can move 
a ship to a specific vnum. This one allows, if no vnum is used, to trans it to you, similiar like 
do_transfer on characters. We have also added being able to move a ship into a specific starsystem 
with random coordinates.

Just replace your current version with this one, or if you don't have one, add it into space.c and 
add the command entries into mud.h and tables.c


/*************************************************
**************************************************
**	Transfering Ships By Command		**
**						**
**	By Gavin Mogan				**
**************************************************
**************************************************
**	Star Wars: Unknown Regions		**
**	Telnet://swruk.dhs.org:5555		** ( Currently this mud is unavailable )
**	http://www.halkeye.net			**
**	Email: halkeye@halkeye.net		**
**************************************************
**************************************************
**	Put do_transship in tables.c		**
**	and in mud.h				**
**	and if nesseccary, any where else	**
**************************************************
**************************************************/

/*
 * New Transship function
 * Coded by Gavin and Greven of Dark Warriors
 * Original credits Above
 */

void do_transship( CHAR_DATA *ch ,char *argument )
{
	char arg1[MAX_INPUT_LENGTH];
	char arg2[MAX_INPUT_LENGTH];
	int  arg3;
	SHIP_DATA *ship=NULL;
	SPACE_DATA *starsystem=NULL;
    
	if ( IS_NPC( ch ) )
	{
		send_to_char( "Huh?\n\r", ch );
		return;
	}

	argument = one_argument( argument, arg1 );
	argument = one_argument( argument, arg2 );


	if ( arg1[0] == '\0' )
	{
		send_to_char( "Usage: transship <ship>\n\r", ch );
		send_to_char( "Usage: transship <ship> <vnum/system>\n\r", ch );
		return;
	}

	ship = get_ship( arg1 );

	if ( !ship )
	{
		send_to_char( "No such ship.\n\r", ch );
		return;
	}

	if (arg2 && arg2[0] != '\0')
		starsystem = starsystem_from_name(arg2);

	if ( (!arg2 || arg2[0] == '\0') && ch->in_room )
		arg3 = ch->in_room->vnum;
	else
		arg3 = atoi( arg2 );

	if (ship->starsystem)
        	ship_from_starsystem( ship, ship->starsystem );  
	if ( starsystem )
	{
		extract_ship(ship);
		ship_to_starsystem(ship, starsystem);
		ship->shipyard = 0;
		ship->location = 0;
		ship->shipstate = SHIP_READY;
		ship->vx = number_range(-5000, 5000);
		ship->vy = number_range(-5000, 5000);
		ship->vz = number_range(-5000, 5000);
	}
	else
	{
		ship->shipyard = arg3;
     		ship->shipstate = SHIP_READY;
     
		if ( ship->ship_class != SHIP_PLATFORM && ship->type != MOB_SHIP )
		{
			extract_ship( ship );
			ship_to_room( ship , ship->shipyard ); 
			ship->location = ship->shipyard;
			ship->lastdoc = ship->shipyard; 
			ship->shipstate = SHIP_DOCKED;
		}
	}

	save_ship(ship);               
	send_to_char( "Ship Transfered.\n\r", ch );
}