/***************************************************************************\
[*]    ___    ____   ____   __   __  ____ [*]   ROGUE: ROM With Attitude  [*]
[*]   /#/ )  /#/  ) /#/  ) /#/  /#/ /#/   [*]    All rights reserved      [*]
[*]  /#/ <  /#/  / /#/ _  /#/  /#/ /#/--  [*]   Copyright(C) 2000-2001    [*]
[*] /#/   \(#(__/ (#(__/ (#(__/#/ (#(___  [*] Kenneth Conley (Mendanbar)  [*]
[*]  Expression of Digital Creativity..   [*]  scmud@mad.scientist.com    [*]
[-]---------------------------------------+-+-----------------------------[-]
[*] File: race_look.c                                                     [*]
[*] Usage: look human to look at a human in the same room                 [*]
[*] From: rogue.dyn.dhs.org:3033                                          [*]
\***************************************************************************/

Allows the usage of "look elf" or any other valid race to look at a PC
within the same room as the character who is doing the look.

New version is more modular and allows you to use it in more than one
place in the code, try looking at give, kill.

in act_info.c add:
    if ( (victim = get_char_room( ch, arg1 ) ) != NULL)
    {
        show_char_to_char_1(victim, ch );
        return;
    }

+    if ( (victim = get_race_room( ch, arg1 ) ) != NULL)
+    {
+	show_char_to_char_1(victim, ch );
+	return;
+    }


in handler.c add:
+/*
+ * Find a race_char in the room by Mendanbar
+ */
+CHAR_DATA *get_race_room(CHAR_DATA *ch, char *argument)
+{
+    char arg[MAX_INPUT_LENGTH];
+    CHAR_DATA *rch;
+    int number, count;
+
+    number = number_argument(argument, arg);
+    count = 0;
+
+    for ( rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room )
+    {
+	if (!can_see(ch, rch) || !(rch->race == race_lookup(arg))
+	|| (rch == ch))
+		continue;
+	if (++count == number)
+		return rch;
+    }
+    return NULL;
+}


in merc.h add:
CD *	get_char_room	args( ( CHAR_DATA *ch, char *argument ) );
+CD *	get_race_room	args( ( CHAR_DATA *ch, char *argument ) );
CD *	get_char_world	args( ( CHAR_DATA *ch, char *argument ) );

// End snippet....


-------
With any luck you can make one of these useful..
Thanks for the challange.... Compile, reboot, and enjoy!
-Mendanbar <scmud@mad.scientist.com>
telnet://rogue.dyn.dhs.org:3033