Example #1
0
void quest_cancel(  )
{
    if ( quest_mob )
        do_crusade( quest_mob, "Shoot! Just forget about recovering ANYTHING for me, ok?" );

    clear_quest(  );
    return;
}
Example #2
0
void quest_complete( CHAR_DATA * ch )
{
    char buf[MAX_STRING_LENGTH];

    snprintf( buf, MSL, qmessages[quest_personality][16].message1, ch->get_name(), quest_object->short_descr );
    do_crusade( quest_mob, buf );
    clear_quest(  );
    return;
}
Example #3
0
void quest_cancel()
{
   extern CHAR_DATA *quest_mob;
   extern bool auto_quest;
    if ( quest_mob )
       do_crusade( quest_mob, "{RShoot! Just forget about recovering ANYTHING for me, ok?{x", 9 );


    clear_quest();
    auto_quest = TRUE;
    return;   
}   
Example #4
0
 * quest_inform : Makes the questing mobile give out information to the
 * players on the mud.  Starts off real simple, and gets more helpful as
 * time runs out :P
 */

void quest_inform( void )
{
   char buf[MAX_STRING_LENGTH];
   extern CHAR_DATA *quest_mob;
   extern CHAR_DATA *quest_target;
   extern OBJ_DATA *quest_object;
   extern int quest_timer;
   extern sh_int quest_personality;
   extern const struct qmessage_type  qmessages[4][17]; 



   /* Work out what the mob should tell the players.... */
   /* Add random element to each case so quests look different each time? */
   if ( quest_timer < 7 )
   {
    sprintf( buf, qmessages[quest_personality][quest_timer].message1, quest_object->short_descr );
   }
   else
   { 
   if (quest_target)
	sprintf ( buf, qmessages[quest_personality][quest_timer].message1,
			 quest_target->short_descr,quest_object->short_descr );
   else
      sprintf( buf, qmessages[quest_personality][quest_timer].message2,
		 quest_object->short_descr );
   }



   quest_timer++;
   
   if ( quest_mob && quest_timer < 16 )
        do_crusade( quest_mob, buf, 9 );
	
   if ( quest_timer == 1 )
   {
     sprintf( buf, " {x%s{x is crusading for {x%s{x ", quest_mob->pIndexData->short_descr, quest_object->short_descr);
    /*
     info( buf, 5 );
     */
  }
   if ( !quest_mob )
   {
     clear_quest();
   }    
   return;
}
Example #5
0
void quest_complete( CHAR_DATA *ch )
{
   extern CHAR_DATA *quest_mob;
   extern bool auto_quest;
   extern OBJ_DATA *quest_object;
   extern sh_int quest_personality;
   extern const struct qmessage_type  qmessages[4][17]; 


   char buf[MAX_STRING_LENGTH];

   sprintf( buf, qmessages[quest_personality][16].message1, ch->name, quest_object->short_descr );

   do_crusade( quest_mob, buf, 9 );

  clear_quest();
  auto_quest = TRUE;
   return;
}   
Example #6
0
void quest_inform( void )
{
    char buf[MAX_STRING_LENGTH];

    /*
     * Work out what the mob should tell the players....
     */
    /*
     * Add random element to each case so quests look different each time?
     */
    if ( quest_timer < 7 )
    {
        snprintf( buf, MSL, qmessages[quest_personality][quest_timer].message1, quest_object->short_descr );
    }
    else
    {
        if ( quest_target )
            snprintf( buf, MSL, qmessages[quest_personality][quest_timer].message1,
                      quest_target->get_name(), quest_object->short_descr );
        else
            snprintf( buf, MSL, qmessages[quest_personality][quest_timer].message2, quest_object->short_descr );
    }



    quest_timer++;
    if ( quest_mob && quest_timer < 16 )
        do_crusade( quest_mob, buf );
    if ( quest_timer == 1 )
    {
        snprintf( buf, MSL, "%s is crusading for %s ", quest_mob->get_name(), quest_object->short_descr );
        info( buf, 5 );
    }
    if ( !quest_mob )
    {
        clear_quest(  );
    }
    return;
}
Example #7
0
void ask_quest_question( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    buf[0] = '\0';

    if ( !quest || IS_NPC( ch ) )
        return;

    if ( ( !str_cmp( argument, "who is the thief?" ) )
            || ( !str_cmp( argument, "who was the thief?" ) )
            || ( !str_cmp( argument, "what mob?" ) ) || ( !str_cmp( argument, "who stole the item?" ) ) )
    {
        if ( quest_mob )
        {
            if ( quest_timer < 7 )
            {
                snprintf( buf, MSL, "@@eI don't even know who stole it yet!@@N" );
            }
            else if ( quest_object && quest_target )
            {
                snprintf( buf, MSL, "@@NIt was %s @@N who stole my %s@@N.", quest_target->get_name(), quest_object->short_descr );
            }
        }
        else if ( quest_object )
        {
            snprintf( buf, MSL, "@@NDon't worry about who stole my %s@@N, he has recieved his just reward!",
                      quest_object->short_descr );
        }
        if ( quest_mob != NULL )
            do_crusade( quest_mob, buf );
        return;
    }

    if ( !str_cmp( argument, "what item?" ) )
    {
        if ( quest_mob && quest_object )
        {
            snprintf( buf, MSL, "@@NMy %s @@Nwas stolen from me.", quest_object->short_descr );
            do_crusade( quest_mob, buf );
            return;
        }
    }

    if ( !str_cmp( argument, "where are you?" ) )
        if ( quest_mob )
        {
            snprintf( buf, MSL, "@@NYou can find me in %s@@N, please hurry!!", quest_mob->in_room->area->name );
            do_crusade( quest_mob, buf );
            return;
        }

    if ( !str_cmp( argument, "where is the thief?" ) )
    {
        if ( quest_mob )
        {
            if ( ( quest_target ) && ( quest_timer > 7 ) )
            {
                if ( quest_timer < 10 )
                {
                    snprintf( buf, MSL, "@@NI don't really know where %s@@N is, let me try and find out.", quest_target->get_name() );
                }
                else if ( quest_target )
                {
                    snprintf( buf, MSL, "@@NI'm not really sure, but I THINK %s@@N is in %s@@N",
                              quest_target->get_name(), quest_target->in_room->area->name );
                }

            }
            else if ( ( quest_target ) && ( quest_timer <= 7 ) )
            {
                snprintf( buf, MSL, "@@eI don't even know who stole it yet!@@N" );
            }
            else
            {
                snprintf( buf, MSL, "@@NDon't worry about where the thief who stole my %s@@N is, he has recieved his just reward",
                          quest_object->short_descr );
            }
            do_crusade( quest_mob, buf );
        }
    }

    if ( !str_cmp( argument, "what level are you?" ) )
        if ( quest_mob )
        {
            int lvl = number_range( (quest_mob->level - 3), (quest_mob->level + 3) );
            snprintf( buf, MSL, "@@NI am somewhere around the level of %d!", lvl > 0 ? lvl : 1 );
            do_crusade( quest_mob, buf );
        }

    return;
}
Example #8
0
void do_relquest(CHAR_DATA* ch, char *argument)
{
    do_crusade(ch, argument);
}