-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpiref.html
2712 lines (2282 loc) · 86.9 KB
/
mpiref.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
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<title>The MUCK Manual: MPI Reference</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<a href="mpiex.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="muf.html">next</a>
</center>
<table>
<tr>
<td width="20%"> </tc>
<td>
<!-- BODY CONTENT HERE -->
<p><b>3.1.3 MPI Reference</b></p>
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<p>
<center>
<table border="0">
<tr>
<td colspan="5"><em>Connection Functions</em></code></td>
</tr><tr>
<td><code><a href="#awake">awake</a></code></td>
<td><code><a href="#idle">idle</a></code></td>
<td><code><a href="#online">online</a></code></td>
<td><code><a href="#ontime">ontime</a></code></td>
<td><code> </code></td>
</tr><tr>
<td><code>
<nobr>
</nobr>
</code></td>
<td><code>
<nobr>
</nobr>
</code></td>
<td><code>
<nobr>
</nobr>
</code></td>
<td><code>
<nobr>
</nobr>
</code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>DB Functions</em></code></td>
</tr><tr>
<td><code><a href="#contains">contains</a></code></td>
<td><code><a href="#contents">contents</a></code></td>
<td><code><a href="#controls">controls</a></code></td>
<td><code><a href="#dbequals">dbequals</a></code></td>
<td><code><a href="#exits">exits</a></code></td>
</tr><tr>
<td><code><a href="#flags">flags</a></code></td>
<td><code><a href="#force">force</a></code></td>
<td><code><a href="#fullname">fullname</a></code></td>
<td><code><a href="#holds">holds</a></code></td>
<td><code><a href="#istype">istype</a></code></td>
</tr><tr>
<td><code><a href="#links">links</a></code></td>
<td><code><a href="#location">location</a></code></td>
<td><code><a href="#locked">locked</a></code></td>
<td><code><a href="#money">money</a></code></td>
<td><code><a href="#name">name</a></code></td>
</tr><tr>
<td><code><a href="#nearby">nearby</a></code></td>
<td><code><a href="#owner">owner</a></code></td>
<td><code><a href="#ref">ref</a></code></td>
<td><code><a href="#testlock">testlock</a></code></td>
<td><code><a href="#type">type</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>List-Handling Functions</em></code></td>
</tr><tr>
<td><code><a href="#commas">commas</a></code></td>
<td><code><a href="#count">count</a></code></td>
<td><code><a href="#lcommon">lcommon</a></code></td>
<td><code><a href="#lmember">lmember</a></code></td>
<td><code><a href="#lrand">lrand</a></code></td>
</tr><tr>
<td><code><a href="#sublist">sublist</a></code></td>
<td><code><a href="#lremove">lremove</a></code></td>
<td><code><a href="#lsort">lsort</a></code></td>
<td><code><a href="#lunion">lunion</a></code></td>
<td><code><a href="#lunique">lunique</a></code></td>
</tr><tr>
<td><code><a href="#mklist">mklist</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Loop Functions<em></code></td>
</tr><tr>
<td><code><a href="#filter">filter</a></code></td>
<td><code><a href="#fold">fold</a></code></td>
<td><code><a href="#for">for</a></code></td>
<td><code><a href="#foreach">foreach</a></code></td>
<td><code><a href="#parse">parse</a></code></td>
</tr><tr>
<td><code><a href="#while">while</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Logical Functions</em></code></td>
</tr><tr>
<td><code><a href="#and">and</a></code></td>
<td><code><a href="#equals">equals</a></code></td>
<td><code><a href="#ge">ge</a></code></td>
<td><code><a href="#gt">gt</a></code></td>
<td><code><a href="#if">if</a></code></td>
</tr><tr>
<td><code><a href="#le">le</a></code></td>
<td><code><a href="#lt">lt</a></code></td>
<td><code><a href="#not">not</a></code></td>
<td><code><a href="#notequals">notequals</a></code></td>
<td><code><a href="#or">or</a></code></td>
</tr><tr>
<td><code><a href="#xor">xor</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Math Functions</em></code></td>
</tr><tr>
<td><code><a href="#absolute">absolute</a></code></td>
<td><code><a href="#addition">addition</a></code></td>
<td><code><a href="#decrement">decrement</a></code></td>
<td><code><a href="#dice">dice</a></code></td>
<td><code><a href="#distance">distance</a></code></td>
</tr><tr>
<td><code><a href="#divide">divide</a></code></td>
<td><code><a href="#increment">increment</a></code></td>
<td><code><a href="#maximum">maximum</a></code></td>
<td><code><a href="#minimum">minimum</a></code></td>
<td><code><a href="#modulo">modulo</a></code></td>
</tr><tr>
<td><code><a href="#multiply">multiply</a></code></td>
<td><code><a href="#sign">sign</a></code></td>
<td><code><a href="#subtraction">subtraction</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Miscellaneous Functions</em></code></td>
</tr><tr>
<td><code><a href="#attr">attr</a></code></td>
<td><code><a href="#debug">debug</a></code></td>
<td><code><a href="#debugif">debugif</a></code></td>
<td><code><a href="#delay">delay</a></code></td>
<td><code><a href="#fox">fox</a></code></td>
</tr><tr>
<td><code><a href="#func">func</a></code></td>
<td><code><a href="#isnum">isnum</a></code></td>
<td><code><a href="#isdbref">isdbref</a></code></td>
<td><code><a href="#kill">kill</a></code></td>
<td><code><a href="#macros">macros</a></code></td>
</tr><tr>
<td><code><a href="#muckname">muckname</a></code></td>
<td><code><a href="#muf">muf</a></code></td>
<td><code><a href="#version">version</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Property Handling</em></code></td>
</tr><tr>
<td><code><a href="#concat">concat</a></code></td>
<td><code><a href="#delprop">delprop</a></code></td>
<td><code><a href="#exec">exec</a></code></td>
<td><code><a href="#exec!">exec!</a></code></td>
<td><code><a href="#index">index</a></code></td>
</tr><tr>
<td><code><a href="#index!">index!</a></code></td>
<td><code><a href="#lexec">lexec</a></code></td>
<td><code><a href="#list">list</a></code></td>
<td><code><a href="#listprops">listprops</a></code></td>
<td><code><a href="#prop">prop</a></code></td>
</tr><tr>
<td><code><a href="#prop!">prop!</a></code></td>
<td><code><a href="#propdir">propdir</a></code></td>
<td><code><a href="#rand">rand</a></code></td>
<td><code><a href="#select">select</a></code></td>
<td><code><a href="#store">store</a></code></td>
</tr><tr>
<td><code><a href="#timesub">timesub</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>String Functions</em></code></td>
</tr><tr>
<td><code><a href="#center">center</a></code></td>
<td><code><a href="#eval">eval</a></code></td>
<td><code><a href="#instr">instr</a></code></td>
<td><code><a href="#left">left</a></code></td>
<td><code><a href="#literal">literal</a></code></td>
</tr><tr>
<td><code><a href="#midstr">midstr</a></code></td>
<td><code><a href="#nl">nl</a></code></td>
<td><code><a href="#null">null</a></code></td>
<td><code><a href="#otell">otell</a></code></td>
<td><code><a href="#pronouns">pronouns</a></code></td>
</tr><tr>
<td><code><a href="#right">right</a></code></td>
<td><code><a href="#smatch">smatch</a></code></td>
<td><code><a href="#strip">strip</a></code></td>
<td><code><a href="#strlen">strlen</a></code></td>
<td><code><a href="#subst">subst</a></code></td>
</tr><tr>
<td><code><a href="#tell">tell</a></code></td>
<td><code><a href="#tolower">tolower</a></code></td>
<td><code><a href="#toupper">toupper</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Time Functions</em></code></td>
</tr><tr>
<td><code><a href="#convsecs">convsecs</a></code></td>
<td><code><a href="#convtime">convtime</a></code></td>
<td><code><a href="#created">created</a></code></td>
<td><code><a href="#date">date</a></code></td>
<td><code><a href="#delay">delay</a></code></td>
</tr><tr>
<td><code><a href="#ftime">ftime</a></code></td>
<td><code><a href="#lastused">lastused</a></code></td>
<td><code><a href="#ltimestr">ltimestr</a></code></td>
<td><code><a href="#modified">modified</a></code></td>
<td><code><a href="#secs">secs</a></code></td>
</tr><tr>
<td><code><a href="#stimestr">stimestr</a></code></td>
<td><code><a href="#time">time</a></code></td>
<td><code><a href="#timestr">timestr</a></code></td>
<td><code><a href="#tzoffset">tzoffset</a></code></td>
<td><code><a href="#timesub">timesub</a></code></td>
</tr><tr>
<td><code><a href="#usecount">usecount</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Variable-Handling Functions</em></code></td>
</tr><tr>
<td><code><a href="#arg">&arg</a></code></td>
<td><code><a href="#cmd">&cmd</a></code></td>
<td><code><a href="#how">&how</a></code></td>
<td><code><a href="#set">set</a></code></td>
<td><code><a href="#variable">variable</a></code></td>
</tr><tr>
<td><code><a href="#with">with</a></code></td>
</tr>
</table></center>
</p>
<p><em>Definitions</em></p>
<dl>
<p><dt><em>Trigger</em>
<dd>The object that the <code>MPI</code> script is evaluated from.</p>
<p><dt><em>List</em>
<dd>A string containing several individual substring items,
seperated by carriage return characters.</p>
<p><dt><em>Property-Based List</em>
<dd>A set of consecutively numbered properties that each contain one
string in a list of strings. Property based lists are often numbered
like: <code>listname1,</code> <code>listname2,</code>
<code>listname3,</code> <code>listname4,</code> etc. Another
popular format is <code>listname#/1,</code>
<code>listname#/2,</code> <code>listname#/3,</code> etc.
<code>MPI</code> can read in either of those formats, and several
more, for that matter.</p>
<p><dt><em>False</em>
<dd>A string value of <code>"0",</code> or a null string
(<code>""</code>).</p>
<p><dt><em>True</em>
<dd>Anything that is not False.</p>
</dl>
<a name="a">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="absolute">
<p><code>ABS | ABSOLUTE</code><br>
<code>{abs:expr}</code></p>
<p>Returns the absolute value of <code>expr.</code>
[<a href="#top">top</a>]</p><hr>
<a name="addition">
<p><code>ADD | ADDITION</code><br>
<code>{add:expr1,expr2}</code><br>
<code>{add:expr1,expr2,expr3...}</code></p>
<p>Returns the sum of the values of <code>expr1</code> and
<code>expr2.</code> If more than two args are given, then this will add
all the args together and return the result.
[<a href="#top">top</a>]</p><hr>
<a name="and">
<p><code>AND | &&</code><br>
<code>{and:expr1,expr2...}</code></p>
<p>Returns true if <code>expr1</code> and <code>expr2</code> evaluate as
true. Otherwise, this returns false. If <code>expr1</code> was false,
this doesn't bother to evaluate <code>expr2,</code> as it does C-style
shortcutting. If there are more than two arguments, then this will
evaluate all of them until either one returns false, in which case this
function returns false, or until it has evaluated all of the arguments.
This function returns true only if all the arguments evaluate as true.
[<a href="#top">top</a>]</p><hr>
<a name="arg">
<p><code>ARG | &ARG</code><br>
<code>{&arg}</code></code></p>
<p>The <code>{&arg}</code> variable contains a string with the value of
the command line arguments the user entered. This is so that you can
have stuff like <code>MPI</code> in the fail of an exit, and when the
user triggers the exit, and has some extra text on the line they
entered, other than the exitname, the <code>MPI</code> can take that
extra stuff as arguments for use. Note that you need to set an action
<code>Haven</code> to get it to accept command line arguments.
[<a href="#top">top</a>]</p><hr>
<a name="attr">
<p><code>ATTR | ATTRIBUTE</code><br>
{attr:attr1,attr2...,text}<br>
<p>This formats <code>text</code> with color and formatting attributes
specified as <code>attr1,</code> <code>attr2,</code> etc. You may specify up
to 8 attributes. Example, to format the string `<code>WARNING!</code>' in
bold red letters, use <code>{attr:bold,red,WARNING!</code>}. Nesting
attributes is not recommended. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="awake">
<p><code>AWAKE</code><br>
<code>{awake:player}</code></p>
<p>Returns how many times player is connected. This means that it will
returns 0 if the player is not connected. If the given object is
<em>not</em> a player, it will return 0. In all other cases, it will
return a positive number, being how many times the given player is
connected to the server.
[<a href="#top">top</a>]</p><hr>
<a name="b">
<a name="c">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="center">
<p><code>CENTER</code><br>
<code>{center:string}</code><br>
<code>{center:string,fieldwidth}</code><br>
<code>{center:string,fieldwidth,padstring}</code></p>
<p>Takes a string and pads it to fit the given fieldwidth, with the
string center justified. If no padstring is given, it assumes that it
will pad the string with spaces. If no fieldwidth is given, it assumes
that the field width is 78 characters. Example:
<code>{center:Hello,10,1234567890}</code> would return the string
"123Hello12"
[<a href="#top">top</a>]</p><hr>
<a name="commas">
<p><code>COMMAS</code><br>
<code>{commas:list}</code><br>
<code>{commas:list,lastsep}</code><br>
<code>{commas:list,lastsep,var,expr}</code></p>
<p>Takes a list and returns a plain english comma delimited string with
the items in it. For example,
<code>{commas:{mklist:Tom,Dick,Harry}}</code> will return "Tom, Dick and
Harry". If you specify the lastsep argument, you can replace the "and"
with something else, such as "or" to get a result like "a, b or c".
Note: You need to be careful to include spaces around the "or" or else
you might get a result like "a, borc". </p>
<p>Example:</p>
<p><code>
{commas:{mklist:a,b,c}, or }
</code></p>
<p>If the var and expr arguments are passed, then for every item in the
list, it will set the value of the given variable name (which it will
declare) to the item, then evaluate expr, and use the result in the
string it outputs. Example: <code>{commas:{contents:here},\, or
,v,{name:{&v}}}</code> will return the name of every object in the room in a
comma separated list, using ", or " as the final conjunction. ie: "Tom,
Can of SPAM, Dick, or Harry."
[<a href="#top">top</a>]</p><hr>
<a name="cmd">
<p><code>CMD | &CMD</code><br>
<code>{&cmd}</code></p>
<p>The <code>{&cmd}</code> variable contains the command name the user
used, that caused the <code>MPI</code> to run. This is generally the
exit name that the player triggered. For example, if the player typed
`east', and triggered the exit named `east;e;out', which ran some
<code>MPI</code> commands, the <code>{&cmd}</code> variable would have a
value of "east".
[<a href="#top">top</a>]</p><hr>
<a name="concat">
<p><code>CONCAT</code><br>
<code>{concat:listname}</code><br>
<code>{concat:listname,obj}</code></p>
<p>Returns a string, containing the concatenated lines of a property
based list. It concatenates the list semi-intelligently, putting a
single space between lines normally, and two spaces between lines when
the previous one ended with a period, exclamation mark, or question
mark. A property based list is a series of properties that are
consecutively numbered. The server understands several different
formats, and can also read in property lists in either the propnameX
format, or the <code>propname#/X</code> format. It does <em>not</em>
evaluate the contents of the list for embedded <code>MPI</code>
commands. If no <code>obj</code> argument is supplied, then it looks for
the list somewhere down the environment from the trigger object.
Otherwise, it looks for the list down the environment from the given
object.
[<a href="#top">top</a>]</p><hr>
<a name="contains">
<p><code>CONTAINS</code><br>
<code>{contains:obj1}</code><br>
<code>{contains:obj1,obj2}</code></p>
<p>Returns true if <code>obj1</code> is within <code>obj2,</code> or
within anything it contains, or within anything they contain. If
<code>obj2</code> is not given, then it checks to see is
<code>obj1</code> is held by the player, or by anything they hold, etc.
Basically, this just sees if <code>obj1</code> is within the locational
environment of <code>obj2.</code>
[<a href="#top">top</a>]</p><hr>
<a name="contents">
<p><code>CONTENTS</code><br>
<code>{contents:obj}</code><br>
<code>{contents:obj,type}</code></p>
<p>Returns a list of the contents of the given object. If a second
argument is passed to it, it restricts the listing to only those objects
that are of the given type. Either the object must be nearby the trigger
object, or else the owner of the trigger object must control the object.
Otherwise this will error out with a <code>Permission Denied</code>
error. The valid object type values are <code>Room,</code>
<code>Thing,</code> <code>Exit,</code> <code>Player,</code>
<code>Program,</code> and <code>Bad.</code> <em>Hint</em>: If you need
to get a list of two types of objects from the room, just concatenate
the lists from two calls to this function, with each object type you
want. For example:</p>
<p><code>
{mklist:{contents:here,player},{contents:here,thing}}
- or -<br>
{contents:here,player}{nl}{contents:here,thing}
</code></p>
[<a href="#top">top</a>]</p><hr>
<a name="controls">
<p><code>CONTROLS</code><br>
<code>{controls:obj}</code><br>
<code>{controls:obj,player}</code></p>
<p>If one argument is given, then this returns true ("1") if the trigger
object's owner controls the given object. If two arguments are given,
then it returns true if the given player controls the given object.
Otherwise, this returns false. ("0") Wizards control everything
[<a href="#top">top</a>]</p><hr>
<a name="convsecs">
<p><code>CONVSECS</code><br>
<code>{convsecs}</code></p>
<p>Converts systime seconds into a readable time string.
[<a href="#top">top</a>]</p><hr>
<a name="convtime">
<p><code>CONVTIME</code><br>
<code>{convtime:string}</code></p>
<p>Converts <code>"HH:MM:SS</code> Mo/Dy/Yr"</code> format time string
to systime seconds.
[<a href="#top">top</a>]</p><hr>
<a name="count">
<p><code>COUNT</code><br>
<code>{count:list}</code><br>
<code>{count:list,sep}</code></p>
<p>This counts the number of <code>\r</code> delimited items that are in
the given list. This is effectively a list item count. If the sep
argument if given, then it counts the number of sep delimited substrings
in list. ie: The default sep <code>is</code> \r. (A carriage return.)
[<a href="#top">top</a>]</p><hr>
<a name="created">
<p><code>CREATED</code><br>
<code>{created:obj}</code></p>
<p>Returns the systime when <code>obj</code> was created.
[<a href="#top">top</a>]</p><hr>
<a name="d">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="date">
<p><code>DATE</code><br>
<code>{date}</code><br>
<code>{date:timezone}</code></p>
<p>Returns a date string in the form <code>mm/dd/yy.</code> If the
timezone argument is given, then it offsets the date returned by that
number of hours.
[<a href="#top">top</a>]</p><hr>
<a name="dbequals">
<p><code>DBEQ | DBEQUALS</code><br>
<code>{dbeq:obj1,obj2}</code></p>
<p>Returns true if <code>obj1</code> and <code>obj2</code> refer to the
same <code>object.</code> This does name matching, so
<code>{dbeq:*Wizard,#1}</code> will return true if <code>#1</code> is
named Wizard.
[<a href="#top">top</a>]</p><hr>
<a name="debug">
<p><code>DEBUG</code><br>
<code>{debug:expr}</code></p>
<p>This will show <code>MPI</code> debugging information for all the
commands within the given expression. This is useful for seeing why
something isn't working. This returns the result of the evaluation of
<code>expr.</code>
[<a href="#top">top</a>]</p><hr>
<a name="debugif">
<p><code>DEBUGIF</code><br>
<code>{debugif:condition,statement}</code></p>
<p>If <code>condition</code> evals true, use debug mode is used when
evaluating statement. Otherwise the statement is evaluated in regular
mode.
[<a href="#top">top</a>]</p><hr>
<a name="decrement">
<p><code>DEC | DECREMENT</code><br>
<code>{dec:var}</code><br>
<code>{dec:var,val}</code></p>
<p>Decrements the value of the given variable by one, returning the
result. If a value argument is given, then it will subtract that from
the variable, instead of the value <code>1.</code>
[<a href="#top">top</a>]</p><hr>
<a name="delay">
<p><code>DELAY</code><br>
<code>{delay:secs,expr}</code></p>
<p>Evaluates the given expression, then puts the result of that on the
timequeue, to execute after the given number of seconds. At that time,
the string is evaluated again, and displayed to the user, or to the
room, depending on whether it was run from a regular message such as
<code>@succ,</code> or from an omessage such as <code>@osucc.</code>
Since the expression is evaluated both before and after being delayed,
you need to put <code>MPI</code> code that is to run after the delay
within a <code>{lit:expr}</code> command. If a <code>{delay}</code>
evaluation is a null string, then the notify or notify_except will not
be done. <code>{Delay}</code> will return the process ID of the event
it puts on the timequeue.
[<a href="#top">top</a>]</p><hr>
<a name="delprop">
<p><code>DELPROP</code><br>
<code>{delprop:propname}</code><br>
<code>{delprop:propname,object}</code></p>
<p>This function will remove a property and all of its subsidiary
properties in the case that it is a propdir. This will delete the
property on the trigger object, unless an object argument is specified.
If one is, then it will delete the property on that given object. This
function returns a null string. If you specify a propname that is
protected, you will get an error of <code>Permission Denied</code>. You
are only allowed to delete properties from objects that are owned by the
owner of the trigger object.
[<a href="#top">top</a>]</p><hr>
<a name="dice">
<p><code>DICE</code><br>
<code>{dice:X}</code><br>
<code>{dice:X,Y}</code><br>
<code>{dice:X,Y,Z}</code></p>
<p>Given one parameter, picks a random number between <code>1</code> and
<code>X.</code> <code>(1dX)</code> Given two parameters, it randomly
generates <code>Y</code> numbers between <code>1</code> and
<code>X,</code> and adds them together. <code>(YdX)</code> A third
parameter, if given, is just added to this sum as a modifier.
<code>(YdX+Z)</code>
[<a href="#top">top</a>]</p><hr>
<a name="distance">
<p><code>DIST | DISTANCE</code><br>
<code>{dist:x,y} Returns distance from 0,0 that x,y</code> is.<br>
<code>{dist:x,y,z} Returns distance from 0,0,0 that x,y,z</code> is.<br>
<code>{dist:x,y,x2,y2} Returns distance between x,y and x2</code>,y2.<br>
<code>{dist:x,y,z,x2,y2,z2} Returns distance between x,y,z and x2,y2</code>,z2.</p>
<p>Given two arguments, this calculates the distance of a 2D point from
the origin. Given three arguments, this calculates the distance of a 3D
point from the origin. Given four arguments, this calculates the
distance between a pair of 2D points. Given six arguments, this
calculates the distance between a pair of 3D points.
[<a href="#top">top</a>]</p><hr>
<a name="divide">
<p><code>DIV | DIVIDE</code><br>
<code>{div:expr1,expr}</code><br>
<code>{div:expr1,expr2,expr3...}</code></p>
<p>Returns the value of <code>expr1</code> divided by
<code>expr2.</code> Division by zero will return zero. If more than two
arguments are given, then the first argument is divided by the second,
and the result is divided by the third, etc, for all of the arguments.
For example: <code>{div:180,6,3,5}</code> would be read like <code>180
/ 6 / 3 / 5</code>, and a result of 2 would be returned.
[<a href="#top">top</a>]</p><hr>
<a name="e">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="equals">
<p><code>EQ | EQUALS | ==</code><br>
<code>{eq:expr1,expr2}</code></p>
<p>If <code>expr1</code> and <code>expr2</code> evaluate out to the same
value, then this returns true. Otherwise, this returns false. If both
expressions evaluate out to numbers, then this compares them
numerically.
[<a href="#top">top</a>]</p><hr>
<a name="eval">
<p><code>EVAL</code><br>
<code>{eval:string}</code></p>
<p>Sort of the exact opposite of <code>{lit:}</code>. This takes a
string, and evaluates it for <code>MPI</code> commands embedded within
it. This can be used on the output of <code>{list:}</code>, for example.
[<a href="#top">top</a>]</p><hr>
<a name="exec">
<p><code>EXEC</code><br>
<code>{exec:propname}</code><br>
<code>{exec:propname,obj}</code></p>
<p>Returns the string value of the given property, after having
evaluated any embedded <code>MPI</code> commands that it contained. If
no object parameter is passed to it, it looks for the property somewhere
down the environment from the trigger object. Otherwise, it looks down
the environment from the object specified. If the property is not found,
this returns an empty string. If the property that it tries to access is
read restricted and the owner of the trigger object does not own the
object that the property is found on, then the <code>MPI</code> script
stops with a <code>Permission denied</code> error.
[<a href="#top">top</a>]</p><hr>
<a name="exec!">
<p><code>EXEC!</code><br>
<code>{exec!:propname}</code><br>
<code>{exec!:propname,obj}</code></p>
<p>Returns the string value of the given property, after having
evaluated any embedded <code>MPI</code> commands that it contained. If
no object parameter is passed to it, it looks for the property on the
trigger. Otherwise, it looks for the property on the object specified.
If the property is not found, this returns an empty string. If the
property that it tries to access is read restricted and the owner of the
trigger object does not own the object that the property is found on,
then the <code>MPI</code> script stops with a <code>Permission
denied</code> error.
[<a href="#top">top</a>]</p><hr>
<a name="exits">
<p><code>EXITS</code><br>
<code>{exits:obj}</code></p>
<p>Returns a list of all the exits on the given object. The owner of the
trigger object has to control <code>obj,</code> or else this errors out
with <code>Permission denied</code>. Programs and exits never have exits
attached to them.
[<a href="#top">top</a>]</p><hr>
<a name="f">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="filter">
<p><code>FILTER</code><br>
<code>{filter:var,list,expr}</code><br>
<code>{filter:var,list,exp,sep}</code><br>
<code>{filter:var,lst,exp,sep,s2}</code></p>
<p>This evaluates <code>expr</code> for each and every item in the given
list. On each evaluation, the temporary variable <code>var</code> will
contain the value of the item under scrutiny. This function returns a
list containing all of the items from the input list, for which
<code>expr</code> evaluated true. <code>Var</code> will only be defined
for the duration of <code>expr,</code> and will be undefined after the
<code>{filter}</code> construct finishes. If sep is given, then it uses
that string as the item seperator in the input list, instead of the
usual carriage return character. If <code>s2</code> is defined, then it
will use that string to seperate the items in the list it returns,
instead of the normal carriage return. <code>Sep</code> and
<code>s2</code> can be multiple characters long.
[<a href="#top">top</a>]</p><hr>
<a name="flags">
<p><code>FLAGS</code><br>
<code>{flags:obj}</code></p>
<p>Returns a flaglist string from <code>obj.</code>, such as
<code>PM2J.</code> The object must either be in the vicinity, or it must
be controlled by the owner of the trigger object.
[<a href="#top">top</a>]</p><hr>
<a name="fold">
<p><code>FOLD</code><br>
<code>{fold:var1,var2,list,expr}</code><br>
<code>{fold:var1,var2,lst,expr,sep}</code></p>
<p>This takes a list and stores the first two items in <code>var1</code>
and <code>var2,</code> then evaluates <code>expr.</code> The value
returned by <code>expr</code> is then put in <code>var1,</code> and the
next list item is put in <code>var2.</code> <code>Expr</code> keeps
being evaluated in this way until there are no more list items left.
This returns the last value returned by <code>expr.</code> If a sep
argument is given, the input list is assumed to have its individual
items delimited by that string, otherwise it assumes a carriage return.
[<a href="#top">top</a>]</p><hr>
<a name="for">
<p><code>FOR</code><br>
{for:varname,start,end,increment,command}</p>
<p>Acts as a counting loop, like BASIC's <code>for</code> loops. The
<code>varname</code> is the name of the variable that it will create and
use to store the count value. The start value will be the initial value
of the variable, and the end value will be the value that the variable
is working towards. The increment is how much the variable will be
incremented by in each loop. The command will be evaluated for each
value of the variable between the beginning and ending values. For
example: <code>{null:{for:i,10,1,-1,{tell:{&i}}}}</code> will echo a
countdown from ten to one, inclusive, to the user.
[<a href="#top">top</a>]</p><hr>