(it ain't pretty, but I'm a coder on the last day of a 3-day weekend...)
Here is a really great site with all kinds of training and examples on scripting the rooms, mobs, objects, and triggers.
Since we don't like crash loops, read this before you do any triggers:
(shamelessly stolen from the above site, because you really need to read it!)
It is important to first try out the trigger via the attach command before attaching it via the script editor. If you've made a mistake, causing the mud to crash (we've seen it happen), the script will reattach when the mud comes back up, causing another crash, ad infinitum. This will not happen if you 'attach' it.
attach Attach has the following syntax: