-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDRG.lua
343 lines (305 loc) · 10.7 KB
/
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
343
local profile = {};
local sets = {
['idle'] = {
Ammo = 'Potestas Bomblet',
Head = 'Askar Zucchetto',
Neck = 'Orochi Nodowa',
Ear1 = 'Hollow Earring',
Ear2 = 'Bushinomimi',
Body = 'Askar Korazin',
Hands = 'Pln. Dastanas',
Ring1 = 'Rajas Ring',
Ring2 = 'Warp Ring',
Back = 'Aesir Mantle',
Waist = 'Ninurta\'s Sash',
Legs = 'Pln. Seraweels',
Feet = 'Homam Gambieras',
},
['tp_lowacc'] = {
Ammo = 'Potestas Bomblet',
Head = 'Ace\'s Helm', --7
Neck = 'Peacock Charm', --5
Ear1 = 'Brutal Earring',
Ear2 = 'Hollow Earring', --3
Body = 'Askar Korazin',
Hands = 'Homam Manopolas', --4
Ring1 = 'Rajas Ring',
Ring2 = 'Mars\'s Ring', --8
Back = 'Aesir Mantle',
Waist = 'Ninurta\'s Sash',
Legs = 'Aurum Cuisses', --7
Feet = 'Homam Gambieras', --6
},
['tp_medacc'] = {
Ammo = 'Potestas Bomblet',
Head = 'Ace\'s Helm',
Neck = 'Chivalrous Chain',
Ear1 = 'Hollow Earring',
Ear2 = 'Bushinomimi',
Body = 'Askar Korazin',
Hands = 'Homam Manopolas',
Ring1 = 'Rajas Ring',
Ring2 = 'Mars\'s Ring',
Back = 'Accura Cape',
Waist = 'Wyrm Belt',
Legs = 'Aurum Cuisses',
Feet = 'Homam Gambieras',
},
['tp_highacc'] = {
Ammo = 'Potestas Bomblet',
Head = { Name = 'Optical Hat', Augment = { [1] = 'Haste+3', [2] = 'HP+15', [3] = 'AGI+3', [4] = 'DEX+3' } },
Neck = 'Peacock Amulet',
Ear1 = 'Hollow Earring',
Ear2 = 'Megasco Earring',
Body = 'Hecatomb Harness',
Hands = 'Pln. Dastanas',
Ring1 = 'Oneiros Annulet',
Ring2 = 'Mars\'s Ring',
Back = 'Forager\'s Mantle',
Waist = 'Virtuous Belt',
Legs = 'Pln. Seraweels',
Feet = 'Hydra Greaves',
},
['ws_stardiver'] = {
Ammo = 'Potestas Bomblet',
Head = 'Ace\'s Helm',
Neck = 'Fotia Gorget',
Ear1 = 'Aesir Ear Pendant',
--Ear2 = 'Assault Earring',
Ear2 = 'Bushinomimi',
Body = 'Hecatomb Harness',
Hands = 'Alkyoneus\'s Brc.',
Ring1 = 'Strigoi Ring',
Ring2 = 'Mar\'s Ring',
Back = 'Forager\'s Mantle',
Waist = 'Potent Belt',
Legs = 'Aurum Cuisses',
Feet = 'Askar Gambieras',
},
['jump'] = {
Ammo = 'Potestas Bomblet',
Head = 'Askar Zucchetto',
Neck = 'Peacock Amulet',
Ear1 = 'Hollow Earring',
Ear2 = 'Megasco Earring',
Body = 'Askar Korazin',
Hands = 'Pln. Dastanas',
Ring1 = 'Rajas Ring',
Ring2 = 'Mars\'s Ring',
Back = 'Aesir Mantle',
Waist = 'Virtuoso Belt',
Legs = 'Barone Cosciales',
Feet = 'Volans Greaves',
},
['call_wyvern'] = {
Body = 'Wyrm Mail',
},
['range'] = {
Ammo = 'Angon',
},
['movement'] = {
Legs = 'Blood Cuisses',
},
['precast'] = {
Head = 'Walahra Turban',
Neck = 'Enhancing Torque',
Ear1 = 'Loquac. Earring',
Ear2 = 'Magnetic Earring',
Body = 'Askar Korazin',
Hands = 'Dusk Gloves',
Ring1 = 'Setae Ring',
Ring2 = 'Tamas Ring',
Back = 'Aesir Mantle',
Waist = 'Ninurta\'s Sash',
Legs = 'Blood Cuisses',
Feet = 'Dusk Ledelsens',
},
['tp_tank'] = {
Head = 'Hydra Mask',
Neck = 'Orochi Nodowa',
Ear1 = 'Bushinomimi',
Ear2 = 'Megasco Earring',
Body = 'Hydra Mail',
Hands = 'Gavial Fng.Gnt. +1',
Ring1 = 'Jelly Ring',
Ring2 = 'Succor Ring',
Back = 'Shadow Mantle',
Waist = 'Warwolf Belt',
Legs = 'Hydra Cuisses',
Feet = 'Askar Gambieras',
},
};
local settings = {
tpvariant = 1,
diset= false,
autohasso = false,
autoseigan = false,
autoberserk = false,
autotankgear = true, -- If set to true will equip your tank set when HP reaches the autotankhp setting
forceautotankgear = false, -- Forces your tank set to equip and stay equiped even at idle
autotankhp = 30, -- HP% for when the tank gear will auto equip
};
-- Use these names when creating tp sets
-- like tp_default when you add a set via the /lac addset command
-- i.e /lac addset tp_default
-- This will allow you to switch between different tp gear sets
local tpvarianttable = {
[1] = 'lowacc',
[2] = 'medacc',
[3] = 'highacc',
[4] = 'tank'
};
function CheckAbilityRecast(check)
local RecastTime = 0;
for x = 0, 31 do
local id = AshitaCore:GetMemoryManager():GetRecast():GetAbilityTimerId(x);
local timer = AshitaCore:GetMemoryManager():GetRecast():GetAbilityTimer(x);
if ((id ~= 0 or x == 0) and timer > 0) then
local ability = AshitaCore:GetResourceManager():GetAbilityByTimerId(id);
if ability ~= nil and ability.Name[1] ~= 'Unknown' and (ability.Name[1] == check) then
RecastTime = timer;
end
end
end
return RecastTime;
end
profile.Sets = sets;
profile.Packer = {
};
profile.OnLoad = function()
gSettings.AllowAddSet = true;
local subjob = gData.GetPlayer()
if (subjob.SubJob == 'WAR') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 12');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 2');
elseif (subjob.SubJob == 'SAM') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 12');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
else
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 12');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
end
AshitaCore:GetChatManager():QueueCommand(-1, '/alias /drg /lac fwd');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F1 /lac fwd tpset');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F2 /lac fwd diset');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F3 /lac fwd autohasso');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F4 /lac fwd autoseigan');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F5 /lac fwd autoberserk');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F6 /lac fwd forcetank');
end
profile.OnUnload = function()
AshitaCore:GetChatManager():QueueCommand(-1, '/alias delete /drg');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F1');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F2');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F3');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F4');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F5');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F6');
end
profile.HandleCommand = function(args)
local player = gData.GetPlayer();
if (args[1] == 'autohasso') then
if (settings.autohasso == true) then
settings.autohasso = false;
else
settings.autohasso = true;
end
gFunc.Message('Auto Hasso is now set to ' .. string.upper(tostring(settings.autohasso)));
elseif (args[1] == 'autoberserk') then
if (settings.autoberserk == true) then
settings.autoberserk = false;
else
settings.autoberserk = true;
end
gFunc.Message('Auto Berserk is now set to ' .. string.upper(tostring(settings.autoberserk)) .. ' a Work In Progress');
elseif (args[1] == 'tpset') then
settings.tpvariant = settings.tpvariant + 1;
if (settings.tpvariant > #tpvarianttable) then
settings.tpvariant = 1;
end
gFunc.Message('TP Set: ' .. string.upper(tpvarianttable[settings.tpvariant]));
elseif (args[1] == 'forcetank') then
if (settings.forceautotankgear == true) then
settings.forceautotankgear = false;
else
settings.forceautotankgear = true;
end
gFunc.Message('Force Tank Set is now set to ' .. string.upper(tostring(settings.forceautotankgear)));
elseif (args[1] == 'test') then
gFunc.Message('My HPP = ' .. player.HPP);
end
end
profile.HandleDefault = function()
local pet = gData.GetPet();
local player = gData.GetPlayer(); -- This gets the players info and holds it all in 'player'
local hasso = gData.GetBuffCount('Hasso'); -- Checks if active
local seigan = gData.GetBuffCount('Seigan'); -- Checks if active
local berserkRecast = CheckAbilityRecast('Berserk');
if (player.Status == 'Engaged') then
-- Auto Hasso works 100%
if (settings.autohasso == true) and (hasso == 0) then
AshitaCore:GetChatManager():QueueCommand(1, '/ja "Hasso" <me>');
end
-- Auto Hasso works 100%
if (settings.autoseigan == true) and (seigan == 0) then
AshitaCore:GetChatManager():QueueCommand(1, '/ja "Seigan" <me>');
end
-- Auto Berserk is a work in progress
if (settings.autoberserk == true) and (berserkRecast == 0) then
AshitaCore:GetChatManager():QueueCommand(1, '/ja "Berserk" <me>');
end
gFunc.EquipSet('tp_' .. tpvarianttable[settings.tpvariant]);
elseif (player.Status == 'Resting') then
gFunc.EquipSet(sets.rest);
elseif (player.Status == 'Zoning') then
--If you have your wyvern out you need to have your call set on when zoning
--so your wyvern gets your SJ buffs from your relic armor
gFunc.EquipSet(sets.call_wyvern);
else
gFunc.EquipSet(sets.idle);
end
-- Auto tank gear logic start
if (player.HPP <= settings.autotankhp) and (settings.autotankgear == true) then
gFunc.EquipSet(sets.tp_tank);
--gFunc.Message('HP less than')
elseif (settings.forceautotankgear == true) then
gFunc.EquipSet(sets.tp_tank);
--gFunc.Message('HP less than')
end
-- Auto tank gear logic end
if (player.IsMoving) then
gFunc.EquipSet(sets.movement);
end
end
profile.HandleAbility = function()
local action = gData.GetAction();
if (action.Name == 'Jump') then
gFunc.EquipSet(sets.jump);
elseif (action.Name == 'High Jump') then
gFunc.EquipSet(sets.jump);
gFunc.Equip('Legs', 'Wyrm Brais');
elseif (action.Name == 'Call Wyvern') then
gFunc.EquipSet(sets.call_wyvern);
elseif (action.Name == 'Angon') then
gFunc.EquipSet(sets.range);
end
end
profile.HandleItem = function()
end
profile.HandlePrecast = function()
gFunc.EquipSet(sets.precast);
end
profile.HandleMidcast = function()
gFunc.EquipSet(sets.precast);
end
profile.HandlePreshot = function()
end
profile.HandleMidshot = function()
end
profile.HandleWeaponskill = function()
local ws = gData.GetAction();
if (ws.Name == 'Stardiver') then
gFunc.EquipSet(sets.ws_stardiver);
end
end
return profile;