-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathxegdig.lic
199 lines (175 loc) · 6.23 KB
/
xegdig.lic
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
# Version 3.6.2 Taleph.
# This version uses your lootsack variable. You set it before you run this program, and you only need to do it once: ;vars set lootsack=longcoat (for example).
# If the container is a T5 or Jackpot, I EXIT the script.
#
# The script will put seashells in the bucket if you are wearing one.
#
# I don't buy your shovels for you...that's so easy...and you have to pawn every 6 shovels or so anyway.
#
# NEW ADDITION: There have been a high number of policy 18 violations (running scripts unattended). That's a bad thing for everyone.
# To help with this, I've put in a timer that will ask you for input every ~7 minutes or so to let the script know you're
# paying attention. This is to help you-and to pause the script if your attention wanders. If a script check is initiated
# before the script auto-pauses you will NOT escape penalties for unattended scripting. This does, however, help if you
# get distracted and forget to pause the game by stopping the continual running.
#
# You can opt OUT of this by starting EGDig with "off" in the command line: "EGDig off".
#
# Also note, though the script pauses or exits on a T5 or a Jackpot, that does NOT protect you from a script check...
# and that's not the intent of the pause. The pause is so you can admire your prize! That's all.
#
#
# HINT: You might want to highlight the string:
#--------------------- Master, it's been a few minutes...are you still wake?" ----------------------
def dig
loop {
clear
waitrt?
fput "dig"
test = matchtimeout 11, "You continue", "You hit", "You begin"
waitrt?
words = test.split(' ')
if words[1] == "hit"
waitrt?
loop {
if "#{GameObj.right_hand}" == "shovel"
fput "stow shovel"
else
break
end
}
break
end
}
end
def OpenIt(item_found, bucket)
echo "in openit now"
fput "open my #{item_found}"
test8 = matchtimeout 5, "locking the hinges", "You open the lid", "You lift the lid", "which begins to glow"
loc = test8 =~ /locking the hinges in place/
if loc >= 0
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "a T5 or better! Script is paused. Exiting"
exit
end
loc = test8 =~ /which begins to glow/
if loc >= 0
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "ding ding ding ding ding ding ding!"
echo "a T5 or better! Script is paused. Unpause by typing ;u"
# pause_script "DSD"
end
fput "get coins from my #{item_found}"
test = matchtimeout 5, "Get what", "You gather"
waitrt?
fput "look in my #{item_found}"
test = matchwait 1, "In the", "There is"
fput "get seash from my #{item_found}"
matchwait 2, "You grab", "Get what", "You remove"
fput "redeem seash"
fput "empty my #{item_found} in my #{Vars.lootsack}"
matchwait "You try"
if "#{GameObj.left_hand}" == "#{item_found}"
fput "look in my #{item_found}"
test4 = matchwait "nothing", "#{item_found}"
words4 = test4.split(' ')
if words4[2] == "nothing"
loop {
words = ""
fput "put my #{item_found} in hole"
test = matchtimeout 3, "As you place"
waitrt?
words = test.split(' ')
if words[2] == "place"
break
end
}
else
GameObj.left_hand.contents.each{|i| multifput "get ##{i.id}", "stow right"}
fput "look in my #{item_found}"
test4 = matchwait "nothing", "#{item_found}"
waitrt?
words4 = test4.split(' ')
if words4[2] == "nothing"
fput "put my #{item_found} in hole"
else
echo "something's not coming out. Come look!"
pause_script "DSD"
end
end
end
end
#---------timer setup-------------
doNotTime = " #{script.vars[1]}" #if this is "off" then we won't set a timer.
if doNotTime =~ /off/
echo "The activity timer will be set to off"
timer = 100
else
echo "every 6 to 8 minutes you'll be asked to type in 'yes'. No quotes are needed. You don't need to say it (as in: 'yes)"
echo "also, you might want to set a highlight up for: Master, it's been a few minutes...are you still wake"
echo "if you don't want to run the script with the timer reminder, start it like this: ;egdig off. (no period). That will"
echo "turn off the timer"
timer = 0
end
#---------------------------------
bucket = 0
fput "look in my bucket"
test = matchwait 1, "wooden bucket", "could not find"
words = test.split(' ')
if words[2] == "bucket"
bucket = 1
end
toggle_upstream
loop {
timer =timer + 1
if timer == 10
echo "Master, it's been a few minutes...are you still wake? Answer yes if you are"
echo "Master, it's been a few minutes...are you still wake? Answer yes if you are"
echo "Master, it's been a few minutes...are you still wake? Answer yes if you are"
echo "Master, it's been a few minutes...are you still wake? Answer yes if you are"
likes = upstream_waitfor "yes"
echo "okay, we're good to go then!"
timer = 0
end
# if bucket == 1
# fput "put seash in my bucket"
# else
# fput "get seashells from my #{Vars.lootsack}"
# fput "get seashells from my #{Vars.lootsack}"
# fput "bundl"
# fput "stow all"
# end
fput "get shovel"
test = matchwait "You remove", "You already", "Get what", "Hey, that", "You grab"
words = test.split(' ')
if words[0] != "You"
exit
end
dig
item_found = "#{GameObj.left_hand}"
if item_found == "box" or item_found == "trunk" or item_found == "chest" or item_found == "coffer" or item_found == "strongbox" or item_found == "crate"
OpenIt(item_found, bucket)
elsif item_found == "coffin" or item_found == "casket" or item_found == "sarcophagus"
loop { #just making sure the lid comes off
fput "pry my #{item_found}"
test = matchtimeout 5, "With the lid loosened, you", "You begin"
waitrt?
words = test.split(' ')
if words[2] == "lid"
break
end
}
echo "ding ding ding ding dingding ding ding ding dingding ding ding ding ding!"
echo "ding ding ding ding dingding ding ding ding dingding ding ding ding ding!"
echo "ding ding ding ding dingding ding ding ding dingding ding ding ding ding!"
echo "likely jackpot...exiting script"
exit
else
waitrt?
fput "put my #{item_found} in my #{Vars.lootsack}"
end
}