From the NannyMUD documentation

LAST CHANGE

2000-12-12

FUNCTION


NAME

        _signal_take_from_inv - _signal_take_from_inv - offer monster/container a chance to hold on to an object

LOCATION

        Can be placed in any living object or container.

SYNTAX

        int _signal_take_from_inv(object taken_object);

DESCRIPTION

        When a player gets, gives, drops, puts an object from one environment
        into another this signal will be called in the environment the object
        currently is located. The environment will be asked if it is willing to
        let the object be moved from it's inventory.
        If 1 is returned the object will not be moved.
        If 0 is returned, the give, drop, etc. will proceed as normal (default).

RETURN VALUES

       1 means the monster or container refuses the object to leave its inventory.
       0 means the 'give', 'drop', 'put' or 'get' proceeds normally (the default).

EXAMPLE

        //In a Coca-cola machine that contains coke and the money you put into it.

        int _signal_take_from_inv(object o) 
        {
          if (!o->id("coke"))
          {
             write("You can only take coke from this machine.\n");
             return 1;
          }
          return 0; /* Someone is trying to take coke from us, that is okey */
        }

SEE ALSO

        _signal_please_take_this in lfun/_signals/_signal_please_take_this