Find
You are looking at a command called pack
Created by
wolis
, last updated 24 Dec 2006
Code
get $target in $loc;
if $target > 0 then setupwrap else fail;
##chklock:
if $pw like $target's pwd then setupwrap else itslocked;
##setupwrap:
var $text to 'package'; rem all the same so you can wrap several things into the one parcee;
runsub wrapit;
##wrapit:
var $present to $target; rem remember the original target as new clobbers this variable;
new $text; rem create the new parcel;
set $new_id's colour to "$clr";
set $new_id's qty to 1; rem make sure there is only one parcel if one already existed;
set $new_id's info to "please
unwrap it
";
clear $present,all;
set $present's loc to $new_id; rem put target in the parcle;
set $present's pose to 'hidden';
msg $loc,$actor,0,0,'force',"force:look $loc";
say 'wraps',"[$actor] wraps up [$present] in [$new_id]";
##colourit:
var $clr to 'chocolate';
set $new_id's colour to "$clr";
##testcode:
rem someday you can 'wrap the ball in a present';
get $target,$rel,$text in $loc;
if $text eq '' then chkone else wrapit;
##chkone:
##itslocked:
say 'wrapfailed',"[$actor] could not wrap [$target] because it's locked";