-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepairdone.cmd
132 lines (118 loc) · 3.04 KB
/
repairdone.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
#debug 10
# ------------------------------------------------
# Auto Repair Retriever Ver 1.2
# By VTCifer
# ------------------------------------------------
#---------------------------------------
# INCLUDES
#---------------------------------------
include base.cmd
goto SubSkip
#---------------------------------------
# Local Subroutines
#---------------------------------------
SubSkip:
#---------------------------------------
# CONSTANT VARIABLES
#---------------------------------------
var Repairer.List Ylono|Kamze|Unspiek|Wyla|Ladar|Catrox|Dagul|Granzer
#---------------------------------------
# VARIABLES
#---------------------------------------
var ItemList
var NounList
var MaxItemCount
var Source
var ItemCount 1
var Name
var Bag backpack
#---------------------------------------
# ACTIONS
#---------------------------------------
action (sack) var ItemList $1 when ^In the .+ you see (.*)\.
#---------------------------------------
# SCRIPT START
#---------------------------------------
Start:
if ("$righthand" = "large sack") then goto Check.Item
if ("$lefthand" != "Empty") then gosub STOWING
if ("$righthand" != "Empty") then gosub STOWING
if matchre("$roomdesc" "(%Repairer.List)") then var Name $0
if "%Name" = "" then
{
if matchre("$roomobjs" "(%Repairer.List)") then var Name $0
}
if "%Name" = "" then goto done.repair
Get.Ticket:
pause 0.5
gosub Get %Name ticket
pause 0.5
if ("$righthand" == "Empty") then goto done.repair
Give.Ticket:
matchre WaitRepair Well that is almost done|isn't gonna be done
matchre Check.Item ^You hand (%Repairer.List) your ticket and are handed back
put give %Name
matchwait
WaitRepair:
pause 15
goto Give.Ticket
Check.Item:
action (sack) off
if ("$righthandnoun" = "ball and chain") then put stow my ball
pause 0.1
pause 0.1
if matchre("$righthand","(sieve|mixing stick|mortar|pestle) then
{
put tie $righthand to my alc belt
pause 0.5
}
if ("$righthandnoun" != "sack") then
{
put wear my $righthandnoun
pause 0.2
put stow my $righthandnoun in my %Bag
pause 0.3
goto Get.Ticket
}
action (sack) on
Get.Item.List:
pause 0.1
send look in my sack
waitfor In the
pause
gosub Base.ListExtract ItemList NounList MaxItemCount
goto get2
Get2:
if (%ItemCount > %MaxItemCount) then goto CheckSource
gosub Get %NounList(%ItemCount) from my sack
put wear my %NounList(%ItemCount)
put stow my %NounList(%ItemCount)
pause 0.5
pause 0.2
math ItemCount add 1
goto Get2
CheckSource:
pause 0.5
pause 0.5
match SackDone There is nothing in there.
match Fail You glance
put look in my sack
put glance
matchwait
SackDone:
pause
send drop my sack
goto Get.Ticket
done.repair:
put #parse REPAIR DONE
put #parse REPAIR DONE
exit
Fail:
echo ***
echo ***
echo Still Items in the sack!
echo ***
echo ***
put #parse REPAIR DONE
exit
Dumb: