door_trap.scr

lima-1.0b5/lib/domains/std/2.4.5/sub/door_trap.scr · 924 B

From the archive lima-1.0b5+driver.tar.gz

Download the archive   « Back to the archive contents

# Do not remove the headers from this file! see /USAGE for more info.

is=room
light=1
brief=Room with black walls
objects=
  welldoor=
    is=hidden door
    id=east door
    primary_id=door
    adj=wooden,well
    ident=well door
    destination=/domains/std/2.4.5/well.scr
    direction=east
  end
  innerdoor=
    is=hidden door
    id=west door
    primary_id=door
    adj=wooden,inner
    ident=inner door
    destination=after_trap.scr
    direction=west
    locked=wellkey
  end
end
---
void do_pull()
{
  object westdoor = present("west door", this_object());
  object eastdoor = present("east door", this_object());
  if(westdoor->query_locked()) {
    westdoor->set_locked(0);
    westdoor->set_closed(0);
    eastdoor->set_closed(1);
    eastdoor->set_locked("wellkey");
  } else {
    westdoor->set_locked("wellkey");
    westdoor->set_closed(1);
    eastdoor->set_closed(0);
    eastdoor->set_locked(0);
  }
}

Site Stats

Snippets: 1791
Codebases: 571