-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhilite.tf
2075 lines (1773 loc) · 74.2 KB
/
hilite.tf
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
; startup definition file
; please do not remove the next line, it enables the additional
; Windows Specific Functionality for the GUI tools (only installed
; by the Windows Enhanced Build installer)
/require winlib.tf
; general
/set isize=3
/visual on
/redef on
; worlds
; Please make all of your manual edit changes below this line as tf-config
; will overwrite any changes above here.
; ----------------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; TFRC file for Gwen Morse, last modified: 06/30/03 ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Updated so all macros work under 4s1 and 5a11.
;;; Definitions that must come 'first'
/def -Fag -hREDEF gag_redef
/def -Fag -h'conflict' gag_conflict
/def -hload -Fag gag_load
;;; Enter the directories where you keep your tf files.
;;; Home directory if-else help from "Sizer" <sizer at san dot rr dot com>
;;; The if-else check is to see 'which' machine I am running TF on.
;;; I do this because I use TF on multiple machines and OS-es.
;;; That way, I can use one tfrc file on multiple machines.
;;;
;;; I make use of the "STATUS" definition in later macros to determine
;;; "which" machine I'm on.
/if (HOME=~"/home/goldmoon")\
/cd /home/goldmoon %;\
/set HOME=/home/goldmoon %;\
/def LOGDIR=/win/My Documents/Tinyfugue/logs %;\
/def LOCALLIBDIR=/win/My Documents/Tinyfugue/ %;\
/def LOGFILE=/win/My Documents/Tinyfugue/tiny.log %;\
/def DECDIR=/win/My Documents/Tinyfugue/decompile %;\
/set status=linbook %;\
/elseif (HOME=~"/home/morsej")\
/cd /home/morsej%;\
/set HOME=/home/morsej %;\
/def LOGDIR=/home/morsej/tf-logs %;\
/def LOCALLIBDIR=/home/morsej/locallib %;\
/def LOGFILE=/home/morsej/logs/tiny.log %;\
/def DECDIR=/home/morsej/tf-dec %;\
/set status=work %;\
/else \
/cd /cygdrive/e/MUSH/Tf/%;\
/def LOGDIR=/cygdrive/e/My Documents/Tinyfugue/logs %;\
/def LOCALLIBDIR=/cygdrive/e/MUSH/Tf/locallib %;\
/def LOGFILE=/cygdrive/e/MUSH/Tf/logs/tiny.log %;\
/set status=winbook %;\
/set DECDIR=/cygdrive/e/My Documents/Tinyfugue/decompile %;\
/endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; loading lib programs I like
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/require world-q.tf
/require spc-page.tf
/require kbstack.tf
/require complete.tf
/require textutil.tf
/def -F spelling=\
/if ({status}=~"winbook") \
/require complete.tf %;\
/else \
/require spell.tf %;\
/endif
/spelling
;; More space-page broken in 5a11.
;; As a short-term workaround you could try redefining pager like so:
/def -i pager = \
/dokey page%; \
/if (moresize() == 0) \
/purge -ib" "%; \
/endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; setting TF system defaults I like
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; /set TZ=EST5EDT
/set maildelay=0
/set oldslash=off
/set redef=on
/set isize=5
/set more=on
/set cleardone=on
/set quiet=on
/set visual=on
/set wrapspace=2
/set insert=on
/set histsize=25000
/set ptime=0
/def -f host_def = \
/quote /set hostname=!hostname
/host_def
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Special Logging Macros
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Put together from definitions by Andrew Mortimer and members of the
; Tinyfugue mailing list
; When I connect to a world, it starts logging (-w) to the file
; 'date_worldname.log', where date is in the format Year-Month-Day. For
; example: 1997-12-02_<world>.log. It also writes the time the log starts in the file.
; This format keeps logs in date order in the directory.
;;; This version doesn't include the multi-machine 'status' check:
;; /def -Fp100 -h'connect' connect_log = \
;; /log -w ${LOGDIR}/$[ftime("%Y-%m-%d", time())]_${world_name}.log %;\
;; /eval /echo -ag -w${world_name} \
;; %========================================================================== %;\
;; /eval /echo -ag -w${world_name} \
;; %= Log for world *** ${world_name} ***, started $(/time %%c) %;\
;; /eval /echo -ag -w${world_name} \
;; %==========================================================================
;;; This version includes the multi-machine 'status' check:
/def -Fp100 -h'connect' connect_log = \
/if ({status}=~"work") \
/log -w ${LOGDIR}/$[ftime("%Y-%m-%d", time())]w_${world_name}.log %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/eval /echo -ag -w${world_name} \
%= Log for world *** ${world_name} ***, started $(/time %%c) %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/elseif ({status}=~"linbook") \
/log -w ${LOGDIR}/$[ftime("%Y-%m-%d", time())]_${world_name}.log %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/eval /echo -ag -w${world_name} \
%= Log for world *** ${world_name} ***, started $(/time %%c) %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/elseif ({status}=~"winbook") \
/log -w ${LOGDIR}/$[ftime("%Y-%m-%d", time())]_${world_name}.log %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/eval /echo -ag -w${world_name} \
%= Log for world *** ${world_name} ***, started $(/time %%c) %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/else \
/log -w ${LOGDIR}/$[ftime("%Y-%m-%d", time())]b_${world_name}.log %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/eval /echo -ag -w${world_name} \
%= Log for world *** ${world_name} ***, started $(/time %%c) %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/endif
; Lets /dc function like 'QUIT' to trigger the disconnect (needed to close the log)
; written by 'Brack <slayer at kaiwan dot com>'
/def -F -1ag -h'conflict' gagconflict
/def -Fiq dc = /if /@dc %*%; /then /trigger -hdisconnect %*%; /endif
; This lets you return to the special logging after shutting it off with /log off.
; Note, if the original special log was during the previous calendar 'day', then,
; /relog will start a new log!
;
; Syntax: '/relog'
/def -i -q relog = /connect_log
;This is the disconnect function, noting the time the log ended and closing the file.
/def -Fp100 -h'disconnect' disconnect_log = \
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/eval /echo -ag -w${world_name} \
%= Log for world *** ${world_name} ***, ended $(/time %%c) %;\
/eval /echo -ag -w${world_name} \
%============================================================================== %;\
/log -w${world_name} off
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; World.tf file info
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; <snippage - get your own worldlist!>
;;;;;;;;;;;;;;;;;;;;;;
;; Sneaky world system
;; Pretend you have multiple computers you play from, and you have a character
;; (or characters) that you only want to be able to play from a specific account.
;; (Stealth RP!)
;; You can use a modified form of the below macro (coupled with the {status} macro
;; shown earlier) to only add world(s) when you're on the 'correct' account.
/def -F tsc=\
/if ({status}=~"winbox") \
/addworld -T"tiny.mush" tsc palemoon.com 9990 %;\
/else \
/endif
/tsc
;;;;;;;;;;;;;;;;;;;;
;;
;;
/addworld -T"tiny" NOWHERE nowhere guest guest localhost 9999
;;
;;;;;; IRC "Worlds"
/addworld -T"irc.irc" teambg irc.teambg.net 6667
/addworld -T"irc.irc" fwp irc.gamesnet.net 6667
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; hilite.tf file info
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Make pages, multipages, and whispers stand out
;;; Gwen: I like to make my pages/multipages/whispers that I send out hilighted
;;; also, not just the ones people send to me. To discriminate between them,
;;; I use the non-bold form of the color I use for the incoming communication
;;; of the same type. This mostly helps me visually seperate any remote
;;; conversation from action in my location.
;bold cyan color pages
/def -i -p2 -aBCcyan -t'* pages[,:] *' hl_page1
/def -i -p4 -aBCcyan -t'You sense that * is looking for you in *' hl_page2
/def -i -p4 -aBCcyan -t'From afar, *' hl_page3
/def -i -p2 -aCcyan -t'Long distance to *' hl_page4
/def -i -p2 -aCcyan -t'You paged *' hl_page5
;bold green multi-pages
/def -i -p3 -aBCgreen -t'* pages (*) *' hl_mpage1
/def -i -p5 -aBCgreen -mregexp -t"(multipages|multi-pages)" hl_mpage2
/def -i -p5 -aCgreen -mregexp -t"(multipage|multi-page)" hl_mpage3
/def -i -p6 -aBCgreen -t'(To: *)' hl_mpage4
/def -i -p4 -aCgreen -t'(To: *) Long Distance, *' hl_mpage5
/def -i -p5 -aCgreen -t'(To: *) * pages: *' hl_mpage6
;bold blue color whispers
/def -i -p2 -aBCblue -t'* whispers[,:] *' hl_whisper1
/def -i -p3 -aBCblue -t'You sense *' hl_whisper2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Full-line highlights (odds and ends)
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;When someone triggers a character @adesc (bold magenta)
/def -p5 -aBCmagenta -t'* looked at *.' hl_adesc
/def -p5 -aBCmagenta -t'* is looking at *.' hl_adesc2
;hilite Activity in bg worlds
/def -p2 -F -hACTIVITY -aBCwhite hl_activity
;<OOC> Code
/def -p4 -aBCyellow -t'<OOC> *' hl_ooc
;+watch code
/def -i -p5 -aBCgreen -t'<Watch> *' hl_watch
;MUX 'game' messages
/def -i -p5 -F -aBCgreen -t'GAME:*' hl_watch2
;+finger pemits
/def -i -p5 -F -aBCgreen -t'* +fingered you.' hl_finger
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; "Partial" highlights of importance
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Channels
;Any '[ ]' or '>'
/def -i -p9 -P0BCred -F -t'\\[*\\]' tiny_sh1
/def -i -p8 -P0BCred -mregexp -F -t"^\\[.*\\]" tiny_sh2
/def -i -p8 -P0BCred -mregexp -F -t"^[A-Za-z0-9 _-]*>" tiny_sh3
/def -i -p7 -P0BCred -mregexp -F -t"^<.*> " tiny_sh4
; Warnings
/def -i -p3 -F -P1xBCred -t'(ALERT>)' par_alert
/def -i -p1 -P0BCred -F -t'^[^ ]+ >>' night_chan
; Table-talk conversation partially in white
/def -i -p7 -P0xBCwhite -t'^(At|In) (your|the) [^,:]*[,:]' par_place1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Gag lines
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Gags
/def -i -p3 -ag -mregexp -t"^You own a (floating|disconnected) room" floating_gag
/def -i -p3 -ag -t"*Saving your work*" savework_gag
/def -i -p3 -ag -t"START LOG NOW*" startlog_gag
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Odds and Ends (doesn't fit anywhere else)
;; What time people connect
/def -i -p10 -F -t'* has connected.' contime_trig = \
/send -w @pemit me=\[time()\]
/def -i -p10 -F -t'* has disconnected.' discontime_trig = \
/send -w @pemit me=\[time()\]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Auto-idler
/def idler=\
/if (world_info()!~"") \
/send -W @@ %;\
/repeat -0:6:00 1 /idler %;\
/endif%;\
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;----------------------------------------------------------------------
;;; TF stuff, by Tiercel/JBB, batzel at cceb.med.upenn.edu
;;;----------------------------------------------------------------------
;;; MUSHcode escaper. If you've typed a long line of code (or grabbed
;;; it with /fuguedit), you don't want to have to go through by hand to
;;; escape out all those characters MUSH will eat. Instead, with this
;;; loaded, just hit esc-e, and it escapes all the odd characters in
;;; what you've just typed (or /redit'd).
;;; RATING: **** (Very useful for heavy coders or for teaching people code)
/def -ib'^[e' = /test kbgoto(kblen() + 1) %;\
/grab $(/escape %%[]{}\ $[kbhead()])
/def -i -F eschelp = %;/echo%;/echo *** Tiercel's MUSHcode Escaper Help %;\
/echo If you've typed a long line of code (or grabbed it with Fuguedit), %;\
/echo you don't want to have to go through by hand to escape out all those %;\
/echo characters MUSH will eat. Instead, with this loaded, just hit esc-e, %;\
/echo and it escapes all the odd characters in the command line. %;\
/echo %;/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Status Field update
;;;
;;; Status_field default
;;; @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 @mail:6 :1 insert:6 :1 @clock:5
;;;
;;; and the corresponding format variables are:
;;;
;;; /set status_int_more \
;;; moresize() == 0 ? "" : \
;;; moresize() > 9999 ? "MuchMore" : \
;;; pad("More", 4, moresize(), 4)
;;; /set status_int_world ${world_name}
;;; /set status_int_read nread() ? "(Read)" : ""
;;; /set status_int_active nactive() ? pad("(Active:",0,nactive(),2,")") : ""
;;; /set status_int_log nlog() ? "(Log)" : ""
;;; /set status_int_mail \
;;; !nmail() ? "" : \
;;; nmail()==1 ? "(Mail)" : \
;;; pad("Mail", 0, nmail(), 2)
;;; /set status_var_insert insert ? "" : "(Over)"
;;; /set status_int_clock ftime("%I:%M", time())
;;;
;;; /set status_fields @more:8:Br :1 @world :1 @read:6 :1 @active:11 :1 @log:5 :1 insert:6 :1 @clock:12
;;; /set status_int_clock ftime("%I:%M %m/%d", time())
;;;
;;; My changes (Gwen Morse)
;;; 1) removed the @mail configuration (since I use Windoze)
;;; 2) reset the clock to show date in dd/mm format along with time.
;;; 3) updated status line to include Australia TZ information (based on help below)
;;;
;;; From: Craig Marsden (TF mailing list)
;;;
;;; Not very pleasant but this line displays the time in the UK (me), AT
;;; (time on the game) and MC is the timezone of a good friend of mine
;;; (Canada).
;;; The number is in seconds so its (hours from your timezone to another) * 60 * 60
;;; This may be incorrect 2 weeks out of 52, as different regions treat DST differently.
;;;
;;; (Gwen Note: Australia +15 hrs=+54000 || Australia +14 hours=+50400 || +16 hours +57600)
;;;
;;; /set status_int_clock strcat(ftime("%H:%M", time()), "__AT:", ftime("%H:%M", time()-18000), "__MC:", ftime("%H:%M", time()-14400))
;;; /def setstatus = /set status_fields = @more:8 "_Wd:":4 @world:5 "_UK:":4 @clock:25 @read:6 @active:11 @log:5 @mail:6 insert:6
;;;
;;; /set status_int_clock strcat(ftime("%I:%M%p", time()), " SW: ", ftime("%I:%M%p", time()+21600), " OZ: ", ftime("%I:%M%p", time()+54000))
;;; /set status_int_clock strcat(ftime("%I:%M%p", time()), " OZ: ", ftime("%I:%M%p", time()+57600))
;;; /set status_fields @more:8:Br :1 "Wd:":3 @world:5 :1 @read:6 :1 @active:11 :1 @log:5 :1 "_NY: ":5 @clock:32
;;; 5.0 update: New way to modify status field. The below code will give errors, but, does function. Look
;;; into updating it to work seamlessly.
/set status_int_clock strcat(ftime("%I:%M%p", time()), " _ OZ: ", ftime("%I:%M%p", time()+50400))
/set status_fields @more:8:Br :1 "Wd:":3 @world:5 :1 @read:6 :1 @active:11 :1 @log:5 :1 "_NY: ":5 @clock:21
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; IDE Highlighting
;;;
;;; I'm sure most of you have worked on a IDE that uses syntax highlighting if you're into
;;; any sort of coding at all, you all know how useful it can be. Of course, MUSHes didn't
;;; have that -- till now. If you paste the following into your .tfrc (for tinyfugue
;;; users; others probably will have to modify this code) and then do line joins if
;;; necessary, you'll get some form of syntax highlighting.
;;; Author: Kamikaze: http://www.imsa.edu/~kamikaze/
/def -p10 hilight_cmd = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd2 = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd3 = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd4 = /def -PBCwhite -F -t"%1"
/def -p10 -F -PBCyellow -t'(\{|\})'
/def -p10 -F -PBCred -t'(\[|\])'
/def -p10 -F -PBCgreen -t'(\(|\))'
/def -p10 -F -PBCblue -t'(=|;|/|\%0|\%1|\%2|\%3|\%4|\%5|\%6|\%7|\%8|\%9|\%#|\%@|\%N)'
/def -p10 -F -PBCmagenta -t'(\%r|\%b|\%t|\%s|\%p|\%o|\%!|\%l)'
/def -p10 -F -PBCcyan -t'(\%q0|\%q1|\%q2|\%q3|\%q4|\%q5|\%q6|\%q7|\%q8|\%q9|\%Q0|\%Q1|\%Q2|\%Q3|\%Q4|\%Q5|\%Q6|\%Q7|\%Q8|\%Q9)'
/def -p10 -F -PBCmagenta -t'(,)'
/hilight_cmd (@@|@allhalt|@allquota|@atrchown|@atrlock|@attribute|@boot|@cemit|@channel|@chat|@chown)
/hilight_cmd (@chownall|@chzone|@chzoneall|@clock|@clone|@command|@config|@cpattr|@create|@dbck)
/hilight_cmd (@decompile|@destroy|@dig|@disable|@doing|@dolist|@drain|@dump|@edit|@elock|@emit|@enable)
/hilight_cmd (@entrances|@eunlock|@find|@firstexit|@fixdb|@force|@function|@gedit|@grep|@halt|@hide|@kick)
/hilight_cmd2 (@link|@listmotd|@list|@lock|@log|@mail|@map|@motd|@mvattr|@name|@newpassword|@notify|@nuke)
/hilight_cmd2 (@oemit|@open|@parent|@password|@pcreate|@pemit/list|@pemit|@poll|@poor|@power|@ps|@purge|@quota)
/hilight_cmd2 (@recycle|@rejectmotd|@remit|@restart|@rwall|@rwallemit|@rwallpose|@scan|@search|@select)
/hilight_cmd3 (@shutdown|@sitelock|@squota|@stats|@sweep|@switch|@tel|@teleport|@toad|@trigger|@ulock|@unlock)
/hilight_cmd3 (@undestroy|@unlink|@unlock|@unrecycle|@uptime|@uunlock|@verb|@version|@wait|@wall|@wallemit)
/hilight_cmd3 (@wallpose|@warnings|@wcheck|@wipe|@wizemit|@wizmotd|@wizpose|@wizwall|@zemit|@desc|@dol)
/hilight_cmd4 (@sel|@fo|@no|@listen|@lemit|@femit|@fpose|@fsay|@mudwho|@alias|@last|@robot|@readcache)
/hilight_cmd4 (@setq|@set)
; Hilite various Tiny-MUSH specific settings (dbrefs, flags, @'s, etc)
; written by Andrew Mortimer
/def -i -p1 -P0BCred -mregexp -F -t'#[0-9]+' tiny_dbrefnum
/def -i -p1 -P0BCred -mregexp -F -t'#-1' tiny_dbreferr
/def -i -p1 -P1BCred -mregexp -F -t'#[0-9]+([A-Za-z\$+&@]+( \[[^]]+\])?)' tiny_dbrefflag
/def -i -p1 -P0Cwhite -mregexp -F -t'@[A-Za-z_]+' tiny_atcomm
/def -i -p1 -P1Cwhite -mregexp -F -t'^([ ]*[^;()# ]+)(\\(#[0-9]+\\))?:.*' tiny_heads
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; defining Improved Fugue Edit command
;;;
;;; FROM: http://www.chaoticmux.org/~kareila/TF/
;;;
;;; FugueEdit macro (ed obj/attr)
;;; Probably the most common tf macro out there is one that will grab the text of
;;; an attribute into the input buffer for editing. The incarnation I was given required
;;; some softcode to implement, and the only tf-side code you had to define was the
;;; gag-trigger that got the input. This worked, but I was annoyed that I had to
;;; port this piece of softcode to every game I was on. So I recoded it to be
;;; defined entirely within tf. It uses the usual syntax: "/ed <obj>/<attr>".
;;;
;;; FugueEdit macro (ed obj/attr) coded by Kareila@ChaoticMUX
;;; based on mushcode that originated with van@TinyTIM
;;; and has mutated several times since then.
;;; Thanks to Gwen Morse for the incentive to make improvements. :)
;;;
;;; Gwen: works -- very nice! And, look, I get credit for "inspiring" improvements!
; edmarker can be anything you like - no spaces allowed.
/set edmarker TFEdit
/eval /def -p100 -ag -t'%{edmarker} > *' edtrig = /grab %%-2
/def ed = \
/if (regmatch('/',{*})) \
/let edobj %PL %; \
/let edattr %PR %; \
/def -n1 -t#* -q -ag tempedtrig = \
@pemit me = switch(%%*, \
#-1, I don't see that here., \
#-2, I don't know which one you mean!, \
%{edmarker} > &%{edattr} %{edobj} = \
[get(%%*/%{edattr})]) %; \
/send @pemit me = locate(me, %{edobj}, *) %; \
/else /echo %% %{edmarker}: ed argument must be of form <obj>/<attr> %; \
/endif
/def -h"send ed *" edhook = /ed %-1
/def ng = \
/if (regmatch('/',{*})) \
/echo %% %{edmarker}: ng argument must be a valid object name %; \
/else \
/def -n1 -t#* -q -ag tempngtrig = \
@pemit me = switch(%%*, \
#-1, I don't see that here., \
#-2, I don't know which one you mean!, \
%{edmarker} > @name %* = [translate(fullname(%%*))]) %; \
/send @pemit me = locate(me, %*, *) %; \
/endif
/def -h"send ng *" nghook = /ng %-1
/def lock = \
/if (regmatch('/',{*})) \
/let edobj %PL %; \
/let edattr %PR %; \
/def -n1 -t#* -q -ag templocktrig = \
@pemit me = switch(%%*, \
#-1, I don't see that here., \
#-2, I don't know which one you mean!, \
%{edmarker} > @lock/%{edattr} %{edobj} = \
[lock(%%*/%{edattr})]) %; \
/send @pemit me = locate(me, %{edobj}, *) %; \
/else \
/def -n1 -t#* -q -ag templocktrig = \
@pemit me = switch(%%*, \
#-1, I don't see that here., \
#-2, I don't know which one you mean!, \
%{edmarker} > @lock %* = [lock(%%*)]) %; \
/send @pemit me = locate(me, %*, *) %; \
/endif
/def -h"send lock *" lockhook = /lock %-1
/def edhelp = \
/echo -p @{h}ed <obj>/<attr>:@{n} \
edits the given attribute on the given object. %; \
/echo -p @{h}ng <obj>:@{n} \
grabs the name of the given object for editing. %; \
/echo -p @{h}lock <obj>[/<type>]:@{n} \
edits the given lock (default lock if no type given).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FROM: http://www.chaoticmux.org/~kareila/TF/
;;; Macro for quickly cloning a copy of an object to a different mush
;;; without the need to log a @decompile. http://www.amtgard.com/~marvin/
;;; This is a useful macro I got from Pedersen's web page, which unfortunately
;;; appears to have bitten the proverbial dust since I snarfed it. It defines a macro,
;;; /clone, that can be used to quickly reproduce an object between worlds you
;;; are connected to, with no intermediate logfile.
;;;
/def clone = \
/def -t&* -p100 -q -ag -w%1 cloneitampertrig = /send -w%2 \%* %; \
/def -t@* -p100 -q -ag -w%1 cloneitattrig = /send -w%2 \%* %; \
/def -tCLONEDONE -p10 -q -ag -w%1 cloneitdone = /purge cloneit* %; \
/def -tCLONEDONE -p1000 -n1 -q -ag -w%1 cloneitgagfirst %; \
/send -w%1 OUTPUTSUFFIX CLONEDONE %; \
/send -w%1 @decompile %3 %; \
/send -w%1 OUTPUTSUFFIX %; \
/send -w%1 @pemit \%#=Object is now sent.
/def clonehelp = /echo -p @{u}Syntax:@{n} /clone <worldfrom> <worldto> <object>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FROM: http://www.chaoticmux.org/~kareila/TF/
;;; TF multidescer coded by Kareila@ChaoticMUX, May 2003
;;;
;;; Syntax: /showdescs, /listdescs, /showdesc <desc>, /setdesc [<obj>=]<desc>
;;;
;;; To add a desc: /set desc_<descname> <description> (see examples below)
;;;
;;; World specific adjustment and @dolist list support by Gwen Morse.
; Descriptions start here (descs "have" to come before the commands)
/set desc_testa %r[space(5)]the first short and boring test description
/set desc_testb the second short and boring test description
/set desc_testc This is a really long and boring test description. The \
real purpose of this description is to demonstrate how descriptions that \
are broken across multiple lines need to be continued with backslashes \
in order for the file to parse correctly. The extra spaces at the \
beginnings of lines are parsed out by TF.
; Commands are defined here
/def helpdescs = \
/echo %; \
/echo Syntax: /showdescs, /listdescs, /showdesc <desc>, /setdesc [<obj>=]<desc>
/def showdescs = /showdescs_ $(/listvar -mglob -s desc_${world_name}_*)
/def showdescs_ = \
/while ({#}) \
/test regmatch('^desc_${world_name}_',{1}) %; \
/showdesc %PR %; /shift %; \
/done
/def listdescs = /listdescs_ $(/listvar -mglob -s desc_${world_name}_*)
/def listdescs_ = \
/while ({#}) \
/test regmatch('^desc_${world_name}_',{1}) %; \
/set listdescs_temp %{listdescs_temp} %PR %; /shift %; \
/done %; \
/echo Available descriptions: %{listdescs_temp} %; /unset listdescs_temp
/def showdesc = \
/if ($(/eval /echo %%desc_${world_name}_%*) =~ '') \
/echo %% showdesc: No such description "%*". %;\
/else \
/eval /echo -p @{h}%*:@{n} %%desc_${world_name}_%* %; \
/endif
/def setdesc = \
/if (regmatch('=',{*})) \
/if ($(/eval /echo %%desc_${world_name}_%PR) =~ '') \
/echo %% setdesc: No such description "%PR". %; \
/else \
/echo %% Setting description "%PR" on object "%PL". %; \
/eval /send @desc %PL = %%desc_${world_name}_%PR %; \
/eval /send @dolist [num(%PL)] = %%desc_list_${world_name}_%PR %; \
/endif %; \
/elseif ($(/eval /echo %%desc_${world_name}_%*) =~ '') \
/echo %% setdesc: No such description "%*". %; \
/else \
/echo %% Setting description "%*". %; \
/eval /send @desc me = %%desc_${world_name}_%* %; \
/eval /send @dolist [num(me)] = %%desc_list_${world_name}_%* %; \
/endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FROM: http://www.chaoticmux.org/~kareila/TF/
;;; Cool shell-like hacks to grab previous commands from input history.
;;; Inputs beginning with ! echo and execute the last matching command.
;;; If ` is pressed, it grabs the last matching command for editing.
;;; Kareila 02/03/1999
/def -p1000 -mregexp -h'SEND ^!(.*)$' resend = \
/let matchtxt=$(/recall -i /1 %P1*) %; \
/if (strlen(matchtxt)) \
/echo %% %matchtxt %; \
/send %matchtxt %; \
/else \
/beep 1 %; \
/endif
/def -b'`' reedit = \
/if (regmatch('^!', (kbhead()))) \
/let matchtxt=$(/recall -i /1 $[substr((kbhead()),1)]*) %; \
/if (strlen(matchtxt)) \
/grab %matchtxt %; \
/else \
/beep 1 %; \
/endif %; \
/else \
/@test input("`") %; \
/endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MUSH/MUX data-base cloning
; Based on a count script by Michael Hunger (mh14 at inf dot tu-dresden dot de)
; Expanded to clone by Gwen Morse (goldmooneachna at yahoo dot com)
; Used OUTPREFIX examples provided by Kareila at chaoticMUX
;
; Handy little macro to @dec items incrementally in a database, one item at a time.
; Requires Wiz powers (or, will only @dec dbrefs you actually own).
;
; type: /dbc <number>
; where <number> is the *last* number in the database you want to log.
; @stats will tell you last # in database.
;
; Macro tells you the number and name of each item being cloned, and then
; @decompiles it to a log. Starts with #0
/def -w -q -F dbc = \
;;; if a parameter was given
/if ({#} > 0) %;\
/log -w${world_name} off %;\
/more off %;\
/idler %;\
;;; set variables (grabs from number entered)
/set counter= -1 %;\
/set end_counter=%1 %;\
/endif%;\
;;; if end reached end log
/if (counter==end_counter) %;\
/more on %;\
/relog %;\
/endif%;\
;;; if end not reached call itself in 2 (-2) seconds
/if (++counter<=end_counter)%;\
/send @pemit me = DBC> Now working with object #%counter, name: [edit(name(#%counter),\%b,_)] %; \
/def -q -ag -n1 -p1000 -t'DBC> Decompile done!' dbc_hide %; \
/send @decompile #%counter %; \
/send OUTPUTSUFFIX DBC> Decompile done! %; \
/send OUTPUTSUFFIX %; \
/repeat -w -2 1 /dbc%;\
/endif%;\
;;; Alternate @stats check to automagically tell /dbc what the ending # should be.
;;; Gwen: The check will set DBSTATS, but, it's not integrated with /dbc, yet.
/def -w -F -p100 -mregexp -t"^The universe contains ([0-9]+) objects" dbstats_set = \
/set DBSTATS=%{P1} %;\
;;;;;; DBC checks needed for DBC scripts
/def -p100 -qi -t'DBC> Now working with object *' dbc_start = \
/log -w %{DECDIR}/working/dbc_${world_name}_%{counter}_%8.log
/def -p100 -qi -t'DBC> Decompile done!' dbc_end = \
/log -w off
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Debugging Code help (MUSH/MUX)
;;;
;;; Original Source Mux-In-A-Minute Globals code. Ported to TF by Gwen Morse
;;; Gwen: DOES NOT YET WORK -- work in progress!
;;;
/def debug=[setq(0,num(%*))][setq(1,locate(me,r(0),*))]; @switch \
[isdbref(r(1))][controls(me,r(1))]=0?,{@pemit me=I'm sorry, but I can't see \
{'%*'} here.},10,{@pemit me=I'm sorry, but you can't modify that object.},11,{@set \
r(1)=VERBOSE; @set r(1)=TRACE; @pemit me=Debugging is now on for [name(r(1))].}
/def debugstop=[setq(0,num(%*))][setq(1,locate(me,r(0),*))]; @switch \
[isdbref(r(1))][controls(me,r(1))]=0?,{@pemit me=I'm sorry, but I can't see {'%*'} \
here.},10,{@pemit me=I'm sorry, but you can't modify that object.},11,{@set \
r(1)=!VERBOSE; @set r(1)=!TRACE; @pemit me=Debugging is now off for [name(r(1))].}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Elrick's @doing machine
;;;
;;; This is a (very rough) translation of Eldrik's @doing machine code
;;; to TF macros. No need for a parentable object on the MUSH to run it.
;;;
;;; To Use: Put this in your .tfrc. Once loaded in, type '/dohelp' for
;;; command list.
;;;
;;; Original code by Eldrik at AmberMUSH. Modified for TF by Rina at pobox dot com.
;;;
;;; Updated to work under tf40 by Gwen Morse (with mail list help)
;;;/def -i dorand = @fo [setq(0,extract(v(doings_list), \
;;; add(rand(words(v(doings_list),|)),1),1,|))]me=@doing [r(0)]; \
;;; @pemit me=@doing set: [r(0)]
/def -i dolist = @pemit me=Stored \
@doings:[iter(lnum(words(v(doings_list),|)),\%r[add(##,1)]. \
[extract(v(doings_list),add(##,1),1,|)])]
/def -i doset = @switch [and(lte(%*,words(v(doings_list),|)), \
gt(%*,0))]=1,{@fo [setq(0,extract(v(doings_list),%1,1,|))]me= \
@doing [r(0)]; @pemit me=@doing set: [r(0)]},@pemit me=That is not \
the number of a stored @doing.
/def -i doswap = @switch and(lte(%1,words(v(doings_list),|)), \
gt(%1,0),lte(%2,words(v(doings_list),|)),gt(%2,0))=1,{&doings_list \
me=[setq(0,extract(v(doings_list),%1,1,|))][replace(replace( \
v(doings_list),%1,extract(v(doings_list),%2,1,|),|),%2,r(0),|)]; \
@pemit me=@doings swapped.},@pemit me=At least one selection is invalid.
/def -i dorand = @fo [setq(0,extract(v(doings_list), \
add(rand(words(v(doings_list),|)),1),1,|))]me=@doing [r(0)]; \
@pemit me=@doing set: [r(0)]
/def -i dodel = @switch [and(lte(%*,words(v(doings_list),|)), \
gt(%*,0))]=1,{&doings_list me=[ldelete(v(doings_list),{%*},|)]; \
@pemit me=@doing deleted.},@pemit me=That is not a number of a \
stored @doing.
/def -i dohelp = %;/echo%;/echo @doing Machine commands:%;/echo%;/echo /dolist: List \
stored @doings.%;/echo /doadd <text>: Add an @doing.%; \
/echo /dodel <#>: Delete a stored @doing.%; \
/echo /doset <#>: Set your @doing to a stored one.%; \
/echo /dorand: Set your @doing randomly.%; \
/echo /doswap <#> <#>: Swap one @doing with another.%; \
/echo%;/echo Original code by Eldrik@AmberMUSH. Modified for TF \
by Rina@pobox dot com. Updated by Gwen Morse.
/def -i doadd = @switch gt(strlen(%*),40)=1,@pemit me={@doing is too long \
-- not saved. ([strlen(%*)] chars, 40 max)},{@switch words( \
v(doings_list),|)=0,&doings_list me={%*},{&doings_list me=[edit( \
v(doings_list),$$,|{%*})]};@pemit me=@doing added.}
;;; Gwen: Call 'dorand' on each world when I connect to it!
/def -Fp5 -h'connect' connect_doing = /repeat -w${world_name} -1 1 /dorand
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $Id: ignore.tf,v 1.1 1996/11/24 20:22:57 dmoore Exp $
; v1.0 - created May 31, 1996
; *** Requires tf3.5a18 or later to use. ***
; (May work with earlier versions.)
;
; dmoore at ucsd.edu
;
; You first say '/ignore_pair WORLD1 WORLD2', (with your two world names),
; to tell it that these two worlds go together. Then you can use
; '/ignore_toggle' from inside either of those worlds to switch which is
; ignored. And you can use '/ignore_off' to turn it off. It won't start
; ignoring until the first time you use '/ignore_toggle'. This way you
; can stick the '/ignore_pair W1 W2' command in your world file.
;
; You can also just say '/ignore_auto WORLD1 WORLD2' which will
; automatically keep the frontmost world in a pair showing text, and the
; background one hiding it.
;
; Both /ignore_toggle and /ignore_off can be given a world name.
;
;; Example lines in your world file:
;
; /addworld bob BOB xxx localhost echo
; /addworld fred FRED xxx localhost echo
; /ignore_pair bob fred
;
;; Then after you've connected to bob and fred and gotten started:
;
; /ignore_toggle bob
; --> now you won't see anything on world bob anymore.
;
; /ignore_toggle
; --> now you won't see anything on world fred anymore.
;
; /ignore_off bob
; --> now you see everyone on both bob and fred.
;
;; Example lines in your world file:
;
; /addworld aa BOB xxx localhost echo
; /addworld bb FRED xxx localhost echo
; /ignore_auto aa bb
;;; This sets the priority level of the gags.
/set ignore_priority=0
;;; FIX FIX FIX: if Ken adds a /fg flush option, then you could
;;; easily use /advise on fg to check if the destination is a pair'd one,
;;; and add the flush arg to the /fg subcall.
/def -i ignore_auto =\
/if /!ignore_pair %1 %2%;/then /break%;/endif%;\
/if (!ismacro("ignore__world_hook")) \
/def -i -F -h'WORLD' ignore__world_hook = \
/let ignore_which=\$[tolower({1})]%%;\
/let ignore_other=%%;\
/if (ignore__find_pair()) \
/ignore__show \%{ignore_which}%%;\
/ignore__hide \%{ignore_other}%%;\
/endif%;\
/endif
/def -i ignore_pair =\
/if ({#} != 2) \
/echo \% /ignore_pair requires two world names.%;\
/test 0%;\
/break%;\
/endif%;\
/let first=$[tolower({1})]%;\
/let second=$[tolower({2})]%;\
/set ignore_pairs=%{ignore_pairs} [%{first} %{second}]%;\
/test 1
/def -i ignore_toggle =\
/if ({#} > 1) \
/echo \% /ignore_toggle requires one world name.%;\
/break%;\
/endif%;\
/let ignore_which=$[tolower({1-${world_name}})]%;\
/let ignore_other=%;\
/if (!ignore__find_pair()) \
/echo \% No match found for world %{ignore_which}.%;\
/break%;\
/endif%;\
/if ({#}) \
/ignore__show %{ignore_other}%;\
/ignore__hide %{ignore_which}%;\
/elseif /test (ignore_hidden =/ "*{%{ignore_which}}*")%;/then \
/ignore__show %{ignore_which}%;\
/ignore__hide %{ignore_other}%;\
/else \
/ignore__show %{ignore_other}%;\
/ignore__hide %{ignore_which}%;\
/endif
/def -i ignore_off =\
/if ({#} > 1) \
/echo \% /ignore_off requires one world name.%;\
/break%;\
/endif%;\
/let ignore_which=$[tolower({1-${world_name}})]%;\
/let ignore_other=%;\
/if (!ignore__find_pair()) \
/echo \% No match found for world %{ignore_which}.%;\
/break%;\
/endif%;\
/ignore__show %{ignore_which}%;\
/ignore__show %{ignore_other}
/def -i ignore__find_pair =\
/: First try to find a match like [WHICH *]%;\
/test regmatch("\\[%{ignore_which} ([^ ]*)\\]", ignore_pairs)%;\
/test ignore_other := "%P1"%;\
/if (ignore_other =~ "") \
/: Didn't find it, now try a match like [* WHICH]%;\
/test regmatch("\\[([^ ]*) %{ignore_which}\\]", ignore_pairs)%;\
/test ignore_other := "%P1"%;\
/endif%;\
/test (ignore_other !~ "")
/require lisp.tf
/def -i ignore__show =\
/set ignore_hidden=$(/remove %1 %{ignore_hidden})%;\
/if /ismacro ignore__gag_%1%;/then \
/undef ignore__gag_%1%;\
/endif
/def -i ignore__hide =\
/set ignore_hidden=%{ignore_hidden} %1%;\
/def -i -p%{ignore_priority} -w%1 -ag -t'*' ignore__gag_%1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Gwen: Note -- completely untested!
;;;
;;; Player purges
;;;
;;; From: http://www.pennmush.org/~alansz/guide/guide-single.html (Javelin's Guide for PennMUSH)
;;;
;;; After a while, you may want to remove old players and their objects
;;; from your game. I typically use tinyfugue macros, rather than MUSHcode
;;; to do this. First, I define a macro /nuke <player>, which nukes a player
;;; and everything they own, providing they're not currently connected:
/def nuke = @switch hasflag(pmatch(%1),connected)=1,{think %1 is connected!}, {@dol lsearch(%1,none,none)=@nuke ##}
;;; The connected check prevents you from accidentally nuking yourself.
;;; Then, I define a player purge macro like this:
/def ppurge = @dol lsearch(all,type,player)=@switch [and(not(orflags(##,Wr)),lt(convtime(xget(##,last)),sub(convtime(time()),2419200)))]=1, {think /nuke [name(##)] ## [lstats(##)]}
;;; This macro searches the db for all players and lists those who aren't admin
;;; and whose last connection was longer than 28 days ago.
;;; Actually doing a purge, then, requires these steps:
;;; 1./log purge, to start logging output to a file called 'purge'
;;; 2./ppurge, to list players who are candidates for purging
;;; 3./log off, to stop logging
;;; 4./sh vi purge, to edit the purge file and see who'll be purged.
;;; Delete lines in the file for players who you don't want to see purged.
;;; What's left will be a list of /nuke lines which will purge the players you want purged.
;;; 5./quote 'purge, to load the commands in the purge file and do the actual purging.
;;; 6./sh rm purge, to remove the purge file.
;;;
;;; [ Rhyanna notes that the tinyfugue purge macros which I discuss are incomplete.
;;; /nuke may leave rooms with more than 3 exits, and the lsearch() may fail to get all
;;; the players due to buffer length problems. - Javelin ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; If you want to know how long your tf has been running stick the following
;;; line someplace early in your .tfrc, and then stick the macro below anywhere you like.
;;;
;;; FROM: http://oj.egbt.org/dmoore/tf/#hints
;; Set the tf startup time in .tfrc, only once.
/test tf_start_time := (tf_start_time | time())
/def tf_time = \
/let seconds=$[time() - tf_start_time] %;\
/echo % Your tf has been running for \
$[seconds/86400] days $[mod(seconds/3600,24)] hours \
$[mod(seconds/60,60)] mins $[mod(seconds,60)] secs. \
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; /recall_file
;
; Michael Hunger wrote a recall file once:
;
; Usage:
; /recall_file filename recall arguments
;
; eg: /recall_file say.log 1000 *You said:*
/def recall_file = \