An interactive fiction by Juhana Leinonen (2008) - the Inform 7 source text
|Part Trading stuff
Chapter Multitool -> Encyclopedia
Before giving the multitool to the creature when the multitool is not useful:
say "'I don't want this. It's rusted through,' you complain. [c]It was [italic type]free[roman type],[c] [the creature] snaps. 'Oh well, I guess I [italic type]could[roman type] find something else... ' It rummages through its sack. [c][rummage through misc items] Here, you can have this.'[line break][paragraph break]It hands you a dusty old book.";
remove the multitool from play;
hand the encyclopedia to the player;
stop the action.