-
Notifications
You must be signed in to change notification settings - Fork 1
/
carve.cmd
116 lines (95 loc) · 1.8 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
debuglevel 5
var item %1
var itemDesc
var count 1
var current_count 0
var primary.container $lw.container
var carvespeed carve
if_2 then
{
var count %2
}
goto %item
band:
var itemDesc a bone band
gosub book 9
goto %carvespeed
javelin:
var itemDesc a bone javelin
gosub book 8
goto %carvespeed
# ~175 - ?
shiv:
var itemDesc a bone shiv
gosub book 8
goto %carvespeed
tasset:
var itemDesc a ribbed bone tasset
gosub book 10
var carvespeed carvefast
goto %carvespeed
# 240- 274
buckle:
var itemDesc a bone belt buckle
gosub book 9
goto %carvespeed
# 275- ?
choker:
var itemDesc a bone choker
gosub book 9
goto %carvespeed
# <450 - 501
necklace:
var itemDesc an articulated bone necklace
gosub book 9
goto %carvespeed
crown:
var itemDesc a bone crown
gosub book 9
goto %carvespeed
comb:
var itemDesc a bone comb
gosub book 9
goto %carvespeed
book:
var chapter $1
put get my carving book
pause
put turn my book to chapter %chapter
put read my book
matchre stowbook Page (\d+): %itemDesc
matchwait 3
goto error
stowbook:
var page $1
put turn my book to page %page
pause
#put stow carving book
return
get.stack:
pause 0.5
put put my %item in my %primary.container
put get my stack in my %primary.container
waitfor You get
goto %carvespeed
carve:
send .bw %item
waitforre ^BW DONE
pause 0.5
goto checkCount
carvefast:
send .bwfast %item
waitforre ^BW DONE
pause 0.5
goto checkCount
checkCount:
math current_count add 1
if (%current_count < %count) then goto get.stack
goto done
error:
echo
echo *** Could not match item description: %itemDesc ***
echo
exit
done:
put #parse CARVING DONE