-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDeadLetter.xml
More file actions
324 lines (313 loc) · 15.4 KB
/
DeadLetter.xml
File metadata and controls
324 lines (313 loc) · 15.4 KB
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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="DeadLetter"
author="Ruhsbaar"
language="Lua"
purpose="Identify the target of Dead Letter missions"
date_written="2017-05-29"
date_modified="2018-05-05"
save_state="n"
version="0.1"
id="77541a5fdc7c032524fb75d6"
>
</plugin>
<aliases>
<alias
match="solveletter"
enabled="y"
ignore_case="y"
sequence="30"
script="DeadLetterSolver"
></alias>
<alias
match="sl"
enabled="y"
ignore_case="y"
sequence="30"
script="DeadLetterSolver"
></alias>
</aliases>
<script>
<![CDATA[
difficult_customer = {
["Triad Boss"] = {"Triad Boss", "Medina, Bes Pelargic" },
["The Grflx"] = {"The Grflx", "Large cavern, Skund Forest" },
["Vyrt"] = {"Vyrt", "Ephebe" },
["Avalanche Preventore"] = {"Avalanche Preventore", "Endless Halls (say 'Endless Halls' to Hermal of Sandelfon)" },
["The Librarian"] = {"The Librarian", "Unseen University, wanders (in L-space)" },
["Smuggler captain"] = {"Smuggler captain", "Ephebe underground" },
["Queen Shelox"] = {"Queen Shelox", "Gloomy Forest" },
["The Clown (Ha'pennywise)"] = {"The Clown (Ha'pennywise)", "Genua Sewers" },
["Ice giants"] = {"Ice giants", "The Hub" },
["T-shop proprietor"] = {"T-shop proprietor", "The Travelling shop" },
["The Proprietor"] = {"T-shop proprietor", "The Travelling shop" },
["Bug"] = {"Bug", "Ramtops" },
["Thursday"] = {"Thursday", "A Deserted Island (Thursday's Island)" },
["Hotan Hwoar Ni"] = {"Hotan Hwoar Ni", "Hotan Hwoar Ni's Rare Armours, The Snail, Sum Bing, Bes Pelargic" },
["Security guards"] = {"Security guards", "First Imperial Bank, Bes Pelargic" },
}
distant_land = {
["Boy Willie"] = {"Boy [Willie]","Bes Pelargic, The Agatean Empire" },
["Disembowel-Meself-Honourably Dibhala"] = {"Disembowel-Meself-Honourably [Dibhala]","Bes Pelargic" },
["Glod-san"] = {"[Glod-san]","Bes Pelargic" },
["Laggy-san"] = {"[Laggy-san]","Bes Pelargic, The Agatean Empire" },
["Lon Fah Lo"] = {"Lon Fah [Lo]","Bes Pelargic" },
["Mad Hamish"] = {"Mad [Hamish]","Bes Pelargic" },
["No Go Wan"] = {"No Go [Wan]","Bes Pelargic" },
["Quisoda"] = {"[Quisoda]","Bes Pelargic" },
["Ruto of Fish"] = {"[Ruto] of Fish","Bes Pelargic, underwater in a shipwreck" },
["Ryattenoki"] = {"[Ryattenoki]","Bes Pelargic" },
["Shi Do Gai"] = {"Shi Do [Gai]","Bes Pelargic" },
["Lap-lip"] = {"[Lap-lip]","Djelibeybi" },
["Lip-phon Lap-top"] = {"Lip-phon [Lap-top]","Djelibeybi" },
["Mihk-gran-bohp"] = {"Mihk-gran-[bohp]","Djelibeybi" },
["Phos-phor"] = {"[Phos]-phor","Djelibeybi" },
["Very Reverend Khepresh"] = {"Very Reverend [Khepresh]","Djelibeybi" },
["Yclept"] = {"[Yclept]","Djelibeybi" },
["Tuffy"] = {"[Tuffy]","Escrow" },
["Casanunda"] = {"[Casanunda]","Genua" },
["Greig Schwitz"] = {"Greig [Schwitz]","Genua" },
["Noobie"] = {"[Noobie]","Genua" },
["Tfat Chick"] = {"Tfat [Chick]","Genua" },
["Cut Me Own Hand Off Dhblah"] = {"Cut Me Own Hand Off [Dhblah]","Oasis" },
["Miss Pennie Laced"] = {"Miss Pennie [Laced]","Ohulan-Cutash" },
["Berti Boggis"] = {"[Berti] Boggis","Skund Forest, Pekan Ford" },
["The Proprietor"] = {"The Proprietor","A ferry shop, Counterweight Continent" }
}
far_away = {
["Cern Smith"] = {"Cern Smith","Bad Ass" },
["Granny Weatherwax"] = {"Granny Weatherwax","Bad Ass (Witches' Guild)" },
["Gulta Smith"] = {"Gulta Smith","Bad Ass" },
["Hanlo Shepston"] = {"Hanlo Shepston","Bad Ass, The Forge" },
["Jaims Smith"] = {"[Jaims] Smith","Bad Ass" },
["Kev Ogg / Mr. Ogg"] = {"Kev Ogg / Mr. Ogg","Bad Ass, Forge" },
["Martha Headlock"] = {"Martha Headlock","Bad Ass" },
["Mrs Smith"] = {"Mrs Smith","Bad Ass" },
["Cohen the Barbarian"] = {"Cohen the Barbarian","Barbarian camp" },
["Allen Kingfisher"] = {"Allen Kingfisher","Blackglass, Ramtops" },
["Morchella Esculenta"] = {"Morchella Esculenta","Blackglass, Undead Defence Shop" },
["Emile"] = {"Emile","Bois, pub" },
["Fern Golly"] = {"Fern Golly","Brass Neck, Brightly coloured (toy) stall" },
["Granville"] = {"Granville","Brass Neck, Village Shop" },
["Virgo Vango"] = {"Virgo Vango","Brass Neck (Portrait Shop)" },
["The Proprietor"] = {"The Proprietor","Brown Islands, Souvenir Shop" },
["Scuttle Me Own Canoe Dihbl / SMOC Dihbl"] = {"Scuttle Me Own Canoe Dihbl / SMOC Dihbl","Calh-Nhad" },
["Dia Shale"] = {"Dia Shale","Creel Springs" },
["Esther Elderbury"] = {"Esther Elderbury","Creel Springs" },
["DEATH"] = {"DEATH","Death's realm" },
["Dil the Embalmer"] = {"Dil the Embalmer","Djelibeybi, Embalmers' guild" },
["Khip-en-dahl"] = {"Khip-en-dahl","Djelibeybi, Queen Ptraci furniture shop" },
["Master Bibh-Lat"] = {"Master Bibh-Lat","Djelibeybi, Phoenix Road, Silversmith" },
["Merk"] = {"Merk","Djelibeybi, Phoenix Road, Merk's Mephit Messengers" },
["Ptep-ptip-ptop"] = {"Ptep-ptip-ptop","Djelibeybi, Pottery shop, Tsort Road" },
["Ptik-ptak-ptoe"] = {"Ptik-ptak-ptoe","Djelibeybi, Hourglass shop" },
["Pugh Alighieri"] = {"Pugh Alighieri","Djelibeybi, Sickle Street, Alcohol shop" },
["Teh-takk-eht"] = {"Teh-takk-eht","Djelibeybi, Temple street" },
["Toohumi"] = {"Toohumi","Toohumi's Illuminations, Market Street, Djelibeybi" },
["Ug Ogg"] = {"Ug Ogg","Djelibeybi, Guards" },
["Wan-tew-iit"] = {"Wan-tew-iit","Djelibeybi, barracks' kitchen" },
["Arms trader"] = {"Arms trader","Djelibeybi Harbour" },
["Awaiting-Rain"] = {"Awaiting-Rain","Djelibeybi Harbour" },
["Captain Ptargos"] = {"Captain Ptargos","Djelibeybi Harbour, Brazen Mermaid" },
["Fis'n-tsips"] = {"Fis'n-tsips","Djelibeybi Harbour, Happy Melon Inn" },
["Abraxas"] = {"Abraxas","Ephebe, Rational Street" },
["Ania"] = {"Ania","Ephebe, Logical Lane, the Flaming Ram's Skull Club" },
["Arimasticopoulous the Mosaicist"] = {"Arimasticopoulous the Mosaicist","Ephebe, Rational Street Alleyway" },
["Aurinax"] = {"Aurinax","Ephebe, Antithesis lane, jewellery repair shop" },
["Betty"] = {"Betty","Ephebe, Morporkian Tearoom (tea shop close to the Bing bank)" },
["Endos the Listener"] = {"Endos the Listener","Ephebe, Antithesis Lane" },
["Kakia"] = {"Kakia","Ephebe, Logical Lane, the Flaming Ram's Skull Club" },
["Klepton"] = {"Klepton","Ephebe, Ponder Alley" },
["Maintenance man"] = {"Maintenance man","Ephebe, Citadel" },
["Master Zosimos"] = {"Master Zosimos","Ephebe, Paradox Avenue, A murky little shop" },
["Rimasticopoulous the Mosaicist"] = {"Rimasticopoulous the Mosaicist","Ephebe, Rational Street Alleyway" },
["Souvlakios"] = {"Souvlakios","Ephebe, Tuvelpit Road" },
["The owner"] = {"The owner","Ephebe, Market Taverna" },
["Xenophobios"] = {"Xenophobios","Ephebe, Logical Lane, Amaryllis' Taverna" },
["Clara"] = {"Clara","Escrow, chandelers' shop" },
["Ema Nymton"] = {"Ema Nymton","Escrow, fair" },
["Ivor von Kaeyya"] = {"Ivor von Kaeyya","Escrow, The Count's Seat, Briar Way" },
["SMOH Dybbler"] = {"SMOH Dybbler","Escrow, Mother Dybbler Potion Shop" },
["Trau Mirnicht"] = {"Trau Mirnicht","Escrow, fair" },
["Verkauft Keinfleisch"] = {"Verkauft Keinfleisch","Escrow, The Meat Pie Shoppe, Garlic Way" },
["A generic Charre Bux employee"] = {"A generic Charre Bux employee","Charre Bux Coffee House, Genua" },
["Ayna"] = {"Ayna","The Magick Boxe, Genua" },
["Blloddwyn"] = {"Blloddwyn","'Y Crochan Ddu' Tavern, Genua" },
["Brittnee"] = {"Brittnee","Savannah Road, Genua" },
["Captain Merreaux Vingian"] = {"Captain Merreaux Vingian","Musketeers, Genua" },
["Cogsworth"] = {"Cogsworth","Cogsworth's Clocks, Genua" },
["David Leatherman"] = {"David Leatherman","Marketplace, Genua" },
["Edna Scum"] = {"Edna Scum","Pirate Avenue, Scum Bar" },
["Fredd S'Vage"] = {"Fredd S'Vage","Calypso Street, The Baron's Hand, Genua, Genua" },
["Harbour Master"] = {"Harbour Master","Office near docks, Genua" },
["Harbour mistress"] = {"Harbour mistress","underground docks, Genua" },
["Hotel Reception"] = {"Hotel Reception","Hotel, Genua" },
["Jolly Roger"] = {"Jolly Roger","Pirate Avenue, pirate shop, Genua" },
["Mamie Olivia"] = {"Mamie Olivia","Dead Man's Walk, Genua" },
["Mr Ray"] = {"Mr Ray","Tacticus Academy, Genua" },
["Mr Myrtle"] = {"Mr Myrtle","Silver Bells Silversmiths, Genua" },
["Myrtle"] = {"Myrtle","Silver Bells Silversmiths, Genua" },
["Mrs Gogol"] = {"Mrs Gogol","Marketplace, Genua" },
["Sno-ball vendor"] = {"Sno-ball vendor","Lovers' Walk, Genua" },
["Spritz Peltanque"] = {"Spritz Peltanque","The Resting Zombie, Genua" },
["Talula"] = {"Talula","Talula's Tintillating Toys, Genua" },
["The shopkeeper"] = {"The shopkeeper","Chandlery in Genua Avenue" },
["The tipster"] = {"The tipster","Genua" },
["Thom Cru'ez"] = {"Thom Cru'ez","Barracks, Genua" },
["Watch clerk"] = {"Watch clerk","Watch House, Genua" },
["Wounded soldier"] = {"Wounded soldier","Barracks, Genua" },
["Private Inside Leg"] = {"Private Inside Leg","Klatchian Foreign Legion outpost storage tent" },
["Bestiality Carter"] = {"Bestiality Carter","Lancre Town" },
["Brother Turbil"] = {"Brother Turbil","Lancre Town, lodging house" },
["Embezile Thatcher"] = {"Embezile Thatcher","Lancre Town, Lancrastian Farmers' Cooperative Bank" },
["J. Ogg"] = {"J. Ogg","Lancre Town, forge" },
["giant leader"] = {"giant leader","land of the giants" },
["Len"] = {"Len","Mad Stoat, Looney Len's Pottery Shop" },
["Maggie"] = {"Maggie","Mad Stoat (beside pond)" },
["Nicholas Winston"] = {"Nicholas Winston","Mad Stoat, Winston Puppets" },
["Serb Unglish"] = {"Serb Unglish","Mad Stoat" },
["Sharn Unglish"] = {"Sharn Unglish","Mad Stoat" },
["Our Wullie"] = {"Our Wullie","Mad Wolf, The Hunter's Head" },
["Stephan"] = {"Stephan","Mad Wolf, Mad Wolf Furriers" },
["Young Steven"] = {"Young Steven","Mad Wolf, The Hunter's Head" },
["Suhm-wil-deih"] = {"Suhm-wil-deih","Oasis, Fig Stall" },
["Vic"] = {"Vic","Vic's tannery, Ohulan Cutash" },
["Twoflower the tourist"] = {"Twoflower the tourist","Ohulan-Cutash, Fiddler's Riddle" },
["My poor kidnapped daughter (Beautiful female captive)"] = {"My poor kidnapped daughter","Ramtops, Bandit camp (very dangerous)" },
["Abbot Lobsang"] = {"Abbot Lobsang","Ramtops, Listening Monks Temple" },
["Brother Asap"] = {"Brother Asap","Ramtops, Monks of Cool temple (can be Cool Monks)" },
["Brother Hotpot"] = {"Brother Hotpot","Ramtops, Listening Monks Temple" },
["Sister Bi-Bi Effenne"] = {"Sister Bi-Bi Effenne","Monks of Cool, Ramtops" },
["Bi-Bi Effenne"] = {"Sister Bi-Bi Effenne","Cool Monks, Ramtops" },
["Ti-Ti Effenne"] = {"Sister Ti-Ti Effenne","Cool Monks, Ramtops" },
["Sister Ti-Ti Effenne"] = {"Sister Ti-Ti Effenne","Monks of Cool, Ramtops" },
["Heinz Blauhimmel"] = {"Heinz Blauhimmel","Razorback, village shop" },
["Lichtenstein"] = {"Lichtenstein","Razorback, The Inn" },
["Mad Gammer Nudity"] = {"Mad Gammer Nudity","Razorback" },
["Candice Little"] = {"Candice Little","Slice, Quilter shop" },
["Cleetus Patterson"] = {"Cleetus Patterson","Slice, Cleetus Patterson's Diuerse Supplies" },
["Granma Muckloe"] = {"Granma Muckloe","Slice" },
["Peggy Little"] = {"Peggy Little","Slice" },
["Ann Celeria"] = {"Ann Celeria","Slippery Hollow" },
["Honest Dachshund (Frank Doberman)"] = {"Honest Dachshund (Frank Doberman)","Slippery Hollow, Moon Under Water Tavern" },
["Mr Smith (Mr Shopkeeper)"] = {"Mr Smith (Mr Shopkeeper)","Slippery Hollow, Tannery Supply Shop" },
["Mrs Van Carrot"] = {"Mrs Van Carrot","Slippery Hollow" },
["One and Only Manclef"] = {"One and Only Manclef","Slippery Hollow" },
["Young Bran"] = {"Young Bran","Slippery Hollow" },
["A maitre d'"] = {"A maitre d'","Sto Lat, The Hammered Cat" },
["Fleppo"] = {"Fleppo","Sto Lat, Bathrobe Shop" },
["Isobel Kingdom"] = {"Isobel Kingdom","Sto Lat, Academy of Artificers" },
["71-hour Ahmed"] = {"71-hour Ahmed","Tacticum (get El Kinte Caravan from Djelibeybi)" },
["Temple Guardian"] = {"Temple Guardian","Temple of Soyin" },
["Fione mac Feegle"] = {"Fione mac Feegle","Uberwald (Pictsie Barrows)" },
["Abe"] = {"Abe","Unnamed town, graveyard, Uberwald" },
["Innkeeper"] = {"Innkeeper","Unnamed town, Uberwald" },
["Spiegal"] = {"Spiegal","Ye Olde Weapons Shoppe, Unnamed town, Uberwald" }
}
letter_type = ""
letter_pattern = {}
function DeadLetterSolver(sName, sLine, wildcards)
letter_pattern = {}
EnableTrigger("DeadLetterCaptureStart", true)
EnableTrigger("DeadLetterCaptureEnd", true)
EnableTrigger("DeadLetterCaptureError", true)
EnableTrigger("DeadLetterCaptureCombatError", true)
Send("read letter")
end
function DeadLetterParse(sName, sLine, wildcards)
if(string.match(wildcards.line, "_")) then
table.insert(letter_pattern, wildcards.line)
end
end
function DeadLetterStop(sName, sLine, wildcards)
EnableTrigger("DeadLetterCaptureStart", false)
EnableTrigger("DeadLetterCaptureEnd", false)
EnableTrigger("DeadLetterCaptureError", false)
EnableTrigger("DeadLetterCaptureCombatError", false)
if(next(letter_pattern)) then
--Note("Letter is due: " .. wildcards.time)
DeadLetterSolution()
letter_pattern = {}
end
end
function DeadLetterSolution()
name = rex.new("^".. string.gsub(letter_pattern[1], "_", ".") .. "$")
if(letter_pattern[2] ~= nil) then
place = rex.new("^" .. string.gsub(letter_pattern[2], "_", "."))
else
place = nil
end
for k,v in pairs(difficult_customer) do
if(name:match(k)) then
if(place:match(v[2])) then
Note("[DC] Deliver letter to: " .. v[1] .. " in " .. v[2])
end
end
end
for k,v in pairs(distant_land) do
if(name:match(k)) then
if(place:match(v[2])) then
Note("[DL] Deliver letter to: " .. v[1] .. " in " .. v[2])
end
end
end
for k,v in pairs(far_away) do
if(name:match(k)) then
if(place == nil) then
Note("[FA] Deliver letter to: " .. v[1] .. " in " .. v[2])
elseif(place:match(v[2])) then
Note("[FA] Deliver letter to: " .. v[1] .. " in " .. v[2])
end
end
end
end
]]>
</script>
<triggers>
<trigger
enabled="n"
ignore_case="n"
keep_evaluating="y"
match="(?P<line>.+)"
regexp="y"
script="DeadLetterParse"
sequence="35"
name="DeadLetterCaptureStart"
></trigger>
<trigger
enabled="n"
ignore_case="n"
keep_evaluating="y"
match="^Deliver by (?P<time>.+)( \[\w{3}\])?\.$"
regexp="y"
script="DeadLetterStop"
sequence="35"
name="DeadLetterCaptureEnd"
></trigger>
<trigger
enabled="n"
ignore_case="n"
keep_evaluating="y"
match="^Cannot find \Wletter\W, no match\.$"
regexp="y"
script="DeadLetterStop"
sequence="35"
name="DeadLetterCaptureError"
></trigger>
<trigger
enabled="n"
ignore_case="n"
keep_evaluating="y"
match="^You are too busy fighting to read at the moment\.$"
regexp="y"
script="DeadLetterStop"
sequence="35"
name="DeadLetterCaptureCombatError"
></trigger>
</triggers>
</muclient>
<!--
match="^Deliver by (?P<time>.+ (\[\w{3}\])?)\."
-->