forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscouting.lic
More file actions
60 lines (49 loc) · 1.5 KB
/
scouting.lic
File metadata and controls
60 lines (49 loc) · 1.5 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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#scouting
=end
custom_require.call(%w[common common-arcana common-travel drinfomon])
class Scouting
include DRC
include DRCA
include DRCT
def initialize
settings = get_settings
@trail_override = settings.trail_override
do_buffs(settings)
train_scouting
end
def do_buffs(settings)
settings.scouting_buffs['spells'].each do |spell|
echo "Buffing: #{spell}" if UserVars.scouting_debug
buff(spell, settings)
end
end
def train_scouting
if @trail_override
start_room, return_room = @trail_override
elsif DRSkill.getrank('Scouting') < 50
fput('hunt')
return
elsif DRSkill.getrank('Scouting') < 85
start_room = 995
return_room = 1032
elsif DRSkill.getrank('Scouting') < 600
start_room = 991
return_room = 1378
else
start_room = 3476
return_room = 4336
end
take_trail(start_room)
take_trail(return_room)
end
def take_trail(room_id)
walk_to(room_id)
return if bput('scout trail', 'You notice a trailmarker', 'Because your account is free') == 'Because your account is free'
return if bput('go trail', 'You set off into the wild', 'That would be difficult', 'I could not find what you were referring to') == 'I could not find what you were referring to'
waitfor('As your journey ends')
pause 0.5 until Room.current.id
end
end
# Call this last to avoid the need for forward declarations
Scouting.new