Conversation and trigguring events

here’s my code I am also using the telephone extention from here http://inform7.com/extensions/George%20Tryfonas/Telephones/source.html
Judy is a woman. The office phone is a telephone. The calling number of the office phone is 2345. The owner of the office phone is Judy.
Before telling Judy about something: try asking about something instead.
Before answering Judy that something: say “Best to confine your conversation to questions and answeres.” instead.
Before asking Judy about something: if the topic understood is a topic listed in the Table of Conversation, say “[reply entry] [paragraph break]” instead;
otherwise say “[the noun] does not reply.” instead.
After asking Judy about [topic in row 1 of the Table of Conversation]: award 10 points; say “(work safely avoided)”;

Table of Conversation
topic reply
“work /missing /absent /missing work” “‘Sure I’ll tell Mrs. Stark you won’t be in today. Enjoy your day off.’ says Judy in a pleasant tone.”
“leaving” “‘If you want to leave, you would need to give your 3 weeks notice. I have the paper right here but I would be sad to see you go.’ says Judy.”

I’m having trouble with two things
one I can only talk about missing work, not work, missing, or absent,
this might be a formatting problem how are you supposed to get tables to look properly, What is inform looking for when it determines the end of a row or column

and two
the after asking Judy about, doesn’t work, the code is understandable but nothing happens.

This would be a big help

You have a lot going on here.

This is because of the way you have the phrase set up, and it’s actually “working” exactly the way you’ve written. For example:

Ask Judy about absent work
“Sure I’ll tell Mrs. Stark you won’t be in today. Enjoy your day off.” says Judy in a pleasant tone.

In other words, as the code is currently written it’s set up as understanding “work work” or “absent work” or “missing work” or “missing work” as the first topic. There are two ways to fix this to do what you want:

a)

Table of Conversation topic reply "work/missing/absent" or "missing work" "'Sure I'll tell Mrs. Stark you won't be in today. Enjoy your day off.' says Judy in a pleasant tone."
b) Make a text token for the phrases you want to use

[code]Understand “work/missing/absent” or “missing work” as “[token1]”.

Table of Conversation
topic reply
“[token1]” “‘Sure I’ll tell Mrs. Stark you won’t be in today. Enjoy your day off.’ says Judy in a pleasant tone.”[/code]

You need a tab between each column, and a line break at the end of each row. For example, imagine it this way:

Table of Conversation[press enter]
topic[press tab]reply[press enter]
“missing work”[press tab]“‘Bla bla bla’ says Judy.”[press enter]

The code as you posted it here can’t actually compile, because the part:

After asking Judy about [topic in row 1 of the Table of Conversation]:

is invalid; you have some brackets, making a comment out of “topic in row 1 of the Table of Conversation”; if you just forgot to put quotes around it as posted, I don’t think it would work anyway as written. There are a few ways to fix that, for example:

[code]Understand “work/missing/absent” or “missing work” as “[token1]”.

After asking Judy about “[token1]”:
award 10 points;
say “(work safely avoided)”.[/code]
But that’s only part of the problem. You wrote:

Before asking Judy about something: if the topic understood is a topic listed in the Table of Conversation, say “[reply entry] [paragraph break]” instead;
otherwise say “[the noun] does not reply.” instead.

By setting things up this way and adding “instead” to the end of each phrase, you end the action after Judy says her reply, and no “after” rule will ever be reached. The extension itself uses this method, though, so it’s hardly your fault for trying to copy it.

Another minor problem is that if your “after” rule did work, the player could rack up loads of easy points by repeatedly asking Judy about missing work; ten points are awarded each time this happens.

There are a few ways to fix all this, but I want to think them over before responding. In the meantime perhaps someone else can help you with this part.

the code
Before asking Judy about something: if the topic understood is a topic listed in the Table of Conversation, say “[reply entry] [paragraph break]”;
otherwise say “[the noun] does not reply.” instead.

produces the following

ask judy about being absent
Judy does not reply.

