An interactive fiction by Juhana Leinonen (2008) - the Inform 7 source text
|Chapter Empty encyclopedia -> Motor oil
Before giving the encyclopedia to the creature when the encyclopedia is not useful:
if something is in the encyclopedia:
say "(first taking [the list of things in the encyclopedia] out from the box)[command clarification break]";
now the player carries everything in the encyclopedia;
if the article is a part of the encyclopedia:
say "One page comes off the encyclopedia and flutters on the floor.[paragraph break]";
now the article is in the cell;
say "'Can I have something else instead?' you carefully ask. [c]Not enough pictures, eh? Well, I'll trade it in but I can't give you anything as nice this time. [rummage through misc items] This'll do.'
It gives you a can of motor oil.
"; [for some reason you need the two extra line spaces here, or there will be none printed. [paragraph break] doesn't work.]
remove the encyclopedia from play;
hand the motor oil to the player;
stop the action.