Find
You are looking at a command called unwrap
unwrap {object}
Unwrap an object and get the things which were wrapped up inside it.
eg:
unwrap the present
If the object you are unwrapping contained nothing, then nothing happens.
If the object you are unwrapping contains something then the contaniing object is deleted (discarded old wrappings.. who needs them)
You can not unwrap something if it is locked.
Created by
wolis
, last updated 03 Feb 2007
Code
get $target in $loc;
if $target > 0 then chklock else fail;
##chklock:
if $pw like $target's pwd then unwrapit else itslocked;
##unwrapit:
set $foundone to 0;
say 'unwraps',"[$init_obj] starts to unwrap [$target]";
foreach in $target do extractit;
if $foundone > 0 then cleanup else nopresents;
##cleanup:
clear $target,all;
unhost $target;
set $target's loc to 0; rem delete it;
say 'unwrapfinish',"[$init_obj] cleans up the discarded wrappings";
msg $loc,$actor,0,0,'force',"force:look $loc";
##nopresents:
say 'unwrapfailed',"[$init_obj] fumbles with [$target] and finds it is unwrappable";
##extractit:
set $for_id's loc to $loc;
clear $for_id,all;
var $how to (gasps in surprise at,giggles with glee at,shrieks with delight at,blinks in amazment at,is genuinely impressed with,is amazed by,is shocked by,is delighted with);
say 'present',"[$init_obj] $how [$for_id]";
var $foundone to 1;
##fail:
if $counter > 0 then exit else listall;
##listall:
var $click_cmd to 'unwrap';
var $desc_intro to 'Click on the object you want to unwrap:
';
look $loc,list;
msg $loc,$actor,$actor,0,'force',"force:look $loc,list";
##itslocked:
say 'unwrapfailed',"[$actor] could not unwrap [$target] because it's locked";