Find
You are looking at a command called feed
feed {object}
feed {object} with {object}
You can feed one object with another, or just feed an object.
feed the doggy
feed the goat with the cheese
Some objects will react to being fed
Created by
wolis
, last updated 18 Dec 2010
Code
get $target,$rel,$second in $loc;
if $second > 0 then usewith else chkone;
##chkone:
get $target in $loc;
if $target > 0 then doit else fail;
##doit:
clear $actor,all;
set $actor's host to $target;
set $actor's hosthow to 'feeding';
say 'feeds',"[$actor] feeds [$target]";
msg $loc,$actor,0,0,'force',"force:look $loc";
##usewith:
if $second's pwd ne "" then itslocked else putinside;
##itslocked:
say 'feedfail',"[$init_obj] tried to feed [$second] to [$target]!";
##putinside:
clear $actor,all;
set $actor's host to $target;
set $actor's hosthow to 'feeding';
say 'feeds',"[$init_obj] feeds [$target] $rel [$second]";
clear $second,all;
set $second's loc to $target; rem put the second object in the target;
msg $loc,$actor,0,0,'force',"force:look $loc";
##fail:
var $click_cmd to 'feed';
var $desc_intro to 'Click on the object you want to feed:
';
look $loc,list;
msg $loc,$actor,$actor,0,'force',"force:look $loc,list";