codemush(6)
Unsupported
Name
CodeMUSH - MUSHcode Installation Tool
Syntax
codemush [-l] [-w] [-c] subscript mushname
Description
The CodeMUSH program is a PERL script designed to facilitate the crea-
tion and maintenence of MUSHcode. It provides the code for connecting
to and communicating with a MUSH, and has a number of subroutines
defined for easy uploading of code.
When run, the CodeMUSH program tries to connect to a MUSH listed by the
name mushname in your $HOME/.tinytalk file. It uses the standard Tiny-
Fugue format for this file, requiring a name, password, and address/port
to be specified for the MUSH. (For more information on this format, see
the TinyFugue documentation.) Once connected, CodeMUSH tries to run
subscript, which can then command the MUSH as desired.
Since the subscript is run as a PERL script, you can use the full power
of PERL to create your MUSH objects. This includes (but is not limited
to) checking output of the MUSH to decide whether to build something,
creating multiple objects with for loops, and (theoretically) even
responding to other players when connected to the MUSH. Unfortuanetly,
you still can't write PERL code into your MUSH objects themselves, and
have it work properly.
This program is under the GNU General Public License. If you specify
the -l, -w, or -c options, the complete license, the warranty section,
or the redistribution conditions will be displayed, respectively.
The predefined subroutines available are:
command (EXPR)
Sends the value of EXPR to the MUSH, followed by a newline. The
MUSH's response is returned both as the function result and in the
global variable $block.
think (EXPR)
The think subroutine uses the value of EXPR as the argument to a
'"' command. The result (without the 'You say, ""' markers) is
returned as the function result, and in $block.
num (EXPR)
Returns the result of a '"[num( EXPR )]' command, with say markers
and trailing newline removed.
tel (EXPR)
Teleports the player to EXPR.
home Executes the "home" command.
1
codemush(6)
Unsupported
make ('ROOM', NAME)
make ('EXIT', NAME, SOURCE, DEST)
make ('THING', NAME)
make ('THING', NAME, VALUE)
@dig/@open/@create an object with the given name. Exits must have
both a source and destination specified, while things may option-
ally have a value (number of coins to spend) given. The dbref# of
the object made is returned.
make_one ('EXIT', NAME, SOURCE, DEST)
make_one ('THING', NAME)
make_one ('THING', NAME, VALUE)
The make_one subroutine is similar to the make subroutine, but
checks for an object with the given NAME before making anything.
If an object of that name pre-exists, its dbref# is returned and no
new object is made.
dest (OBJECT)
Destroys OBJECT with the @dest command.
nuke (OBJECT)
Destroys OBJECT with the @nuke command.
attr (OBJECT, NAME, BODY)
Sets an attribute on OBJECT with the name NAME. Note that the full
name of a standard attribute must be used to set it.
edit (OBJECT, NAME, SEARCH, REPLACE)
Executes an @edit command with the corresponding arguments.
flag (OBJECT, NAME)
Sets a flag on OBJECT. To reset a flag, put a '!' before the flag
name.
link (OBJECT, DEST)
Links OBJECT to DEST.
unlink (OBJECT)
Acts like @unlink.
lock (OBJECT, TYPE, BODY)
Locks the TYPE lock on OBJECT to BODY. For the default lock, use
null for the TYPE, otherwise specify the lock type preceded by a
'/' (e.g. '/enter').
parent (OBJECT, MASTER)
Parents OBJECT to MASTER.
2
codemush(6)
Unsupported
zone (OBJECT, MASTER)
Sets the zone on OBJECT to
Author
T. Alexander Popiel (Talek)
Files
$HOME/.tinytalk
The list of worlds searched when trying to connect to a MUSH.
See Also
PERL(1), TF(1)
Bugs
There are probably a lot of them. I have had no problems, but I haven't
tried anything obscure, either.
This was written with PennMUSH 1.5 in mind, and works with some of its
peculiarities. Some parts may break with TinyMUSH 2.0.
This program is 'spoofable' - it uses OUTPUTPREFIX and OUTPUTSUFFIX to
isolate command results. If someone/something produces the same
strings, CodeMUSH may become hopelessly confused. The strings that are
used are defined close to the top of the script, and may be changed
without affecting anything else.
The results of the MUSH disconnecting in the middle of a session are
unknown.
3
99
| Frames Homepage | Non-Frames Homepage |
|
In memory of those who died Sept. 11, 2001 at the World Trade Center, the Pentagon, and on American Airlines Flight 11, United Airlines Flight 175, American Airlines Flight 77, and United Airlines Flight 93 | |
|---|---|---|
|
Honoring Marsh & McLennan professionals I've worked with,
including: Jack Aron, Valerie Hanna, Joe Sisolak, Greg Reda, and Cathy Fagan. |
||
| Shattered Photoessay by James Nachtewy | ||
Comments may be sent to gyles19@nospam.visi.com