-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathportglobals.html
More file actions
213 lines (183 loc) · 6.93 KB
/
portglobals.html
File metadata and controls
213 lines (183 loc) · 6.93 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<html>
<head>
<title>The MUCK Manual: Admin: Porting Global Programs</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<a href="dbsetup.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="otherport.html">next</a>
</center>
<table>
<tr>
<td width="20%"> </tc>
<td>
<!-- BODY CONTENT HERE -->
<p><b>Setting Up the Database (cont't)</b>:</p>
<p><em>Porting Global Programs</em>:</p>
<p>The files provided in the <code>fbmuf.tar</code> are a genuine help.
These are upload scripts that not only provide necessary programs, but
also set up necessary exits, macros, and properties. To install them,
uncompress and extract the files (<code>`gunzip fbmuf.tar.gz',</code>
<code>`tar -xvf fbmuf.tar'</code>), and quote, paste, or upload the
resulting files onto the <code>MUCK,</code> using whatever method works
best for you.</p>
<p>The file for <code>cmd-@register</code> should be uploaded first: the
other upload scripts will use the <code>@register</<em></code> command in
installing the programs. Next, install the libraries, in the following
order:</p>
<ul>
<li><code>lib-strings</code>
<li><code>lib-stackrng</code>
<li><code>lib-props</code>
<li><code>lib-lmgr</code>
<li><code>lib-edit</code>
<li><code>lib-editor</code>
<li><code>lib-match</code>
<li><code>lib-mesg</code>
<li><code>lib-mesgbox</code>
<li><code>lib-reflist</code>
<li><code>lib-index</code>
<li><code>lib-case</code>
<li><code>lib-look</code>
</ul>
<p>(<em>Note</em>: The README file in fbmuf lists `lib-case' as
`lib-cases'. You will need to quote it by the name given here,
`lib-case'.)</p>
<p>The remaining programs can be installed in any order.</p>
<p>If you're not uploading scripts from <code>fbmuf.tar,</code> you'll
need to install all the programs `by hand'. Even if you are using
<code>fbmuf.tar</code> or the standard database, you will need to
install some programs without the benefit of a script. The following
gives an example of porting a library; the same techniques can be used
for any program. First, get the code, perhaps by <code>@listing</code>
and logging the program on an established <code>MUCK.</code> The example
uses the logging and quoting syntax for TinyFugue; other clients will
have different syntax.</p>
<p><code>
====================================<br>
On the established MUCK...<br>
> /log lib-props<br>
% Logging to file lib-props<br>
> @list $lib/props<br>
<br>
<output output output><br>
<br>
> /log off<br>
<br>
On your MUCK...<br>
> @prog lib-props<br>
Program created with number 26.<br>
Entering editor.<br>
> i<br>
Entering insert mode.<br>
> /quote -0 `lib-props<br>
> .<br>
> c<br>
Error in line 78: Unrecognized word lines.<br>
> 78 l<br>
77 lines displayed.<br>
> 78 d<br>
1 lines deleted.<br>
> c<br>
Compiler done.<br>
> q<br>
Editor exited.<br>
====================================
</code></p>
<p>As the example indicates, listing and quoting a program picks up an
extra, unwanted line: the <code>@list</code> command follows its output
with a line indicating how many lines of program code were listed... 77
in this case. You need to remove that line, either with a text editor on
your system, or — as in this example — by uploading,
compiling, noting and deleting the offending line, and then
re-compiling.</p>
<p>Once you have the program compiled, you need to set its flags
appropriately. All libraries should be set <code>M3</code> and
<code>L;</code> <code>lib-lmgr,</code> <code>lib-props,</code> and
<code>lib-reflist</code> should also be set <code>S,</code>
<code>B,</code> and <code>H.</code> <code>Lib-look</code> should be set
<code>S.</code> Other programs should be set with whatever flags they
have on the <code>MUCK</code> you're porting from.</p>
<p>Libraries — and other programs frequently used by players, such
as <code>do-nothing</code> and <code>obv-exits</code> — will need
to be registered. You can do this either with the <code>@register</code>
command, or by setting the property directly.</p>
<p><code>
====================================<br>
> @reg lib-props = lib/props<br>
Now registered as _reg/lib/props: lib-look(#26FLM3) on Room Zero(#0R)<br>
<br>
or...<br>
<br>
> @propset #0 = dbref:_reg/lib/props:#26<br>
Property set.<br>
====================================
</code></p>
<p>Some programs will also need properties set. For libraries, this
information is readily available with the <code>@view</code> command;
for other programs, you will probably need to get a wizard or the
program owner to help you view the props.</p>
<p><code>
====================================<br>
> @view $lib/look<br>
Command to view: @list $lib/props=1-20<br>
Run this command? (y/n)<br>
> n<br>
Read definitions? (y/n)<br>
> y<br>
.envprop = "$lib/props" match "envprop" call<br>
.envsearch = "$lib/props" match "envsearch" call<br>
.locate-prop = "$lib/props" match "locate-prop" call<br>
.setpropstr = "$lib/props" match "setpropstr" call<br>
envprop = "$lib/props" match "envprop" call<br>
envsearch = "$lib/props" match "envsearch" call<br>
locate-prop = "$lib/props" match "locate-prop" call<br>
setpropstr = "$lib/props" match "setpropstr" call<br>
====================================
</code></p>
The first bit of output in this series...
<p><code>
Command to view: @list $lib/props=1-20
</code></p>
<p>...tells you that the program documentation appears in lines 1 - 20
of the program. To set things up so that players on your
<code>MUCK</code> can view the program, set the <code>_docs</code>
property on the program:</p>
<p><code>
====================================<br>
> @set lib-props = _docs:@list $lib/props=1-20<br>
Property set.<br>
====================================
</code></p>
<p>The definitions are stored in propdir <code>_defs/</code> on the
program object. They provide information needed for calling programs to
communicate with the library. The definition...</p>
<p><code>
.envprop = "$lib/props" match "envprop" call
</code></p>
<p>... means `Where a program that uses this library contains the word
`.envprop', use the function <code>`envprop'</code> in this
library'.</p>
<p>Set the <code>_def</code> properties for each definition.</p>
<p><code>
====================================<br>
> @set lib-props = _defs/.envprop:"$lib/props" match "envprop"
call<br>
Property set.<br>
<Etc. Copy, find/replace, and paste are your friends.><br>
====================================
</code></p>
<p>Setting up libraries is also discussed in <a
href="muflibs.html">Section 3.2.2</a>, <code>MUF</code> Libraries.</p>
<center>
<a href="dbsetup.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="#top">top</a>|
<a href="otherport.html">next</a>
</center>
</td>
<td width="20%"> </tc>
</table>
</body>
</html>