I want to have the player come across a piece of paper, on which is a random 4 digit code. The player then must use that code to open a safe.
So basically, same as the example in “Safety” of section 9.2 of the inform recipe book, except that the number that needs to be spun to would be different every playthrough.