forked from rpherbig/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bug-grabber.lic
42 lines (38 loc) · 1.08 KB
/
bug-grabber.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
custom_require.call(%w[common-travel drinfomon])
rooms = [10_506, 10_507, 10_676, 10_508, 10_509, 10_665, 10_670, 10_673, 10_482, 10_497, 10_515, 10_675, 10_510, 10_539, 10_668, 10_669, 10_590, 10_520,
10_666, 10_640, 10_557, 10_576, 10_617, 10_667, 10_620, 10_572, 10_671, 10_672, 10_677, 13_231, 10_678]
def bug?(obj_name)
/\b(locust|bug|beetle|cricket|hornet|moth|scarab|firefly|dragonfly|mantis)/i =~ obj_name
end
loop do
rooms.each do |room|
DRCT.walk_to(room)
break if DRRoom.room_objs.any? { |x| bug?(x) }
end
unless DRRoom.room_objs.any? { |x| bug?(x) }
pause 15
echo 'waiting on more bugs'
next
end
while DRRoom.room_objs.any? { |x| bug?(x) }
bug = Regexp.last_match(1)
fput('stand') until checkstanding
fput("get the #{bug}")
pause 1
waitrt?
thing = checkright || checkleft
case thing
when /\bwing/i
fput('drop wing')
else
DRCT.walk_to(10_506)
fput("put #{thing} on shrine")
pause
waitrt?
pause
fput("stow #{checkright || checkleft}")
end
waitrt?
end
waitrt?
end