forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buff.lic
37 lines (28 loc) · 891 Bytes
/
buff.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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_development#buff
=end
custom_require.call(%w[common common-arcana])
class Waggle
def initialize
arg_definitions = [
[
{ name: 'spells', regex: /\w+/, optional: true, description: 'Spell list to use, otherwise default' },
{ name: 'force', regex: /force/i, optional: true, description: 'Recast spells even if currently active' }
]
]
args = parse_args(arg_definitions)
settings = get_settings
setname = args.spells || 'default'
unless settings.waggle_sets[setname]
DRC.message("No waggle set found for name: #{setname}")
exit
end
if args.force
settings.waggle_sets[setname].values.each do |spell_data|
spell_data['recast'] = 99 # force spell to be recast
end
end
DRCA.do_buffs(settings, setname)
end
end
Waggle.new