From the NannyMUD documentation

LAST CHANGE

2000-12-12

FUNCTION


NAME

        _signal_please_take_this - _signal_please_take_this - offer chance to refuse object

LOCATION

        Can be placed in any living object or container.

SYNTAX

        int _signal_please_take_this(object given_object);

DESCRIPTION

        When a player attempts to give a monster an item, this function is
        called in the monster.  If 1 is returned, then the give will not
        occur.  It is up to the monster to print out any useful messages
        (such as 'The orc refuses to take the foo.').  The same applies
        to 'put' and containers.

RETURN VALUES

        1 means the monster or container refuses to take the object.
        0 means the 'give' or 'put' proceeds normally (the default).

EXAMPLE

        //In a Coca-cola machine whose change slot is broken.

        int _signal_please_take_this(object o) {
          if( o->id("money") ) {
            write("The change slot is taped over.  You must use dollar bills.\n");
            return 1;
          }
          if( !o->id("dollar bill") ) {
            write("There's no way you can put "+o->short()+" into the\n"+
        	"coke machine!  Only a dollar bill will fit.\n");
            return 1;
          }
          if( o->query_value() > 1 ) {
            write("The machine spits your money back out.  It only will\n"+
        	"accept ONE dollar bills.\n");
            return 1;
          }
          return 0; /* Then it's a good old 1-dollar bill.  Accept it */
        }