These objects and xelagot script were made for the Avatars 2002 conference (http://www.ccon.org/conf02/aw/) in honour of J.R.R. Tolkien's eleventy-first birthday by Alex Grigny de Castro (XelaG), and have been released to the public domain. You may use them and modify them as you please, but leave the original copyright notice intact.
They work for xelagot bots in ActiveWorlds 3.2 worlds (or higher).
The actual Gate consists of a series of three objects: the arch and two doors, in various stages of illumination, numbered from 00 to 08. The easiest way to install the Gate for running the script is to install one of the illuminated arches and doors, for example, moriagate_01arch, moriagate_01right, moriagate_01left. Find a good location for the arch, which should be looking west (when you enter, you go east), then install the arch and the doors. Each door is 1.4 metres from the centre of the arch (3 clicks to one side, then 2 shift-clicks back towards the centre). Doors and arch should be built with the same citizen number the bot will be using. The arch and doors must have a 'name' in the action field:
create name arch,
create name left,
create name right,
Notice the final comma, it must be included. The objects are built without using the RWX extension.
Place the bot somewhere near the Gate, then run the script scriptMoriaGate.txt. The bot queries the area for objects, locates the arch and doors by their model names and action field, and starts acting. It will set up the starting objects (a rock slab for the arch, and two triangles), and preload the next arch and doors as invisible objects.
To activate the Gate, click on the 'wall' (the arch slab). The doors will start shining. When they are well visible, say: mellon. The doors will then open up. To open the Gate from 'inside' Moria, you only need to click.
Other objects included are: moriarock_a.rwx, which is the rock surrounding the gate, and two more rocks b and c to access the gate, as well as a lake piece and some stone slabs to make steps. These pieces were fitted to the terrain in such a way that the gate was stuck to a hole in the terrain, which was mountainous. Here is a picture of how this looked: http://www.ccon.org/conf02/aw/snaps/moria.jpg.