-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvo (peopletracker).xml
591 lines (552 loc) · 27.9 KB
/
svo (peopletracker).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
<?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>svo People Tracker</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="no" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>qwho (svo people tracker)</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>Auto-more (qwho)</name>
<script>send("more", false)
svo.deleteLineP()</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>[Type MORE if you wish to continue reading</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>Continued more</name>
<script>deleteLine()</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>[File continued via MORE]</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</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 (people tracker who)</name>
<script>svo.deleteLineP()
disableTrigger("qwho (svo people tracker)")
if svo.qwhoopen then killTimer(svo.qwhoopen) end
svo.qwhoopen = nil
tempTimer(0, function() svo.echof("Done checking all of wholist!") svo.buildwhosummary() svo.showprompt() wrapLine(getLineCount()) end)
raiseEvent("mmapper updated pdb")</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: \d+$</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>Gag while checking...</name>
<script>mmp.pdb[matches[2]] = matches[3]
mmp.pdb_lastupdate[matches[2]] = true
svo.deleteLineP()</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>^The soul of (\w+) +\((.+)\)$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<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>Gag no-location & guides</name>
<script>svo.deleteLineP()</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>Juliet, the Guide</string>
<string>Romeo, the Guide</string>
<string>(Praying for Salvation)</string>
<string>The soul of</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>2</integer>
<integer>2</integer>
<integer>2</integer>
<integer>2</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="yes" isColorTriggerFg="yes" isColorTriggerBg="yes">
<name>Gag no-location (gods)</name>
<script>svo.deleteLineP()</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#00b300</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>FG6BG2</string>
<string>return not isPrompt()</string>
</regexCodeList>
<regexCodePropertyList>
<integer>6</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>Gag phased</name>
<script>mmp.pdb[matches[2]] = matches[3]
mmp.pdb_lastupdate[matches[2]] = true
svo.deleteLineP()</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>^\(Phased\) (\w+) +\((.+)\)$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>KoTH start</name>
<script>mmp.pdb.Hill = matches[2]
echo(string.rep(" ", 50-#line)) svo.echof("gotop hill")
raiseEvent("mmapper updated pdb")</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>^The HILL is at: (.+)!$</string>
<string>^The HILL has moved! It is now at: (.+)!$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<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>KoTH</name>
<script>mmp.pdb_lastupdate = {}</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>2</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>Current event: King of the Hill</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>Hill</name>
<script>mmp.pdb.Hill = matches[2]
echo(string.rep(" ", 60-#line)) svo.echof("gotop hill")
raiseEvent("mmapper updated pdb")</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>^The HILL for this game is: (.+)</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>Flag</name>
<script>mmp.pdb.Flag = matches[2]
echo(string.rep(" ", 60-#line)) svo.echof("gotop flag")
raiseEvent("mmapper updated pdb")</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>^Flag Location: (.+?)\.</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</Trigger>
</TriggerGroup>
</TriggerPackage>
<TimerPackage/>
<AliasPackage>
<AliasGroup isActive="yes" isFolder="yes">
<name>svo People Tracker</name>
<script></script>
<command></command>
<packageName></packageName>
<regex></regex>
<Alias isActive="yes" isFolder="no">
<name>(qwho, qwhom, qwhog, qwho<area>) Check wholist</name>
<script>mmp.pdb, mmp.pdb_lastupdate = {}, {}
enableTrigger("qwho (svo people tracker)")
if not svo.defc.thirdeye then
if svo.conf.thirdeye then svo.doaction("thirdeye", "misc")
else svo.doaction("thirdeye", "herb") end
end
sendSocket("who b\n", false)
if svo.qwhoopen then killTimer(svo.qwhoopen) end
svo.qwhoopen = tempTimer(10, [[
if not svo.qwhoopen then return end
disableTrigger("qwho (svo people tracker)")
svo.echof("qwho didn't finish - manually closed it.")
tempTimer(0, function() svo.buildwhosummary() svo.showprompt() wrapLine(getLineCount()) end)
raiseEvent("mmapper updated pdb")
svo.qwhoopen = nil
]])
svo.showqwho = matches[2]
svo.qwhofilter = matches[3]
svo.echof("Checking all of wholist%s%s...", ((svo.showqwho and svo.showqwho ~= "") and (" for "..svo.showqwho) or ''), (svo.qwhofilter and " in "..svo.qwhofilter or ''))</script>
<command></command>
<packageName></packageName>
<regex>^qwho(m|g|w)?(?: (.+))?$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(gotop) Go to person</name>
<script>local function goto(whom)
local p = whom:title()
if not mmp.pdb[p] then mmp.echo("Sorry - don't know where "..p.." is.") return end
local nums = mmp.getnums(mmp.pdb[p], true)
mmp.gotoRoom(nums[1])
mmp.echo(string.format("Going to %s in %s%s.", p, mmp.cleanAreaName(mmp.areatabler[getRoomArea(nums[1])] or '?'), (#nums ~= 1 and " (non-unique location though)" or "")))
end
if not matches[2] then
if not target then
mmp.echo("I don't know what your target is (set the 'target' variable)") return
else
goto(target)
end
else
goto(matches[2])
end</script>
<command></command>
<packageName></packageName>
<regex>^gotop(?: (\w+))?$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(ppwith) Report people with person</name>
<script>if not svo.qwhoareas or not next(svo.qwhoareas) then svo.echof("Check qwho first - we don't have any wholist data.") return end
local person = matches[2]:title()
local function locate(person)
for area, areadata in pairs(svo.qwhoareas) do
for room, people in pairs(areadata) do
for i = 1, #people do
if people[i]:starts(person) then
return area, room, people[i]
end
end
end
end
end
local area, room, fullname = locate(person)
if not area then svo.echof("Don't have %s in the list - perhaps they're gemmed, or check qwho again?", person) return end
local people = svo.qwhoareas[area][room]
table.sort(people)
local function cleanAreaName(area)
return mmp.cleanAreaName and mmp.cleanAreaName(area) or area
end
if #people == 1 then
local text = string.format("%s is alone at %s in %s", people[1], room, cleanAreaName(area))
svo.cc(text)
svo.echof(text)
else
local text = string.format("%d %s total with %s at %s in %s - %s", #people, (#people == 1 and 'person' or 'people'), fullname, room, cleanAreaName(area) or '?', svo.concatand(people))
svo.cc(text)
svo.echof(text)
end</script>
<command></command>
<packageName></packageName>
<regex>^ppwith (\w+)$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(ppin) Report people in area</name>
<script>if not svo.qwhoareas or not next(svo.qwhoareas) then svo.echof("Check qwho first - we don't have any wholist data.") return end
local function cleanAreaName(area)
return mmp.cleanAreaName and mmp.cleanAreaName(area) or area
end
for area, areadata in pairs(svo.qwhoareas) do
local people = {}
if area:lower():find(matches[2]:lower()) then
for _, room in pairs(areadata) do
people = table.n_union(people, room)
end
table.sort(people)
svo.cc("%s %s in %s - %s", #people, (#people == 1 and 'person' or 'people'), cleanAreaName(area), svo.concatand(people))
end
end</script>
<command></command>
<packageName></packageName>
<regex>^ppin (.+)$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(vshow watchfor) See people on watchfor</name>
<script>local l = (next(svo.me.watchfor) and svo.oneconcat(svo.me.watchfor) or "(none - use vconfig watchfor <person> to add)")
svo.echof("People on the watchfor list: %s", l)
svo.showprompt()</script>
<command></command>
<packageName></packageName>
<regex>^vshow watchfor$</regex>
</Alias>
</AliasGroup>
</AliasPackage>
<ActionPackage/>
<ScriptPackage>
<ScriptGroup isActive="yes" isFolder="yes">
<name>svo People Tracker</name>
<packageName></packageName>
<script>function svo.buildwhosummary()
local time = createStopWatch(); startStopWatch(time)
local areas = {}
local pdb, getnums, getRoomArea, areatabler = mmp.pdb, mmp.getnums, getRoomArea, mmp.areatabler
for name in pairs(mmp.pdb_lastupdate) do
local room = pdb[name]
local roomids = getnums(room, true)
if not roomids then
areas["unknown area"] = areas["unknown area"] or {}
areas["unknown area"][room] = areas["unknown area"][room] or {}
areas["unknown area"][room][#areas["unknown area"][room]+1] = name
elseif #roomids == 1 then
local area = areatabler[getRoomArea(roomids[1])] or "unknown area"
areas[area] = areas[area] or {}
areas[area][room] = areas[area][room] or {}
areas[area][room][#areas[area][room]+1] = name
else
local singlearea = mmp.areatabler[getRoomArea(roomids[1])] or '?'
local inexact
for i = 1, #roomids do
if singlearea ~= mmp.areatabler[getRoomArea(roomids[i])] then
areas["uncertain area"] = areas["uncertain area"] or {}
areas["uncertain area"][room] = areas["uncertain area"][room] or {}
areas["uncertain area"][room][#areas["uncertain area"][room]+1] = name
inexact = true
break
end
end
if not inexact then
areas[singlearea] = areas[singlearea] or {}
areas[singlearea][room] = areas[singlearea][room] or {}
areas[singlearea][room][#areas[singlearea][room]+1] = name
end
end
end
local sortedareas = {}
for area in pairs(areas) do sortedareas[#sortedareas+1] = area end
table.sort(sortedareas)
svo.qwhoareas, svo.qwhosortedareas = areas, sortedareas
if not svo.showqwho then return end
if svo.qwhofilter then svo.qwhofilter = svo.qwhofilter:lower() end
if #sortedareas == 0 then svo.echof("Didn't pick anyone up on the who list - it was empty.") return end
local cecho, sformat, concatand, concatandf = cecho, string.format, svo.concatand, svo.concatandf
-- wraps the name so people after a <reset> are still white
local function wrapname(name)
return "<white>"..ndb.getcolorn(name).."<reset>"
end
local function rendergeneral()
svo.echof("%s ungemmed people are visible:", table.size(mmp.pdb_lastupdate))
for i = 1, #sortedareas do
if not svo.qwhofilter or sortedareas[i]:lower():find(svo.qwhofilter, 1, true) then
cecho(sformat(" <CadetBlue>in %s:\n", sortedareas[i]))
for room, people in pairs(areas[sortedareas[i]]) do
table.sort(people)
cecho(sformat(" in %s: <white>%s <DarkSlateGray>(%d %s)\n", room, concatandf(people, wrapname), #people, (#people == 1 and "person" or "people")))
end
end
end
end
local function rendergroups()
svo.echof("%s ungemmed people are visible, showing groups only:", table.size(mmp.pdb_lastupdate))
for i = 1, #sortedareas do
if not svo.qwhofilter or sortedareas[i]:lower():find(svo.qwhofilter, 1, true) then
local showedarea
for room, people in pairs(areas[sortedareas[i]]) do
if #people > 1 then
if not showedarea then cecho(sformat(" <CadetBlue>in %s:\n", sortedareas[i])) showedarea = true end
table.sort(people)
cecho(sformat(" in %s: <white>%s <DarkSlateGray>(%d %s)\n", room, concatandf(people, wrapname), #people, (#people == 1 and "person" or "people")))
end
end
end
end
end
local function renderwatchfor()
-- make an indexed list
local watchfor = {}; for name in pairs(svo.me.watchfor) do watchfor[#watchfor+1] = name end
svo.echof("%s ungemmed people are visible, showing watchfor names only:", table.size(mmp.pdb_lastupdate))
for i = 1, #sortedareas do
if not svo.qwhofilter or sortedareas[i]:lower():find(svo.qwhofilter, 1, true) then
local showedarea
for room, people in pairs(areas[sortedareas[i]]) do
local intersection = table.n_intersection(watchfor, people)
if #intersection > 0 then
if not showedarea then cecho(sformat(" <CadetBlue>in %s:\n", sortedareas[i])) showedarea = true end
table.sort(people)
cecho(sformat(" in %s: <white>%s <DarkSlateGray>(%d %s)\n", room, concatandf(people, wrapname), #people, (#people == 1 and "person" or "people")))
end
end
end
end
end
if svo.showqwho == 'g' then
rendergroups()
elseif svo.showqwho == 'w' then
if not svo.me.watchfor or not next(svo.me.watchfor) then svo.echof("You don't have anyone on the watchfor list - do vconfig watchfor <person> to add someone first.") return
else renderwatchfor() end
else
rendergeneral()
end
svo.showqwho = nil
if svo.conf.debug and not s then display(m) end
if svo.conf.perf then svo.echof("qwho rendered in %ss", stopStopWatch(time)) end
end</script>
<eventHandlerList/>
<Script isActive="yes" isFolder="no">
<name>svo.add_peopletracker_config</name>
<packageName></packageName>
<script>function svo.add_peopletracker_config()
svo.me.watchfor = svo.me.watchfor or {}
svo.config.setoption("watchfor", {
type = "string",
check = function(what)
if what:find("^%w+$") then return true end
end,
onset = function ()
local name = string.title(svo.conf.watchfor)
-- we want nil, not false so 'or' doesn't help
if svo.me.watchfor[name] then svo.me.watchfor[name] = nil else svo.me.watchfor[name] = true end
if svo.me.watchfor[name] then
svo.echof("Added <0,255,0>%s%s to the watchfor list - use qwhow to see them.", name, svo.getDefaultColor())
else
svo.echof("Removed %s from the watchfor list.", name)
end
raiseEvent("svo watchfor name changed", name)
end
})
end</script>
<eventHandlerList>
<string>svo system loaded</string>
</eventHandlerList>
</Script>
</ScriptGroup>
</ScriptPackage>
<KeyPackage/>
<HelpPackage>
<helpURL></helpURL>
</HelpPackage>
</MudletPackage>