Re: [NEWBIE] NPCs that tell PCs

From: Daniel A. Koepke (dkoepke@circlemud.org)
Date: 04/05/02


On Fri, 5 Apr 2002, Moppe Sewerin wrote:

> I was just wondering: How do I make a mob tell a player something?

I assume you'd want them to respond in reaction to something.  For that,
you'll need a special procedure, mob progs, DGscripts, or some other
device of your own creation.  If you have the mobile as the pointer 'mob'
and the character you want to send the tell to as the pointer 'ch', then
either of the following will suffice in a special procedure:

    if ( is_tell_ok(mob, ch) )
        perform_tell(mob, ch, "Whatever I want to tell ...");

or

    sprintf(buf, "%s Whatever I want to tell ...", GET_NAME(ch));
    do_tell(mob, buf, find_command("tell"), 0);

For examples of the latter, note that the shopkeepers in stock CircleMUD
sometimes tell potential shoppers things using the same method: see
shop.c.

If you have DGscripts or mob progs, one would imagine you just have the
mobile tell the player in the same manner one forces the scripted mobile
to do anything.  I might recommend attempting to install DGscripts if you
don't know C well enough to work with special procedures.

-dak

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT