-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLunafay_DRG.lua
342 lines (304 loc) · 9.33 KB
/
Lunafay_DRG.lua
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
function get_sets()
incapacitated_states = T {"stun", "petrification", "terror", "sleep"}
sets.Idle = {
-- ammo = "Staunch Tathlum +1",
head = "Gleti's Mask",
body = "Gleti's Cuirass",
hands = "Gleti's Gauntlets",
legs = "Carmine cuisses +1",
feet = "Gleti's Boots",
-- neck = "Loricate Torque +1",
-- waist = "Flume Belt",
-- left_ear = "Infused Earring",
-- right_ear = "Etiolation Earring",
left_ring = "Chirich Ring +1",
right_ring = "Defending Ring",
back = {
name = "Brigantia's Mantle",
augments = {
'DEX+20',
'Accuracy+20 Attack+20',
'DEX+10',
'"Dual Wield"+10',
'Phys. dmg. taken-10%'
}
}
}
sets.Engaged = {
mode = "Mdt"
}
sets.Engaged.Hybrid = {
ammo = "Aurgelmir orb",
head = "Gleti's Mask",
body = "Gleti's Cuirass",
hands = "Gleti's Gauntlets",
legs = "Gleti's Breeches",
feet = "Gleti's Boots",
neck = "Dgn. Collar +1",
waist = "Ioskeha Belt +1",
-- left_ear = "Mache Earring +1",
left_ear = "Telos Earring",
right_ear = "Sherida Earring",
left_ring = "Chirich Ring +1",
right_ring = "Niqmaddu Ring",
back = {
name = "Brigantia's Mantle",
augments = {
'DEX+20',
'Accuracy+20 Attack+20',
'DEX+10',
'"Dual Wield"+10',
'Phys. dmg. taken-10%'
}
}
}
sets.Engaged.Mdt = set_combine(sets.Engaged.Hybrid, {
right_ring = "Defending Ring",
feet = "Nyame Sollerets",
})
-- JA Sets --
sets.JobAbility = {}
sets.JobAbility["Jump"] = {
ammo = "Aurgelmir Orb",
head = "Flam. Zucchetto +2",
body = "Vishap Mail +2",
hands="Vis. Fng. Gaunt. +2",
feet = "Flam. Gambieras +2",
neck = "Vim Torque +1",
waist = "Kentarch Belt +1",
left_ear = "Dedition Earring",
right_ear = "Sherida Earring",
left_ring = "Chirich Ring +1",
right_ring = "Petrov Ring"
}
sets.JobAbility["Soul Jump"] = set_combine(sets.JobAbility["Jump"], {})
sets.JobAbility["Spirit Jump"] = set_combine(sets.JobAbility["Soul Jump"], {
-- feet = "Pelt. Schyn. +1"
})
sets.JobAbility["High Jump"] = set_combine(sets.JobAbility["Jump"], {
-- legs = "Pteroslaver Brais +3"
})
sets.JobAbility["Spirit Link"] = {
-- head = "Vishap Armet +1",
-- hands = "Peltast's Vambraces +1",
}
sets.JobAbility["Angon"] = {
-- hands = "Ptero. Fin. G. +3",
}
sets.JobAbility["Ancient Circle"] = {
legs = "Vishap Brais +3",
}
sets.JobAbility["Call Wyvern"] = {
neck = "Dgn. Collar +1",
-- body = "Pteroslaver Mail +1",
left_ring = "Dreki Ring",
}
-- WS Sets --
sets.WeaponSkill = {}
sets.WeaponSkill["Savage Blade"] = {
ammo = "Knobkierrie",
head = "Nyame Helm",
body = "Gleti's Cuirass",
hands = "Gleti's Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Dgn. Collar +1",
waist = "Sailfi Belt +1",
left_ear = "Moonshade Earring",
right_ear = "Thrud Earring",
left_ring = "Ephramad's Ring",
right_ring = "Epaminondas's Ring",
back = {
name = "Brigantia's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Damage taken-5%'}
}
}
sets.WeaponSkill["Diarmuid"] = {
main = "Gae Buide",
sub = "Utu Grip",
ammo = "Knobkierrie",
head = "Peltast's Mezail +3",
body = "Nyame Mail",
hands = "Ptero. Fin. G. +3",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Dgn. Collar +1",
waist = "Sailfi Belt +1",
left_ear = "Moonshade Earring",
right_ear = "Peltast's Earring",
left_ring = "Ephramad's Ring",
right_ring = "Epaminondas's Ring",
back = {
name = "Brigantia's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Damage taken-5%'}
}
}
sets.WeaponSkill["Impulse Drive"] = {
main = "Gae Buide",
sub = "Utu Grip",
ammo = "Knobkierrie",
head = "Peltast's Mezail +3",
body = "Gleti's Cuirass",
hands = "Nyame Gauntlets",
legs = "Gleti's Breeches",
feet = "Nyame Sollerets",
neck = "Dgn. Collar +1",
waist = "Sailfi Belt +1",
left_ear = "Moonshade Earring",
right_ear = "Peltast's Earring",
left_ring = "Ephramad's Ring",
right_ring = "Epaminondas's Ring",
back = {
name = "Brigantia's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Damage taken-5%'}
}
}
sets.WeaponSkill["Stardiver"] = set_combine(sets.WeaponSkill["Savage Blade"], {})
sets.WeaponSkill["Sonic Thrust"] = set_combine(sets.WeaponSkill["Savage Blade"], {})
sets.WeaponSkill["Drakesbane"] = {
main = "Gae Buide",
sub = "Utu Grip",
ammo = "Knobkierrie",
head = "Gleti's Mask",
body = "Gleti's Cuirass",
hands = "Gleti's Gauntlets",
legs = "Gleti's Breeches",
feet = "Gleti's Boots",
neck = "Dgn. Collar +1",
waist = "Sailfi Belt +1",
left_ear = "Sherida Earring",
right_ear = "Thrud Earring",
left_ring = "Ephramad's Ring",
right_ring = "Niqmaddu Ring",
back = {
name = "Brigantia's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Damage taken-5%'}
}
}
sets.WeaponSkill["Camlann's Torment"] = {
ammo = "Knobkierrie",
head = "Nyame Helm",
body = "Gleti's Cuirass",
hands = "Gleti's Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Dgn. Collar +1",
waist = "Light Belt",
left_ear = "Moonshade Earring",
right_ear = "Thrud Earring",
left_ring = "Niqmaddu Ring",
right_ring = "Epaminondas's Ring",
back = {
name = "Brigantia's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Damage taken-5%'}
}
}
end
function precast(spell, action)
if incapacitated() then
return
end
if "Trust" == spell.type then
return
end
if (spell.english == "Spectral Jig" or spell.english == "Sneak") and buffactive.Sneak then
cast_delay(0.2)
send_command("cancel Sneak")
end
if sets[spell.type] and sets[spell.type][spell.english] then
equip(sets[spell.type][spell.english])
return
end
debug("No set for " .. spell.type .. "." .. spell.english)
end
function aftercast(spell, action)
status_change(player.status)
end
function status_change(new, old)
if incapacitated() then
return
end
if _G["status_change_" .. new:lower()] and not _G["status_change_" .. new:lower()]() then
return
end
if (sets[new]) then
equip(sets[new])
end
end
function status_change_engaged()
equip(sets.Engaged[sets.Engaged.mode])
end
function buff_change(name, gain, buff_details)
if incapacitated_states:contains(name) then
status_change(player.status)
end
end
function incapacitated()
if incapacitated_states:find(function(value)
return buffactive[value] or false
end) then
equip(sets.Idle)
return true
end
end
function self_command(argsString)
print(T(player).status)
args = argsString:lower():split(" ")
if _G["self_command_" .. args[1]] then
_G["self_command_" .. args[1]](args:slice(2))
end
status_change(player.status)
end
function self_command_e(args)
return self_command_engaged(args)
end
function self_command_engaged(args)
local mode = "Melee"
if args[1] then
mode = args[1]:ucfirst()
end
if not sets.Engaged[mode] then
error("Error: Invalid Engaged Mode: " .. mode)
return
end
sets.Engaged.mode = mode
status_change(player.status)
-- notice("Engaged Mode Set: " .. mode)
end
function self_command_tp(args)
local order = T { -- {id=162, command = '"Spirit Link" <me>'},
{
id = 167,
command = '"Soul Jump" <t>'
}, {
id = 166,
command = '"Spirit Jump" <t>'
}, {
id = 158,
command = '"Jump" <t>'
}, {
id = 159,
command = '"High Jump" <t>'
}}
local recasts = windower.ffxi.get_ability_recasts()
if recasts[162] and pet.isvalid and (pet.tp > 500 or pet.hpp < 70) then
windower.send_command("input /ja 'Spirit Link' <me>")
end
for _, ability in ipairs(order) do
if recasts[ability.id] == 0 then
windower.send_command("input /ja " .. ability.command)
return
end
end
end
function notice(s)
add_to_chat(121, s)
end
function error(s)
add_to_chat(4, s)
end
function debug(s)
if debugMode then
notice(s)
end
end