forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
find-darkbox.lic
60 lines (53 loc) · 2.46 KB
/
find-darkbox.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
custom_require.call(%w(events common-travel common))
rooms = [10_155, 10_158, 10_156, 10_658, 10_177, 10_173, 10_661, 10_662, 10_663, 10_664, 10_157, 10_660, 10_659, 10_178, 10_265, 10_311, 10_309, 10_306, 10_286,
10_272, 10_287, 10_291, 10_295, 10_482, 10_493, 10_497, 10_509, 10_506, 10_673, 10_515, 10_675, 10_674, 10_510, 10_539, 10_668, 10_669, 10_508, 10_590, 10_520,
10_666, 10_665, 10_640, 10_557, 10_576, 10_507, 10_617, 10_667, 10_620, 10_670, 10_572, 10_671, 10_672, 10_676, 10_677, 10_679, 10_678, 19_136, 10_318, 10_319,
19_139, 19_138, 10_337, 10_338, 10_340, 10_352, 10_356, 10_357, 10_361, 10_362, 10_341, 10_333, 10_334, 10_336, 10_335, 10_377, 10_431, 10_420, 10_682, 10_425,
10_379, 19_141, 19_151, 19_150, 19_149, 10_406, 10_680, 10_684, 10_414, 10_398, 10_681, 10_402, 10_403, 10_390, 10_392, 10_394, 10_396, 10_419, 10_449, 10_478,
10_479, 10_473, 10_477, 10_476, 10_474, 10_475, 10_469, 10_470, 10_471, 10_472, 10_468, 10_467, 10_462, 10_466, 10_464, 10_465, 10_450, 10_460, 10_461, 10_455,
10_456, 10_683, 10_438, 10_447, 10_448]
if UserVars.last_darkbox && rooms.include?(UserVars.last_darkbox)
rooms.rotate! until rooms.first == UserVars.last_darkbox
end
rooms.each do |id|
break if DRRoom.room_objs.any? { |x| /Darkbox/ =~ x }
break if Map.last_seen_objects.include?('Darkbox')
DRCT.walk_to(id)
end
UserVars.last_darkbox = Room.current.id
Flags.add('darkbox-drop', 'Your .* falls to the ground')
Flags.add('darkbox-gone', 'Without warning, the Darkbox simply vanishes')
Flags.add('darkbox-wounded', 'Your injury increases the difficulty of the game, but you press on')
junk_list = get_settings.darkbox_junk.map { |x| /#{x}/i }
darkbox_stop_on_wounded = get_settings.darkbox_stop_on_wounded
loop do
if Flags['darkbox-gone']
UserVars.last_darkbox = nil
break
end
Flags.reset('darkbox-drop')
fput('stand') unless checkstanding
break if darkbox_stop_on_wounded && Flags['darkbox-wounded']
fput('play dark')
pause 1
thing = DRC.right_hand || DRC.left_hand
break if reget(10, 'your wounds make it impossible')
waitrt?
if thing
fput("get #{thing}") if Flags['darkbox-drop']
case thing
when /pouch/
fput('open my pouch')
fput('get my tickets from my pouch')
fput('put pouch in bin')
fput('drop pouch')
fput('ticket')
when *junk_list
fput("put #{thing} in bin")
else
fput("stow #{thing}")
end
end
waitrt?
end
DRCT.walk_to(19_104)