/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
/*
** Player/monster locator device, given as a 'taster'
** of high-tech equipment to new players in the home
** domain city.
**
** Newstyle, 21/11/93
*/

inherit "/std/object";

void setup()
{
    set_name("box");
    set_short("mysterious metal box");
    add_adjective( ({"mysterious", "metal"}) );
    set_long("Studying the mysterious metal box more "
            +"closely, you discover a switch on one "
            +"side of it that when touched causes a small "
            +"panel to light up. Beneath this panel are a "
            +"number of buttons marked with strange letters. "
            +"From what little you can make of them, you deduce "
            +"that this is a device capable of 'locate'ing "
            +"living creatures.\n");
    set_weight(4);
    set_value(10000);
}

void init()
{
    ::init();
    add_action("do_locate", "locate");
    add_action("my_help", "help", 1);
}

int my_help(string str)
{
    if(str != "box" && str != "metal box" &&
       str != "mysterious box" && str != "mysterious metal box" )
       return 0;
    write("The mysterious metal box seems to be a device "
         +"to locate living creatures. You could try to use it with "
         +"'locate <name>'.\n");
    return 1;
}

int do_locate(string str)
{
    object who;

    say(this_player()->query_cap_name()+
        " fiddles about with "+
        this_player()->query_possessive()+
        " mysterious metal box.\n");
    if(!str)
    {
      notify_fail("The box bleeps quietly to itself before "
                 +"its screen displays the message : 'locate "
                 +"what?'\n");
       return 0;
    }
    str = (string)this_player()->expand_nickname(str);
    str = lower_case(str);
    who = find_living(str);
    if(!who || !environment(who))
    {
       notify_fail("Several lights flash briefly on the "
                  +"mysterious metal box, then it's screen "
                  +"gives you the message : 'Cannot find "
                  +"specified being'\n");
        return 0;
    }
    write("The mysterious metal box hums slightly, then "
+"displays :\n     'Being "+who->query_cap_name()
         +" located in "
         +environment(who)->query_short()
         +".'\n");
    return 1;
}