forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscern.lic
43 lines (37 loc) · 1.38 KB
/
discern.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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#Discern
=end
custom_require.call(%w[common common-travel events spellmonitor drinfomon])
class Discern
include DRC
include DRCA
def initialize
settings = get_settings
echo 'Reading spell list'
settings.buff_spells
.each_value do |value|
next unless value['use_auto_mana']
abbrev = value['abbrev']
echo "Discerning: '#{abbrev}'"
check_discern(value, settings)
echo " Current Discern data valid until '#{UserVars.discerns[abbrev]['time_stamp'] + 24 * 60 * 60}'"
end
settings.offensive_spells
.select { |x| x['use_auto_mana'] }
.each do |x|
abbrev = x['abbrev']
echo "Discerning: '#{abbrev}'"
check_discern(x, settings)
echo " Current Discern data valid until '#{UserVars.discerns[abbrev]['time_stamp'] + 24 * 60 * 60}'"
end
settings.training_spells
.each_value do |value|
next unless value['use_auto_mana']
abbrev = value['abbrev']
echo "Discerning: '#{abbrev}'"
check_discern(value, settings)
echo " Current Discern data valid until '#{UserVars.discerns[abbrev]['time_stamp'] + 24 * 60 * 60}'"
end
end
end
Discern.new