-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmuf2.html
149 lines (133 loc) · 5 KB
/
muf2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<html>
<head>
<title>The MUCK Manual: Overview: MUF (2)</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<a href="muf.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="muf3.html">next</a>
</center>
<table>
<tr>
<td width="20%"> </tc>
<td>
<!-- BODY CONTENT HERE -->
<p><b>3.2 Overview: MUF (cont'd)</b></p>
<p><b>Actually Beginning:</b></p>
<p>We'll get to <code>MUF</code> code itself soon, but a few words on
the mechanics of making programs and their trigger actions may be in
order first.</p>
<p>The command to make a program is <code>@program <name of
program>,</code> or just <code>@prog <name of program>.</code>
This does two things. It creates the program object (although there is
no code in it yet), and it puts you into the <code>MUF</code> editor.
The program is essentially a thing. You can pick it up, hand it to
people, and so on, but it has the type flag <code>F</code> and so is
treated as a different kind of object. The editor lets you enter and
manipulate the text of your program, much like lsedit lets you enter and
manipulate the text of a list (though the commands are different). Type
<code>q</code> to get out of the editor (if you're in `insert' mode, you
will need to type a . period and then <code>q</code>). Once the program
is created, you can edit or add to the code with the <code>@edit</code>
command, syntax <code>@edit <program></code>.</p>
<p>The editor commands are:</p>
<p><table border="0">
<tr>
<td valign="top"><code><number> i </code></td>
<td valign="top"><code>Insert text before line <number>. If you
don't have any code in the program, you can just type `i' by itself to
enter insert mode.</code></td>
</tr>
<tr>
<td valign="top"><code>.</code></td>
<td valign="top"><code>Exit insert mode. (That's a period, btw)</code>
</td>
</tr>
<tr>
<td valign="top"><code><number> <number> l</code></td>
<td valign="top"><code>List lines <number> to <number>.
</code></td>
</tr>
<tr>
<td valign="top"><code><number> <number> d </code></td>
<td valign="top"><code>Delete lines <number> to <number>.
</code></td>
</tr>
<tr>
<td valign="top"><code>a</code></td>
<td valign="top"><code>Show macros (abridged version).</code></td>
</tr>
<tr>
<td valign="top"><code>s</code></td>
<td valign="top"><code>Show macros (long version).</code></td>
</tr>
<tr>
<td valign="top"><code><program#> v</code></td>
<td valign="top"><code>List program's public functions.</code></td>
</tr>
<tr>
<td valign="top"><code>n</code></td>
<td valign="top"><code>Toggle line numbering on and off.</code></td>
</tr>
<tr>
<td valign="top"><code>c</code></td>
<td valign="top"><code>Compile the program you're editing.</code></td>
</tr>
<tr>
<td valign="top"><code>u</code></td>
<td valign="top"><code>Uncompile it.</code></td>
</tr>
<tr>
<td valign="top"><code>h</code></td>
<td valign="top"><code>Get help on the editor.</code></td>
</tr>
<tr>
<td valign="top"><code>q</code></td>
<td valign="top"><code>Quit editor mode.</code></td>
</tr>
</table></p>
<p>The editor is cumbersome, especially if you've never used a
line-based editor (such as <code>UNIX's</code> <code>ex</code>). You may
find it easier to work on your program in a text editor on your own
computer or in your <code>UNIX</code> account, and upload it to the
<code>MUCK</code> as needed. The following technique works well. Begin
the file with:</p>
<p><code>
@q<br>
@edit <program name or #dbref><br>
1 9999 d<br>
i
</code></p>
<p>And end it with:
<p><code>
.<br>
c<br>
q
</code></p>
<p>Put the code of your program between those. Then, by pasting the
whole file into your mucking window, or by using your client to upload
the file onto the <code>MUCK,</code> you automatically quit any programs
you have running, delete all old code, insert new code, and recompile.
(To upload a file using <code>TinyFugue,</code> type <code>/quote -0
`<filename></code> . The apostrophe in front of
<code><filename></code> is required.) For other clients, see the
program's Help menu or other documentation.</p>
<p>You will also need to make something that triggers the program. The most
straightforward method is to open an action and link it to the program. You
can also trigger it from a prop (see <a href="triggers.html">Section
2.1.4</a>). If a program is set with the <code>L</code> flag, it is
<code>Link_OK</code> and is in effect a public program: anyone can link to it
or list it. Without the <code>L</code> flag, only you or a wizard can list
and link to the program.</p>
<center>
<a href="muf.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="#top">top</a>|
<a href="muf3.html">next</a>
</center>
</td>
<td width="20%"> </tc>
</table>
</body>
</html>