-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvo (namedb).xml
4783 lines (4277 loc) · 224 KB
/
svo (namedb).xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
<TriggerPackage>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>NameDB</name>
<script>ndb = ndb or {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>99</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList/>
<regexCodePropertyList/>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Data Capture</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList/>
<regexCodePropertyList/>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Lists</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList/>
<regexCodePropertyList/>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>NameDB cwho</name>
<script>temp_name_list = {}
temp_dragon = 0
ndb.temp_classes_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>100</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^Citizen\s+Rank\s+CT\s+Class$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Get name (cwho)</name>
<script>resetFormat()
local match = getColorWildcard(14)
if match then
local matches = multimatches[1]
local isdragon
if (matches[4] and matches[4]:lower():find("dragon")) then matches[4] = nil; isdragon = true end
temp_name_list[#temp_name_list + 1] = {
name = match[1],
class = (matches[4] and matches[4]:lower()),
city_rank = tonumber(matches[3]),
city = gmcp.Char.Status.city:match("^(%w+)")
}
if isdragon then temp_name_list[#temp_name_list].dragon = 1 end
-- if we know a class, add it in
local class = ndb.getclass(match[1])
local dragon
if ndb.isdragon then dragon = ndb.isdragon(match[1]) end
if class and class ~= "" then
ndb.temp_classes_list[class] = (ndb.temp_classes_list[class] or 0) + 1
if matches[4] and dragon then cecho(" <a_darkwhite>(Dragon)") temp_dragon = temp_dragon +1 elseif dragon then cecho(" <a_darkwhite>("..class:title()..")") temp_dragon = temp_dragon +1
end end
end</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^([A-Za-z].+)\s+(1|2|3|4|5|6)\s+(?:On|Off)\s+(.*)$</string>
<string>return not isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop getting (cwho)</name>
<script>setTriggerStayOpen("NameDB cwho", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
if next(ndb.temp_classes_list) then
local classes = svo.keystolist(ndb.temp_classes_list)
table.sort(classes)
for i = 1, #classes do
classes[i] = ndb.temp_classes_list[classes[i]] .. " "..(ndb.temp_classes_list[classes[i]] == 1 and classes[i] or string.pluralize(classes[i]))
end
moveCursor(0, getLineNumber())
svo.itf("%s present, of those %s %s dragon%s (%s total).\n", svo.concatand(classes), temp_dragon, (temp_dragon == 1 and 'is a' or 'are'), (temp_dragon == 1 and '' or 's'), #temp_name_list)
moveCursorEnd()
ndb.temp_classes_list = nil
end
temp_name_list = nil
raiseEvent("NameDB got new data")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^\d+</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>NameDB hwho</name>
<script>temp_name_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>100</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>Member Rank HTell HNTell Probation Class</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Get name (hwho)</name>
<script>if matches[3]:lower() == "dragon" then matches[3] = nil end
temp_name_list[#temp_name_list + 1] = {
name = matches[2],
class = (matches[3] and matches[3]:lower()),
guild = ndb.findfromtable(gmcp.Char.Status.house, ndb.valid.houses)
}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^(\w+)\s+(?:\* )?\d+\s+\w+\s+\w+\s+\w+\s+(\w+)$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop getting (hwho)</name>
<script>setTriggerStayOpen("NameDB hwho", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
temp_name_list = nil
raiseEvent("NameDB got new data")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^\d+</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Citizens</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>93</conditonLineDelta>
<mStayOpen>999</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^The following are (?:IN)?ACTIVE citizens of (\w+)\:$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop getting (citizens)</name>
<script>setTriggerStayOpen("Citizens", 0)
stop_capturing = true
ndb.templist = {}
ndb.templist = string.split(ndb.tempnames, ",")
for i,k in pairs(ndb.templist) do
ndb.templist[i] = k:trim()
end
-- last on name on list might have a dot
if string.sub(ndb.templist[#ndb.templist], -1, -1) == "." then
ndb.templist[#ndb.templist] = string.sub(ndb.templist[#ndb.templist], 1, -2)
end
ndb.tempnames = nil
temp_name_list = {}
for i,j in ipairs(ndb.templist) do
temp_name_list[#temp_name_list + 1] = {
name = j,
city = gmcp.Char.Status.city:match("^(%w+)")
}
end
db:merge_unique(ndb.db.people, temp_name_list)
raiseEvent("NameDB got new data")
-- reload all highlights, as citizens list is big anyhow
ndb.loadhighlights()</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>Total:</string>
</regexCodeList>
<regexCodePropertyList>
<integer>2</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Save line</name>
<script>if stop_capturing then stop_capturing = nil return end
if string.find(line, "The following are ACTIVE citizens of .*") then return end
if ndb.tempnames == nil then ndb.tempnames = "" end
ndb.tempnames = ndb.tempnames .. " " .. line
</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>return true</string>
</regexCodeList>
<regexCodePropertyList>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>House members</name>
<script>temp_name_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>999</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string> HR Stat Class Name + Title</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Get name (house members)</name>
<script>local match = getColorWildcard(14)
if match then
if matches[2]:lower() == "dragon" then matches[2] = nil end
temp_name_list[#temp_name_list + 1] = {
name = match[1],
class = ((matches[2] and ndb.isvalidclass(matches[2])) and matches[2]:lower() or ""),
guild = ndb.findfromtable(gmcp.Char.Status.house, ndb.valid.houses)
}
end</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^ *\d+(?: prob)? +(\w+)\s+.*$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop getting (house members)</name>
<script>setTriggerStayOpen("House members", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
temp_name_list = nil
raiseEvent("NameDB got new data")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^\d+</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Clan who</name>
<script>temp_name_list = {}
temp_dragon = 0
ndb.temp_classes_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>100</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>The following members of the clan of </string>
<string>are in the realms:</string>
</regexCodeList>
<regexCodePropertyList>
<integer>2</integer>
<integer>0</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Get name (clan who)</name>
<script>local match = getColorWildcard(14)
if match then
local title = line:gsub(" %(off channel%)", "")
temp_name_list[#temp_name_list + 1] = {
name = match[1],
title = title
}
-- if we know a class, add it in
local class = ndb.getclass(match[1])
local dragon
if ndb.isdragon then dragon = ndb.isdragon(ndb.findname(line)) end
if class and class ~= "" then
class = class:title()
echo((" "):rep(70-#line))
cecho("<a_darkwhite>("..class..")")
ndb.temp_classes_list[class] = (ndb.temp_classes_list[class] or 0) + 1
if dragon then cecho(" <a_darkwhite>(Dragon)") temp_dragon = temp_dragon +1 end
elseif dragon then echo((" "):rep(70-#line)) cecho("<a_darkwhite>(Dragon)") temp_dragon = temp_dragon +1
end
end</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^</string>
<string>return not isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop (clan who)</name>
<script>setTriggerStayOpen("Clan who", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
if next(ndb.temp_classes_list) then
local classes = svo.keystolist(ndb.temp_classes_list)
table.sort(classes)
for i = 1, #classes do
classes[i] = ndb.temp_classes_list[classes[i]] .. " "..(ndb.temp_classes_list[classes[i]] == 1 and classes[i] or string.pluralize(classes[i]))
end
moveCursor(0, getLineNumber())
svo.itf("%s present, of those %s %s dragon%s (%s total).\n", svo.concatand(classes), temp_dragon, (temp_dragon == 1 and 'is a' or 'are'), (temp_dragon == 1 and '' or 's'), #temp_name_list)
moveCursorEnd()
ndb.temp_classes_list = nil
end
temp_name_list, temp_dragon = nil, nil
raiseEvent("NameDB got new data")
</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>return isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Party who</name>
<script>temp_name_list = {}
temp_dragon = 0
ndb.temp_classes_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>100</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>The following members of your party are in the realms:</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Get name (party who)</name>
<script>resetFormat()
local match = ndb.findname(line)
if match then
temp_name_list[#temp_name_list + 1] = {
name = ndb.findname(line),
title = line
}
-- if we know a class, add it in
local class = ndb.getclass(ndb.findname(line))
local dragon
if ndb.isdragon then dragon = ndb.isdragon(ndb.findname(line)) end
if class and class ~= "" then
echo((" "):rep(60-#line))
cecho("<a_darkwhite>("..class:title()..")")
ndb.temp_classes_list[class] = (ndb.temp_classes_list[class] or 0) + 1
if dragon then cecho(" <a_darkwhite>(Dragon)") temp_dragon = temp_dragon +1 end
elseif dragon then echo((" "):rep(60-#line)) cecho("<a_darkwhite>(Dragon)") temp_dragon = temp_dragon +1
end
end</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^</string>
<string>return not isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop (party who)</name>
<script>setTriggerStayOpen("Party who", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
if next(ndb.temp_classes_list) then
local classes = svo.keystolist(ndb.temp_classes_list)
table.sort(classes)
for i = 1, #classes do
classes[i] = ndb.temp_classes_list[classes[i]] .. " "..(ndb.temp_classes_list[classes[i]] == 1 and classes[i] or string.pluralize(classes[i]))
end
moveCursor(0, getLineNumber())
svo.itf("%s present, of those %s %s dragon%s.\n", svo.concatand(classes), temp_dragon, (temp_dragon == 1 and 'is a' or 'are'), (temp_dragon == 1 and '' or 's'))
moveCursorEnd()
ndb.temp_classes_list = nil
end
temp_name_list, temp_dragon = nil, nil
raiseEvent("NameDB got new data")
</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>return isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Order members</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>999</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>The order has no mortal order head.</string>
<string>Mortal order head:</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</integer>
<integer>2</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Skip (order members)</name>
<script>temp_name_list = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>3</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^</string>
<string>3</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>5</integer>
</regexCodePropertyList>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Member</name>
<script>if matches[2] == "Total" then return end
local class = line:sub(47):match("^(%w+)")
if class and class:lower() == "dragon" then class = nil end
temp_name_list[#temp_name_list + 1] = {
name = matches[2],
class = class,
order = gmcp.Char.Status.order:match("(%w+)")
}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^([A-Za-z]+)\*?</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Stop (order members)</name>
<script>setTriggerStayOpen("Order members", 0)
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
temp_name_list = nil
raiseEvent("NameDB got new data")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>return isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
</Trigger>
<Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>NameDB qw</name>
<script>local data = string.split(line, ", ")
-- fix last name that ends with a dot
data[#data] = string.sub(data[#data], 1, #data[#data] - 1)
-- fix the 'and Name' from qw2
if data[#data]:starts("and ") then
data[#data] = data[#data]:match("and (%w+)")
end
local city_colours = {
["0,255,0"] = "Eleusis",
["0,128,128"] = "Cyrene",
["255,0,0"] = "Mhaldor",
["128,128,0"] = "Hashan",
["128,0,128"] = "Ashtan",
["255,255,255"] = "Targossas"
}
temp_name_list = {}
local selectString, getFgColor, format = selectString, getFgColor, string.format
-- selectString not working for first name by default - fix with this
moveCursor(0,getLineNumber())
insertText(">")
-- see if we can glean off city affiliation off qwc colours
for _, name in ipairs(data) do
temp_name_list[#temp_name_list + 1] = {name = name}
if selectString(name,1) > 0 then
local r,g,b = getFgColor()
local rgb = format("%d,%d,%d", r,g,b)
if city_colours[rgb] then
temp_name_list[#temp_name_list].city = city_colours[rgb]
else
temp_name_list[#temp_name_list].city = "rogue"
end
setFgColor(192,192,192)
deselect()
end
end
</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^(\w+),</string>
<string>return not isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>4</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>NameDB qw</name>
<script>local function commit()
db:merge_unique(ndb.db.people, temp_name_list)
for _, person in pairs(temp_name_list) do
raiseEvent("NameDB saw list name", person.name)
end
raiseEvent("NameDB got new data")
end
-- ignore yourself gemmed offplane
if multimatches[1][1] == "None." then
disableTrigger("NameDB qw")
ndb.checkingqwi = nil
commit()
return
end
-- update the total amount of people in the game with a clever addition
if selectString(multimatches[3][2], 1) > -1 then
replace(string.format("%d (%d total)", multimatches[3][2], tonumber(multimatches[3][2])+#temp_name_list))
end
--[[
for _,name in ipairs(data) do
-- check for guides, but ignore Gods, who show as (God)
if name:find("(", 1, true) then
local secondname
name, secondname = name:match("(%w+)%((%w+)%)")
if name and secondname then
temp_name_list[#temp_name_list + 1] = {
name = secondname
}
temp_name_list[#temp_name_list + 1] = {
name = name
}
end
else
-- add a plain name
temp_name_list[#temp_name_list + 1] = {
name = name
}
end
end
]]
-- re-honors if asked for
if ndb.qwtype and ndb.qwtype == "update" then
for _, name in pairs(temp_name_list) do
name.xp_rank = -1
end
-- or organize by cities
elseif ndb.qwtype and ndb.qwtype == "organize cities" then
local cities = {}
local getcity = ndb.getcity
for _, person in pairs(temp_name_list) do
local city = getcity(person.name)
city = city or "unknown"
if city == "" then city = "rogue" end
if ndb.isimmortal(person.name) then city = "Immortal" end
cities[city] = cities[city] or {}
cities[city][#cities[city]+1] = person.name
end
echo'\n\n'
svo.echof("qw, sorted by members and count:")
local sortbycount, longestcityname = {}, 0
for city, members in pairs(cities) do
sortbycount[city] = #members
if #city > longestcityname then longestcityname = #city end
end
local sortbycount = {}; for city in pairs(cities) do sortbycount[#sortbycount+1] = {city, #cities[city]} end
table.sort(sortbycount, function(a, b)
return a[2] > b[2]
end)
for _, org in ipairs(sortbycount) do
local city, members = org[1], cities[org[1]]
table.sort(members)
cecho(string.format(" <royal_blue>%-"..longestcityname.."s<a_grey> <DarkSlateGrey>(<blaze_orange>%d<DarkSlateGrey>): <a_grey>%s\n", city, #members, svo.concatand(members)))
end
-- or report to cc
elseif ndb.qwtype and ndb.qwtype:starts("report members of ") then
local org = ndb.qwtype:match("^report members of (%w+)"):lower()
local citizens = {}
for _, city in ipairs(ndb.valid.cities) do
if city:lower():starts(org) then
org = city
for _, person in pairs(temp_name_list) do
local persons_city = ndb.getcity(person.name)
if persons_city == city then citizens[#citizens+1] = person.name end
end
break
end
end
if not citizens[1] then echo'\n' svo.echof("No citizens of %s seem to be on.", org) return end
table.sort(citizens)
svo.cc("%s %s visible: %s", #citizens, ndb.getpluralcity(org, #citizens), svo.concatand(citizens))
elseif ndb.qwtype == "show marks" then
local marks = {}
for _, person in pairs(temp_name_list) do
local mark = ndb.ismark(person.name)
if mark then
marks[mark] = marks[mark] or {}
marks[mark][#marks[mark]+1] = person.name
end
end
echo'\n\n'
svo.echof("Marks:")
if not next(marks) then svo.echof("(none found)") end
for cat, people in pairs(marks) do
table.sort(people)
cecho(string.format(" %s: %s\n", cat:title(), svo.concatandf(people, ndb.getcolorn)))
end
elseif ndb.qwtype == "show infamous" then
local infamous = {}
for _, person in pairs(temp_name_list) do
local infamy = ndb.isinfamous(person.name)
if infamy and infamy >= 1 then
infamous[infamy] = infamous[infamy] or {}
infamous[infamy][#infamous[infamy]+1] = person.name
end
end
echo'\n\n'
svo.echof("Infamous:")
if not next(infamous) then svo.echof("(none found)") end
for cat, people in pairs(infamous) do
table.sort(people)
cecho(string.format(" %s: %s\n", ndb.valid.shortinfamous[cat], svo.concatandf(people, ndb.getcolorn)))
end
end
commit()
disableTrigger("NameDB qw")</script>
<triggerType>0</triggerType>
<conditonLineDelta>1</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>.*</string>
<string>1</string>
<string>^Plus another (\d+) whose presence you cannot fully sense(?: \(\d+ total\))?\.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>5</integer>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="yes" isColorTriggerFg="yes" isColorTriggerBg="yes">
<name>City/House/Order enemies</name>
<script>local field
if multimatches[2][1]:find("City") then
ndb.fixed_set(ndb.db.people.cityenemy, 0)
field = "city"
elseif multimatches[2][1]:find("Order") then
ndb.fixed_set(ndb.db.people.orderenemy, 0)
field = "order"
else
ndb.fixed_set(ndb.db.people.houseenemy, 0)
field = "house"
end