-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrg.lua
More file actions
121 lines (94 loc) · 3.95 KB
/
Copy pathdrg.lua
File metadata and controls
121 lines (94 loc) · 3.95 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
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff['Spirit Surge'] = buffactive['Spirit Surge'] or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.
function user_setup()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- A list of specific spells for which we trigger Healing Breath.
healingBreathTriggers = S{
'Dia',
'Poison',
'Blaze Spikes',
'Protect',
'Sprout Smack',
'Head Butt',
'Cocoon',
'Barfira',
'Barblizzara',
'Baraera',
'Barstonra',
'Barthundra',
'Barwatera',
}
-- A list of wyvern elemental breath attack names.
elementalBreaths = S{
'Flame Breath',
'Frost Breath',
'Sand Breath',
'Hydro Breath',
'Gust Breath',
'Lightning Breath',
}
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if healingBreathTriggers:contains(spell.english) or (spell.skill == 'Ninjutsu' and player.hpp < 33) then
equip(sets.precast.HealingBreath)
end
-- Use Spirit Jump instead of Jump if the wyvern is present.
if pet.isvalid and player.main_job_level >= 77 and spell.name == "Jump" then
eventArgs.cancel = true
send_command('@input /ja "Spirit Jump" <t>')
end
-- Use Soul Jump instead of High Jump if the wyvern is present.
if pet.isvalid and player.main_job_level >= 85 and spell.name == "High Jump" then
eventArgs.cancel = true
send_command('@input /ja "Soul Jump" <t>')
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
-- Runs when a pet initiates an action.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_midcast(spell, action, spellMap, eventArgs)
if spell.name:startswith('Healing Breath') or spell.name == 'Restoring Breath' then
equip(sets.midcast.HealingBreath)
end
if elementalBreaths:contains(spell.english) then
equip(sets.midcast.ElementalBreath)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end