-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlwfast.cmd
More file actions
297 lines (255 loc) · 6.7 KB
/
lwfast.cmd
File metadata and controls
297 lines (255 loc) · 6.7 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
# debug 5
var container $lw.container
var belt outfitter's belt
var has_craft_belt $has_tailor_craft_belt
var mark $can.stamp
ECHO *******************************
ECHO **
ECHO ** This script assumes that you will have cloth or tanned leather in your right hand
ECHO ** and the tailoring book turned to the correct page before starting
ECHO **
ECHO ** When starting the script, type .lw <item>
ECHO **
ECHO ** Change var container to where you keep tools.
ECHO **
ECHO *******************************
action var yards $1 when material \((\d+) yards\)$
action var yards $1 when cloth \((\d+) yards\)$
action var yards 1 when \(1 yard\)$
action var have $1 when You count out (\d+) yards of material there\.$
var tool
var item %1
if_2 then goto %2
var study_item tailor book
Glance:
matchre Get.Needle %item
matchre HaveCloth cloth
matchre HaveSilk silk
matchre HaveLeather leather
matchre NotEnough Both of your hands are empty
put inv held
matchwait 5
goto done
HaveCloth:
var material cloth
goto top
HaveSilk:
var material silk
goto top
HaveLeather:
var material leather
goto top
instructions:
var study_item instructions
var material cloth
pause 0.5
put get my instructions;read my instructions
pause 1
put count my %material
pause 0.5
if %yards = %have then goto GetBook
if %yards > %have then goto NotEnough
put stow instructions
waitforre ^You put your instructions
put mark my %material at %yards yards
match CutLeather You count out
match NotEnough There is not enough
matchwait
top:
put get tailor book
pause 0.5
put read my book;count my %material
waitfor A list of
pause 0.5
if %yards = %have then goto GetBook
if %yards > %have then goto NotEnough
put stow book
waitforre ^You put your book
put mark my %material at %yards yards
match CutLeather You count out
match NotEnough There is not enough
matchwait
CutLeather:
gosub swap.tool scissor
put cut my %material with my scissor
waitfor You carefully cut
gosub stow.tool scissor
put stow right
waitfor You put
put get my %material
waitfor You pick up
GetBook:
match GetBook Study them again
match DoneBook Roundtime
pause 0.5
put get my %study_item;study my %study_item
matchwait
DoneBook:
pause 0.5
put stow my %study_item
waitfor You put
gosub swap.tool scissor
goto FirstCut
FirstCut:
put cut my %material with my scissor
goto Matches
Matches:
matchre %s ...wait|Sorry
match Get.Awl needs holes punched
matchre Get.Needle Roundtime|must be holding the sewing needles to do that|That tool does not seem suitable
matchre done You cannot figure out how to do that|You realize that cannot be repaired|not damaged enough to warrant repair
matchre LargePad You need another finished large cloth padding|reinforced with some large cloth padding
match Smallpad You need another finished small cloth padding
match Handle You need another finished leather shield handle
match LongCord You need another finished long leather cord
match MoreThread The needles need to have thread
match Get.Needle New seams must now be sewn
matchwait
MoreThread:
put put my needle in my %container;get thread in my %container
match Thread You get
match NoThread What were you referring to?
matchwait 3
goto NoThread
Thread:
put put my thread on needle in my %container
waitfor You carefully thread
put get needle in my %container
goto Sew
NoThread:
echo
echo ########### NO THREAD ###########
echo
goto done
Sew:
save Sew
pause 0.5
put play $play.song $play.style
put push my %item with my sew needle
goto Matches
Poke:
save Poke
pause 0.5
put poke my %item with my %tool
goto Matches
Measure:
save Measure
pause 0.5
put measure my %item with my yardstick
goto Matches
Cut:
save Cut
pause 0.5
put cut my %item with my scissor
goto Matches
Rub:
save Rub
pause 0.5
put rub my %item with my slickstone
goto Matches
Mark:
put mark my %item with my stamp
waitforre Roundtime|too badly damaged to be used
pause 1
#put put my stamp in my %container
goto done
NotEnough:
echo ****** Not Enough Material ******
pause
if "$righthand" != "Empty" then put put $righthand in my %container
if "$lefthand" != "Empty" then gosub stow.tool
pause
goto done
done:
gosub stow.tool
send #parse LW DONE
exit
Get.Needle:
var last Get.Needle
if %tool = yardstick then goto Get.Scissor
if "$lefthand" = "sewing needles" then goto Sew
pause 1
gosub swap.tool sewing needles
goto Sew
Get.Awl:
var last Get.Awl
gosub swap.tool awl
goto Poke
Get.Pins:
var last Get.Pins
pause 1
gosub swap.tool pins
goto Poke
Get.Scissor:
var last Get.Scissor
pause 1
gosub swap.tool scissor
goto Cut
Get.Slick:
var last Get.slick
pause 1
gosub swap.tool slickstone
goto Rub
Get.Yard:
var last Get.Yard
pause 1
gosub swap.tool yardstick
goto Measure
Get.Stamp:
var last Get.Stamp
pause 1
if "%mark" != "ON" then { goto done }
gosub swap.tool stamp
if "$lefthand" = "Empty" then goto done
goto Mark
swap.tool:
var tool $0
if !contains("$lefthand", "%tool") then
{
if ("$lefthand" != "Empty") then { gosub stow.tool }
pause 0.5
matchre %last \.\.\.wait|Sorry
matchre RETURN You get|You remove|You untie
if "%has_craft_belt" = "YES" then { put untie my %tool from my %belt }
else { put get my %tool }
put untie my %tool
put get my %tool in my %container
matchwait 5
goto done
}
pause 0.5
return
stow.tool:
if "$lefthand" = "Empty" then return
put stop play
pause 0.5
matchre RETURN You attach|You put|Tie what
matchre stow.tool.2 doesn't seem to fit
if "%has_craft_belt" = "YES" then { put tie my $lefthandnoun to my %belt }
else { put put my $lefthandnoun in my %container }
matchwait
stow.tool.2:
put put my $lefthandnoun in my %container
return
RETURN:
pause 0.5
return
LargePad:
var assemble Large Pad
goto Assemble
SmallPad:
var assemble Small Pad
goto Assemble
Handle:
var assemble shield handle
goto Assemble
LongCord:
var assemble long cord
goto Assemble
Assemble:
var tool Assemble
gosub stow.tool
put get %assemble in my %container
waitfor You get
put assemble my %assemble with my %item
goto Get.Needle