This is a very common and simple example of how to create a portable light source that can be carried by the player to provide light in dark rooms.
Portable Light (flashlight device) was created with Inform and has IFID B88B7063-D0CC-40E7-9986-B4371B8E1B22. To play a work like this one, you need an interpreter program: many are available, among them Zoom
for Mac OS X and for Unix; Windows Frotz or Windows Glulxe for Windows.