Ok, here's what I got. I'm trying to make a call command to call a public ship to a landing pad.. right now i am in testing phases and i know this code is incomplete as far as checking room flags...
Here is the code.
Now what it is doing is calling all the public ships into the room, I want it to call a random public ship to the room, or call them in order each time the command is issued. I'm not sure if there is a function that will pull one from the list alone. any help will be apprieciated.
Here is the code.
void do_call( CHAR_DATA *ch, char * argument)
{
SHIP_DATA *ship;
for ( ship = first_ship; ship; ship = ship->next )
{
if ( !str_cmp( ship->owner , "Public" ) && !IS_SET(ship->flags, SHIP_SIMULATOR ) )
{
if (ship->class > CAPITAL_SHIP)
continue;
if (ship->type == MOB_SHIP)
continue;
transship(ship, ch->in_room->vnum);
}
}
}
Now what it is doing is calling all the public ships into the room, I want it to call a random public ship to the room, or call them in order each time the command is issued. I'm not sure if there is a function that will pull one from the list alone. any help will be apprieciated.