-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRUN.lua
514 lines (467 loc) · 15.3 KB
/
RUN.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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
local profile = {};
local sets = {
['lunge'] = {
Neck = 'Chivalrous Chain',
Ear1 = 'Cass. Earring',
Ear2 = 'Helenus\'s Earring',
Ring1 = 'Tamas Ring',
Ring2 = 'Galdr Ring',
Back = 'Futhark Cape',
Waist = 'Salire Belt',
Legs = 'Hydra Cuisses',
Feet = 'Shrewd Pumps',
},
['idle'] = {
Head = 'Walahra Turban',
Neck = 'Orochi Nodowa',
Ear1 = 'Magnetic Earring',
Ear2 = 'Astral Earring',
Body = 'Futhark Coat',
Hands = 'Runeist Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Warp Ring',
Back = 'Lamia Mantle',
Waist = 'Al Zahbi Sash',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['haste'] = {
Head = 'Walahra Turban',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Hydra Mail',
Hands = 'Dusk Gloves',
Waist = 'Al Zahbi Sash',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['precast'] = {
Head = 'Walahra Turban',
Ear1 = 'Magnetic Earring',
Ear2 = 'Loquac. Earring',
Body = 'Hydra Mail',
Hands = 'Dusk Gloves',
Waist = 'Al Zahbi Sash',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['refresh'] = {
Ammo = '',
Head = 'Walahra Turban',
Neck = 'Chivalrous Chain',
--Ear1 = 'Magnetic Earring',
--Ear2 = 'Bushinomimi',
Body = 'Hydra Mail',
Hands = 'Pln. Dastanas',
Back = 'Lamia Mantle',
Waist = 'Headlong Belt',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['savage'] = {
Head = 'Futhark Bandeau',
Neck = 'Fotia Gorget',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Futhark Coat',
Hands = 'Alkyoneus\'s Brc.',
Ring1 = 'Rajas Ring',
Ring2 = 'Strigoi Ring',
Back = 'Ryl. Army Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Futhark Boots',
},
['town_relic'] = {
Head = 'Futhark Bandeau',
Neck = 'Chivalrous Chain',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Futhark Coat',
Hands = 'Futhark Mitons',
Ring1 = 'Rajas Ring',
Ring2 = 'Flame Ring',
Back = 'Lamia Mantle',
Waist = 'Warwolf Belt',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['town_af'] = {
Head = 'Runeist Bandeau',
Neck = 'Chivalrous Chain',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Runeist Coat',
Hands = 'Runeist Mitons',
Ring1 = 'Rajas Ring',
Ring2 = 'Flame Ring',
Back = 'Lamia Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Runeist Boots',
},
['matk'] = {
--Head = 'Futhark Bandeau',
--Neck = 'Chivalrous Chain',
Ear1 = 'Cass. Earring',
Ear2 = 'Helenus\'s Earring',
--Body = 'Futhark Coat',
--Hands = 'Alkyoneus\'s Brc.',
Ring1 = 'Rajas Ring',
Ring2 = 'Flame Ring',
--Back = 'Ryl. Army Mantle',
--Waist = 'Warwolf Belt',
--Legs = 'Runeist Trousers',
Feet = 'Shrewd Pumps',
},
['kiteset'] = {
Head = 'Hydra Mask',
Neck = 'Chivalrous Chain',
Ear1 = 'Eris\' Earring',
Ear2 = 'Eris\' Earring',
Body = 'Hydra Mail',
Hands = 'Runeist Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Astral Ring',
Back = 'Lamia Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Futhark Boots',
},
['tp_acc'] = {
Head = 'Optical Hat',
Neck = 'Chivalrous Chain',
Ear1 = 'Megasco Earring',
Ear2 = 'Hollow Earring',
Body = 'Hydra Mail',
Hands = 'Aiming Bracelets',
Ring1 = 'Oneiros Annulet',
Ring2 = 'Sniper\'s Ring +1',
Back = 'Accura Cape',
Waist = 'Potent Belt',
Legs = 'Pln. Seraweels',
Feet = 'Runeist Bottes',
},
['tp_mtank'] = {
Head = 'Hydra Mask',
Neck = 'Parrying Torque',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Hydra Mail',
Hands = 'Gavial Fng.Gnt. +1',
Ring1 = 'Succor Ring',
Ring2 = 'Tamas Ring',
Back = 'Lamia Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Hydra Greaves',
},
['tp_ptank'] = {
Head = 'Runeist Bandeau',
Neck = 'Parrying Torque',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Hydra Mail',
Hands = 'Futhark Mitons',
Ring1 = 'Jelly Ring',
Ring2 = 'Corneus Ring',
Back = 'Shadow Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Hydra Greaves',
},
['tp_hybrid'] = {
Head = 'Runeist Bandeau',
Neck = 'Parrying Torque',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Hydra Mail',
Hands = 'Futhark Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Corneus Ring',
Back = 'Shadow Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Hydra Greaves',
},
['tp_btank'] = {
Head = 'Runeist Bandeau',
Neck = 'Parrying Torque',
Ear1 = 'Magnetic Earring',
Ear2 = 'Bushinomimi',
Body = 'Crm. Scl. Mail',
Hands = 'Futhark Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Corneus Ring',
Back = 'Shadow Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Hydra Greaves',
},
['ws_groundstrike'] = {
Head = 'Futhark Bandeau',
Neck = 'Fotia Gorget',
Ear1 = 'Aesir Ear Pendant',
Ear2 = 'Bushinomimi',
Body = 'Futhark Coat',
Hands = 'Alkyoneus\'s Brc.',
Ring1 = 'Rajas Ring',
Ring2 = 'Flame Ring',
Back = 'Psilos Mantle',
Waist = 'Warwolf Belt',
Legs = 'Runeist Trousers',
Feet = 'Futhark Boots',
},
['ws_herculean'] = {
Head = 'Futhark Bandeau',
Neck = 'Fotia Gorget',
Ear1 = 'Helenus\'s Earring',
Ear2 = 'Cass. Earring',
Body = 'Futhark Coat',
Hands = 'Gavial Fng.Gnt. +1',
Ring1 = 'Breeze Ring',
Ring2 = 'Rajas Ring',
Back = 'Aesir Mantle',
Waist = 'Warwolf Belt',
Legs = 'Futhark Trousers',
Feet = 'Shrewd Pumps',
},
['scat'] = {
Neck = 'Fotia Gorget',
Ear1 = 'Aesir Ear Pendant',
Ear2 = 'Eris\' Earring',
Body = 'Futhark Coat',
Hands = 'Runeist Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Thunder Ring',
Back = 'Lamia Mantle',
Waist = 'Warwolf Belt',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['enmity'] = {
Ear1 = 'Eris\' Earring',
Ear2 = 'Eris\' Earring',
Ring2 = 'Corneus Ring',
Waist = 'Warwolf Belt',
},
['tp_default'] = {
Head = 'Walahra Turban',
Neck = 'Parrying Torque',
Ear1 = 'Magnetic Earring',
Ear2 = 'Suppanomimi',
Body = 'Futhark Coat',
Hands = 'Runeist Mitons',
Ring1 = 'Succor Ring',
Ring2 = 'Flame Ring',
Back = 'Futhark Cape',
Waist = 'Warwolf Belt',
Legs = 'Futhark Trousers',
Feet = 'Futhark Boots',
},
['STR'] = {
},
['MND'] = {
},
['INT'] = {
},
['DEX'] = {
},
['AGI'] = {
},
['VIT'] = {
},
['CHR'] = {
},
};
local towns = T{'Aht Urhgan Whitegate','Al Zahbi','Bastok Markets [S]','Bastok Markets','Bastok Mines','Bastok-Jeuno Airship','Celennia Memorial Library','Chateau d\'Oraguille','Eastern Adoulin','Heavens Tower','Kazham','Kazham-Jeuno Airship','Lower Jeuno','Metalworks','Mhaura','Mog Garden','Nashmau','Norg','Northern San d\'Oria','Port Bastok','Port Jeuno','Port San d\'Oria','Port Windurst','Rabao','Ru\'Lude Gardens','San d\'Oria-Jeuno Airship','Selbina','Southern San d\'Oria [S]','Southern San d\'Oria','Tavnazian Safehold','Upper Jeuno','Western Adoulin','Windurst Walls','Windurst Waters [S]','Windurst Waters','Windurst Woods','Windurst-Jeuno Airship',};
local runes = {
Ignis = {'Barblizzard','Fire','STR'},
Gelus = {'Baraero','Ice','DEX'},
Flabra = {'Barstone', 'Wind', 'VIT'},
Tellus = {'Bartunder','Earth','AGI'},
Sulpor = {'Barwater','Thunder','INT'},
Unda = {'Barfire','Water','MND'},
Lux = {nil,'Light','CHR'},
Tenebrae = {nil,'Dark',nil},
};
local settings = {
tpvariant = 1,
diset = false;
autorefresh = true;
kite = false,
afpercent = 20;
};
local tpmodetable = {
[1] = 'default',
[2] = 'mtank',
[3] = 'ptank',
[4] = 'btank',
[5] = 'hybrid',
[6] = 'acc',
};
local costumevartable = {
[1] = 'relic',
[2] = 'af',
[3] = 'none',
};
profile.Sets = sets;
profile.Packer = {
};
profile.OnLoad = function()
gSettings.AllowAddSet = true;
local player = gData.GetPlayer()
-- Below code will change your macro book to the specified macro book when you load this job
-- Change the macro book # to your main jobs macro set
-- Change the macro set # to the palatte for the sub job
if (player.SubJob == 'WAR') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 14');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
elseif (player.SubJob == 'DNC') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 14');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
elseif (player.SubJob == 'RDM') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 14');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
elseif (player.SubJob == 'NIN') then
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 14');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
else
AshitaCore:GetChatManager():QueueCommand(1, '/macro book 14');
AshitaCore:GetChatManager():QueueCommand(1, '/macro set 1');
end
AshitaCore:GetChatManager():QueueCommand(-1, '/alias /run /lac fwd');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F1 /lac fwd tpset');
AshitaCore:GetChatManager():QueueCommand(-1, '/bind !F2 /lac fwd diset');
gFunc.Message('Active Alias - /run [/lac fwd]');
gFunc.Message('Active Binds - Alt+F1 to cycle TP sets');
gFunc.Message('Active Binds - Alt+F2 to cycle DI set');
end
profile.OnUnload = function()
-- Bind clean up
AshitaCore:GetChatManager():QueueCommand(-1, '/alias delete /run');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F1');
AshitaCore:GetChatManager():QueueCommand(-1, '/unbind !F2');
end
profile.HandleCommand = function(args)
if (args[1] == 'tpset') then
settings.tpvariant = settings.tpvariant + 1;
if (settings.tpvariant > #tpmodetable) then
settings.tpvariant = 1;
end
gFunc.Message('TP Set: ' .. string.upper(tpmodetable[settings.tpvariant]));
elseif (args[1] == 'diset') then
if (settings.diset == true) then
settings.diset = false;
else
settings.diset = true;
end
gFunc.Message('DI Set is now set to ' .. string.upper(tostring(settings.diset)));
elseif (args[1] == 'autorefresh') then
if (settings.autorefresh == true) then
settings.autorefresh = false;
else
settings.autorefresh = true;
end
gFunc.Message('Auto Refresh Set is now set to ' .. string.upper(tostring(settings.autorefresh)));
elseif (args[1] == 'kite') then
if (settings.kite == true) then
settings.kite = false;
else
settings.kite = true;
end
gFunc.Message('Kite Mode is now set to ' .. string.upper(tostring(settings.kite)));
end
end
profile.HandleDefault = function()
local player = gData.GetPlayer(); -- This gets the players info and holds it all in 'player'
local swordplay = gData.GetBuffCount('Swordplay');
local rune = gData.GetBuffCount();
local zone = gData.GetEnvironment().Area;
if (player.Status == 'Engaged') then
gFunc.EquipSet('tp_' .. tpmodetable[settings.tpvariant]);
if (swordplay ~= 0) then
gFunc.Equip('Hands', 'Futhark Mitons');
end
elseif (player.Status == 'Resting') then
gFunc.EquipSet(sets.rest);
elseif (player.Status == 'Zoning') then
if (towns:contains(zone)) then
local x = math.random(#costumevartable);
if (x == 3) then
gFunc.EquipSet(sets.idle);
return;
else
gFunc.EquipSet('town_' .. costumevartable[x]);
end
else
gFunc.EquipSet(sets.idle);
end
elseif (player.Status == 'Dead') then
else -- This is for the idle set used as a catch all
gFunc.EquipSet(sets.idle);
if (settings.tpvariant > 1) and (settings.tpvariant < 5) then
gFunc.EquipSet('tp_' .. tpmodetable[settings.tpvariant]);
end
end
if (settings.kite == true) then
gFunc.EquipSet(sets.kiteset);
end
if (player.IsMoving) then
gFunc.Equip('Legs', 'Blood Cuisses');
end
end
profile.HandleAbility = function()
local ability = gData.GetAction();
if (ability.Name == 'Lunge' or ability.Name == 'Swipe') then
gFunc.EquipSet(sets.lunge);
elseif (ability.Name == 'Battuta') then
gFunc.Equip('Head', 'Futhark Bandeau');
elseif (ability.Name == 'Vallation' or 'Valiance') then
gFunc.Equip('Body', 'Runeist Coat');
elseif (ability.Name == 'Pflug') then
gFunc.Equip('Feet', 'Runeist Bottes');
elseif (ability.Name == 'Gambit') then
gFunc.Equip('Hands', 'Runeist Mitons');
elseif (ability.Name == 'Vivacious Pulse') then --Restores HP or MP with dark runes
elseif (ability.Name == 'Swordplay') then
gFunc.Equip('Head', 'Futhark Mitons');
elseif (ability.Name == 'Emolden') then
elseif (ability.Name == 'One for All') then
end
end
profile.HandleItem = function()
end
profile.HandlePrecast = function()
local spell = gData.GetAction();
gFunc.EquipSet(sets.precast);
if (spell.Skill == 'Enhancing Magic') then
gFunc.Equip('Neck', 'Enhancing Torque');
if string.match(spell.Name, 'Regen') then
gFunc.Equip('Head', 'Runeist Bandeau');
end
elseif string.match(spell.Name, 'Utsusemi') then
gFunc.EquipSet(sets.haste);
elseif (spell.Name == 'Flash') then
gFunc.EquipSet(sets.enmity);
end
end
profile.HandleMidcast = function()
end
profile.HandlePreshot = function()
end
profile.HandleMidshot = function()
end
profile.HandleWeaponskill = function()
local skill = gData.GetAction();
if (skill.Name == 'Savage Blade') then -- 50% STR and 50% MND
gFunc.EquipSet(sets.savage);
elseif (skill.Name == 'Ground Strike') then -- 50% STR and 50% INT
gFunc.EquipSet(sets.ws_groundstrike);
elseif (skill.Name == 'Herculean Slash') then -- VIT and matk
gFunc.EquipSet(sets.ws_herculean);
elseif (skill.Name == 'Requiescat') then -- MND
gFunc.EquipSet(sets.ws_scat);
end
end
return profile;