"Basic People and Animals" by John Timmons
The release number is 1. The story creation year is 2007. The story headline is "Creating men, woman, and animals". The story description is "This demonstrates how we create men and women to populate a game. Also how we create animals and specific ones such as a cat that will follow you from room to room."
Release along with the source text and a website.
The Foyer is a room. "A small simple room with one exit to the north."
The Kitchen is north of Foyer. "Your standard kitchen. To the east is the side porch."
The Side Porch is east of the Kitchen. "The porch is screened-in making it a nice place to be on summer nights."
[Here we create a man named Mr Smith. We include the understand rule so that the player can also refer to him as Ed.]
Mr Smith is a man in the Kitchen. The description is "Mr Smith (call him Ed) is a middle-aged guy who looks like he hasn't missed many meals in his lifetime." Understand "Ed" as Mr Smith.
[Here we create a woman called Ann.]
Ann is a woman in the Foyer. The description is "Ann is a young woman engrossed in some magazine."
[Here we create a male animal but only its description reveals that it is a dog. The player won't know the difference.]
Ralphie is a male animal in the Kitchen. The description is "Ralphie, a black lab, sleeps quietly in the corner." Understand "dog" as Ralphie.
[Not necessary but you can define what kind of animal to make it clearer to program. Here we define a cat.]
A cat is a kind of animal.
Zen is a female cat in the Foyer. The description is "Zen is a small brown and white tiger cat." Understand "cat" as Zen.
[Here we check every turn to see if Zen is around and, if she is not, Zen is moved to the location of the player. In other words, she follows the player everywhere.]
Every turn:
if Zen is not visible begin;
move Zen to the location of the player;
say "Zen follows you into the room.";
end if.