For those specially interested in a rather personal project, I soon discovered a problem with the hug button: while the zombie would only hug Jessie if she was in the same room, it would always greet her even if she was elsewhere! The solution lay in the "query" option in the "say" program. For those who haven't explored that far yet, here's how it works: Type, for instance,

say ?jess,,Hello Jessie!

and the output comes as

You say, "Hello Jessie!" to Jessie.

but - and here's the point - only if Jessie (or someone else whose name starts with "jess") is in the same room!
Problem one solved. Just change the force part to

{force:#1234,say ?jessie\,\,Hello Jessie!}

[In case anyone wonders, the backslashes are necessary to "escape" the commas to let the force function see the whole line after the first comma as one argument - without them it would think you were passing it four arguments - "#1234", "say ?jessie", a blank string and "Hello Jessie!"]

Anyway, it was still rather predictable except for when I changed it manually. Then I got a more advanced idea.The first thing I did was get a list of the hug verbs on that particular muck (there's a lot of them!). After a bit of processing I had a command file that would make a character go through all the verbs, first speaking each and then trying to do it to Jessie. I ran the list in her room once while she was asleep (to avoid spamming her player, and so she wouldn't know I was working on something). The output told me which verbs she had set responses to and which she was not allowing to be done to her. (She makes a point of not being a toon, so verbs like toon and anvil were obviously out.)
I then compiled two lists, one of the verbs she had set responses to and one of verbs she had no response for but still allowed. Then I made a third list of various greetings and other stuff. After a bit of experimenting I then came up with a bit of code that does this:

  1. Picks a random verb from the first list and sends it to the zombie followed by Jessie's name.
  2. Picks a line from the third list and sends it to the zombie preceded by "say ?jessie,,".
  3. Picks a random verb from the second list and sends it followed by Jessie's name.

All of which produces an output like for instance

Zombie nuzzles Jessie! She giggles and beeps his nose.
Zombie says, "Are we having fun yet?" to Jessie.
Zombie squeezes Jessie!

This is of course what others see, Jessie and the zombie (if on) get the appropriate parts in first person.

So what's the magic code that makes all this happen? Hey, I have already told you the simpler version, consider it an exercise in MPI to figure out how the advanced version works!

© 2000 by Ragnar Fyri. All rights reserved.