forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buffother.lic
55 lines (43 loc) · 1.4 KB
/
buffother.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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#buffother
=end
custom_require.call(%w(common common-arcana common-travel))
class BuffOther
def initialize
arg_definitions = [
[
{ name: 'recipient', regex: /\w+/, description: 'Player to buff.' },
{ name: 'waggle', regex: /\w+/, description: 'Waggle set to buff on player.' },
{ name: 'room', regex: /\d+/, optional: true, description: 'Will move to room number of target player.' }
]
]
args = parse_args(arg_definitions)
settings = get_settings
recipient = args.recipient.capitalize
waggle_set = args.waggle
room = args.room
move_to_room(recipient, room)
cast_buff_spells(recipient, waggle_set, settings)
end
def move_to_room(recipient, room)
return unless room
DRC.message "Tracking down #{recipient} in room ##{room}!"
DRCT.walk_to(room)
end
def cast_buff_spells(recipient, waggle_set, settings)
if !DRRoom.pcs.include?(recipient)
DRC.message "#{recipient} not found in room. Exiting..."
exit
end
settings.waggle_sets[waggle_set].values.each do |spell_data|
spell_data['cast'] = "cast #{recipient}"
spell_data['recast'] = 99
pause 1 while DRStats.mana < 40
DRCA.cast_spell(spell_data, settings, settings.waggle_force_cambrinth)
end
end
end
before_dying do
fput("release mana")
end
BuffOther.new