Re: [CODE] Advice with Mob Special

From: Daniel Koepke (
Date: 02/01/97

On Sun, 2 Feb 1997, Ron Hensley wrote:

> That being said, I know, or 'think' mob specials get triggered basically 
> whenever anyone types a command whithin a room with a mob. I know ive 
> seen them catch what command was spoken using CMD_IS("string");
> However im sitting here scratching my head how to tell the mobs just been 
> given something, and to therefore take a look at whats been given it, 
> money? how much? an object? what object?

You're perhaps thinking about it in the wrong way.  What you want to
do is catch what is about to be given to the mobile.  You do the CMD_IS
check, copy some of the code from do_give to the spec_proc so you get
all the functionality of the do_give, and have the actual object.

A perhaps more flexible manner would be to implement spec proc *types*
which would be flagged on the mob.  Then you can do checks and call the
appropriate spec proc when the mobile is actually given something,
instead of using the above method.  I think this manner would be much
more elegant and make it rather trivial to implement spec procs like
the ones you mention above.  Still would require some changing about
the code, though.

Daniel Koepke
Forgive me father, for I am sin.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST