forked from Celther-FFXI/GearSwap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBST.lua
760 lines (650 loc) · 40.2 KB
/
BST.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
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- __________.__ ________ __ .__.__ __ __ .__ .__ _____.__.__
-- \______ | | ____ _____ ______ ____ \______ \ ____ ____ _____/ |_ ____ __| _|___/ |_ _/ |_| |__ |__| ______ _/ ____|__| | ____
-- | ___| | _/ __ \\__ \ / ____/ __ \ | | \ / _ \ / \ / _ \ __\ _/ __ \ / __ || \ __\ \ __| | \| |/ ___/ \ __\| | | _/ __ \
-- | | | |_\ ___/ / __ \_\___ \\ ___/ | ` ( <_> ) | | ( <_> | | \ ___// /_/ || || | | | | Y | |\___ \ | | | | |_\ ___/
-- |____| |____/\___ (____ /____ >\___ > /_______ /\____/ |___| /\____/|__| \___ \____ ||__||__| |__| |___| |__/____ > |__| |__|____/\___ > /\
-- \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
--
-- Please do not edit this file! Please do not edit this file! Please do not edit this file!
--
-- Editing this file will cause you to be unable to use Github Desktop to update!
--
-- Any changes you wish to make in this file you should be able to make by overloading. That is Re-Defining the same variables or functions in another file, by copying and
-- pasting them to a file that is loaded after the original file, all of my library files, and then job files are loaded first.
-- The last files to load are the ones unique to you. User-Globals, Charactername-Globals, Charactername_Job_Gear, in that order, so these changes will take precedence.
--
-- You may wish to "hook" into existing functions, to add functionality without losing access to updates or fixes I make, for example, instead of copying and editing
-- status_change(), you can instead use the function user_status_change() in the same manner, which is called by status_change() if it exists, most of the important
-- gearswap functions work like this in my files, and if it's unique to a specific job, user_job_status_change() would be appropriate instead.
--
-- Variables and tables can be easily redefined just by defining them in one of the later loaded files: autofood = 'Miso Ramen' for example.
-- States can be redefined as well: state.HybridMode:options('Normal','PDT') though most of these are already redefined in the gear files for editing there.
-- Commands can be added easily with: user_self_command(commandArgs, eventArgs) or user_job_self_command(commandArgs, eventArgs)
--
-- If you're not sure where is appropriate to copy and paste variables, tables and functions to make changes or add them:
-- User-Globals.lua - This file loads with all characters, all jobs, so it's ideal for settings and rules you want to be the same no matter what.
-- Charactername-Globals.lua - This file loads with one character, all jobs, so it's ideal for gear settings that are usable on all jobs, but unique to this character.
-- Charactername_Job_Gear.lua- This file loads only on one character, one job, so it's ideal for things that are specific only to that job and character.
--
--
-- If you still need help, feel free to contact me on discord or ask in my chat for help: https://discord.gg/ug6xtvQ
-- !Please do NOT message me in game about anything third party related, though you're welcome to message me there and ask me to talk on another medium.
--
-- Please do not edit this file! Please do not edit this file! Please do not edit this file!
-- __________.__ ________ __ .__.__ __ __ .__ .__ _____.__.__
-- \______ | | ____ _____ ______ ____ \______ \ ____ ____ _____/ |_ ____ __| _|___/ |_ _/ |_| |__ |__| ______ _/ ____|__| | ____
-- | ___| | _/ __ \\__ \ / ____/ __ \ | | \ / _ \ / \ / _ \ __\ _/ __ \ / __ || \ __\ \ __| | \| |/ ___/ \ __\| | | _/ __ \
-- | | | |_\ ___/ / __ \_\___ \\ ___/ | ` ( <_> ) | | ( <_> | | \ ___// /_/ || || | | | | Y | |\___ \ | | | | |_\ ___/
-- |____| |____/\___ (____ /____ >\___ > /_______ /\____/ |___| /\____/|__| \___ \____ ||__||__| |__| |___| |__/____ > |__| |__|____/\___ > /\
-- \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- Much credit goes to Falkirk of Quetzalcoatl for providing a lot of the concepts and
-- code in this file, as well as, always, Motenten/Kinematics.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Sel-Include.lua')
end
function job_setup()
state.Buff['Killer Instinct'] = buffactive['Killer Instinct'] or false
state.Buff["Unleash"] = buffactive["Unleash"] or false
state.Buff['Aftermath: Lv.3'] = buffactive['Aftermath: Lv.3'] or false
-- 'Out of Range' distance; WS will auto-cancel
target_distance = 6
tp_based_ready_moves = S{'Sic','Somersault ','Dust Cloud','Foot Kick','Sheep Song','Sheep Charge','Lamb Chop',
'Rage','Head Butt','Scream','Dream Flower','Wild Oats','Leaf Dagger','Claw Cyclone','Razor Fang','Roar',
'Gloeosuccus','Palsy Pollen','Soporific','Cursed Sphere','Geist Wall','Numbing Noise','Frog Kick',
'Nimble Snap','Cyclotail','Spoil','Rhino Guard','Rhino Attack','Hi-Freq Field','Sandpit','Sandblast',
'Mandibular Bite','Metallic Body','Bubble Shower','Bubble Curtain','Scissor Guard','Grapple','Spinning Top',
'Double Claw','Filamented Hold','Spore','Blockhead','Secretion','Fireball','Tail Blow','Plague Breath',
'Brain Crush','Infrasonics','Needleshot','Chaotic Eye','Blaster','Ripper Fang','Intimidate','Recoil Dive',
'Water Wall','Snow Cloud','Wild Carrot','Sudden Lunge','Noisome Powder','Wing Slap','Beak Lunge','Suction',
'Drainkiss','Acid Mist','TP Drainkiss','Back Heel','Jettatura','Choke Breath','Fantod','Charged Whisker',
'Purulent Ooze','Corrosive Ooze','Tortoise Stomp','Harden Shell','Aqua Breath','Sensilla Blades',
'Tegmina Buffet','Sweeping Gouge','Zealous Snort','Tickling Tendrils','Pecking Flurry','Pestilent Plume',
'Foul Waters','Spider Web','Crossthrash','Venom Shower','Mega Scissors','Fluid Toss',
'Fluid Spread','Digest','Rhinowrecker','Disembowel','Extirpating Salvo','Frenzied Rage'}
-- List of Magic-based Ready moves to use with Pet MAB or Pet M.Acc gearset.
magic_ready_moves = S{'Dust Cloud','Sheep Song','Scream','Dream Flower','Roar','Gloeosuccus','Palsy Pollen',
'Soporific','Cursed Sphere','Venom','Geist Wall','Toxic Spit','Numbing Noise','Spoil','Hi-Freq Field',
'Sandpit','Sandblast','Venom Spray','Bubble Shower','Filamented Hold','Silence Gas','Spore','Dark Spore',
'Fireball','Plague Breath','Infrasonics','Chaotic Eye','Blaster','Intimidate','Snow Cloud',
'Noisome Powder','TP Drainkiss','Jettatura','Charged Whisker','Purulent Ooze','Corrosive Ooze','Aqua Breath',
'Molting Plumage','Stink Bomb','Nectarous Deluge','Nepenthic Plunge','Pestilent Plume','Foul Waters',
'Spider Web','Nihility Song','Venom Shower','Digest'}
debuff_ready_moves = S{'Dust Cloud','Sheep Song','Scream','Dream Flower','Roar','Gloeosuccus','Palsy Pollen',
'Soporific','Geist Wall','Numbing Noise','Spoil','Hi-Freq Field','Sandpit','Sandblast','Filamented Hold',
'Spore','Fireball','Infrasonics','Chaotic Eye','Blaster','Intimidate','Noisome Powder','TP Drainkiss',
'Jettatura','Purulent Ooze','Corrosive Ooze','Pestilent Plume','Spider Web','Nihility Song'}
multi_hit_ready_moves = S{'Pentapeck','Tickling Tendrils','Sweeping Gouge','Chomp Rush','Wing Slap',
'Pecking Flurry'}
physical_debuff_ready_moves = S{'Sudden Lunge','Extirpating Salvo','Choke Breath'}
-- List of abilities to reference for applying Treasure Hunter +1 via Chaac Belt.
abilities_to_check = S{'Feral Howl','Quickstep','Box Step','Stutter Step','Desperate Flourish','Violent Flourish',
'Animated Flourish','Provoke','Dia','Dia II','Flash','Bio','Bio II','Sleep','Sleep II',
'Drain','Aspir','Dispel','Steal','Mug'}
pet_info = {['FunguarFamiliar']="Funguar, Plantoid, Warrior",['CourierCarrie']="Crab, Aquan, Paladin",
['AmigoSabotender']="Cactuar, Plantoid, Warrior",['NurseryNazuna']="Sheep, Beast, Warrior",
['CraftyClyvonne']="Coeurl, Beast, Warrior",['FleetReinhard']="Raptor, Lizard, Warrior",
['PrestoJulio']="Flytrap, Plantoid, Warrior",['SwiftSieghard']="Raptor, Lizard, Warrior",
['MailbusterCetas']="Fly, Vermin, Warrior",['AudaciousAnna']="Lizard, Lizard, Warrior",
['TurbidToloi']="Pugil, Aquan, Warrior",['SlipperySilas']="Toad, Aquan, Warrior",
['LuckyLulush']="Rabbit, Beast, Warrior",['DipperYuly']="Ladybug, Vermin, Thief",
['FlowerpotMerle']="Mandragora, Plantoid, Monk",['DapperMac']="Apkallu, Bird, Monk",
['DiscreetLouise']="Funguar, Plantoid, Warrior",['FatsoFargann']="Leech, Amorph, Warrior",
['FaithfulFalcorr']="Hippogryph, Bird, Thief",['BugeyedBroncha']="Eft, Lizard, Warrior",
['BloodclawShasra']="Lynx, Beast, Warrior",['GorefangHobs']="Tiger, Beast, Warrior",
['GooeyGerard']="Slug, Amorph, Warrior",['CrudeRaphie']="Adamantoise, Lizard, Paladin",
['DroopyDortwin']="Rabbit, Beast, Warrior",['PonderingPeter']="HQ Rabbit, Beast, Warrior",
['SunburstMalfik']="Crab, Aquan, Paladin",['AgedAngus']="HQ Crab, Aquan, Paladin",
['WarlikePatrick']="Lizard, Lizard, Warrior",['MosquitoFamiliar']="Mosquito, Vermin, Dark Knight",
['Left-HandedYoko']="Mosquito, Vermin, Dark Knight",['ScissorlegXerin']="Chapuli, Vermin, Warrior",
['BouncingBertha']="HQ Chapuli, Vermin, Warrior",['RhymingShizuna']="Sheep, Beast, Warrior",
['AttentiveIbuki']="Tulfaire, Bird, Warrior",['SwoopingZhivago']="HQ Tulfaire, Bird, Warrior",
['BrainyWaluis']="Funguar, Plantoid, Warrior",['SuspiciousAlice']="Eft, Lizard, Warrior",
['HeadbreakerKen']="Fly, Vermin, Warrior",['RedolentCandi']="Snapweed, Plantoid, Warrior",
['AlluringHoney']="HQ Snapweed, Plantoid, Warrior",['CaringKiyomaro']="Raaz, Beast, Monk",
['SurgingStorm']="Apkallu, Bird, Monk",['SubmergedIyo']="Apkallu, Bird, Monk",
['CursedAnnabelle']="Antlion, Vermin, Warrior",['AnklebiterJedd']="Diremite, Vermin, Dark Knight",
['VivaciousVickie']="HQ Raaz, Beast, Monk",['HurlerPercival']="Beetle, Vermin, Paladin",
['BlackbeardRandy']="Tiger, Beast, Warrior",['GenerousArthur']="Slug, Amorph, Warrior",
['ThreestarLynn']="Ladybug, Vermin, Thief",['BraveHeroGlenn']="Frog, Aquan, Warrior",
['SharpwitHermes']="Mandragora, Plantoid, Monk",['ColibriFamiliar']="Colibri, Bird, Red Mage",
['ChoralLeera']="HQ Colibri, Bird, Red Mage",['SpiderFamiliar']="Spider, Vermin, Warrior",
['GussyHachirobe']="HQ Spider, Vermin, Warrior",['AcuexFamiliar']="Acuex, Amorph, Black Mage",
['ChoralLeera']="HQ Colibri, Bird, Red Mage",['SpiderFamiliar']="Spider, Vermin, Warrior",
['AmiableRoche']="Pugil, Aquan, Warrior",['HeraldHenry']="Crab, Aquan, Paladin",
['FluffyBredo']="HQ Acuex, Amorph, Black Mage",['WeevilFamiliar']="Weevil, Vermin, Thief",
['StalwartAngelina']="HQ Weevil, Vermin, Thief",['SweetCaroline']="Mandragora, Plantoid, Monk",
['P.CrabFamiliar']="Crab, Aquan, Paladin",['JovialEdwin']="HQ Crab, Aquan, Paladin",
['Y.BeetleFamiliar']="Beetle, Vermin, Warrior",['EnergizedSefina']="Beetle, Vermin, Warrior",
['LynxFamiliar']="Coeurl, Beast, Warrior",['VivaciousGaston']="HQ Coeurl, Beast, Warrior",
['Hip.Familiar']="Hippogryph, Bird, Thief/Black Mage",['DaringRoland']="HQ Hippogryph, Bird, Thief/Black Mage",
['SlimeFamiliar']="Slime, Amorph, Warrior",['SultryPatrice']="Slime, Amorph, Warrior",
}
ready_moves = {}
ready_moves.default = {['DroopyDortwin']='Foot Kick',['PonderingPeter']='Foot Kick',['HeraldHenry']='Big Scissors',['CourierCarrie']='Big Scissors',
['AgedAngus']='Big Scissors',['SunburstMalfik']='Big Scissors',['WarlikePatrick']='Fireball',['ScissorlegXerin']='Sensilla Blades',
['BouncingBertha']='Sensilla Blades',['RhymingShizuna']='Lamb Chop',['AttentiveIbuki']='Swooping Frenzy',
['SwoopingZhivago']='Swooping Frenzy',['AmiableRoche']='Recoil Dive',['BrainyWaluis']='Frogkick',['SuspiciousAlice']='Cyclotail',
['HeadbreakerKen']='Somersault',['RedolentCandi']='Tickling Tendrils',['AlluringHoney']='Tickling Tendrils',
['CaringKiyomaro']='Sweeping Gouge',['VivaciousVickie']='Sweeping Gouge',['AnklebiterJedd']='Double Claw',
['HurlerPercival']='Power Attack',['BlackbeardRandy']='Razor Fang',['FleetReinhard']='Scythe Tail',
['ColibriFamiliar']='Pecking Flurry',['ChoralLeera']='Pecking Flurry',['SpiderFamiliar']='Sickle Slash',
['GussyHachirobe']='Sickle Slash',['ThreestarLynn']='Spiral Spin',['GenerousArthur']='Purulent Ooze',
['CursedAnnabelle']='Mandibular Bite',['SurgingStorm']='Beak Lunge',['SubmergedIyo']='Beak Lunge',
['SharpwitHermes']='Head Butt',['AcuexFamiliar']='Pestilent Plume',['FluffyBredo']='Pestilent Plume',
['MosquitoFamiliar']='Infected Leech',['Left-HandedYoko']='Infected Leech',['WeevilFamiliar']='Disembowel',
['StalwartAngelina']='Disembowel',['SweetCaroline']='Head Butt',['P.CrabFamiliar']='Mega Scissors',
['JovialEdwin']='Mega Scissors',['Y.BeetleFamiliar']='Power Attack',['EnergizedSefina']='Power Attack',
['LynxFamiliar']='Charged Whisker',['VivaciousGaston']='Charged Whisker',['Hip.Familiar']='Back Heel',['DaringRoland']='Back Heel',
['SlimeFamiliar']='Fluid Toss',['SultryPatrice']='Fluid Toss',
}
ready_moves.aoe = {['DroopyDortwin']='Whirl Claws',['PonderingPeter']='Whirl Claws',['HeraldHenry']='Bubble Shower',['CourierCarrie']='Bubble Shower',
['AgedAngus']='Bubble Shower',['SunburstMalfik']='Bubble Shower',['WarlikePatrick']='Fireball',['ScissorlegXerin']='Tegmina Buffet',
['BouncingBertha']='Tegmina Buffet',['RhymingShizuna']='Sheep Song',['AttentiveIbuki']='Molting Plumage',
['SwoopingZhivago']='Molting Plumage',['AmiableRoche']='Recoil Dive',['BrainyWaluis']='Silence Gas',['SuspiciousAlice']='Cyclotail',
['HeadbreakerKen']='Cursed Sphere',['RedolentCandi']='Nectarous Deluge',['AlluringHoney']='Nectarous Deluge',
['AnklebiterJedd']='Spinning Top',['HurlerPercival']='Hi-Freq Field',['BlackbeardRandy']='Claw Cyclone',
['SpiderFamiliar']='Spider Web',['GussyHachirobe']='Spider Web',['ThreestarLynn']='Spiral Spin',['GenerousArthur']='Purulent Ooze',
['CursedAnnabelle']='Sandblast',['SharpwitHermes']='Scream',['AcuexFamiliar']='Pestilent Plume',['FluffyBredo']='Pestilent Plume',
['MosquitoFamiliar']='Infected Leech',['Left-HandedYoko']='Infected Leech',['SweetCaroline']='Scream',['P.CrabFamiliar']='Venom Shower',
['JovialEdwin']='Venom Shower',['Y.BeetleFamiliar']='Rhinowrecker',['EnergizedSefina']='Rhinowrecker',['LynxFamiliar']='Charged Whisker',
['VivaciousGaston']='Charged Whisker',['Hip.Familiar']='Choke Breath',['DaringRoland']='Choke Breath',
['SlimeFamiliar']='Fluid Spread',['SultryPatrice']='Fluid Spread',}
ready_moves.buff = {['DroopyDortwin']='Wild Carrot',['PonderingPeter']='Wild Carrot',['HeraldHenry']='Scissor Guard',['CourierCarrie']='Scissor Guard',
['AgedAngus']='Scissor Guard',['SunburstMalfik']='Scissor Guard',['WarlikePatrick']='Secretion',
['RhymingShizuna']='Rage',['AmiableRoche']='Water Wall',['HurlerPercival']='Rhino Guard',
['CaringKiyomaro']='Zealous Snort',['VivaciousVickie']='Zealous Snort',['P.CrabFamiliar']='Scissor Guard',
['JovialEdwin']='Scissor Guard',['Y.BeetleFamiliar']='Rhino Guard',['EnergizedSefina']='Rhino Guard',['LynxFamiliar']='Frenzied Rage',
['VivaciousGaston']='Frenzied Rage',['Hip.Familiar']='Fantod',['DaringRoland']='Fantod',}
ready_moves.debuff = {['DroopyDortwin']='Dust Cloud',['PonderingPeter']='Dust Cloud',['HeraldHenry']='Bubble Shower',['CourierCarrie']='Bubble Shower',
['AgedAngus']='Bubble Shower',['SunburstMalfik']='Bubble Shower',['WarlikePatrick']='Infrasonics',['ScissorlegXerin']='Tegmina Buffet',
['BouncingBertha']='Tegmina Buffet',['RhymingShizuna']='Sheep Song',['AttentiveIbuki']='Swooping Frenzy',
['SwoopingZhivago']='Swooping Frenzy',['AmiableRoche']='Intimidate',['BrainyWaluis']='Numbshroom',['SuspiciousAlice']='Geist Wall',
['HeadbreakerKen']='Venom',['RedolentCandi']='Stink Bomb',['AlluringHoney']='Stink Bomb',
['CaringKiyomaro']='Sweeping Gouge',['VivaciousVickie']='Sweeping Gouge',['AnklebiterJedd']='Filamented Hold',
['HurlerPercival']='Hi-Freq Field',['BlackbeardRandy']='Roar',['FleetReinhard']='Chomp Rush',
['SpiderFamiliar']='Spider Web',['GussyHachirobe']='Spider Web',['ThreestarLynn']='Noisome Powder',
['GenerousArthur']='Corrosive Ooze',['CursedAnnabelle']='Sandpit',
['SharpwitHermes']='Wild Oats',['AcuexFamiliar']='Pestilent Plume',['FluffyBredo']='Pestilent Plume',
['MosquitoFamiliar']='Gloom Spray',['Left-HandedYoko']='Gloom Spray',['WeevilFamiliar']='Extirpating Salvo',
['StalwartAngelina']='Extirpating Salvo',['SweetCaroline']='Wild Oats',['P.CrabFamiliar']='Venom Shower',
['JovialEdwin']='Venom Shower',['Y.BeetleFamiliar']='Hi-Freq Field',['EnergizedSefina']='Hi-Freq Field',
['LynxFamiliar']='Blaster',['VivaciousGaston']='Blaster',['Hip.Familiar']='Jettatura',['DaringRoland']='Jettatura',}
ready_moves.physical = {['DroopyDortwin']='Foot Kick',['PonderingPeter']='Foot Kick',['HeraldHenry']='Big Scissors',['CourierCarrie']='Big Scissors',
['AgedAngus']='Big Scissors',['SunburstMalfik']='Big Scissors',['WarlikePatrick']='Tail Blow',['ScissorlegXerin']='Sensilla Blades',
['BouncingBertha']='Sensilla Blades',['RhymingShizuna']='Lamb Chop',['AttentiveIbuki']='Swooping Frenzy',
['SwoopingZhivago']='Swooping Frenzy',['AmiableRoche']='Recoil Dive',['BrainyWaluis']='Frogkick',['SuspiciousAlice']='Cyclotail',
['HeadbreakerKen']='Somersault',['RedolentCandi']='Tickling Tendrils',['AlluringHoney']='Tickling Tendrils',
['CaringKiyomaro']='Sweeping Gouge',['VivaciousVickie']='Sweeping Gouge',['AnklebiterJedd']='Double Claw',
['HurlerPercival']='Power Attack',['BlackbeardRandy']='Razor Fang',['FleetReinhard']='Scythe Tail',
['ColibriFamiliar']='Pecking Flurry',['ChoralLeera']='Pecking Flurry',['SpiderFamiliar']='Sickle Slash',
['GussyHachirobe']='Sickle Slash',['ThreestarLynn']='Spiral Spin',['GenerousArthur']='Purulent Ooze',
['CursedAnnabelle']='Mandibular Bite',['SurgingStorm']='Beak Lunge',['SubmergedIyo']='Beak Lunge',
['SharpwitHermes']='Head Butt',['WeevilFamiliar']='Disembowel',['StalwartAngelina']='Disembowel',['SweetCaroline']='Head Butt',
['P.CrabFamiliar']='Mega Scissors',['JovialEdwin']='Mega Scissors',['Y.BeetleFamiliar']='Power Attack',['EnergizedSefina']='Power Attack',
['Hip.Familiar']='Back Heel',['DaringRoland']='Back Heel',['SlimeFamiliar']='Fluid Toss',['SultryPatrice']='Fluid Toss',}
ready_moves.magical = {['DroopyDortwin']='Dust Cloud',['PonderingPeter']='Dust Cloud',['HeraldHenry']='Bubble Shower',['CourierCarrie']='Bubble Shower',
['AgedAngus']='Bubble Shower',['SunburstMalfik']='Bubble Shower',['WarlikePatrick']='Fireball',
['AttentiveIbuki']='Molting Plumage',['SwoopingZhivago']='Molting Plumage',
['BrainyWaluis']='Silence Gas',['HeadbreakerKen']='Cursed Sphere',['RedolentCandi']='Nepenthic Plunge',
['AlluringHoney']='Nepenthic Plunge',['SpiderFamiliar']='Acid Spray',
['GussyHachirobe']='Acid Spray',['GenerousArthur']='Purulent Ooze',
['SharpwitHermes']='Scream',['AcuexFamiliar']='Pestilent Plume',['FluffyBredo']='Pestilent Plume',
['MosquitoFamiliar']='Infected Leech',['Left-HandedYoko']='Infected Leech',
['P.CrabFamiliar']='Venom Shower',['JovialEdwin']='Venom Shower',['LynxFamiliar']='Charged Whisker',
['VivaciousGaston']='Nihility Song',['Hip.Familiar']='Back Heel',['DaringRoland']='Nihility Song',
['SlimeFamiliar']='Digest',['SultryPatrice']='Digest',}
state.AutoFightMode = M(true, 'Auto Fight Mode')
state.AutoReadyMode = M(false, 'Auto Ready Mode')
state.AutoCallPet = M(false, 'Auto Call Pet')
state.PetMode = M{['description']='Pet Mode','Tank','DD'}
state.RewardMode = M{['description']='Reward Mode', 'Theta', 'Zeta', 'Eta'}
state.JugMode = M{['description']='Jug Mode', 'ScissorlegXerin', 'BlackbeardRandy', 'AttentiveIbuki', 'AgedAngus',
'RedolentCandi','DroopyDortwin','WarlikePatrick','HeraldHenry','AlluringHoney','SwoopingZhivago','AcuexFamiliar'}
UnleashLock = true
UnleashLocked = false
autows = 'Cloudsplitter'
autofood = 'Akamochi'
base_chargetimer = 30
if player.job_points[(res.jobs[player.main_job_id].ens):lower()].jp_spent > 100 then
base_chargetimer = base_chargetimer - 5
end
base_chargetimer = base_chargetimer - (2 * windower.ffxi.get_player().merits.sic_recast)
update_pet_groups()
update_melee_groups()
init_job_states({"Capacity","AutoRuneMode","AutoTrustMode","AutoWSMode","AutoShadowMode","AutoFoodMode","AutoStunMode","AutoDefenseMode","AutoReadyMode",},{"AutoBuffMode","AutoSambaMode","Weapons","OffenseMode","WeaponskillMode","PetMode","IdleMode","Passive","RuneElement","JugMode","RewardMode","TreasureMode",})
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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_filtered_action(spell, eventArgs)
end
function job_filter_precast(spell, spellMap, eventArgs)
if spell.english == "Bestial Loyalty" then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[94] ~= 0 then
send_command('@input /ja "Call Beast" <me>')
eventArgs.cancel = true
return
end
end
end
function job_precast(spell, spellMap, eventArgs)
if spell.type == "WeaponSkill" and spell.english ~= 'Mistral Axe' and spell.english ~= 'Bora Axe' and spell.target.distance > target_distance then
eventArgs.cancel = true
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
elseif spell.english == 'Reward' then
equip(sets.precast.JA.Reward[state.RewardMode.value])
if can_dual_wield then
equip(sets.RewardAxesDW)
else
equip(sets.RewardAxe)
end
elseif spell.english == 'Spur' then
equip(sets.precast.JA.Spur)
if can_dual_wield then
equip(sets.SpurAxesDW)
else
equip(sets.SpurAxe)
end
elseif spell.english == 'Bestial Loyalty' then
if state.JugMode.value == 'DroopyDortwin' and item_available('Vis. Broth') then
equip(sets.precast.JA['Bestial Loyalty'].PonderingPeter)
elseif state.JugMode.value == 'SunburstMalfik' and item_available('Ferm. Broth') then
equip(sets.precast.JA['Bestial Loyalty'].AgedAngus)
elseif state.JugMode.value == 'ScissorlegXerin' and item_available('Bubbly Broth') then
equip(sets.precast.JA['Bestial Loyalty'].BouncingBertha)
elseif state.JugMode.value == 'AttentiveIbuki' and item_available('Windy Greens') then
equip(sets.precast.JA['Bestial Loyalty'].SwoopingZhivago)
elseif state.JugMode.value == 'RedolentCandi' and item_available('Bug-Ridden Broth') then
equip(sets.precast.JA['Bestial Loyalty'].AlluringHoney)
elseif state.JugMode.value == 'CaringKiyomaro' and item_available('Tant. Broth') then
equip(sets.precast.JA['Bestial Loyalty'].VivaciousVickie)
elseif state.JugMode.value == 'ColibriFamiliar' and item_available('Glazed Broth') then
equip(sets.precast.JA['Bestial Loyalty'].ChoralLeera)
elseif state.JugMode.value == 'SpiderFamiliar' and item_available('Slimy Webbing') then
equip(sets.precast.JA['Bestial Loyalty'].GussyHachirobe)
elseif state.JugMode.value == 'SurgingStorm' and item_available('Deepwater Broth') then
equip(sets.precast.JA['Bestial Loyalty'].SubmergedIyo)
elseif state.JugMode.value == 'AcuexFamiliar' and item_available('Venomous Broth') then
equip(sets.precast.JA['Bestial Loyalty'].FluffyBredo)
elseif state.JugMode.value == 'MosquitoFamiliar' and item_available('Heavenly Broth') then
equip(sets.precast.JA['Bestial Loyalty']['Left-HandedYoko'])
elseif state.JugMode.value == 'WeevilFamiliar' and item_available('T. Pristine Sap') then
equip(sets.precast.JA['Bestial Loyalty']['StalwartAngelina'])
elseif state.JugMode.value == 'P.CrabFamiliar' and item_available('Pungent Broth') then
equip(sets.precast.JA['Bestial Loyalty']['JovialEdwin'])
elseif state.JugMode.value == 'Y.BeetleFamiliar' and item_available('Gassy Sap') then
equip(sets.precast.JA['Bestial Loyalty']['EnergizedSefina'])
elseif state.JugMode.value == 'LynxFamiliar' and item_available('Spumante Broth') then
equip(sets.precast.JA['Bestial Loyalty']['VivaciousGaston'])
elseif state.JugMode.value == 'Hip.Familiar' and item_available('Feculent Broth') then
equip(sets.precast.JA['Bestial Loyalty']['DaringRoland'])
elseif state.JugMode.value == 'SlimeFamiliar' and item_available('Putrescent Broth') then
equip(sets.precast.JA['Bestial Loyalty']['SultryPatrice'])
else
equip(sets.precast.JA['Bestial Loyalty'][state.JugMode.value])
end
elseif spell.english == 'Call Beast' then
equip(sets.precast.JA['Bestial Loyalty'][state.JugMode.value])
-- Define class for Sic and Ready moves.
elseif spell.type == 'Monster' then
classes.CustomClass = "WS"
if can_dual_wield then
equip(sets.midcast.Pet.ReadyRecastDW)
else
equip(sets.midcast.Pet.ReadyRecast)
end
end
end
function job_post_precast(spell, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
local WSset = standardize_set(get_precast_set(spell, spellMap))
local wsacc = check_ws_acc()
if (WSset.ear1 == "Moonshade Earring" or WSset.ear2 == "Moonshade Earring") then
-- Replace Moonshade Earring if we're at cap TP
if get_effective_player_tp(spell, WSset) > 3200 then
if wsacc:contains('Acc') and not buffactive['Sneak Attack'] and sets.AccMaxTP then
local AccMaxTPset = standardize_set(sets.AccMaxTP)
if (AccMaxTPset.ear1:startswith("Lugra Earring") or AccMaxTPset.ear2:startswith("Lugra Earring")) and not classes.DuskToDawn and sets.AccDayMaxTPWSEars then
equip(sets.AccDayMaxTPWSEars[spell.english] or sets.AccDayMaxTPWSEars)
else
equip(sets.AccMaxTP[spell.english] or sets.AccMaxTP)
end
elseif sets.MaxTP then
local MaxTPset = standardize_set(sets.MaxTP)
if (MaxTPset.ear1:startswith("Lugra Earring") or MaxTPset.ear2:startswith("Lugra Earring")) and not classes.DuskToDawn and sets.DayMaxTPWSEars then
equip(sets.DayMaxTPWSEars[spell.english] or sets.DayMaxTPWSEars)
else
equip(sets.MaxTP[spell.english] or sets.MaxTP)
end
else
end
else
if wsacc:contains('Acc') and not buffactive['Sneak Attack'] and (WSset.ear1:startswith("Lugra Earring") or WSset.ear2:startswith("Lugra Earring")) and not classes.DuskToDawn and sets.AccDayWSEars then
equip(sets.AccDayWSEars[spell.english] or sets.AccDayWSEars)
elseif (WSset.ear1:startswith("Lugra Earring") or WSset.ear2:startswith("Lugra Earring")) and not classes.DuskToDawn and sets.DayWSEars then
equip(sets.DayWSEars[spell.english] or sets.DayWSEars)
end
end
elseif (WSset.ear1:startswith("Lugra Earring") or WSset.ear2:startswith("Lugra Earring")) and not classes.DuskToDawn then
if wsacc:contains('Acc') and not buffactive['Sneak Attack'] and sets.AccDayWSEars then
equip(sets.AccDayWSEars[spell.english] or sets.AccDayWSEars)
elseif sets.DayWSEars then
equip(sets.DayWSEars[spell.english] or sets.DayWSEars)
end
end
-- If Killer Instinct is active during WS, equip Ferine Gausape +2.
if buffactive['Killer Instinct'] then
equip(sets.buff['Killer Instinct'])
end
end
end
function job_pet_midcast(spell, spellMap, eventArgs)
end
function job_post_pet_midcast(spell, spellMap, eventArgs)
end
function job_pet_aftercast(spell, action, spellMap, eventArgs)
windower.add_to_chat:schedule(.5,204,'~~~Current Ready Charges Available: ['..get_current_ready_count()..']~~~')
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_midcast(spell, spellMap, eventArgs)
end
function job_aftercast(spell, spellMap, eventArgs)
if spell.type == 'Monster' then
equip(get_pet_midcast_set(spell, spellMap))
petWillAct = os.clock()
if magic_ready_moves:contains(spell.english) then
if debuff_ready_moves:contains(spell.english) and sets.midcast.Pet.DebuffReady then
equip(sets.midcast.Pet.DebuffReady)
else
if sets.midcast.Pet.MagicReady[state.OffenseMode.value] then
equip(sets.midcast.Pet.MagicReady[state.OffenseMode.value])
else
equip(sets.midcast.Pet.MagicReady)
end
end
elseif physical_debuff_ready_moves:contains(spell.english) and sets.midcast.Pet.PhysicalDebuffReady then
equip(sets.midcast.Pet.PhysicalDebuffReady)
elseif multi_hit_ready_moves:contains(spell.english) and sets.midcast.Pet.MultiHitReady then
equip(sets.midcast.Pet.MultiHitReady)
else
if sets.midcast.Pet[state.OffenseMode.value] then
equip(sets.midcast.Pet[state.OffenseMode.value])
else
equip(sets.midcast.Pet.WS)
end
end
-- If Pet TP, before bonuses, is less than a certain value then equip Nukumi Manoplas +1
if tp_based_ready_moves:contains(spell.english) then
if pet.tp < 1900 or (PetJob ~= 'Warrior' and pet.tp < 2400) then
equip(sets.midcast.Pet.TPBonus)
end
end
if state.Buff["Unleash"] and UnleashLock and not UnleashLocked then
UnleashLocked = true
disable('main','sub','range','ammo','head','neck','lear','rear','body','hands','lring','rring','back','waist','legs','feet')
add_to_chat(217, "Unleash is on, locking your current Ready set.")
end
eventArgs.handled = true
elseif spell.english == "Bestial Loyalty" or spell.english == 'Call Beast' then
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hook for idle sets.
-------------------------------------------------------------------------------------------------------------------
function job_customize_idle_set(idleSet)
if pet.isvalid and pet.status == 'Engaged' and can_dual_wield and sets.idle.Pet.Engaged.DW then
equip(sets.idle.Pet.Engaged.DW)
end
return idleSet
end
function job_state_change(stateField, newValue, oldValue)
if stateField == 'PetMode' then
update_pet_groups()
end
if pet_info[state.JugMode.value] then
send_command('wait .001;gs c DisplayPetInfo')
end
end
function job_pet_change(pet, gain)
update_pet_groups()
end
-- Update custom groups based on the current pet.
function update_pet_groups()
classes.CustomIdleGroups:clear()
if pet.isvalid then
classes.CustomIdleGroups:append(state.PetMode.value)
end
end
-- Modify the default melee set after it was constructed.
function job_customize_melee_set(meleeSet)
return meleeSet
end
-------------------------------------------------------------------------------------------------------------------
-- Hooks for Reward, Correlation, Treasure Hunter, and Pet Mode handling.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff, gain)
update_melee_groups()
if buff == 'Unleash' and UnleashLocked and not gain then
UnleashLocked = false
enable('main','sub','range','ammo','head','neck','lear','rear','body','hands','lring','rring','back','waist','legs','feet')
add_to_chat(217, "Unleash has worn, enabling all slots.")
end
end
function job_status_change(newStatus, oldStatus, eventArgs)
if newStatus == "Engaged" and pet.isvalid and pet.status == "Idle" and player.target.type == "MONSTER" and state.AutoFightMode.value and player.target.distance < 20 then
windower.chat.input('/pet Fight <t>')
end
end
function get_custom_wsmode(spell, spellMap, default_wsmode)
if default_wsmode ~= 'Fodder' then
if spell.english == "Ruinator" and (world.day_element == 'Water' or world.day_element == 'Wind' or world.day_element == 'Ice') then
return 'Mekira'
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- 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_pet_groups()
update_melee_groups()
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local msg = 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ': '
msg = msg .. state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. ', WS: ' .. state.WeaponskillMode.value
if state.DefenseMode.value ~= 'None' then
msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
end
if state.Kiting.value then
msg = msg .. ', Kiting'
end
if state.ExtraMeleeMode.value ~= 'None' then
msg = msg .. ', Extra: ' .. state.ExtraMeleeMode.value
end
msg = msg .. ', Reward: '..state.RewardMode.value..', Correlation: '..state.CorrelationMode.value
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_melee_groups()
if player.equipment.main then
classes.CustomMeleeGroups:clear()
if player.equipment.main == "Aymur" and state.Buff['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM')
end
end
end
function job_self_command(commandArgs, eventArgs)
if commandArgs[1]:lower() == 'showcharge' then
add_to_chat(204, '~~~Current Ready Charges Available: ['..get_current_ready_count()..']~~~')
elseif commandArgs[1]:lower() == 'displaypetinfo' then
add_to_chat(8,''..state.JugMode.value..': '..pet_info[state.JugMode.value]..'')
elseif commandArgs[1]:lower() == 'unleashlock' then
if UnleashLock == true then
UnleashLock = false
add_to_chat(122, "Unleash no longer locks gear.")
elseif UnleashLock == false then
UnleashLock = true
add_to_chat(122, "Unleash now locks gear.")
end
elseif commandArgs[1]:lower() == 'ready' and pet.isvalid then
if pet.status == "Idle" and player.target.type == "MONSTER" then
windower.chat.input('/pet Fight <t>')
else
handle_ready(commandArgs)
end
end
end
function job_tick()
if check_pet() then return true end
if check_ready() then return true end
return false
end
function check_pet()
if pet.isvalid then
if pet.hpp < 34 then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[103] < latency and not (buffactive.amnesia or buffactive.impairment) then
if item_available('Pet Food '..state.RewardMode.value..'') then
windower.chat.input('/ja "Reward" <me>')
tickdelay = os.clock() + 1.1
return true
else
return false
end
end
end
elseif state.AutoCallPet.value and not data.areas.cities:contains(world.area) then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[94] < latency then
send_command('@input /ja "Bestial Loyalty" <me>')
tickdelay = os.clock() + .7
return true
elseif abil_recasts[104] < latency then
send_command('@input /ja "Call Beast" <me>')
tickdelay = os.clock() + 1.1
return true
else
return false
end
else
return false
end
end
function check_ready()
if state.AutoReadyMode.value and not moving then
if pet.isvalid then
if pet.status == "Engaged" and get_current_ready_count() > 0 then
windower.send_command('gs c ready')
tickdelay = os.clock() + 2
return true
elseif pet.status == "Idle" and player.target.type == "MONSTER" then
windower.chat.input('/pet Fight <t>')
tickdelay = os.clock() + 2
return true
else
return false
end
else
return false
end
else
return false
end
end
function get_current_ready_count()
local readyRecast = windower.ffxi.get_ability_recasts()[102]
local maxCharges = 3
local ReadyChargeTimer = get_ready_charge_timer()
-- The *# is your current recharge timer.
local fullRechargeTime = 3*ReadyChargeTimer
local currentCharges = math.floor(maxCharges - maxCharges * readyRecast / fullRechargeTime)
return currentCharges
end
function job_zone_change(new_id,old_id)
state.AutoReadyMode:reset()
end
function handle_ready(commandArgs)
if data.areas.cities:contains(world.area) then
add_to_chat(123, 'Abort:You cannot use ready in town.')
return
end
if not pet.isvalid then
add_to_chat(123,'Abort: You do not have a pet.')
return
end
if get_current_ready_count() == 0 then
add_to_chat(123,'Abort: No pet charges!')
return
end
if not commandArgs[2] then
if ready_moves.default[pet.name] then
windower.chat.input('/pet "'..ready_moves.default[pet.name]..'" <me>')
else
windower.chat.input('/pet "Sic" <me>')
end
return
end
local ready = commandArgs[2]:lower()
if not ready_moves[ready] then
add_to_chat(123,'Abort: Unknown ready type: '..tostring(ready))
return
end
if ready_moves[ready][pet.name] then
windower.chat.input('/pet "'..ready_moves[ready][pet.name]..'" <me>')
elseif ready == 'default' then
windower.chat.input('/pet "Sic" <me>')
else
add_to_chat(123,'Abort: No '..ready..' ready move for '..pet.name..'.')
end
end
function get_ready_charge_timer()
local charge_timer = base_chargetimer
if state.Weapons.Value == 'None' then
if can_dual_wield and sets.midcast.Pet.ReadyRecastDW.sub and sets.midcast.Pet.ReadyRecastDW.sub == "Charmer's Merlin" then
charge_timer = charge_timer - 5
elseif sets.midcast.Pet.ReadyRecast.main and sets.midcast.Pet.ReadyRecast.main == "Charmer's Merlin" then
charge_timer = charge_timer - 5
end
elseif sets.weapons[state.Weapons.Value].main == "Charmer's Merlin" or sets.weapons[state.Weapons.Value].main == "Charmer's Merlin" then
charge_timer = charge_timer - 5
end
if can_dual_wield and sets.midcast.Pet.ReadyRecastDW.legs and sets.midcast.Pet.ReadyRecastDW.legs == "Desultor Tassets" then
charge_timer = charge_timer - 5
elseif sets.midcast.Pet.ReadyRecast.legs and sets.midcast.Pet.ReadyRecast.legs == "Desultor Tassets" then
charge_timer = charge_timer - 5
end
if charge_timer < 10 then
return 10
else
return charge_timer
end
end