Programming commands overview.

So, you're a programmer now huh? Well, there's some new commands for you to learn in order to make use of your powers. I'll run through the common (and most useful) ones here.

Information Commands

These commands are used for gathering information only about various aspects of building a MOO.

@display
@display is incredibly useful. It has 3 main ways of being used:
@display <object>
This will give the basic information about the object - such as its name, object number, parent, and current location.
@display <object>.
Note well the period after the object! This will display all the properties defined on the object, and if possible their value.
@display <object>:
Note well the colon after the object this time! This will display all the verbs defined on the object, and their argument specifiers.

@list
Another incredibly useful command, @list is used for listing the code of a particualr verb. Syntax wise it's:
@list <object>:<verb name>
Eg: @list $player:tell

@audit
This command will give a list of all the objects that you, or another player, owns. To audit yourself, just use @audit To audit someone else, for example me, @audit mort

@kids/@parent
Usage: @kids <object> and @parent <object>
@kids will give a list of all the children of any given object. Doing this on things like the generic exit and generic room are generally not a good idea unless you like spam. @parent is the opposite and will tell you the heirarchy of inheritance for the given object.

@classes generics/utilities
A not often used, but still useful command. It gives a display of all the generic objects, or utility objects that have been defined in the database. If it looks a bit slim, bug your Archwizard to update it.

Modification Commands

@create
This is the command to create new objects. To use it:
@create <parent object> named <name of new object>
This will create a child of the given parent object, and set it's name to the one given. Don't use it to build rooms, there's an easier way to do that - look at 'help @dig' in your MOO. But you probably already knew that :)

@recycle
@recycle <object> is the opposite of @create. It will recycle the object for reuse with @create. Don't use the builtin function recycle() ever as it will permanently remove the object number from the pool available!
(gc)The command will ask if you really really want to destroy the object, as there's no possible way to get back the information on it short of rebooting from an old database before you recycled it.

@chparent
Ooops! You @created a generic thing, when you really wanted a container. You've already described it and put some code on it, so don't want to @recycle it and start over. Here's the way to avoid redoing everything on the object that you've already done.
@chparent <object> to <new parent object>
This will change the parent to the new one, unless there are properties defined on the object that conflict with ones already on the new parent.

@set
@set is used to set property values. (Personally I use eval as it's much quicker to type, but @set is there to be used too) To do it,
@set <object>.<property> to <value>
If you want to set the value as a string, you need to put it in quotes, or it won't interpret what you want properly.

@edit
This will invoke an editor, similar to the note editor in which you write descriptions, to program a verb. You have to first create the verb with @verb (described below), and then the syntax to use is:
@edit <object>:<verb name>
Once in it, all the commands for the note editor will work as you'd expect apart from 'save'. In order to save your code, you need to compile it with the command of the same name.

@prop/@rmprop
These commands are to add and remove respectively properties from an object.
To add a property, @prop <object>.<property name> [value]. The value is not necessary, and will default to 0, but it's easier to give it now than to set it later with @set or an eval...
To remove it again, @rmprop <object>.<property name> and it will be gone.

@verb/@rmverb As @prop/@rmprop is for properties, @verb and @rmverb are for verbs.
@prop <object>:<verb name> [argument specifiers] [permissions]
This will add a verb with the given argument specifiers (as described above). If none are given, it will default to 'none' 'none' 'none'. We haven't looked at verb permissions yet, but it's safe to put 'rxd' for anything that isn't a command, and 'rd' for anything that is. This will default as well, to 'rxd' in this case.

@args/@chmod
This command can be used to change the arguments or permissions for a verb.
Usage: @args <object>:<verb name> <argument specifiers>
and: @chmod <object>:<verb name> <permissions>
If this business of permissions isn't very clear, don't worry, you'll almost never need to use it beyond switching between 'rxd' and 'rd'. For more information about them, see the Programmer's Manual.

Eval

eval
Eval. It deserves its own section its so useful. It allows you to execute code, without having to write it into a program in the editor and compile it. It's exceptionally useful for doing small things like setting property values, running over all of the objects in your inventory and moving them somewhere... quick tasks that don't deserve a properly coded command of their own.
To evaluate a line of code:
eval <code>

There is a shortcut for eval, such as " for say and : for emote. In LambdaCore it's ';'. In GondolinCore ';' is mapped to pose as per MUSH, and '|' is used for eval.
Thus:
;<code> or |<code>

(gc) @options

There are currently three programmer options that can be set in GondolinCores.


Last modified: Fri Sep 17 14:26:31 GMT 1999