ask judy about missing work
“Sure I’ll tell Mrs. Stark you won’t be in today and are using one of your vacation days. Enjoy your day off.” says Judy in a pleasent tone. She isn’t available.

without the instead it writes she isn’t available at the end, it must be a default of the code.

As for the repition for more points I was going to add code like
After asking Judy about x once, award points
once I got it to work

The brackets in this piece of code
After asking Judy about [topic in row 1 of the Table of Conversation] once: award 10 points; say “(work safely avoided)”;
are from 15.2 of the documentation about looking up entries in tables where it says this:
repeat with N running from 1 to the number of rows in the Table of Selected Elements:
say “The atomic weight of [element in row N of the Table of Selected Elements] is [atomic weight in row N of the Table of Selected Elements].”
and the text in the brackets becomes really light blue.
but that is in a say statement i don’t know what punctuation to use to get the same effect in a command,

I noticed as well the effect of changing the “before” rule by removing the “insteads.” That was actually why my last post was probably rather unhelpful (sorry); the way the extension functions in this regard is (I think) enough of a problem to look into making a significant redesign of its processes.

Actually all you should need to do is add quotes around the bracketed text, which will turn it into a text substitution rather than a comment (which is what it is as currently shown, resulting in an uncompilable rule). What I posted last time will work for the general idea of what you want to do, assuming the problem with the extension’s “before” rule is fixed.

Assuming we don’t want to rewrite the whole “Telephones” extension to facilitate more complex conversation sequences (such as what you’re trying to do here), I think the simplest way to get around all the issues here is to break things up into several rules. This may seem overly complicated, but since you’re using a table for Judy’s conversations (either because that’s what the example in the extension uses or because you’re planning on adding more interaction with her later) I couldn’t find any other way to work it all out that was less complicated than what follows (which isn’t to say there aren’t other ways).

What I’m suggesting is that you:

a) address the possible things we may want to ask Judy about in separate rules;

b) due to the way the extension works, address the scoring issue in the same “before” rule as the behavior that results in scoring;

c) add a variable (I’ve called it “playing hookey” below) to address the issue of preventing unlimited scoring of points

Working from the code shown in your original post, I think this does what you’re looking for:

[code]Include Telephones by George Tryfonas.

The testarea is a room.

The phone1 is a telephone in the testarea. The description of the phone1 is “Your home telephone.”. The printed name of the phone1 is “phone”. Understand “phone” or “telephone” or “my phone/telephone” or “my home phone/telephone” or “home phone/telephone” as the phone1.

Judy is a woman. The office phone is a telephone. The calling number of the office phone is 2345. The owner of the office phone is Judy.

Before telling Judy about something: try asking Judy about it instead.

Before answering Judy that something: say “Best to confine your conversation to questions and answeres.” instead.

Playing hookey is a truth state that varies. Playing hookey is usually false.

Understand “work/missing/absent” or “missing work” as “[token1]”.

Before asking Judy about something:
unless the topic understood is a topic listed in the Table of Judy Conversation:
say “[the noun] doesn’t seem interested.” instead.

Before asking Judy about “[token1]”:
say “[reply in row 1 of the Table of Judy Conversation][paragraph break]”;
if playing hookey is false:
change playing hookey to true;
award 10 points;
say “(work safely avoided)[paragraph break]” instead;
otherwise:
do nothing instead.

Before asking Judy about “leaving”:
say “[reply in row 2 of the Table of Judy Conversation][paragraph break]” instead.

After dialling 2345 on something (this is the report calling Judy rule):
say “Acme Incorporated, Judy speaking.”.

Table of Judy Conversation
topic reply
“[token1]” “‘Sure I’ll tell Mrs. Stark you won’t be in today. Enjoy your day off.’ says Judy in a pleasant tone.”
“leaving” “‘If you want to leave, you would need to give your 3 weeks notice. I have the paper right here but I would be sad to see you go.’ says Judy.”[/code]
If you have any questions about how or why this works, or why the way you had written things originally doesn’t work, please feel free to ask.