Notebook help!

Hi all! So I want the player to have a notebook which contains ominous little messages that appear at certain points in the game. For example, the player may step into the cellar and then a new line appears in the journal. I also want the player to be able to be able to view all the previous entries into the notebook whenever they wish.

This is what i have so far:

[code]A thing has some text called printing. The printing of a thing is usually “blank”.
Understand the command “read” as something new. Understand “read [something]” as reading. Reading is an action applying to one thing, requiring light. Check reading: if the printing of the noun is “blank”, say “Nothing is written on [the noun].” instead. Carry out reading: say “You read: [line break][printing of the noun][line break]”. Report reading: do nothing.

The notebook is a thing in the bedroom. The description is “Tattered round the edges, clearly you take this wherever you go”. The printing of the notebook is “While the moon shines bright and the clouds stay parted, [line break] the night may come but you will never walk in darkness.”.[/code]

The simplest way would be to set up the text of the notebook with each section that can tell if the text has been encountered and decide whether or not to print it.

[rant=example][code]A thing has some text called printing. The printing of a thing is usually “”.

Understand the command “read” as something new. Understand “read [something]” as reading. Reading is an action applying to one thing, requiring light.

Check reading: if the printing of the noun is “”, say “Nothing is written on [the noun].” instead. Carry out reading: say “You read: [line break][printing of the noun][line break]”. Report reading: do nothing.

Bedroom is a room. “This gloomy bedroom will have to do.”

The notebook is in bedroom. The description is “Tattered round the edges, clearly you take this wherever you go. It might be something worth a READ.”. The printing of the notebook is “While the moon shines bright and the clouds stay parted, [line break] the night may come but you will never walk in darkness.[italic type][T-bed][T-lantern][T-chest][roman type]”.

To say T-bed:
if we have examined the bed:
say “[paragraph break]This bed won’t do, will it?”

To say T-lantern:
if the player carries the lantern:
say “[line break]You think that little spark of light will avert the doom in your path? Ahahahahahaha. HA HAHAHAHAHAHA.”

To say T-chest:
if we have opened the chest:
say “[line break]Disappointing when such a promising chest is devoid of a heart, eh, my mortal friend?”

A bed is an enterable supporter in bedroom. The description is “Lumpy, but it will have to do.”

A lantern is in bedroom. It is lit. “A feeble glow emanates from a lantern on a hook on the wall.” The description is “This lantern glows very dimly, you hope it will be enough to see you through the horrors that wait ahead.”

A chest is an openable, closed container in bedroom. The description is “[if we have not opened chest]Ah, there must be something hidden in here.[otherwise]It’s a chest. Perhaps you can store things in it, like socks.[end if]”
[/code]

[/rant]

If you want the text snippets to appear in the order encountered in the game, you will need to do it with a table and poke each text into the next blank line as you go. I’m not a big user of tables, so someone will surely chime in with a better way.

If you want the lines to appear in the order the player encountered them:

After going to the unvisited cellar: now the printing of the journal is the substituted form of "[printing of the journal][paragraph break]Then I went into the cellar.

If you don’t care about that:

Instead of examining the journal:
    say "This is a journal.";
    if the cellar is visited, say "You went into the cellar.";
    [etc]