-
Notifications
You must be signed in to change notification settings - Fork 2
/
Sausages.xml
142 lines (126 loc) · 5.06 KB
/
Sausages.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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Monday, March 30, 2020, 2:26 PM -->
<!-- MuClient version 5.05 -->
<!-- Plugin "TestPlugin" generated by Plugin Wizard -->
<muclient>
<plugin
name="Sausages"
purpose="Recall needed parts for sausage missions"
id="4ffd4bdee42613fa81041c33"
language="Lua"
date_written="2020-03-30 14:25:22"
requires="5.05"
version="1.0"
>
</plugin>
<aliases>
<alias
match="sausageTest"
enabled="y"
ignore_case="y"
sequence="30"
script="sausageTest"
name="sausageTest"
></alias>
<alias
match="^slist\s?(\w*)$"
enabled="y"
ignore_case="y"
regexp="y"
sequence="30"
script="sausageList"
name="sausageList"
></alias>
</aliases>
<triggers>
<trigger
enabled="y"
ignore_case="n"
keep_evaluating="y"
match="^You have four hours to deliver (\d+) fresh (\w+) sausages to Sam Slager.$"
regexp="y"
script="sausageStart"
sequence="35"
name="sausageStart"
></trigger>
You read the order slip:
<trigger
enabled="y"
lines_to_match="2"
multi_line="y"
ignore_case="n"
keep_evaluating="y"
match="^You read the order slip:\n(\w+)\s+\d+ sausages\s+"
regexp="y"
script="readSlip"
sequence="35"
name="readSlip"
></trigger>
</triggers>
<script>
<![CDATA[
local data = {
badger = { neededParts = "Skin only makes 45" , location = "Granny's privy, Lower Ramtops, Sto Plains" } ,
chicken = { neededParts = "Skin only makes 36" , location = "Spring chickens in Lancre, Bleak Prospect, Chronides Farmstead, Dinky, Ephebe" } ,
deer = { neededParts = "FAWN Skin, 4 hooves, stomach, brain, tail, intestine makes 78 \nDOE 4 hooves, brain, nose, lungs makes 91" , location = "Bois Forest, CWC, Lower Ramtops, Hublands, Sto Plains, Mountains" } ,
dragon = { neededParts = "Moon dragon: skin makes 106" , location = "Nowhere, Morpork/Carrack Mountains" } ,
eagle = { neededParts = "Skin, any other body part makes 50+" , location = "Morpork/Carrack Mountains, Hublands" } ,
fox = { neededParts = "Pelt, 2 legs, 4 paws makes 70" , location = "Sto Lat, Sto Plains, CWC, Hublands, Lower/Upper Ramtops" } ,
goat = { neededParts = "skin makes 105" , location = "Chronides Farm, Ephebe" } ,
hare = { neededParts = "Skin, head makes 29" , location = "CWC, Hublands, Lower Ramtops, Morpork/Carrack Mountains" } ,
ibis = { neededParts = "Skin makes 36" , location = "Djelibeybi, often found on the walls" } ,
mouse = { neededParts = "All bits makes 15" , location = "Cabbage Warehouse Sto Lat" } ,
owl = { neededParts = "Skin makes 39" , location = "Chronides Farmstead top of barn, Bad Ass, Lower Ramtops, Sto Plains" } ,
rabbit = { neededParts = "Skin, 4 paws, 4 legs makes 17" , location = "Sto plains or Mountains" } ,
raptor = { neededParts = "Skin makes 39" , location = "Sto plains" } ,
rat = { neededParts = "Skin, paws, legs, tail, nose, eyes, head makes 10, \nRAT(large evil-looking) torso makes 37" , location = "AM, Cabbage Warehouse Sto Lat, Solid part of the Ankh around the Isle of the Gods(large evil rats)" } ,
sheep = { neededParts = "1 leg, 1 hoof makes 84" , location = "Bleak Prospect, Sheepridge, Hublands, Lower Ramtops, Sto Plains" } ,
snake = { neededParts = "Garter snake all bits makes 10, get 3 corpses, Viper all bits makes 13, get 2 corpses" , location = "Genua, roads in Klatch" } ,
squirrel = { neededParts = "All bits from corpse makes 15" , location = "Ramtops Terrains/roads, Trail to the Grflx caves in Sto Plains" } ,
tortoise = { neededParts = "Shell, 4 legs, 4 claws, tail, head, eyes, torso makes 35" , location = "Ephebe" } ,
turkey = { neededParts = "Skin, wings, legs, claws makes 56" , location = "Lower/Upper Ramtops(best), Sto Plains, Uberwald, CWC, Hublands" } ,
vulture = { neededParts = "Skin makes 40" , location = "Roads(best)/terrains in Klatch" } ,
wolf = { neededParts = "1 leg, 1 paw makes 146" , location = "Sto Plains(wolf trails best), Mad Wolf, Uberwald" },
}
local lastAnimal
function sausageTest(name, line)
-- With Simulate(), you need the \n at the end to make a new line.
Simulate("You have four hours to deliver 100 fresh deer sausages to Sam Slager.\n")
--Simulate("You read the order slip:\nTortoise 25 sausages A$20.50\n")
end
local function printStuff(animal)
local animalData = data[animal]
if animalData then
Note("need: " .. animalData.neededParts)
Note(animalData.location)
else -- No animal: `animalData` = nil
Note("Animal: " .. animal .. " not found.")
end
end
function readSlip(name, line, wildcards)
local animal = string.lower(wildcards[1])
lastAnimal = animal
printStuff(animal)
end
function sausageStart(name, line, wildcards)
local animal = wildcards[2]
lastAnimal = animal
printStuff(animal)
end
function sausageList(name, line, wildcards)
local animal = wildcards[1]
if animal ~= "" then
if data[animal] then
lastAnimal = animal
end
printStuff(animal)
elseif lastAnimal then
printStuff(lastAnimal)
else
Note("No animals in progress!")
end
end
]]>
</script>
</muclient>