# By Randolph Chung <rc42@cornell.edu>
#
# Note that you'll have to collapse the verbcode commands into a single line.

create $thing named fido

teach fido to feed this any any
verbcode fido feed "$this=shift; $verbcall=shift; $n=$this->name;
	@r=('Ruff, ruff!', $n.' rolls around on the floor',
	    '<Pant> '.$n.' wants more...', $n.' is dripping saliva (Yuck!)');
	$this->location->announce(undef, $verbcall->caller->name.' feeds '.
	$n.'. '.$r[rand(100)%($#r+1)])"

teach fido to pat this any any
verbcode fido pat "$this=shift; return $this->name.' looks very comfortable'"

teach fido to look this
verbcode fido look "$this=shift; $n=$this->name;
	@r=($n.' looks hungry. He begs you to feed him',
	    $n.' rolls around on the floor',
	    $n.' is shedding! there\'s hair everywhere....',
	    'Scratch, scratch. '.$n.' looks really itchy',
	    'Will someone take '.$n.' for a walk?');
	$this->location->announce(undef, $r[rand(100)%($#r+1)])"

teach fido to fetch any
verbcode fido fetch "$this=shift; $verbcall=shift; return $this->name. 
	' runs back excitedly with the '.$verbcall->word('direct_object')"

teach fido to send this to any
verbcode fido send "$this=shift; $verbcall=shift;
	$io=$verbcall->indirect_object; if ($io) {$io->tell('Fido looks at you
	expectantly'); return $this->name.' runs to '.$io->name.' wagging his tail'}
	return 'Fido can't find '.$verbcall->word('indirect_object');"

teach fido to walk this
verbcode fido walk "return 'Fido jumps up and down in anticipation. (later)
	Pant .. pant... pant...'"
