mud/
mud/2.4.5/dgd/include/
mud/2.4.5/dgd/std/
mud/2.4.5/dgd/sys/
mud/2.4.5/doc/
mud/2.4.5/doc/examples/
mud/2.4.5/log/
mud/2.4.5/obj/Go/
mud/2.4.5/players/
mud/2.4.5/players/lars/
mud/2.4.5/room/death/
mud/2.4.5/room/maze1/
mud/2.4.5/room/post_dir/
mud/2.4.5/room/sub/
int parse_command(str, source, pattern, var1, var2 ...)
string str;
object source;      /* Object OR array holding objects */
string pattern;

Parses commands given in "str" against the pattern in "pattern" and
returns 1 if it matches. "source" is either an object or an array of objects.
This is essentially a 'hotted' sscanf and it has a similar syntax, although
parse_command works on word basis where sscanf works on character basis.

"str"		Given command

"source"	if arr	array holding the accessible objects
		if ob	object from which to recurse and create
			the list of accessible objects, normally
			ob = environment(this_player())

"pattern"	Parsepattern as list of words and formats:
		Syntax:
			'word' 		obligatory text (One word)
			[word]		optional text (One word)
			/		Alternative marker
			%o		Single item, object
			%l		Single living object
			%s		Any text (multiple words)
			%w              Any word
			%p		Preposition
			%i		Any items
			%d              Number 0- or tx(0-99)
		Example string = " 'get' / 'take' %i "
		Items as in %o and %i can on many forms, some examples:
			apple, two apples, twentyfirst apple
			apples, all apples, all green apples, all green ones

"varN"		This is the list of result variables as in sscanf
		One variable is needed for each %_
		The return types of different %_ is:
		%o	Returns an object
		%l	Returns an object
		%s	Returns a string of words
		%w      Returns a string of one word
		%p	Can on entry hold a list of word in array
			or an empty variable
			Returns:
			   if empty variable: a string
			   if array: array[0]=matched word
		%i	Returns a special array on the form:
			[0] = (int) given numeric prefix
			       =0: all or a pluralform given
			       >0: numeral given: two, three, four...
			       <0: order given: second, third ...
			[1..n] (object) Objectpointers
			       A list of the POSSIBLE objects that can match
			       the given %i. No choosing of third or such.
		%d      Returns a number
			
Example:

a=parse_command("take apple",environment(this_player()),
	 " 'get' / 'take' %i ",items);