Re: [CODE] Identifying mobs in spec. procs.

From: George Greer (
Date: 11/29/00

On Wed, 29 Nov 2000, Andrej Kacian wrote:

>On Wed, 29 Nov 2000, George Greer wrote:
>> On Wed, 29 Nov 2000, Andrej Kacian wrote:
>> >I have a slight problem. I need to use do_ commands on mobs (so that mobs
>> >can talk, shout, move, etc.), but can't find way to assign mob to struct
>> >char_data.  Is there any function for it?
>> They already have one.
>Hmm... I meant for referring to them in for example do_give commands...

You don't have to do anything special.

        do_give(ch, "bag puff", 0, 0);


        struct char_data *mob = get_char_room("puff", NULL, ch->in_room);

There's get_(char|player)_(room|world) when you want to distinguish.

NOTE: Some ACMD()'s check for mobiles and won't do anything either because
it doesn't make sense (e.g., "quit", "toggle", "reply") or to prevent abuse
(some MUDs disallow charmies from using "gossip" and "shout").

George Greer

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 04/11/01 PDT