-
Notifications
You must be signed in to change notification settings - Fork 0
/
svo (priestreport).xml
437 lines (414 loc) · 21.3 KB
/
svo (priestreport).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
<?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 Priest Report</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="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Seek request</name>
<script>if svo.defc.dragonform then return end
local clans = {
["The Dawnguard"] = "dg",
["Eleusian Rangers"] = "er",
["Cyrene City Guard"] = "ccg",
["Party"] = "party",
["Army"] = "art",
}
if not clans[matches[2]] then echo"\n" svo.echof("This clans short name isn't known - please add it to the 'Seek request' trigger. Can't report the seek back otherwise!") return end
svo.locating = {clan = clans[matches[2]], name = matches[3]}
svo.doaddfree("angel seek "..svo.locating.name)</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+ says, "(?:Locate|Companions) (\w+)."$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</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>Seek</name>
<script>svo.locating.location = multimatches[2][2]
svo.locating.hp = tonumber(multimatches[2][3])
svo.locating.mp = tonumber(multimatches[2][4])
if mmp and svo.locating.name then
mmp.pdb[svo.locating.name] = svo.locating.location
mmp.pdb_lastupdate[svo.locating.name] = true
raiseEvent("mmapper updated pdb")
end</script>
<triggerType>0</triggerType>
<conditonLineDelta>2</conditonLineDelta>
<mStayOpen>100</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>You bid your guardian angel to seek out the</string>
<string>^Your guardian angel senses .+? at (.+?), on a health of (\d+) and a mana of (\d+)\.$</string>
<string>return (svo.locating and line:lower():find(svo.locating.name:lower(), 1, true)) and true or false</string>
</regexCodeList>
<regexCodePropertyList>
<integer>2</integer>
<integer>1</integer>
<integer>4</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>Companion</name>
<script>svo.locating.ents = svo.locating.ents or {}
svo.locating.ents[#svo.locating.ents+1] = matches[2]</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>^(?:She|He|You) is with (\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 (seek)</name>
<script>setTriggerStayOpen("Seek", 0)
-- someone asked directly for a seek
if svo.locating.person then
if not svo.locating.ents then
send(string.format("tell %s %s (%s) is at %s - alone", svo.locating.person, svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location))
else
send(string.format("tell %s %s (%s) is at %s - with %s (%d people total)", svo.locating.person, svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location,
svo.concatand(svo.locating.ents),
#svo.locating.ents+1))
end
svo.locating = nil
return
end
-- manual seek, don't know where to report? Use cc
if not svo.locating.clan then
if not svo.locating.ents then
svo.cc("%s (%s) is at %s - alone", svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location)
else
svo.cc("%s (%s) is at %s - with %s (%d people total)", svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location,
svo.concatand(svo.locating.ents),
#svo.locating.ents+1)
end
svo.locating = nil
return
end
local function getchannel()
if svo.locating.clan == "party" then
return "pt"
elseif svo.locating.clan == "art" then
return "art"
else
return ("clan "..svo.locating.clan.." tell")
end
end
-- someone asked over clan/party for a seek
if not svo.locating.ents then
send(string.format("%s %s (%s) is at %s - alone",
getchannel(), svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location))
else
send(string.format(
"%s %s (%s) is at %s - with %s (%d people total)",
getchannel(), svo.locating.name, (svo.locating.hp == 0 and "dead" or svo.locating.hp.."hp, "..svo.locating.mp.."mp"), svo.locating.location,
(svo.concatand and svo.concatand(svo.locating.ents) or table.concat(svo.locating.ents, ", ")),
#svo.locating.ents+1
))
end
svo.locating = nil</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>Failed Seek</name>
<script>if svo.defc.dragonform then return end
if svo.locating and svo.locating.name then
if svo.locating.clan == "party" then
send(string.format(
"pt %s could not be located",
svo.locating.name
))
elseif svo.locating.clan then
send(string.format(
"clan %s tell %s could not be located",
svo.locating.clan, svo.locating.name
))
end
svo.locating = nil
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>Your angel replies sadly that she cannot find any trace of</string>
<string>^Your angel replies sadly that she cannot find any trace of (\w+)\.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>2</integer>
<integer>1</integer>
</regexCodePropertyList>
</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>Angel trace</name>
<script>svo.angel_trace(multimatches[2][2], multimatches[2][3])</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>Your guardian angel reports that</string>
<string>^Your guardian angel reports that (\w+) has moved to (.+)\.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>2</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>Tell request</name>
<script>if svo.defc.dragonform then return end
local requester, sought = matches[2], matches[3]
if not svo.me.locatelist[requester] then svo.ignore_illusion("This person isn't on our locatelist - if you want to allow them, do vconfig locatelist "..requester) return end
svo.locating = {person = matches[2], name = matches[3]}
svo.doaddfree("angel seek "..svo.locating.name)</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+) tells you.*, "(?:Locate|Sense|Find) (\w+)\."$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
</TriggerPackage>
<TimerPackage/>
<AliasPackage>
<AliasGroup isActive="yes" isFolder="yes">
<name>svo Priest Report</name>
<script></script>
<command></command>
<packageName></packageName>
<regex></regex>
<Alias isActive="yes" isFolder="no">
<name>(tr person) Trace</name>
<script>if matches[2] == "off" then
svo.doadd("angel trace off", false, false)
tracing = nil
else
tracing = matches[2]:title()
svo.tracingarea = matches[3]
svo.doadd("angel trace "..tracing)
svo.echof("Tracing and reporting %s%s", tracing, (svo.tracingarea and " only when they're in "..svo.tracingarea:title() or ''))
end</script>
<command></command>
<packageName></packageName>
<regex>^tr (\w+)(?: (\w+))?$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(vshow locatelist) See the people on the locate list</name>
<script>local l = (next(svo.me.locatelist) and svo.oneconcat(svo.me.locatelist) or "(none - use vconfig locatelist <friend> to add, and that'll allow them to ask you via tells for locations of people)")
svo.echof("People on the locatelist list: %s", l)</script>
<command></command>
<packageName></packageName>
<regex>^vshow locatelist$</regex>
</Alias>
<Alias isActive="yes" isFolder="no">
<name>(seek person) Manually seek & report a person</name>
<script>svo.locating = {name = matches[2]:title()}
svo.doaddfree("angel seek "..svo.locating.name)</script>
<command></command>
<packageName></packageName>
<regex>^seek (\w+)$</regex>
</Alias>
</AliasGroup>
</AliasPackage>
<ActionPackage/>
<ScriptPackage>
<ScriptGroup isActive="yes" isFolder="yes">
<name>svo Priest Report</name>
<packageName></packageName>
<script>-------------------------------------------------
-- Put your Lua functions here. --
-- --
-- Note that you can also use external Scripts --
-------------------------------------------------
</script>
<eventHandlerList/>
<Script isActive="yes" isFolder="no">
<name>svo_load_priestreport</name>
<packageName></packageName>
<script>function svo_load_priestreport()
if type(svo.conf.autoseek) ~= 'nil' then
if svo.conf.autoseek then enableTrigger"Seek request" else
disableTrigger"Seek request" end
end
svo.config.setoption("autoseek",
{
vconfig2string = true,
type = "boolean",
onenabled = function ()
enableTrigger"Seek request"
svo.echof("<0,250,0>Will%s seek on seek requests.", svo.getDefaultColor())
end,
ondisabled = function () disableTrigger"Seek request" svo.echof("<250,0,0>Won't%s automatically seek on requests.", svo.getDefaultColor()) end,
onshow = function (defaultcolour)
fg("gold")
echoLink("pr:", "", "svo Priest Report", true)
fg(defaultcolour)
echo(" Responding to seek requests is ")
fg("a_cyan") echoLink(svo.conf.autoseek and "on" or "off", "svo.config.set('autoseek', "..(svo.conf.autoseek and "false" or "true")..", true)", "Click to "..(svo.conf.autoseek and "disable" or "enable").." responses to seek requests", true) fg(defaultcolour)
fg(defaultcolour) echo(", better tracing ")
fg("a_cyan") echoLink(svo.conf.bettertrace and "on" or "off", "svo.config.set('bettertrace', "..(svo.conf.bettertrace and "false" or "true")..", true)", "Click to "..(svo.conf.bettertrace and "disable" or "enable").." a better trace reporting style", true) fg(defaultcolour)
fg(defaultcolour)
if not svo.conf.bettertrace then
echo(".\n")
else
echo(", reporting every ")
fg("a_cyan") echoLink(svo.conf.reportdelay, "printCmdLine('vconfig reportdelay ')", "Click to adjust the max number of seconds a trace announce will be delayed for someone speedwalking", true) fg(defaultcolour)
echo("s.\n")
end
end})
svo.me.locatelist = svo.me.locatelist or {}
svo.config.setoption("locatelist", {
type = "string",
check = function(what)
if what:find("^%w+$") then return true end
end,
onset = function ()
local name = string.title(svo.conf.locatelist)
-- we want nil, not false so 'or' doesn't help
if svo.me.locatelist[name] then svo.me.locatelist[name] = nil else svo.me.locatelist[name] = true end
if svo.me.locatelist[name] then
svo.echof("Added <0,255,0>%s%s to the locatelist list - will respond to their locate tells.", name, svo.getDefaultColor())
else
svo.echof("Removed %s from the locatelist list.", name)
end
end
})
svo.config.setoption("bettertrace",
{
vconfig2string = true,
type = "boolean",
onenabled = function ()
svo.echof("<0,250,0>Will%s use improved trace output (less spammy and more helpful).", svo.getDefaultColor())
end,
ondisabled = function () svo.echof("<250,0,0>Won't%s use improved trace output (will use old room-by-room instead).", svo.getDefaultColor()) end,
})
svo.config.setoption("reportdelay",
{
type = "number",
min = 1,
max = 100000,
onset = function ()
svo.echof("Will report movement every %d seconds max for someone speedwalking.", svo.conf.reportdelay)
end,
})
end</script>
<eventHandlerList>
<string>svo system loaded</string>
</eventHandlerList>
</Script>
<Script isActive="yes" isFolder="no">
<name>svo_onshow_priestreport</name>
<packageName></packageName>
<script>function svo_onshow_priestreport()
local c = table.size(svo.me.locatelist)
svo.echofn("# of people on the locatelist: %d ", c)
setFgColor(unpack(svo.getDefaultColorNums))
setUnderline(true)
echoLink("(view)", 'echo"\\n" expandAlias"vshow locatelist"', 'Click here open the locatelist list menu', true)
echo"\n"
end</script>
<eventHandlerList>
<string>svo onshow</string>
</eventHandlerList>
</Script>
<Script isActive="yes" isFolder="no">
<name>svo.disable_seek</name>
<packageName></packageName>
<script>-- disable seek alias in dragonform, because it's for priest only
function svo.disable_seek()
if svo and svo.defc.dragonform then disableAlias"(seek person) Manually seek & report a person"
else enableAlias"(seek person) Manually seek & report a person" end
end</script>
<eventHandlerList>
<string>svo got dragonform</string>
<string>svo lost dragonform</string>
<string>svo system loaded</string>
</eventHandlerList>
</Script>
</ScriptGroup>
</ScriptPackage>
<KeyPackage/>
<HelpPackage>
<helpURL></helpURL>
</HelpPackage>
</MudletPackage>