Changing a rule

I’m trying to change the basic calling text of this extension http://inform7.com/extensions/George%20Tryfonas/Telephones/source.html
This is what my code says
Report dialling it on: if other party of the player is Judy, say “Hello, Joe’s knick nacks [random company name]? This is the bosses secretary Judy speaking. How can I help you?” instead.

It prints as
the basic text, and then my new text

how would I have it just print my new text?

Thanks

Inform 7 will run all the before/check/carry out/after/report rules thay apply to any situation. In this case it runs both the “report dialling” rule found in the Telephones extension and the new “report dialling” rule you wrote in your code. There are at least two ways you could get around this:

  1. Write an “after dialling” rule to preempt the “report dialling” rule found in the extension. For example:

After dialling 2345 on something: say "Acme Incorporated, Judy speaking.".
This will prevent the “report dialling” rule from the extension from working when calling Judy.

  1. Use a procedural rule to tell Inform to ignore the “report dialling” rule from the extension under certain circumstances, such as when calling Judy. If you look in the extension, the rule in question is called “the standard dialling rule”:

[code]Procedural rule for dialling 2345 on something: ignore the standard report dialling rule.

Report dialling 2345 on something (this is the report calling Judy rule):
say “Acme Incorporated, Judy speaking.”.[/code]
There are other ways as well; also the two ways shown above could be refined quite a bit. They should be enough to get you started, but if you have more questions feel free to ask.

I would generally avoid using a procedural rule for this kind of thing; it’s overkill, since the procedural rulebook is checked a number of times per turn. It is best used for operations that you can’t achieve any other way.

The “after…” method that Endosphere works just fine. A way to do it that is even more in the “spirit” of Inform’s rule system is to move the condition into the rule’s header, like this:

Report dialling it on when the other party of the player is Judy: say "Hello, Joe's knick nacks [random company name]? This is the bosses secretary Judy speaking. How can I help you?" instead.

This makes this version of the rule more specific than one that begins with just “report dialling it on:”, and therefore this rule will fire first. You want to be sure that you tell Inform not to also go on to the other report rule(s), and this can be done with either the “instead” you used, or by explicitly stating that the rule succeeds or fails:

Report dialling it on when the other party of the player is Judy: say "Hello, Joe's knick nacks [random company name]? This is the bosses secretary Judy speaking. How can I help you?"; rule succeeds.

I prefer the latter method myself, since it’s easier to see at a glance that the rulebook has terminated.

–Erik