Hrm ok well I got SWR 1.0 working, fixed the score bug added tractorbeams and openbay/closebay and edited the who list and wizlist colors, YAY for me :P
Well NOW I'm trying to install a ship hailing code, so:
Ship1 hails Ship2: Hello.
Ship2 hails Ship1: Hi, how are you.
But when I try hailing inside the game i get both the:
You sent: Hello
Ship1 sent: Hello
Dunno whats wrong, I'm gonna post the Hailing code right here:
Well NOW I'm trying to install a ship hailing code, so:
Ship1 hails Ship2: Hello.
Ship2 hails Ship1: Hi, how are you.
But when I try hailing inside the game i get both the:
You sent: Hello
Ship1 sent: Hello
Dunno whats wrong, I'm gonna post the Hailing code right here:
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include "mud.h"
void do_hale( CHAR_DATA *ch, char *argument )
{
SHIP_DATA *ship;
SHIP_DATA *ship2 = ship_from_cockpit( ch->in_room->vnum );
int count;
int top_num=15;
int vnum[top_num];
DESCRIPTOR_DATA *i;
CHAR_DATA *och;
char buf[MAX_STRING_LENGTH];
char buf1[MAX_STRING_LENGTH];
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg1 );
strcpy(arg2,argument);
if (arg1[0] == '\0' || arg2[0] == '\0')
{
send_to_char ("Syntax: Hail <ship> <message>\n\r", ch);
return;
}
ship = get_ship( arg1 );
send_to_char ("\n\r", ch);
if (!ship)
{
send_to_char ("No Such Ship!\n\r", ch);
return;
}
if (!ship2)
{
send_to_char("But your not in a cockpit!\n\r", ch);
return;
}
sprintf (buf, "&R(&BHAIL&R) &G&W%s sent: %s\n\r", ship2->name, arg2);
sprintf (buf1, "&R(&BHAIL&R) &G&WYou Send: %s\n\r", arg2);
send_to_char(buf1, ch);
sprintf (buf1, "&g%s adjusts some settings on the comm system and says something", ch->name, arg2);
act( AT_GREEN, buf1, ch, NULL, NULL, TO_NOTVICT );
vnum[0] = ship->cockpit;
vnum[1] = ship->pilotseat;
vnum[2] = ship->gunseat;
vnum[3] = ship->coseat;
vnum[4] = ship->navseat;
vnum[5] = ship->turret1;
vnum[6] = ship->turret2;
for (i = first_descriptor; i; i = i->next)
{
if (!i->connected && i->character)
{
och = i->original ? i->original : i->character;
}
for( count=1; count <= top_num; count = count + 1 )
{
if (och->in_room->vnum == vnum[count])
{
send_to_char(buf, och);
break;
}
}
}
}