-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathArislan-BLM.lua
972 lines (839 loc) · 31.6 KB
/
Arislan-BLM.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
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
-- Original: Motenten / Modified: Arislan
-------------------------------------------------------------------------------------------------------------------
-- Keybinds
-------------------------------------------------------------------------------------------------------------------
-- Modes: [ F10 ] Emergency -PDT Mode
-- [ ALT+F10 ] Toggle Kiting Mode
-- [ F11 ] Emergency -MDT Mode
-- [ CTRL+F11 ] Cycle Casting Modes
-- [ F12 ] Update Current Gear / Report Current Status
-- [ CTRL+F12 ] Cycle Idle Modes
-- [ ALT+F12 ] Cancel Emergency -PDT/-MDT Mode
-- [ ALT+` ] Toggle Magic Burst Mode
-- [ WIN+D ] Toggle Death Casting Mode Toggle
-- [ WIN+C ] Toggle Capacity Points Mode
--
-- Spells: [ CTRL+` ] Stun
-- [ ALT+P ] Shock Spikes
--
-- Weapons: [ CTRL+W ] Toggles Weapon Lock
--
-- WS: [ CTRL+Numpad0 ] Myrkr
--
--
-- (Global-Binds.lua contains additional non-job-related keybinds)
-------------------------------------------------------------------------------------------------------------------
-- 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.CP = M(false, "Capacity Points Mode")
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
degrade_array = {
['Aspirs'] = {'Aspir','Aspir II','Aspir III'}
}
lockstyleset = 10
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.CastingMode:options('Normal', 'Resistant', 'Spaekona')
state.IdleMode:options('Normal', 'DT')
state.WeaponLock = M(false, 'Weapon Lock')
state.MagicBurst = M(false, 'Magic Burst')
state.DeathMode = M(false, 'Death Mode')
state.CP = M(false, "Capacity Points Mode")
lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder'}
-- Additional local binds
include('Global-Binds.lua') -- OK to remove this line
include('Global-GEO-Binds.lua') -- OK to remove this line
send_command('bind ^` input /ma Stun <t>')
send_command('bind !` gs c toggle MagicBurst')
send_command('bind !w input /ma "Aspir III" <t>')
send_command('bind !p input /ma "Shock Spikes" <me>')
send_command('bind @d gs c toggle DeathMode')
-- send_command('bind @c gs c toggle CP')
send_command('bind @w gs c toggle WeaponLock')
send_command('bind ^numpad0 input /Myrkr')
select_default_macro_book()
set_lockstyle()
state.Auto_Kite = M(false, 'Auto_Kite')
moving = false
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind !w')
send_command('unbind !p')
send_command('unbind ^,')
send_command('unbind !.')
send_command('unbind @d')
-- send_command('unbind @c')
send_command('unbind @w')
send_command('unbind ^numpad0')
send_command('unbind #`')
send_command('unbind #1')
send_command('unbind #2')
send_command('unbind #3')
send_command('unbind #4')
send_command('unbind #5')
send_command('unbind #6')
send_command('unbind #7')
send_command('unbind #8')
send_command('unbind #9')
send_command('unbind #0')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {
feet="Wicce Sabots +1",
back=gear.BLM_Death_Cape,
}
sets.precast.JA.Manafont = {body="Arch. Coat +1"}
-- Fast cast sets for spells
sets.precast.FC = {
-- /RDM --15
ammo="Sapience Orb", --2
head="Amalric Coif +1", --11
body=gear.Merl_FC_body, --13
hands="Merlinic Dastanas", --6
legs="Volte Brais", --8
feet="Volte Gaiters", --6
neck="Orunmila's Torque", --5
ear1="Malignance Earring", --4
ear2="Enchntr. Earring +1", --2
ring1="Kishar Ring", --4
ring2="Weather. Ring +1", --5
back=gear.BLM_FC_Cape, --10
waist="Embla Sash",
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
waist="Siegel Sash",
back="Perimede Cape",
})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {
ear1="Mendi. Earring", --5
ring1="Lebeche Ring", --(2)
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty, body="Twilight Cloak", waist="Shinjutsu-no-Obi +1"})
sets.precast.FC.Dispelga = set_combine(sets.precast.FC, {main="Daybreak", sub="Ammurapi Shield", waist="Shinjutsu-no-Obi +1"})
sets.precast.Storm = set_combine(sets.precast.FC, {ring2={name="Stikini Ring +1", bag="wardrobe4"},})
sets.precast.FC.DeathMode = {
ammo="Ghastly Tathlum +1",
head="Amalric Coif +1", --11
body="Amalric Doublet +1",
hands="Merlinic Dastanas", --6
legs="Volte Brais", --8
feet="Volte Gaiters", --6
neck="Orunmila's Torque", --5
ear1="Etiolation Earring", --1
ear2="Loquacious Earring", --2
ring1="Mephitas's Ring +1",
ring2="Weather. Ring +1", --5
back="Bane Cape", --4
waist="Embla Sash",
}
sets.precast.FC.Impact.DeathMode = set_combine(sets.precast.FC.DeathMode, {head=empty, body="Twilight Cloak", waist="Shinjutsu-no-Obi +1"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
--ammo="Floestone",
head="Jhakri Coronal +2",
body="Jhakri Robe +2",
hands="Jhakri Cuffs +2",
legs=gear.Telchine_ENH_legs,
feet="Jhakri Pigaches +2",
neck="Fotia Gorget",
ear1="Moonshade Earring",
ear2="Telos Earring",
ring1="Epaminondas's Ring",
ring2="Shukuyu Ring",
back="Relucent Cape",
waist="Fotia Belt",
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {
ammo="Ghastly Tathlum +1",
head="Pixie Hairpin +1",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
legs="Merlinic Shalwar",
feet="Merlinic Crackows",
neck="Baetyl Pendant",
ear1="Malignance Earring",
ear2="Moonshade Earring",
ring1="Epaminondas's Ring",
ring2="Archon Ring",
back=gear.BLM_MAB_Cape,
waist="Acuity Belt +1",
} -- INT
sets.precast.WS['Myrkr'] = {
ammo="Ghastly Tathlum +1",
head="Pixie Hairpin +1",
body="Amalric Doublet +1",
hands=gear.Telchine_ENH_hands,
legs="Amalric Slops +1",
feet="Medium's Sabots",
neck="Orunmila's Torque",
ear1="Etiolation Earring",
ear2="Loquacious Earring",
ring1="Mephitas's Ring +1",
ring2="Mephitas's Ring",
back="Bane Cape",
waist="Shinjutsu-no-Obi +1",
} -- Max MP
---- Midcast Sets ----
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.Cure = {
main="Daybreak", --30
sub="Sors Shield", --3/(-5)
ammo="Esper Stone +1", --0/(-5)
body="Vanya Robe",
hands=gear.Telchine_ENH_hands, --10
feet="Medium's Sabots", --12
neck="Nodens Gorget", --5
ear1="Mendi. Earring", --5
ear2="Roundel Earring", --5
ring1="Lebeche Ring", --3/(-5)
ring2="Haoma's Ring",
back="Oretan. Cape +1", --6
waist="Bishop's Sash",
}
sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
neck="Nuna Gorget +1",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2="Metamor. Ring +1",
waist="Luminary Sash",
})
sets.midcast.Cursna = set_combine(sets.midcast.Cure, {
main=gear.Gada_ENH,
sub="Genmei Shield",
head="Vanya Hood",
body="Vanya Robe",
hands="Hieros Mittens",
feet="Vanya Clogs",
neck="Debilis Medallion",
ear1="Beatific Earring",
ear2="Meili Earring",
ring1="Menelaus's Ring",
ring2="Haoma's Ring",
})
sets.midcast['Enhancing Magic'] = {
main=gear.Gada_ENH,
sub="Ammurapi Shield",
head=gear.Telchine_ENH_head,
body=gear.Telchine_ENH_body,
hands=gear.Telchine_ENH_hands,
legs=gear.Telchine_ENH_legs,
feet=gear.Telchine_ENH_feet,
neck="Incanter's Torque",
ear1="Mimir Earring",
ear2="Andoaa Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Fi Follet Cape +1",
waist="Olympus Sash",
}
sets.midcast.EnhancingDuration = {
main=gear.Gada_ENH,
sub="Ammurapi Shield",
head=gear.Telchine_ENH_head,
body=gear.Telchine_ENH_body,
hands=gear.Telchine_ENH_hands,
legs=gear.Telchine_ENH_legs,
feet=gear.Telchine_ENH_feet,
waist="Embla Sash",
}
sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {
main="Bolelabunga",
sub="Ammurapi Shield",
head=gear.Telchine_ENH_head,
body=gear.Telchine_ENH_body,
hands=gear.Telchine_ENH_hands,
legs=gear.Telchine_ENH_legs,
feet=gear.Telchine_ENH_feet,
})
sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
head="Amalric Coif +1",
--feet="Inspirited Boots",
waist="Gishdubar Sash",
back="Grapevine Cape",
})
sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingDuration, {
neck="Nodens Gorget",
waist="Siegel Sash",
})
sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingDuration, {
main="Vadose Rod",
sub="Ammurapi Shield",
ammo="Staunch Tathlum +1",
head="Amalric Coif +1",
hands="Regal Cuffs",
ear1="Halasz Earring",
ring1="Freke Ring",
ring2="Evanescence Ring",
waist="Emphatikos Rope",
})
sets.midcast.Protect = set_combine(sets.midcast.EnhancingDuration, {ring1="Sheltered Ring"})
sets.midcast.Protectra = sets.midcast.Protect
sets.midcast.Shell = sets.midcast.Protect
sets.midcast.Shellra = sets.midcast.Protect
sets.midcast.MndEnfeebles = {
main="Daybreak",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head=empty;
body="Cohort Cloak +1",
hands="Regal Cuffs",
legs="Ea Slops +1",
feet="Skaoi Boots",
neck="Erra Pendant",
ear1="Malignance Earring",
ear2="Vor Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Aurist's Cape +1",
waist="Luminary Sash",
} -- MND/Magic accuracy
sets.midcast.IntEnfeebles = set_combine(sets.midcast.MndEnfeebles, {
main="Maxentius",
sub="Ammurapi Shield",
waist="Acuity Belt +1",
}) -- INT/Magic accuracy
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Dispelga = set_combine(sets.midcast.IntEnfeebles, {main="Daybreak", sub="Ammurapi Shield", waist="Shinjutsu-no-Obi +1"})
sets.midcast['Dark Magic'] = {
main="Rubicundity",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Ea Hat +1",
body="Ea. Houppe +1",
hands="Raetic Bangles +1",
legs="Ea Slops +1",
feet="Merlinic Crackows",
neck="Erra Pendant",
ear1="Malignance Earring",
ear2="Mani Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back=gear.BLM_MAB_Cape,
waist="Acuity Belt +1",
}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
head="Pixie Hairpin +1",
feet="Merlinic Crackows",
ear1="Hirudinea Earring",
ring1="Evanescence Ring",
ring2="Archon Ring",
waist="Fucho-no-obi",
})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {
feet="Volte Gaiters",
})
sets.midcast.Death = {
main=gear.Grioavolr_MB, --5
sub="Enki Strap",
ammo="Ghastly Tathlum +1",
head="Pixie Hairpin +1",
body=gear.Merl_MB_body, --10
hands="Amalric Gages", --(5)
legs="Amalric Slops +1",
feet="Merlinic Crackows", --11
neck="Mizu. Kubikazari", --10
ear1="Malignance Earring",
ear2="Regal Earring",
ring1="Mephitas's Ring +1",
ring2="Metamor. Ring +1",
back=gear.BLM_Death_Cape, --5
waist="Sacro Cord",
}
sets.midcast.Death.Resistant = set_combine(sets.midcast.Death, {
main=gear.Grioavolr_MB,
sub="Enki Strap",
head="Amalric Coif +1",
waist="Acuity Belt +1",
})
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {
main=gear.Lathi_MAB,
sub="Enki Strap",
ammo="Ghastly Tathlum +1",
head="Merlinic Hood",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
legs="Amalric Slops +1",
feet="Amalric Nails +1",
neck="Baetyl Pendant",
ear1="Malignance Earring",
ear2="Regal Earring",
ring1="Freke Ring",
ring2="Metamor. Ring +1",
back=gear.BLM_MAB_Cape,
waist="Refoccilation Stone",
}
sets.midcast['Elemental Magic'].DeathMode = set_combine(sets.midcast['Elemental Magic'], {
main=gear.Grioavolr_MB,
sub="Enki Strap",
ammo="Ghastly Tathlum +1",
legs="Amalric Slops +1",
feet="Merlinic Crackows",
back=gear.BLM_Death_Cape,
})
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
sub="Khonsu",
ammo="Pemphredo Tathlum",
legs="Merlinic Shalwar",
neck="Sanctity Necklace",
waist="Sacro Cord",
})
sets.midcast['Elemental Magic'].Spaekona = set_combine(sets.midcast['Elemental Magic'], {
sub="Khonsu",
ammo="Pemphredo Tathlum",
body="Spaekona's Coat +2",
legs="Merlinic Shalwar",
feet="Merlinic Crackows",
neck="Erra Pendant",
})
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {
head=empty,
body="Twilight Cloak",
ring2="Archon Ring",
})
sets.midcast.Impact.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant, {
sub="Khonsu",
head=empty,
body="Twilight Cloak",
})
-- Initializes trusts at iLvl 119
sets.midcast.Trust = sets.precast.FC
sets.resting = {
main="Chatoyant Staff",
waist="Shinjutsu-no-Obi +1",
}
-- Idle sets
sets.idle = {
main="Daybreak",
sub="Genmei Shield",
ammo="Ghastly Tathlum +1",
head="Volte Beret",
body="Jhakri Robe +2",
hands="Raetic Bangles +1",
legs="Volte Brais",
feet="Volte Gaiters",
neck="Bathy Choker +1",
ear1="Sanare Earring",
ear2="Lugalbanda Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Moonlight Cape",
waist="Carrier's Sash",
}
sets.idle.DT = set_combine(sets.idle, {
main="Daybreak",
sub="Genmei Shield", --10/0
ammo="Staunch Tathlum +1", --3/3
head="Volte Beret",
body="Mallquis Saio +2", --8/8
hands="Raetic Bangles +1",
feet="Volte Gaiters",
neck="Loricate Torque +1", --6/6
ear1="Sanare Earring",
ear2="Lugalbanda Earring",
ring1="Gelatinous Ring +1", --7/(-1)
ring2="Defending Ring", --10/10
back="Moonlight Cape", --6/6
waist="Carrier's Sash",
})
sets.idle.ManaWall = {
feet="Wicce Sabots +1",
back=gear.BLM_Death_Cape,
}
sets.idle.DeathMode = {
main=gear.Lathi_MAB,
sub="Khonsu",
ammo="Ghastly Tathlum +1",
head="Pixie Hairpin +1",
body="Amalric Doublet +1",
hands="Amalric Gages",
legs="Amalric Slops +1",
feet="Merlinic Crackows",
neck="Sanctity Necklace",
ear1="Malignance Earring",
ear2="Regal Earring",
ring1="Mephitas's Ring +1",
ring2="Mephitas's Ring",
back=gear.BLM_Death_Cape,
waist="Shinjutsu-no-Obi +1",
}
sets.idle.Town = set_combine(sets.idle, {
main=gear.Grioavolr_MB,
sub="Khonsu",
head="Ea Hat +1",
body="Ea Houppe. +1",
legs="Ea Slops +1",
feet="Volte Gaiters",
neck="Incanter's Torque",
ear1="Malignance Earring",
ear2="Regal Earring",
ring1="Freke Ring",
ring2="Metamor. Ring +1",
back=gear.BLM_MAB_Cape,
waist="Acuity Belt +1",
})
-- Defense sets
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = sets.idle.DT
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
sets.latent_dt = {ear2="Sorcerer's Earring"}
sets.magic_burst = {
head="Ea Hat +1", --7/(7)
body="Ea Houppe. +1", --9/(9)
hands="Amalric Gages +1", --(6)
legs="Ea Slops +1", --8/(8)
feet="Ea Pigaches +1", --5/(5)
neck="Mizu. Kubikazari", --10
ring2="Mujin Band", --(5)
back=gear.BLM_MAB_Cape, --5
}
sets.magic_burst.Resistant = {
feet="Merlinic Crackows", --11
neck="Sanctity Necklace",
}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
main="Maxentius",
sub="Ammurapi Shield",
head="Blistering Sallet +1",
body="Jhakri Robe +2",
hands="Gazu Bracelet +1",
legs=gear.Telchine_ENH_legs,
feet="Battlecast Gaiters",
neck="Combatant's Torque",
ear1="Cessance Earring",
ear2="Telos Earring",
ring1="Hetairoi Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
back="Relucent Cape",
}
sets.buff.Doom = {
neck="Nicander's Necklace", --20
ring1={name="Eshmun's Ring", bag="wardrobe3"}, --20
ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
sets.DarkAffinity = {head="Pixie Hairpin +1",ring2="Archon Ring"}
sets.Obi = {waist="Hachirin-no-Obi"}
-- sets.CP = {back="Mecisto. Mantle"}
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_precast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' and state.DeathMode.value then
eventArgs.handled = true
equip(sets.precast.FC.DeathMode)
if spell.english == "Impact" then
equip(sets.precast.FC.Impact.DeathMode)
end
end
if spell.name:startswith('Aspir') then
refine_various_spells(spell, action, spellMap, eventArgs)
end
if buffactive['Mana Wall'] then
equip(sets.precast.JA['Mana Wall'])
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.name == 'Impact' then
equip(sets.precast.FC.Impact)
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)
if spell.action_type == 'Magic' and state.DeathMode.value then
eventArgs.handled = true
if spell.skill == 'Elemental Magic' then
equip(sets.midcast['Elemental Magic'].DeathMode)
else
if state.CastingMode.value == "Resistant" then
equip(sets.midcast.Death.Resistant)
else
equip(sets.midcast.Death)
end
end
end
if buffactive['Mana Wall'] then
equip(sets.precast.JA['Mana Wall'])
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Enhancing Magic' and classes.NoSkillSpells:contains(spell.english) and not state.DeathMode.value then
equip(sets.midcast.EnhancingDuration)
if spellMap == 'Refresh' then
equip(sets.midcast.Refresh)
end
end
if spell.skill == 'Elemental Magic' and spell.english == "Comet" then
equip(sets.DarkAffinity)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and spell.english ~= 'Death' then
--if state.CastingMode.value == "Resistant" then
--equip(sets.magic_burst.Resistant)
--else
equip(sets.magic_burst)
--end
if spell.english == "Impact" then
equip(sets.midcast.Impact)
end
end
if (spell.element == world.day_element or spell.element == world.weather_element) then
equip(sets.Obi)
end
end
if buffactive['Mana Wall'] then
equip(sets.precast.JA['Mana Wall'])
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english == "Sleep II" or spell.english == "Sleepga II" then
send_command('@timers c "Sleep II ['..spell.target.name..']" 90 down spells/00259.png')
elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
send_command('@timers c "Sleep ['..spell.target.name..']" 60 down spells/00253.png')
elseif spell.english == "Break" or spell.english == "Breakga" then
send_command('@timers c "Break ['..spell.target.name..']" 30 down spells/00255.png')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock armor when Mana Wall buff is lost.
if buff== "Mana Wall" then
if gain then
--send_command('gs enable all')
equip(sets.precast.JA['Mana Wall'])
--send_command('gs disable all')
else
--send_command('gs enable all')
handle_equipping_gear(player.status)
end
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
send_command('@input /p Doomed.')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('main','sub')
else
enable('main','sub')
end
end
-- latent DT set auto equip on HP% change
windower.register_event('hpp change', function(new, old)
if new<=25 then
equip(sets.latent_dt)
end
end)
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
check_moving()
end
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
end
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == "Enfeebling Magic" then
if spell.type == "WhiteMagic" then
return "MndEnfeebles"
else
return "IntEnfeebles"
end
end
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.DeathMode.value then
idleSet = sets.idle.DeathMode
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if player.hpp <= 25 then
idleSet = set_combine(idleSet, sets.latent_dt)
end
-- if state.CP.current == 'on' then
-- equip(sets.CP)
-- disable('back')
-- else
-- enable('back')
-- end
if buffactive['Mana Wall'] then
idleSet = set_combine(idleSet, sets.precast.JA['Mana Wall'])
end
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if buffactive['Mana Wall'] then
meleeSet = set_combine(meleeSet, sets.precast.JA['Mana Wall'])
end
return meleeSet
end
function customize_defense_set(defenseSet)
if buffactive['Mana Wall'] then
defenseSet = set_combine(defenseSet, sets.precast.JA['Mana Wall'])
end
return defenseSet
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local c_msg = state.CastingMode.value
local d_msg = 'None'
if state.DefenseMode.value ~= 'None' then
d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
end
local i_msg = state.IdleMode.value
local msg = ''
if state.MagicBurst.value then
msg = ' Burst: On |'
end
if state.DeathMode.value then
msg = msg .. ' Death: On |'
end
if state.Kiting.value then
msg = msg .. ' Kiting: On |'
end
add_to_chat(060, '| Magic: ' ..string.char(31,001)..c_msg.. string.char(31,002).. ' |'
..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002).. ' |'
..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002).. ' |'
..string.char(31,002)..msg)
eventArgs.handled = true
end
function refine_various_spells(spell, action, spellMap, eventArgs)
local aspirs = S{'Aspir','Aspir II','Aspir III'}
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' are on cooldown. Cancelling.'
local spell_index
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.name) then
spell_index = table.find(degrade_array['Aspirs'],spell.name)
if spell_index > 1 then
newSpell = degrade_array['Aspirs'][spell_index - 1]
send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
eventArgs.cancel = true
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function job_self_command(cmdParams, eventArgs)
gearinfo(cmdParams, eventArgs)
end
function gearinfo(cmdParams, eventArgs)
if cmdParams[1] == 'gearinfo' then
if type(cmdParams[4]) == 'string' then
if cmdParams[4] == 'true' then
moving = true
elseif cmdParams[4] == 'false' then
moving = false
end
end
if not midaction() then
job_update()
end
end
end
function check_moving()
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if state.Auto_Kite.value == false and moving then
state.Auto_Kite:set(true)
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
end
end
end
function check_gear()
if no_swap_gear:contains(player.equipment.left_ring) then
disable("ring1")
else
enable("ring1")
end
if no_swap_gear:contains(player.equipment.right_ring) then
disable("ring2")
else
enable("ring2")
end
end
windower.register_event('zone change',
function()
if no_swap_gear:contains(player.equipment.left_ring) then
enable("ring1")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.right_ring) then
enable("ring2")
equip(sets.idle)
end
end
)
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 5)
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end