deep_present

sefun
SYNOPSIS
	object deep_present(string|object str)
	object deep_present(string|object str, object ob)

DESCRIPTION
	This function works similar to the efun present(), but searches
	through the complete, nested inventory, including all objects
	contained in other objects.

	The object searched for, <str>, may be given as a string <str> or
	by the object itself. If it is given as string, the lfun id()
	is called with <str> as argument in all objects until one call
	returns non-zero.

	The object is searched in the inventory of <ob>, or in the
	inventory of this_object() if <ob> is not given.

	Result is either the object searched for, or 0 if no such
	object has been found.

EXAMPLE
	// Test if this_player() carries this_object() somewhere
	if (deep_present(this_object(), this_player()))
          ...do something...

	// Test if this_player() carries the object with the given
	// id-string somewhere, e.g. a quest object.
	if (deep_present("id453", this_player()))
	  ... do something...

SEE ALSO
	move_object(E), environment(E), this_object(E), present(E),
	present_clone(sefun), id(A), init(A)