-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcarve.cmd
287 lines (264 loc) · 7.75 KB
/
carve.cmd
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
#debug 5
#MasterCraft - by Shroom
# A crafting script suite...
#v 0.1.7
#
# Script Usage: .carve <item> --carves the item from bone
# .carve <item> <stone size> --carves the item from the stone size specified (ie pebble, rock, stone, boulder)
#
# This script is used in conjunction with the mastercraft.cmd script, and is used to carve items from bone and stone.
#
# To use it with bone, hold the material to be used, study your instructions, then start the script.
# To use it with stone, have the stone in hand or on the floor, study your instructions, then start the script.
#
# Due to the dual material nature of carving and the difficulty in managing stone deeds, repeating is not available for CARVE.CMD.
#
# Be sure to have all the relevant carving tools in your engineering bag, as well as any parts to be assembled. If you have a
# Maker's Mark, be sure that it is also on you if your character profile in MC INCLUDE.cmd is toggled to mark items.
#
# If you are holding an unfinished item instead, this script will try to finish it for you.
#
var rock stack
var chisel saw
var current.lore Engineering
if_2 var rock %2
if_1 put #var MC.order.noun %1
var Action carve
var polish.gone 0
include mc_include.cmd
if "%rock" != "stack" then var chisel chisel
action var Action riffler when notice several rough, jagged (shards|edges) protruding|rubbing the .* with a riffler set
action var Action rasp when and determine it is no longer level|has developed an uneven texture|are uneven|is uneven|scraping the .* with a rasp
action var Action polish when some discolored areas on|applying some polish to
action var Action carve when ^carve .* with my %chisel|^scrape .* with my rasp|^rub .* with my riffler|^apply my polish to .*|appears free of defects that would impede further carving|anything that would prevent carving|ready for further carving
action var Action assemble when ^\[Ingredients can
action (work) goto Retry when \.\.\.wait|type ahead
action goto done when ^Applying the final touches|You cannot figure out how to do that
action (order) var polish.order $1 when (\d+)\)\..*jar of surface polish.*(Lirums|Kronars|Dokoras)
action var polish.gone 1 when ^The polish is all used up, so you toss it away.
action var assemble $1 when another finished \S+ shield (handle)
action var assemble $1 when another finished wooden (hilt|haft)
action var assemble $1 $2 when another finished (long|short|small|large) leather (cord|backing)
action var assemble $1 $2 when another finished (small|large) cloth (padding)
action var assemble $1 $2 when another finished (long|short) wooden (pole)
#fix polish ordering, don't leave room with item in it!
StudyBook:
pause 0.1
if (($concentration > 99) && ($Arcana.LearningRate < 30)) then
{
pause 0.0001
pause 0.0001
send exhale my crystal
pause 0.5
}
send khri prowess hasten darken strike serenity focus
pause 2
pause
pause 0.1
pause 0.1
pause 0.001
pause 0.001
send get my carv book
send study my book
waitforre Roundtime|You|What
pause
pause
pause 0.5
send put my book in my %engineering.storage
pause 0.8
unfinished:
if "%rock" != "stack" then goto first.carve
send glance
waitforre ^You glance down (.*)\.$
pause 1
if contains("$0", "unfinished") then
{
send analyze my $MC.order.noun
waitforre ^You.*analyze
pause 0.1
if !contains("$lefthandnoun", "$MC.order.noun") then send swap
pause 1
goto work
}
first.carve:
pause 0.1
pause 0.1
if contains("$righthandnoun", "%rock") then send swap
pause 0.5
if ((contains("$lefthandnoun", "%rock")) && ("%rock" != "stack")) then send drop my $lefthandnoun
pause 0.5
pause 0.2
pause 0.1
if !contains("$righthandnoun", "%chisel") then
{
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
pause 0.2
send get my %chisel
waitforre ^You get|^You are already
}
matchre excess and place the excess (.+) off to the side|cut off the excess material
matchre work Roundtime: \d+
send carve my %rock with my %chisel
matchwait
excess:
pause
if "%rock" != "stack" then
{
var extra $0
if "%extra" = "pebble" then
{
send get pebble
waitforre ^You pick up|^You are already
send put my pebble in my %engineering.storage
waitforre ^You put
goto work
}
send get packet
wait
send push %extra with my packet
wait
send stow my packet
wait
send get deed
wait
send put my deed in my %engineering.storage
wait
goto work
}
else
{
send put my %chisel in my %engineering.storage
wait
send get stack
wait
send put my stack in my %engineering.storage
wait
goto work
}
work:
action (work) on
save %Action
gosub %Action
goto work
carve:
pause 0.1
pause 0.1
pause 0.1
if !contains("$righthandnoun", "%chisel") then
{
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
send get my %chisel
waitforre ^You get|^You are already
}
send carve $MC.order.noun with my %chisel
pause 1
return
riffler:
pause 0.1
pause 0.1
if !contains("$righthandnoun", "riffler") then
{
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
send get my riffler
waitforre ^You get|^You are already
}
send rub $MC.order.noun with my riffler
pause 1
return
rasp:
pause 0.1
pause 0.1
if !contains("$righthandnoun", "rasp") then
{
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
send get my rasp
waitforre ^You get|^You are already
}
send scrape $MC.order.noun with my rasp
pause 1
return
polish:
pause 0.1
pause 0.1
if %polish.gone = 1 then gosub new.tool
if !contains("$righthandnoun", "polish") then
{
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
send get my polish
waitforre ^You get|^You are already
}
send apply my polish to $MC.order.noun
pause 1
return
assemble:
pause 0.1
if "$righthandnoun" != "%assemble" then
{
pause 1
pause 0.1
if ("$righthand" != "Empty") then send put my $righthandnoun in my %engineering.storage
send get my %assemble
waitforre ^You get|^You are already
}
send assemble $MC.order.noun with my %assemble
pause 1
send analyze $MC.order.noun
pause 1
return
new.tool:
pause 0.1
pause 0.1
if !contains("$scriptlist", "mastercraft.cmd") then return
var temp.room $roomid
gosub check.location
if %polish.gone = 1 then
{
gosub automove %tool.room
if !("$righthand" = "Empty" || "$lefthand" = "Empty") then send put my $MC.order.noun in my %engineering.storage
action (order) on
send order
pause .5
action (order) off
gosub purchase order %polish.order
pause 0.1
send put my polish in my %engineering.storage
waitforre ^You put
if (("$righthandnoun" != "$MC.order.noun" && "$lefthandnoun" != "$MC.order.noun") && ("%rock" = "stack")) then send get my $MC.order.noun from my %engineering.storage
var polish.gone 0
}
gosub automove %temp.room
unvar temp.room
return
purchase:
var purchase $0
goto purchase2
purchase.p:
pause 0.5
purchase2:
matchre purchase.p type ahead|...wait|Just order it again
matchre lack.coin you don't have enough coins|you don't have that much
matchre return pay the sales clerk|takes some coins from you
put %purchase
matchwait
lack.coin:
if contains("$scriptlist", "mastercraft.cmd") then put #parse LACK COIN
else echo *** You need some startup coin to purchase stuff! Go to the bank and try again!
exit
Retry:
pause 1
var Action %s
goto work
return:
return
done:
pause 0.1
pause 0.1
if %polish.gone = 1 then gosub new.tool
send put my $righthandnoun in my %engineering.storage
wait
if "$lefthandnoun" = "$MC.order.noun" then send swap
pause 1
put get my %rock
gosub mark
put #parse CARVING DONE
exit