We've looked at actions earlier, which triggers on some text send from the mud. Sometimes you want a command triggered on something else. Perhaps you want a command to be fired at a given interval, not dependent on text send from the mud, or perhaps you want something to happen before you close you session etc. This is where events brings you what actions can't. In short, events are like actions, but unlike actions they trigger on something else (actions could have been implemented as events but they are not :)
Let us take a relatively simple example. I do not want to go into too much details since that has already been covered in the previous pages.
Event type: Events can be one of the following types and more might be added if needs arise.
For Web events like this example notice the pattern property. The pattern is a filter for when the event is to be fired. Whenever a http request is made on the webserver all web events will be checked if their patterns match the URL passed in the http request. The first part of the URL is the webserver itself, then a folder with the same name as the session, then finally some string that the events pattern will try and match. Let's look at an example. Say your session is called AstroMud, then to make this event fire you will need to make this http request:
In Timer events you will notice two new properties: Interval and FireOnce. Interval is the number of seconds between each trigger. If you set the Interval to 10 and put a "smile" in commands, then you will smile every 10 seconds. Sometimes you might want only want a command to be run once, but after a given number of seconds. Instead of disabling it through a script you can simply check the RunOnce checkbox. Checking that will make sure the commands are run only once, after that the event is disabled.