-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnafay_SCH.lua
844 lines (745 loc) · 29.2 KB
/
Unafay_SCH.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
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- 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()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder", "Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV","Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"
}
info.mid_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder", "Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
}
info.high_nukes = S{"Geohelix II", "Pyrohelix II", "Hydrohelix II", "Anemohelix II", "Cryohelix II", "Ionohelix II", "Noctohelix II", "Luminohelix II","Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV","Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"
}
send_command('bind ^` input /ma Stun <t>')
select_default_macro_book()
end
function user_unload()
send_command('unbind ^`')
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['Sublimation'] ={
main="Musa",
sub="Clerisy strap +1",
ammo="Incanter stone",
head="Acad. Mortar. +3",
body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
hands="",
legs="Amalric Slops +1",
feet="Amalric Nails +1",
neck= "Sanctity Necklace",
waist="Embla Sash",
left_ear="Savant's Earring",
right_ear="Etiolation Earring",
left_ring="",
right_ring="",
back="Fi Follet Cape +1",
}
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants +3"}
sets.precast.JA['Dark Arts'] = {body="Acad. Gown +3"}
sets.precast.JA['Light Arts'] = {legs="Acad. Pants +3"}
sets.precast.JA['Enlightenment'] = {body="Peda. Gown +3"}
-- Fast cast sets for Elemental spells
sets.precast.FC = {
main="Musa", --10
sub="Clerisy Strap +1", --3
ammo="Sapience Orb", --2
head="Amalric coif +1", --11
body="Merlinic Jubbah", --9
hands="Acad. Bracers +3", --9
legs="Volte brais", --8
feet="Amalric nails +1", --6
neck="Orunmila's Torque", --4
waist="Embla Sash", --5
left_ear="Malignance Earring", --4
right_ear="Enchanter's earring +1", --2
left_ring="Kishar Ring", --4
right_ring="Lebeche Ring", --
back={ name="Lugh's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Phys. dmg. taken-10%',}},
}
sets.precast.Impact = set_combine(sets.midcast['Elemental Magic'], {body="Twilight Cloak"})
-- Midcast Sets
sets.midcast.Cure = {
main="Daybreak",
sub="Sors Shield",
ammo="Sapience Orb",
head={ name="Kaykaus Mitra +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
body="Kaykaus Bliaut",
hands={ name="Peda. Bracers +3", augments={'Enh. "Tranquility" and "Equanimity"',}},
legs="Volte brais",
feet="Amalric nails +1",
neck="Incanter's Torque",
waist="Luminary Sash",
left_ear="Meili Earring",
right_ear="Mendi. Earring",
left_ring="Ephedra Ring",
right_ring="Sirona's Ring",
back="Pahtli Cape",
}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {
main="Musa",
sub="Oneiros grip",
head="Arbatel Bonnet +2",
neck="Incanter's Torque",
ear1="Andoaa Earring",
ear2="Mimir earring",
body="Telchine chasuble",
hands="Arbatel bracers +2",
Ring1="Stikini Ring +1",
Ring2="Stikini Ring +1",
back={ name="Lugh's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Phys. dmg. taken-10%',}},
waist="Embla Sash",
legs="Telchine Braconi",
feet="Telchine Pigaches"
}
sets.midcast.Haste = {
main="Musa",
sub="",ammo="Savant's Treatise",
head="Telchine Cap",neck="Incanter's Torque",ear1="Andoaa Earring",
body="Peda. Gown +3",hands="Telchine Gloves",Ring1="Stikini Ring +1",Ring2="Stikini Ring",
back="Fi Follet +1",waist="Embla Sash",legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Cursna = {
main="Gada",
sub="",
ammo="Incantor Stone",
head="Vanya hood",
neck="Malison medallion",
ear1="Meili earring",
ear2="Beatific earring",
body="Pedagogy gown +3",
hands="Hieros mittens",
ring1="Haoma's ring",
ring2="Menelaus's ring",
back="Oretania's cape +1",
waist="Bishop's sash",
legs="Volte brais",
feet="Vanya clogs",
}
sets.midcast['Enhancing Magic'] = {
main="Musa",
sub="",
ammo="Savant's Treatise",
head="Telchine Cap",
neck="Incanter's Torque",
ear1="Andoaa Earring",
ear2="Mimir Earring",
body="Peda. Gown +3",
hands="Arbatel bracers +3",
Ring1="Stikini Ring +1",
Ring2="Stikini Ring +1",
back="Fi Follet Cape +1",
waist="Embla sash",
legs="Telchine Braconi",
feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
neck="Nodens Gorget",
waist="Siegel Sash",
})
sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
waist="Gishdubar Sash",
feet="Insprited boots"})
sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'])
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring2="Sheltered Ring"})
sets.midcast.Protectra = sets.midcast.Protect
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring2="Sheltered Ring"})
sets.midcast.Shellra = sets.midcast.Shell
-- Custom spell classes
sets.midcast.MndEnfeebles = {
main="Bunzi's rod",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Acad. Mortar. +3",
body="Acad. Gown +3",
hands="Acad. Bracers +3",
legs="Arbatel pants +2",
feet="Acad. Loafers +3",
neck=="Argute Stole +2",
waist="Luminary sash",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Stikini Ring +1",
right_ring="Stikini ring +1",
back={ name="Aurist's Cape +1", augments={'Path: A',}},
}
sets.midcast.IntEnfeebles = {
main="Maxentius",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Acad. Mortar. +3",
body="Acad. Gown +3",
hands="Acad. Bracers +3",
legs="Acad. Pants +3",
feet="Acad. Loafers +3",
neck="Argute Stole +2",
waist="Channeler's stone",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Stikini Ring +1",
right_ring="Freke ring",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast['Dark Magic'] = {
main="Maxentius",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",
body="Acad. Gown +3",
hands="Acad. Bracers +3",
legs={ name="Peda. Pants +3", augments={'Enhances "Tabula Rasa" effect',}},
feet="Merlinic Crackows",
neck="Erra Pendant",
waist="Fucho-no-Obi",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Freke ring",
right_ring="Archon Ring",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
sets.midcast.Kaustra = {
main={ name="Akademos", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Enki Strap",
ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",
body="Shamash robe",
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs={ name="Amalric Slops +1", augments={'MP+80','"Mag.Atk.Bns."+25','Enmity-6',}},
feet="Agwu's pigaches",
neck="Argute Stole +2",
waist="Hachirin-no-Obi",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Archon Ring",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
sets.midcast.Drain = {
main="Maxentius",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",
body="Acad. Gown +3",
hands="Acad. Bracers +3",
legs={ name="Peda. Pants +3", augments={'Enhances "Tabula Rasa" effect',}},
feet={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+26','Magic burst dmg.+10%','Mag. Acc.+13',}},
neck="Erra Pendant",
waist="Fucho-no-Obi",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Evanescence Ring",
right_ring="Archon Ring",
back={ name="Bookworm's Cape", augments={'INT+2','MND+1','Helix eff. dur. +20','"Regen" potency+6',}},
}
sets.midcast.Stun = {
main="Maxentius",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Acad. Mortar. +3",
body="Acad. Gown +3",
hands="Acad. Bracers +3",
legs="Acad. Pants +3",
feet="Acad. Loafers +3",
neck="Argute Stole +2",
waist="Sacro Cord",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Stikini Ring +1",
right_ring="Freke ring",
back="",
}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Akademos"})
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {
main="Daybreak",
sub="Ammurapi shield",
ammo="Pemphredo tathlum",
head="Peda. M.Board +3",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
legs="Amalric Slops +1",
feet="Academic's loafers +3",
neck="Argute Stole +2",
waist="Hachirin-no-Obi",
left_ear="Malignance Earring",
right_ear="Regal Earring",
left_ring="Freke ring",
right_ring="Mujin band",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
sets.midcast['Elemental Magic'].MidTierNuke = {
main="Daybreak",
sub="Ammurapi shield",
ammo="Pemphredo tathlum",
head="Peda. M.Board +3",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
legs="Amalric Slops +1",
feet="Academic's loafers +3",
neck="Argute Stole +2",
waist="Hachirin-no-Obi",
left_ear="Malignance Earring",
right_ear="Regal Earring",
left_ring="Freke ring",
right_ring="Mujin band",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
-- Custom refinements for certain nuke tiers
sets.midcast['Elemental Magic'].HighTierNuke = {
main="Daybreak",
sub="Ammurapi shield",
ammo="Pemphredo tathlum",
head="Peda. M.Board +3",
body="Amalric Doublet +1",
hands="Amalric Gages +1",
legs="Amalric Slops +1",
feet="Academic's loafers +3",
neck="Argute Stole +2",
waist="Hachirin-no-Obi",
left_ear="Malignance Earring",
right_ear="Regal Earring",
left_ring="Freke ring",
right_ring="Mujin band",
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
sets.midcast.Helix = {
main="Bunzi's rod",
sub="Ammurapi shield",
ammo="Ghastly tathlum +1",
head="Agwu's cap",
body="Agwu's robe",
hands="Amalric Gages +1",
legs="Agwu's slops",
feet="Agwu's pigaches",
neck="Argute Stole +2",
waist="Orpheus's Sash",
left_ear="Regal Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Mujin band" ,
back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},
}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {
main="Boonwell Staff",
sub="Oneiros Grip",
ammo="Homiliary",
head="Befouled Crown",
body="Academic's gown +3",
hands="Volte gloves",
legs="Volte Brais",
feet="Battlecast gaiters",
neck="Bathy Choker",
waist="Fucho-no-Obi",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Stikini Ring +1",
right_ring="Defending ring",
back="Moonbeam Cape",
}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {
main="Musa",
sub="Khonsu",
ammo="Homiliary",
head="Gala corsage",
body="Shamash robe",
hands="Volte gloves",
legs="Volte brais",
feet="Volte gaiters",
neck="Loricate Torque +1",
waist="Fucho-no-Obi",
left_ear="",
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
sets.idle.Field = {
main="Daybreak",
sub="Genbu's shield",
ammo="Homiliary",
head="Befouled Crown",
body="Shamash robe",
hands="Nyame gauntlets",
legs="Volte brais",
feet="Nyame sollerets",
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Fucho-no-Obi",
left_ear="Moonshade earring",
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
sets.idle.Field.PDT = {
main="Daybreak",
sub="Genbu's shield",
ammo="Homiliary",
head="Befouled Crown",
body="Shamash robe",
hands="Nyame gauntlets",
legs="Volte brais",
feet="Nyame sollerets",
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Fucho-no-Obi",
left_ear="Moonshade earring",
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
sets.idle.Weak = {
main="Daybreak",
sub="Genbu's shield",
ammo="Homiliary",
head="Befouled Crown",
body="Shamash robe",
hands="Nyame gauntlets",
legs="Volte brais",
feet="Nyame sollerets",
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Fucho-no-Obi",
left_ear="Moonshade earring",
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
-- Defense sets
sets.defense.PDT = {
main="Musa",
sub="Khonsu",
ammo="Homiliary",
head="Befouled Crown",
body="Academic's gown +3",
hands={ name="Kaykaus Cuffs", augments={'MP+60','MND+10','Mag. Acc.+15',}},
legs="Volte brais",
feet="Volte gaiters",
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Fucho-no-Obi",
left_ear={ name="Odnowa Earring +1", augments={'Path: A',}},
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- 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="Malignance Pole",
sub="Oneiros grip",
ammo="Homiliary",
head="Befouled Crown",
body="Academic's gown +3",
hands={ name="Kaykaus Cuffs", augments={'MP+60','MND+10','Mag. Acc.+15',}},
legs="Volte brais",
feet={ name="Merlinic Crackows", augments={'INT+6','Weapon Skill Acc.+3','"Refresh"+2','Mag. Acc.+12 "Mag.Atk.Bns."+12',}},
neck={ name="Loricate Torque +1", augments={'Path: A',}},
waist="Fucho-no-Obi",
left_ear={ name="Odnowa Earring +1", augments={'Path: A',}},
right_ear="Etiolation Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back="Moonbeam Cape",
}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Rapture'] = {head="Arbatel Bonnet +2"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers +3"}
sets.buff['Immanence'] = {hands="Arbatel Bracers +3"}
sets.buff['Penury'] = {legs="Arbatel Pants +2"}
sets.buff['Parsimony'] = {legs="Arbatel Pants +2"}
sets.buff['Celerity'] = {feet="Pedagogy Loafers +3"}
sets.buff['Alacrity'] = {feet="Pedagogy Loafers +3"}
sets.buff.FullSublimation = {head="Academic's Mortarboard +3",ear1="Savant's Earring",body="Pedagogy Gown +3",waist="Embla Sash"}
--sets.buff['Sandstorm'] = {feet="Desert Boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
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)
if buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == "Phalanx" then
windower.send_command("send @run gs equip sets.Resting;wait 3;send @run gs c update")
end
end
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
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)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local strategem = cmdParams[2]:lower()
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('input /ja Accession <me>')
elseif strategem == 'power' then
send_command('input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
-- Gets the current number of available strategems based on the recast remaining
-- and the level of the sch.
function get_current_strategem_count()
-- returns recast in seconds.
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = (player.main_job_level + 10) / 20
local fullRechargeTime = 4*60
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 13)
end