object coffin "coffin"
{
article "a"
noun "coffin"
is openable open enterable container
before
{
xobject DoPutIn
{
if player in self and self is not open
{
Perform(&DoDrop, object)
}
else
return false
}
object DoLookIn
{
if player in self and self is not open
{
Perform(&DoLookAround)
}
else
return false
}
}
after
{
object DoOpen,DoClose
{
if player in self
{
if verbroutine = &DoClose and location = self
return false ! so location.after doesn't run this again
if self is not open
{
location = self
if not FindLight(location)
return false
"Closed."
}
else
{
"Opened."
location = parent(self)
}
if FindLight(location)
Perform(&DoLookAround)
return true
}
else
return false
}
}
in STARTLOCATION
capacity 100
}