-
Notifications
You must be signed in to change notification settings - Fork 1
/
lw_repair.cmd
151 lines (124 loc) · 3.02 KB
/
lw_repair.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
debuglevel 5
var container backpack
var belt outfitter's belt
var has_craft_belt $has_tailor_craft_belt
var command
if_2 then goto %2
GET:
matchre GET.STOW You get|You are already holding that
matchre HOLD already in your inventory
put get my %1
matchwait 10
goto END
GET.STOW:
var inv.action STOW
goto REPAIR.MAIN
HOLD:
matchre HOLD.WEAR You loosen|You work|You pull|You take
put hold my %1
matchwait 10
goto END
HOLD.WEAR:
var inv.action WEAR
if "$righthand" = "Empty" then put swap
goto REPAIR.MAIN
WEAR.ITEM:
pause 1
put wear my %1
return
STOW.ITEM:
pause 1
put stow my %1
return
STOW.TOOLS:
pause 0.5
gosub stow.tool
pause 0.5
return
REPAIR.MAIN:
gosub REPAIR
gosub stow.tool
gosub %inv.action.ITEM
goto END
REPAIR:
goto Get.Needle
Matches:
matchre done not damaged enough to warrant repair|You realize that cannot be repaired|suffered too much damage
match done cannot figure out how to do that
match %s ...wait
match MoreThread The needles need to have thread put on
match Get.Needle You rub and press
match Get.Slick ready to be rubbed with a slickstone
match Sew Stitch after stitch
put %command
matchwait 5
goto Matches
Get.Needle:
pause 1
gosub swap.tool needle
goto Sew
Get.Slick:
pause 1
gosub swap.tool slickstone
goto Rub
Sew:
save Sew
var command push my %1 with my sew needle
goto Matches
Rub:
save Rub
var command rub my %1 with my slickstone
goto Matches
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
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
return
done:
gosub stow.tool
gosub %inv.action.ITEM
END:
put #parse REPAIR DONE