-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbraid.cmd
More file actions
318 lines (305 loc) · 10.7 KB
/
braid.cmd
File metadata and controls
318 lines (305 loc) · 10.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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
var forage grass
var trash log
var loop 0
action goto EXIT when ^You survey the area and realize that any foraging efforts would be futile\.
if ("$righthand" != "Empty") then send stow right
if ("$lefthand" != "Empty") then send stow left
pause 0.1
pause 0.2
LOOP:
math loop add 1
if (%loop > 20) then goto DONE
if ($Mechanical_Lore.LearningRate) > 31 then goto DONE
if contains("$roomobjs","(pile of coins|pile of coin|pile of rocks|pile of grass)") then GOSUB KICK.PILE
if contains("$roomobjs","(pile of coins|pile of coin|pile of rocks|pile of grass)") then GOSUB KICK.PILE
pause 0.1
if ("$righthandnoun" = "%forage") && ("$lefthandnoun" = "%forage") then goto BRAID
if ("$righthand" != "Empty") then send empty right
if ("$lefthand" != "Empty") then send empty left
if ("$zoneid" = "150" && "$roomid" != "45") then gosub automove 45
put forage %forage
pause 2
pause
FORAGE:
if ("$lefthand" = "braided vines") then put swap
if ("$lefthand" = "braided grass") then put swap
pause 0.2
if ("$charactername" = "Shroom") && ("$zoneid" = "150") then goto FEEDBAG
pause 0.001
if ("%forage" = "grass") then
{
if contains("$roomobjs","some grass") then
{
put get grass
pause 0.5
goto BRAID
}
}
if ("%forage" = "vine") then
{
if contains("$roomobjs","a vine") then
{
put get vine
pause 0.5
goto BRAID
}
}
put forage %forage
pause 2
pause
if ("$righthand" != "Empty") && ("$lefthand" != "Empty") then goto BRAID
goto FORAGE
FEEDBAG:
pause 0.2
if ("$righthand" != "Empty") && ("$lefthand" != "Empty") then goto BRAID
matchre FEEDBAG ^You get
matchre EMPTYBAG ^What were|^I could not
put get grass from my feedb
matchwait
HUM:
send stop hum
pause 0.2
BRAID:
pause 0.1
if ("$lefthand" = "braided vines") then put swap
if ("$lefthand" = "braided grass") then put swap
if ($Mechanical_Lore.LearningRate) > 31 then goto DONE
pause 0.3
if ("$lefthand" = "Empty") then goto FORAGE
matchre HUM ^But that would give away your hiding
matchre FORAGE ^You need to have more material
matchre DUMP ^You need both hands to do that|nothing more than wasted effort
matchre PULL ^You fumble around trying|^You are certain that you have made a|is already as long
matchre BRAID Roundtime|^\.\.\.wait|^Sorry
send braid my %forage
matchwait
PULL:
pause .5
put pull my %forage
pause
DUMP:
pause 0.2
pause 0.1
if matchre("$roomobjs", "a small hole") then var trash hole
if matchre("$roomobjs", "a small mud puddle") then var trash puddle
if matchre("$roomobjs", "a marble statue ") then var trash statue
if matchre("$roomobjs", "a bucket of viscous gloop|a waste bucket|a bucket|metal bucket|iron bucket") then var trash bucket
if matchre("$roomobjs", "a large stone turtle") then var trash turtle
if matchre("$roomobjs", "a tree hollow|darken hollow") then var trash hollow
if matchre("$roomobjs", "an oak crate") then var trash crate
if matchre("$roomobjs", "a driftwood log") then var trash log
if matchre("$roomobjs", "a disposal bin|a waste bin|firewood bin") then var trash bin
if matchre("$roomobjs", "ivory urn") then var trash urn
if matchre("$roomobjs", "a waste basket") then var trash basket
if matchre("$roomobjs", "a bottomless pit") then var trash pit
if matchre("$roomobjs", "trash receptacle") then var trash receptacle
if matchre("$roomname", "^\[Garden Rooftop, Medical Pavilion\]") then var trash gutter
pause 0.3
if matchre("$righthand","(grass|vine|rope)") then put put my $1 in %trash
if matchre("$lefthand","(grass|vine|rope)") then put put my $1 in %trash
pause 0.5
pause 0.2
if matchre("$righthand","(grass|vine|rope)") then put drop my $righthand
if matchre("$lefthand","(grass|vine|rope)") then put drop my $lefthand
pause 0.4
pause 0.5
if ("$righthand" != "Empty") then send empty right
if ("$lefthand" != "Empty") then send empty left
pause 0.5
if ("$righthand" != "Empty") then put stow right
if ("$lefthand" != "Empty") then put stow left
pause 0.2
send dump junk
pause .1
goto LOOP
EMPTYBAG:
echo **** FEEDBAG IS EMPTY! ATTEMPTING TO REFILL!!
put put grass in my feed
pause 0.5
if ("$zoneid" = "150") && ("$roomid" != "44") then gosub automove 44
# if ("$zoneid" = "150") && ("$roomid" = "85") then put go portal
# pause
# pause 0.5
# if ("$zoneid" = "66") then gosub automove campfire
FEEDBAG.COLLECT:
pause 0.5
put collect grass
pause 2
pause
if !contains("$roomobjs","pile of grass") then goto FEEDBAG.COLLECT
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
if !contains("$roomobjs","pile of grass") then goto FEEDBAG.COLLECT
put get grass
pause 0.5
put put grass in my feedbag
pause 0.1
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
if !contains("$roomobjs","pile of grass") then goto FEEDBAG.COLLECT
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto FEEDBAG.COLLECT
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
if !contains("$roomobjs","pile of grass") then goto FEEDBAG.COLLECT
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto LOOP
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto LOOP
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto LOOP
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto LOOP
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
if !contains("$roomobjs","pile of grass") then goto LOOP
put get grass
pause 0.5
put put grass in my feedbag
pause 0.3
pause 0.3
gosub automove 45
goto LOOP
DONE:
pause 0.1
pause 0.1
EXIT:
if matchre("$roomobjs", "trash receptacle") then var trash receptacle
if matchre("$roomobjs", "a small hole") then var trash hole
if matchre("$roomobjs", "a small mud puddle") then var trash puddle
if matchre("$roomobjs", "a marble statue ") then var trash statue
if matchre("$roomobjs", "a bucket of viscous gloop|a waste bucket|a bucket|metal bucket") then var trash bucket
if matchre("$roomobjs", "a large stone turtle") then var trash turtle
if matchre("$roomobjs", "a tree hollow|darken hollow") then var trash hollow
if matchre("$roomobjs", "an oak crate") then var trash crate
if matchre("$roomobjs", "a driftwood log") then var trash log
if matchre("$roomobjs", "a disposal bin|a waste bin|firewood bin") then var trash bin
if matchre("$roomobjs", "ivory urn") then var trash urn
if matchre("$roomobjs", "a bottomless pit") then var trash pit
if matchre("$roomname", "^\[Garden Rooftop, Medical Pavilion\]") then var trash gutter
pause 0.3
if matchre("$righthand","(grass|vine|rope)") then put put my $1 in %trash
if matchre("$lefthand","(grass|vine|rope)") then put put my $1 in %trash
pause 0.5
pause 0.2
if contains("$righthand","(grass|vine|rope)") then put drop my $righthand
if contains("$lefthand","(grass|vine|rope)") then put drop my $lefthand
pause 0.4
pause 0.5
if "$righthand" != "Empty" then put empty right
if "$lefthand" != "Empty" then put empty left
pause 0.5
put #parse DONE BRAIDING
put #parse BRAIDING DONE
put #parse BRAIDING DONE
exit
KICK.PILE:
pause 0.1
if !matchre("$roomobjs","(pile of coins|pile of coin|pile of rocks|pile of grass)") then RETURN
matchre RETURN ^I could not|^What were you
matchre KICK.PILE foot smashing down
matchre STAND ^You can't do that from your position
match DELAY footing at the last moment
put kick pile
matchwait 20
goto FORAGE.EXP
STAND:
put stand
goto KICK.PILE
DELAY:
pause 11
put stand
goto KICK.PILE
####################################################################################
AUTOMOVE:
delay 0.0001
var Destination $0
var automovefailCounter 0
if (!$standing) then gosub AUTOMOVE_STAND
if ("$roomid" = "%Destination") then return
AUTOMOVE_GO:
delay 0.0001
matchre AUTOMOVE_FAILED ^(?:AUTOMAPPER )?MOVE(?:MENT)? FAILED
matchre AUTOMOVE_RETURN ^YOU HAVE ARRIVED(?:\!)?
matchre AUTOMOVE_RETURN ^SHOP CLOSED(?:\!)?
matchre AUTOMOVE_FAIL_BAIL ^DESTINATION NOT FOUND
put #goto %Destination
matchwait
AUTOMOVE_STAND:
pause 0.1
matchre AUTOMOVE_STAND ^\.\.\.wait|^Sorry\,
matchre AUTOMOVE_STAND ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
matchre AUTOMOVE_STAND ^The weight of all your possessions prevents you from standing\.
matchre AUTOMOVE_STAND ^You are still stunned\.
matchre AUTOMOVE_RETURN ^You stand(?:\s*back)? up\.
matchre AUTOMOVE_RETURN ^You are already standing\.
send stand
matchwait
AUTOMOVE_FAILED:
evalmath automovefailCounter (automovefailCounter + 1)
if (%automovefailCounter > 5) then goto AUTOMOVE_FAIL_BAIL
send #mapper reset
pause 0.5
pause 0.1
goto AUTOMOVE_GO
AUTOMOVE_FAIL_BAIL:
put #echo
put #echo >$Log Crimson *** AUTOMOVE FAILED. ***
put #echo >$Log Destination: %Destination
put #echo Crimson *** AUTOMOVE FAILED. ***
put #echo Crimson Destination: %Destination
put #echo
exit
AUTOMOVE_RETURN:
return