I found an NPC file called Polly, for my StoryManager module. But she was not for the Asgard game, she was written for "Colours", much earlier.
Rob
Class Script
with
current_script NULL,
last_script NULL,
next_script holding_pattern,
number 0,
each_turn [; rfalse; ],
PlayScript [; rtrue; ],
;
Script holding_pattern “holding pattern”
with
PlayScript [ wait_time; if ( self hasnt general ) rtrue;
give self ~general;
wait_time = Polly.number - 1;
Polly.number = 0;
if ( wait_time == 0 or 1 )
"~Now,~ says Polly. ~What was it that you were just asking about?~ ";
print "^~Oh!~ Polly says. ~Wasn't there something you were going to ask
me about";
if ( wait_time > 60 ) ", ages ago?~";
switch( wait_time ) {
2 to 5: print " just now";
6 to 20: print " a little while ago";
21 to 40: print " a few minutes ago";
41 to 60: print ", five or ten minutes ago";
}
"?~";
],
;
Script wait_to_greet “wait to greet”
with
next_script introductions,
PlayScript [;
self.number++;
switch( self.number ) {
1: "^~Oh! Hello there. My name is Polly. What’s yours?~ she says. ";
3: "^~Do you speak English? What’s your name?~ she asks again. ";
5: "^~So, you still haven’t told me your name,~ she says sternly. ";
6: give self done; self.next_script.number = 3;
"^Fine, be that way,~ says Polly.^
~I’m Colin,~ you finally blurt out. ";
}
rtrue;
],
;
Script introductions “introductions”
with
next_script what_you_remember,
PlayScript [;
self.number++;
switch( self.number ) {
1: "^~Hello Colin. It’s nice to meet you.~ ";
2: "^Polly stares at you with curiosity. ";
3: "^Polly says, ~You aren’t so much like the other people here,
are you?~^^
~Neither are you,~ you say. ";
4: "^~Where are you from?~ Polly asks.^
~London,~ you say. ~Where are you from?~ ";
5: "^~Dover,~ she says.^
~Really? I didn’t think anyone actually lived in Dover.
I thought people just visited there on holiday.~ ";
6: give self done;
"^Polly laughs. ~Don’t be silly. Of course people live there.
Actually, I’m not from Dover proper. Just a little village
to the west of it, but it’s near as.~ ";
}
],
;
Script what_you_remember “what you remember”
with
next_script dreams,
PlayScript [;
self.number++;
switch( self.number ) {
1: "^Polly peers around. ~Do you remember how you got here, Colin?~^
~Not so much, no,~ you admit. ";
2: "^~What’s the last thing you remember?~ Polly asks.^
~Well,~ you say, searching your memory, which seems to be obscured by
a thick curtain of haze. ~I really can’t recall.~ ";
3: give self done;
"^~Me neither! Isn’t it curious, though!~ She chews her lip again, and the
wheels in her head begin to spin. ";
}
rtrue;
],
;
Script dreams “dreams”
with
name ‘dreams’,
next_script coins,
PlayScript [;
self.number++;
switch( self.number ) {
1: "^Suddenly, Polly reaches out and pinches you.^
~Ow!~ you say. ~That was rude of you.~ ";
2: "^~I’m sorry,~ she says, giggling. ~I was thinking how this was so very like
a dream, only you don’t seem to be as dreamlike as everything else. I wanted
to see if you were real.~^
~Of course I’m real!~ you say, rubbing the red mark she left on your arm.
~Besides, you’re supposed to pinch yourself to determine if you’re dreaming,
not somebody else.~ ";
3: “^~Oh, but I know I’m not dreaming, silly,~ she says. ~I’m wide awake.~^
~How do you know?~ you ask.”;
4: give self done;
"^~Because I dream in black and white. Don’t you?~^
~I dream in colour, I think. Although perhaps not as vividly as all
this.~ ";
}
rtrue;
],
;
Script coins “coins”
with
! next_script travel_to_blackRoom,
PlayScript [;
self.number++;
switch( self.number ) {
1: "^~Exactly!~ ";
2: if ( location ofclass colourRoom )
print_ret "^Polly runs a hand along the slick ", (SayColour) location, " walls. ";
"^Polly gnaws on the tips one of her pigtails. ";
3: print “^~I think it’s all a game of some sort. Did you notice the coins?~^”;
if ( blackCoin in player ) "~I seem to be holding this black one,~ you say. ";
"~I was holding a black one at one point,~ you say. ";
4: if ( location == redRoom ) {
if ( brownCoin hasnt moved || brownCoin in location )
print "^~And here’s a brown one,~ she says, pointing. ";
else
print "^~And there was a brown one here,~ she says.^
~Yes, I took it up,~ you say.^
She taps her foot and plays with one of her pigtails. ";
}
else {
print "^~And there was a brown one in the red room,~ she says, tapping
her foot and playing with one of her pigtails. ";
}
"~Have you explored much?~^
~A bit,~ you say. ";
5: print "^~I’ve seen three other coloured rooms like this one, and then all sorts of
curious places in between. I saw two other coloured coins, orange and grey.
I was going to say that none of the coins actually match the coloured rooms
directly, but ";
if ( blackCoin in player ) print “your black coin does.~^”;
else print “the black coin does.~^”;
if ( blackCoin has general )
"~I tried putting it into the slot in the black room, but nothing happened.~ ";
else {
self.number = 7;
“~I suppose I could try putting it into the slot in the black room to
see what happens.~”;
}
6: "^~Really? Can I see?~^
~I suppose so.~ ";
7: give self done;
"^~Let’s go, then.~ ";
8: self.number = 6;
"^~Oh, you haven’t thought to try it? Let’s!~ says Polly.^
~Why not?~ you say. ";
}
rtrue;
],
;
Script Dover “Dover”
with
name ‘dover’ ‘home’,
next_script chalk,
PlayScript [;
self.number++;
switch( self.number ) {
1: "~Tell me about Dover,~ you say.^
~Oh,~ says Polly. ~Well, let’s see.~ ";
2: “^Polly says, ~From the top of the white cliffs on a clear day, you can see the coast of
France, 21 miles away across the Channel. Dover is justly famous for its imposing white cliffs,
which buttress the end of the North Downs, but Dover’s real importance lies in the fact that
it is and historically has been Britain’s gateway to Europe, and Europe’s gateway to Britain.~”;
3: “^Polly says, ~In 55 BC, Julius Caesar landed near there with a force of about 6000 men,
in the first wave of Roman Invasion.~”;
4: “^Polly says, ~The town is overlooked and dominated by the sprawling late Norman
fortification which sits atop Castle Hill.~”;
5: give self done;
“^Polly says, ~Dover Castle is the earliest English castle which has fortifications
arranged concentrically.~”;
}
rtrue;
],
;
Script chalk “chalk”
with
name ‘chalk’,
! next_script ,
PlayScript [;
self.number++;
switch( self.number ) {
1: “~Why are the white cliffs of Dover white?~ you ask.^
~That’s an interesting question,~ says Polly. ~I believe they’re made of
chalk. The whole region has a chalk layer just under the topsoil.~”;
2: give self done; “~Really? Chalk, like in school?~ you say. ~How very interesting.~^
~Is it?~ Polly asks. ~I never thought much about it before.~”;
3: self.number = 0; self.PlayScript();
}
rtrue;
],
;
Script template “template”
with
! next_script ,
PlayScript [;
self.number++;
switch( self.number ) {
}
rtrue;
],
;