This is the script used by Santa Bot.
It was written on an earlier version of Self, so is probably more complex than now required now, but does give a good example of how to script responses based on context, how to associate knowledge, and how to create names.