forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfir.lic
More file actions
170 lines (145 loc) · 4.19 KB
/
fir.lic
File metadata and controls
170 lines (145 loc) · 4.19 KB
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
# Documentation: https://elanthipedia.play.net/Lich_script_repository#fir
class FirQuest
def initialize
arg_definitions = [
[
{ name: 'number', regex: /\d+/, description: 'Number of Fir Familiars to make (1-3)' }
]
]
args = parse_args(arg_definitions)
EquipmentManager.new.empty_hands
@settings = get_settings
@bag = @settings.crafting_container
@bag_items = @settings.crafting_items_in_container
@belt = @settings.engineering_belt
if args.number
if args.number.to_i > 3
echo '****Cannot get more than 3 at a time!****'
exit
else
num = args.number.to_i
end
else
num = 1
end
check_carving_knife
get_holy_water
get_fir_bark(num)
goto_shard_temple
unless goto_old_man
open_wall
goto_old_man
end
get_talisman(num)
move 'out'
DRCT.walk_to 2807
carve_talisman(num)
end
def open_wall
DRC.bput('put right hand in first hole', 'You have passed the test of lore')
DRC.bput('get fir bark', 'you get')
DRC.bput('put left hand in second hole', 'You have passed the test of the tree')
DRC.bput('stow right', 'You put')
DRC.bput('get my silver vial', 'You get')
DRC.bput('get water from vial', 'You get some holy water')
DRC.bput('stow vial', 'You put')
DRC.bput('put right hand in third hole', 'A foreboding wall moves out of your way to allow passage!')
DRC.bput('get my silver vial', 'You get')
DRC.bput('put water in my vial', 'You put')
DRC.bput('stow vial', 'You put')
end
def goto_old_man
return false if ['A voice whispers in your head', "You can't"].include? DRC.bput('west', 'A voice whispers in your head', "You can't", 'Obvious exits')
move 'go stairs'
true
end
def carve_talisman(number)
number.times do
case DRC.bput('get fir talisman', 'You get', 'What were you referring to?')
when 'What were you referring to?'
echo 'No more talismans!'
exit
when 'You get'
DRC.bput('rub my fir talisman', 'You rub')
DRCC.get_crafting_item('carving knife', @bag, @belt, @belt)
DRC.bput('swap', 'You move')
carve
DRCC.stow_crafting_item('carving knife', @bag, @belt)
DRC.bput('stow talisman', 'You put')
end
end
end
def carve
case DRC.bput('carve my talisman', 'fine details', 'Roundtime', 'Round time')
when /fine details/
nil
else
carve
end
end
def get_talisman(number)
number.times do
break if DRC.bput('get fir bark', 'You get', 'I could not find') == 'I could not find'
DRC.bput('give man', 'The old man takes your bark')
DRC.bput('stow right', 'You put')
end
end
def check_carving_knife
return if DRCI.exists?('carving knife')
echo '**** You need a carving knife! ****'
DRC.beep
exit
end
def get_holy_water
return if DRCI.exists?('silver vial')
if DRSkill.getrank('Thievery') >= 231
DRCT.walk_to 19_073
DRC.bput('steal silver vial in catalog', 'Roundtime')
else
temp_settings = @settings
temp_settings.hometown = 'Crossing'
unless DRCM.ensure_copper_on_hand(500, temp_settings)
echo '***STATUS*** Insufficient funds to buy silver vial'
DRC.beep
exit
end
DRCT.buy_item(19_073, 'silver vial')
end
DRCT.walk_to 5779
DRC.bput('fill my vial with water from basin', 'You fill your silver vial with some water.')
DRC.bput('stow my silver vial', 'You put')
end
def get_fir_bark(number)
return if DRCI.exists?('fir bark')
DRCT.walk_to 989
number.times do |_x|
DRC.bput('pull tree', 'releasing a small precious piece', 'You should try again later.')
DRC.bput('stow fir bark', 'You put')
end
end
def goto_shard_temple
DRCT.walk_to 2807
move 'north'
move 'north'
move 'north'
move 'north'
move 'north'
move 'northeast'
move 'northwest'
move 'northwest'
move 'north'
move 'north'
move 'east'
move 'east'
move 'northeast'
move 'east'
move 'east'
move 'climb stile'
move 'east'
move 'south'
move 'south'
move 'west'
move 'west'
end
end
FirQuest.new