-
Notifications
You must be signed in to change notification settings - Fork 0
/
Varrout_SMN.lua
1133 lines (986 loc) · 43.3 KB
/
Varrout_SMN.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
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Also, you'll need the Shortcuts addon to handle the auto-targetting of the custom pact commands.
--[[
Custom commands:
gs c petweather
Automatically casts the storm appropriate for the current avatar, if possible.
gs c siphon
Automatically run the process to: dismiss the current avatar; cast appropriate
weather; summon the appropriate spirit; Elemental Siphon; release the spirit;
and re-summon the avatar.
Will not cast weather you do not have access to.
Will not re-summon the avatar if one was not out in the first place.
Will not release the spirit if it was out before the command was issued.
gs c pact [PactType]
Attempts to use the indicated pact type for the current avatar.
PactType can be one of:
cure
curaga
buffOffense
buffDefense
buffSpecial
debuff1
debuff2
sleep
nuke2
nuke4
bp70
bp75 (merits and lvl 75-80 pacts)
astralflow
--]]
-- 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()
-- Load common lua lists and functions
include('common_lists.lua')
include('common_functions.lua')
state.Buff["Avatar's Favor"] = buffactive["Avatar's Favor"] or false
state.Buff["Astral Conduit"] = buffactive["Astral Conduit"] or false
spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith", "Siren", "Atmos"}
magicalRagePacts = S{
'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgment Bolt','Searing Light','Howling Moon','Ruinous Omen',
'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
'Thunderspark','Burning Strike','Meteorite','Nether Blast','Flaming Crush',
'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
'Holy Mist','Lunar Bay','Impact','Night Terror','Level ? Holy','Conflag Strike'}
meritBloopPacts = S{'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm'}
pacts = {}
pacts.cure = {
['Carbuncle']='Healing Ruby'
}
pacts.curaga = {
['Carbuncle']='Healing Ruby II',
['Garuda']='Whispering Wind',
['Leviathan']='Spring Water'
}
pacts.buffoffense = {
['Carbuncle']='Glittering Ruby',
['Ifrit']='Crimson Howl',
['Garuda']='Hastega',
['Ramuh']='Rolling Thunder',
['Fenrir']='Ecliptic Growl'
}
pacts.buffdefense = {
['Carbuncle']='Shining Ruby',
['Shiva']='Frost Armor',
['Garuda']='Aerial Armor',
['Titan']='Earthen Ward',
['Ramuh']='Lightning Armor',
['Fenrir']='Ecliptic Howl',
['Diabolos']='Noctoshield',
['Cait Sith']='Reraise II'
}
pacts.buffspecial = {
['Ifrit']='Inferno Howl',
['Garuda']='Fleet Wind',
['Titan']='Earthen Armor',
['Diabolos']='Dream Shroud',
['Carbuncle']='Soothing Ruby',
['Fenrir']='Heavenward Howl',
['Cait Sith']='Raise II'
}
pacts.debuff1 = {
['Shiva']='Diamond Storm',
['Ramuh']='Shock Squall',
['Leviathan']='Tidal Roar',
['Fenrir']='Lunar Cry',
['Diabolos']='Pavor Nocturnus',
['Cait Sith']='Eerie Eye'
}
pacts.debuff2 = {
['Shiva']='Sleepga',
['Leviathan']='Slowga',
['Fenrir']='Lunar Roar',
['Diabolos']='Somnolence'
}
pacts.sleep = {
['Shiva']='Sleepga',
['Diabolos']='Nightmare',
['Cait Sith']='Mewing Lullaby'
}
pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
['Ramuh']='Thunder II', ['Leviathan']='Water II'}
pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
pacts.bp70 = {
['Ifrit']='Flaming Crush',
['Shiva']='Rush',
['Garuda']='Predator Claws',
['Titan']='Mountain Buster',
['Ramuh']='Volt Strike',
['Leviathan']='Spinning Dive',
['Carbuncle']='Meteorite',
['Fenrir']='Eclipse Bite',
['Diabolos']='Nether Blast',
['Cait Sith']='Regal Scratch'
}
pacts.bp75 = {
['Ifrit']='Meteor Strike',
['Shiva']='Heavenly Strike',
['Garuda']='Wind Blade',
['Titan']='Geocrush',
['Ramuh']='Thunderstorm',
['Leviathan']='Grand Fall',
['Carbuncle']='Holy Mist',
['Fenrir']='Lunar Bay',
['Diabolos']='Night Terror',
['Cait Sith']='Level ? Holy',
['Siren']='Hysteric Assault'
}
pacts.astralflow = {
['Ifrit']='Inferno',
['Shiva']='Diamond Dust',
['Garuda']='Aerial Blast',
['Titan']='Earthen Fury',
['Ramuh']='Judgment Bolt',
['Leviathan']='Tidal Wave',
['Carbuncle']='Searing Light',
['Fenrir']='Howling Moon',
['Diabolos']='Ruinous Omen',
['Cait Sith']="Altana's Favor",
['Siren']='Clarsach Call'
}
pacts.pb99 = {
['Ifrit']='Conflag Strike', -- Fire damage, burn
['Shiva']='Rush', -- Lv70
['Garuda']='Predator Claws', -- Lv70
['Titan']='Crag Throw', -- Single hit, slow
['Ramuh']='Volt Strike', -- 3-Hit, Stun
['Leviathan']='Spinning Dive', -- Lv70
['Carbuncle']='Meteorite', -- Lv70
['Fenrir']='Impact', -- Dark damage
['Diabolos']='Blindside', -- Single hit
['Cait Sith']='Regal Gash', -- 3-Hit
['Siren']='Hysteric Assault' -- Lv70
}
-- Wards table for creating custom timers
wards = {}
-- Base duration for ward pacts.
wards.durations = {
['Crimson Howl'] = 60, ['Earthen Armor'] = 60, ['Inferno Howl'] = 60,
['Heavenward Howl'] = 60, ['Rolling Thunder'] = 120, ['Fleet Wind'] = 120,
['Shining Ruby'] = 180, ['Frost Armor'] = 180, ['Lightning Armor'] = 180,
['Ecliptic Growl'] = 180, ['Glittering Ruby'] = 180, ['Hastega'] = 180,
['Noctoshield'] = 180, ['Ecliptic Howl'] = 180, ['Dream Shroud'] = 180,
['Reraise II'] = 3600
}
-- Icons to use when creating the custom timer.
-- wards.icons = {
-- ['Earthen Armor'] = 'spells/00299.png', -- 00299 for Titan
-- ['Shining Ruby'] = 'spells/00043.png', -- 00043 for Protect
-- ['Dream Shroud'] = 'spells/00304.png', -- 00304 for Diabolos
-- ['Noctoshield'] = 'spells/00106.png', -- 00106 for Phalanx
-- ['Inferno Howl'] = 'spells/00298.png', -- 00298 for Ifrit
-- ['Hastega'] = 'spells/00358.png', -- 00358 for Hastega
-- ['Rolling Thunder'] = 'spells/00104.png', -- 00358 for Enthunder
-- ['Frost Armor'] = 'spells/00250.png', -- 00250 for Ice Spikes
-- ['Lightning Armor'] = 'spells/00251.png', -- 00251 for Shock Spikes
-- ['Reraise II'] = 'spells/00135.png', -- 00135 for Reraise
-- ['Fleet Wind'] = 'abilities/00074.png', --
-- }
-- Flags for code to get around the issue of slow skill updates.
wards.flag = false
wards.spell = ''
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', 'Acc')
-- state.CastingMode:options('Normal', 'Resistant')
-- state.IdleMode:options('Normal', 'PDT')
gear.perp_staff = {name=""}
select_default_macro_book()
end
function job_handle_equipping_gear(playerStatus, eventArgs)
check_special_ring_equipped()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
gear.ArtefactHead = "Convoker's Horn +2"
gear.ArtefactBody = "Convoker's Doublet +2 "
gear.ArtefactHands = "Convoker's Bracers +2"
gear.ArtefactLegs = "Convoker's Spats +2"
gear.ArtefactFeet = "Convoker's Pigaches +2"
gear.RelicHead = "Glyphic Horn +1"
gear.RelicBody = "Glyphic Doublet +1"
gear.RelicHands = "Glyphic Bracers +1"
gear.RelicLegs = "Glyphic Spats +1"
gear.RelicFeet = "Glyphic Pigaches +1"
gear.EmpyreanHead = "Beckoner's Horn +1"
gear.EmpyreanBody = "Beckoner's Doublet +1"
gear.EmpyreanHands = "Beckoner's Bracers +1"
gear.EmpyreanLegs = "Beckoner's Spats +1"
gear.EmpyreanFeet = "Beckoner's Pigaches +1"
gear.EmpyreanEarring = "Beckoner's Earring +1"
gear.DynamisNeck = ""
gear.AmbuscadeCapePhys = { name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}}
gear.AmbuscadeCapeMagic = { name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Pet: Magic Damage+10',}}
gear.ApogeeFeetPhys = { name="Apogee Pumps", augments={'MP+60','Pet: Attack+30','Blood Pact Dmg.+7',}}
gear.ApogeeFeedMagic = { name="Apogee Pumps", augments={'MP+60','Pet: "Mag.Atk.Bns."+30','Blood Pact Dmg.+7',}}
gear.MerlinicHandsMagicAtt = { name="Merlinic Dastanas", augments={'Pet: "Mag.Atk.Bns."+27','Blood Pact Dmg.+4','Pet: DEX+7','Pet: Mag. Acc.+7',}}
gear.MerlinicHandsPhysAtt = { name="Merlinic Dastanas", augments={'Pet: Attack+18 Pet: Rng.Atk.+18','Blood Pact Dmg.+9','Pet: CHR+4','Pet: Mag. Acc.+2',}}
--------------------------------------
-- Idle/Resting/Defense/Etc Sets
--------------------------------------
-- Resting sets
sets.resting = {
main = "Boonwell Staff",
sub = "Ariesian Grip",
ammo = "Mana Ampulla",
head = "Orvail Corona +1",
body = "Chelona Blazer",
hands = "Nares Cuffs",
legs = "Nisse Slacks",
feet = "Chelona Boots",
neck = "Eidolon Pendant +1",
waist = "Austerity Belt",
left_ear = { name = "Moonshade Earring",
augments = {'MP+25','Latent effect: "Refresh"+1',}},
right_ear = gear.EmpyreanEarring,
left_ring = "Angha Ring",
right_ring = "Star Ring",
back = "Felicitas Cape",
}
-- Idle sets
sets.idle = {
main = { name = "Mpaca's Staff",
augments = {'Path: A',}},
sub = "Enki Strap",
ammo = "Sancus Sachet",
head = gear.ArtefactHead,
body = "Shomonjijoe +1",
hands = "Inyan. Dastanas +2",
legs = "Inyanga Shalwar +2",
feet = "Inyan. Crackows +2",
neck = { name = "Loricate Torque +1",
augments = {'Path: A',}},
waist = "Platinum Moogle Belt",
left_ear = { name = "Moonshade Earring",
augments = {'MP+25','Latent effect: "Refresh"+1',}},
right_ear = gear.EmpyreanEarring,
left_ring = "Stikini Ring +1",
right_ring = "Inyanga Ring",
back = "Solemnity Cape",
}
sets.idle.LatentRefresh = {
waist="Fucho-no-Obi",
}
-- perp costs:
-- spirits: 7
-- carby: 11 (5 with mitts)
-- fenrir: 13
-- others: 15
-- avatar's favor: -4/tick
-- Max useful -perp gear is 1 less than the perp cost (can't be reduced below 1)
-- Aim for -14 perp, and refresh in other slots.
-- -perp gear:
-- Gridarvor: -5
-- gear.RelicHead: -4
-- gear.EmpyeanBody: -6
-- Evoker's Ring: -1
-- gear.ArtefactFeet: -5
-- total: -18
-- Can make due without either the head or the body, and use +refresh items in those slots.
-- Idle. Pet not engaged. +10 Refresh. Pet Regain, Regen, Damage taken -5%
sets.idle.Avatar = {
main = { name = "Gridarvor",
augments = {'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
sub = "Vox Grip",
ammo = "Sancus Sachet",
head = gear.ArtefactHead,
body = "Shomonjijoe +1",
hands = gear.ArtefactHands,
legs = "Assid. Pants +1",
feet = gear.ApogeeFeetPhys,
neck = "Caller's Pendant",
waist = "Isa Belt",
left_ear = "Lodurr Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Stikini Ring +1",
right_ring = "Evoker's Ring",
back = gear.AmbuscadeCapePhys,
}
sets.idle.Avatar.Favor = {
head=gear.EmpyreanHead
}
sets.idle.Avatar.Melee = {
main = { name = "Gridarvor",
augments = {'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
sub = "Vox Grip",
ammo = "Sancus Sachet",
head = gear.ArtefactHead,
body = "Shomonjijoe +1",
hands = gear.ArtefactHands,
legs = gear.ArtefactLegs,
feet = gear.ApogeeFeetPhys,
neck = "Shulmanu Collar",
waist = "Incarnation Sash",
left_ear = "Lugalbanda Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Varar Ring +1",
right_ring = "Varar Ring +1",
back = gear.AmbuscadeCapePhys,
}
sets.idle.Spirit = set_combine(sets.idle.Avatar, {
legs = gear.RelicLegs,
neck = "Incanter's Torque",
waist = "Lucidity Sash",
})
--------------------------------------
-- Summonging Magic Related Sets
--------------------------------------
sets.SummoningMagic = {
main = { name = "Espiritus", -- +15
augments = {'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
sub = "Vox Grip", -- + 3
-- ammo="Sancus Sachet",
head = gear.ArtefactHead, -- +17
body = gear.EmpyreanBody, -- +14
hands = "Lamassu Mitts +1", -- +22
legs = gear.EmpyreanLegs, -- +20
-- feet="",
neck = "Incanter's Torque", -- +10
waist = "Lucidity Sash", -- + 7
left_ear = "Lodurr Earring", -- +10
right_ear = "Andoaa Earring", -- + 5
left_ring = "Stikini Ring +1", -- + 8
right_ring = "Evoker's Ring", -- +10
back = { name = "Conveyance Cape", -- +10
augments = {'Summoning magic skill +2','Pet: Enmity+14','Blood Pact Dmg.+1','Blood Pact ab. del. II -2',}},
}
sets.precast.JA["Elemental Siphon"] = set_combine(sets.SummoningMagic, {
ammo = "Esper Stone +1", -- +20
hands = { name = "Telchine Gloves", -- +35
augments = {'Pet: "Mag.Atk.Bns."+18','"Elemental Siphon"+35','Enh. Mag. eff. dur. +3',}},
legs = "Tatsu. Sitagoromo", -- +20
feet = gear.EmpyreanFeet, -- +60
})
sets.perp = {}
sets.perp.Alexander = sets.SummoningMagic
--------------------------------------
-- Precast Sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA['Astral Flow'] = {
head = gear.RelicHead
}
sets.precast.JA['Mana Cede'] = {
hands=gear.EmpyreanHands
}
-- Pact delay reduction gear
sets.precast.BloodPact = {
-- Totall BP: -16 (capped at -15)
head = "Accord Hat +1", -- BP: -9
hands = gear.RelicHands, -- BP: -6
-- Total BP2: -13
main = { name = "Espiritus", -- BP2: -2
augments = {'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
ammo = "Sancus Sachet", -- BP2: -6
body = gear.RelicBody, -- BP2: -2
feet = gear.RelicFeet, -- BP2: -1
back = "Conveyance Cape", -- BP2: -2 (Max -3)
}
sets.precast.BloodPactWard = sets.precast.BloodPact
sets.precast.BloodPactRage = sets.precast.BloodPact
-- Fast cast sets for spells
sets.precast.FC = {
main = "Oranyan", -- FC +7%
sub = "Clerisy Strap", -- FC +2%
head = "Revealer's Crown", -- FC +5%
body = "Inyanga Jubbah +2", -- FC +14%
hands = "Shrieker's Cuffs", -- 0%, Resist Silence +25
legs = "Orvail Pants +1", -- FC +5%
feet = "Regal Pumps +1", -- FC +4~7%
neck = "Baetyl Pendant", -- FC +4%
waist = "Embla Sash", -- FC +5%
left_ear = "Loquac. Earring", -- FC +2%
right_ear = "Etiolation Earring", -- FC +1%
left_ring = "Medada's Ring", -- FC +10%
right_ring = "Lebeche Ring", -- Quick Magic +2%
back = "Perimede Cape", -- Quick Magic +4%
}
sets.precast.FC["Enhancing Magic"] = set_combine(sets.precast.FC, {
waist = "Siegel Sash"
})
sets.precast.FC["Stoneskin"] = set_combine(sets.precast.FC["Enhancing Magic"], {
head = "Umuthi Hat",
hands = "Carapacho Cuffs",
legs = "Doyen Pants",
})
sets.precast.FC["Healing Magic"] = set_combine(sets.precast.FC, {
main = "Vadose Rod",
sub = "Culminus"
})
sets.precast.FC["Cure"] = set_combine({sets.precast.FC["Healing Magic"],
main = "Vadose Rod",
sub = "Sors Shield",
head = { name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body = "Heka's Kalasiris",
legs = "Doyen Pants",
feet = { name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
right_ear = "Mendi. Earring",
back = "Pahtli Cape",
})
sets.precast.FC["Curaga"] = sets.precast.FC["Cure"]
sets.precast.WS = {}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.Cure = {
main = "Raetic Rod",
sub = "Sors Shield",
ammo = "Quartz Tathlum +1",
head = { name = "Vanya Hood",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body = "Heka's Kalasiris",
hands = "Inyan. Dastanas +2",
legs = "Assid. Pants +1",
feet = { name = "Vanya Clogs",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
neck = "Incanter's Torque",
waist = "Bishop's Sash",
left_ear = "Beatific Earring",
right_ear = "Meili Earring",
left_ring = "Jann. Ring +1",
right_ring = "Sirona's Ring",
back = "Altruistic Cape",
}
sets.midcast.CureWeather = set_combine(sets.midcast.Cure, {
waist = "Hachirin-no-Obi",
back = "Twilight Cape",
})
sets.midcast["Enhancing Magic"] = {
main = "Oranyan",
sub = "Fulcio Grip",
ammo = "Sancus Sachet",
head = "Befouled Crown",
body = "Anhur Robe",
hands = "Inyan. Dastanas +2",
legs = "Shedir Seraweels",
feet = { name = "Telchine Pigaches",
augments = {'Enh. Mag. eff. dur. +8',}},
neck = "Incanter's Torque",
waist = "Embla Sash",
left_ear = "Mimir Earring",
right_ear = "Andoaa Earring",
left_ring = "Stikini Ring +1",
right_ring = "Stikini Ring",
back = "Merciful Cape",
}
sets.midcast["Aquaveil"] = set_combine(sets.midcast["Enhancing Magic"], {
main = "Vadose Rod",
legs = "Shedir Seraweels",
waist = "Emphatikos Rope",
})
sets.midcast["Stoneskin"] = set_combine(sets.midcast["Enhancing Magic"], {
neck = "Nodens Gorget",
legs = "Shedir Seraweels",
right_ear = "Earthcry Earring",
waist = "Siegel Sash",
})
sets.midcast["Barspell"] = set_combine(sets.midcast["Enhancing Magic"], {
legs = "Shedir Seraweels",
})
-- Avatar pact sets. All pacts are Ability type.
sets.midcast.Pet.BloodPactWard = sets.SummoningMagic
sets.midcast.Pet.DebuffBloodPactWard = {
main = { name = "Espiritus",
augments = {'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
sub = "Vox Grip",
ammo = "Sancus Sachet",
head = gear.ArtefactHead,
body = gear.ArtefactBody,
hands = gear.ArtefactHands,
legs = gear.ArtefactLegs,
feet = gear.ArtefactFeet,
neck = "Adad Amulet",
waist = "Incarnation Sash",
left_ear = "Lugalbanda Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Tali'ah Ring",
right_ring = "Evoker's Ring",
back = gear.AmbuscadeCapeMagic,
}
sets.midcast.Pet.DebuffBloodPactWard.Acc = sets.midcast.Pet.DebuffBloodPactWard
sets.midcast.Pet.PhysicalBloodPactRage = {
main = { name = "Gridarvor",
augments = {'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
sub = "Elan Strap",
ammo = "Sancus Sachet",
head = { name = "Apogee Crown +1",
augments = {'Pet: Attack+25','Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+8',}},
body = gear.RelicBody,
hands = gear.MerlinicHandsPhysAtt,
legs = { name = "Helios Spats",
augments = {'Pet: "Mag.Atk.Bns."+26','Pet: Crit.hit rate +3',}},
feet = gear.ApogeeFeetPhys,
neck = "Shulmanu Collar",
waist = "Regal Belt",
left_ear = "Lugalbanda Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Varar Ring +1",
right_ring = "Varar Ring +1",
back = gear.AmbuscadeCapePhys,
}
sets.midcast.Pet.PhysicalBloodPactRage['Garuda'] = set_combine(sets.midcast.Pet.PhysicalBloodPactRage, {
head = "Kurara Hachigane",
})
sets.midcast.Pet.PhysicalBloodPactRage.Acc = {
main = { name = "Gridarvor",
augments = {'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
sub = "Elan Strap",
ammo = "Sancus Sachet",
head = gear.ArtefactHead,
body = gear.ArtefactBody,
hands = gear.ArtefactHands,
legs = gear.ArtefactLegs,
feet = gear.ArtefactFeet,
neck = "Shulmanu Collar",
waist = "Klouskap Sash",
left_ear = "Lugalbanda Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Varar Ring +1",
right_ring = "Varar Ring +1",
back = gear.AmbuscadeCapePhys,
}
sets.midcast.Pet.MagicalBloodPactRage = {
main = { name = "Espiritus",
augments = {'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
sub = "Elan Strap",
ammo = "Sancus Sachet",
head = { name = "Apogee Crown +1",
augments = {'Pet: Attack+25','Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+8',}},
body = gear.ArtefactBody,
hands = gear.MerlinicHandsMagicAtt,
legs = { name="Helios Spats", augments={'Pet: "Mag.Atk.Bns."+26','Pet: Crit.hit rate +3',}},
feet = gear.ApogeeFeedMagic,
neck = "Adad Amulet",
waist = "Regal Belt",
left_ear = "Lugalbanda Earring",
right_ear = gear.EmpyreanEarring,
left_ring = "Varar Ring +1",
right_ring = "Varar Ring +1",
back = gear.AmbuscadeCapeMagic,
}
sets.midcast.Pet.MagicalBloodPactRage['Ifrit'] = set_combine(sets.midcast.Pet.MagicalBloodPactRage, {
ring2 = "Fervor Ring"
})
sets.midcast.Pet.MagicalBloodPactRage.Acc = sets.midcast.Pet.MagicalBloodPactRage
sets.midcast.Pet.MeritBP = set_combine(sets.midcast.Pet.MagicalBloodPactRage, {
body = gear.RelicBody,
hands = gear.RelicHands,
legs = gear.RelicLegs,
feet = gear.RelicFeet,
})
sets.midcast.Trust = {
main = "Bolelabunga",
sub = "Ammurapi Shield",
ammo = "Sancus Sachet",
head = "Inyanga Tiara +2",
body = "Inyanga Jubbah +2",
hands = "Inyanga Dastanas +2",
legs = "Inyanga Shalwar +2",
feet = "Inyanga Crackows +2"
}
-- sets.perp = {}
-- -- Caller's Bracer's halve the perp cost after other costs are accounted for.
-- -- Using -10 (Gridavor, ring, Conv.feet), standard avatars would then cost 5, halved to 2.
-- -- We can then use Hagondes Coat and end up with the same net MP cost, but significantly better defense.
-- -- Weather is the same, but we can also use the latent on the pendant to negate the last point lost.
-- -- sets.perp.Day = {hands="Caller's Bracers +2"}
-- -- sets.perp.Weather = {neck="Caller's Pendant",hands="Caller's Bracers +2"}
-- -- Carby: Mitts+Conv.feet = 1/tick perp. Everything else should be +refresh
-- -- sets.perp.Carbuncle = {main="Bolelabunga",sub="Genbu's Shield",
-- -- head=gear.ArtefactHead,body="Hagondes Coat",hands="Carbuncle Mitts",legs="Nares Trews",feet=gear.ArtefactFeet}
-- -- Diabolos's Rope doesn't gain us anything at this time
-- --sets.perp.Diabolos = {waist="Diabolos's Rope"}
-- sets.perp.Alexander = sets.midcast.Pet.BloodPactWard
-- sets.perp.staff_and_grip = {main=gear.perp_staff,sub="Vox Grip"}
-- -- Defense sets
-- sets.defense.PDT = {main=gear.Staff.PDT,
-- head="Hagondes Hat",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
-- body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
-- -- back="Umbra Cape",
-- waist="Fucho-no-Obi",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- sets.defense.MDT = {
-- head="Hagondes Hat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
-- body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
-- -- back="Umbra Cape",
-- waist="Fucho-no-Obi",legs="Bokwus Slops",feet="Hagondes Sabots"}
sets.Kiting = {feet="Herald's Gaiters"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Normal melee group
-- sets.engaged = sets.idle.Avatar
-- {ammo="Sancus Sachet",
-- head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
-- body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
-- back="Conveyance Cape",
-- waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
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 state.Buff['Astral Conduit'] and pet_midaction() then
eventArgs.handled = true
end
end
function job_midcast(spell, action, spellMap, eventArgs)
if state.Buff['Astral Conduit'] and pet_midaction() then
eventArgs.handled = true
end
end
function job_pet_midcast(spell, action, spellMap, eventArgs)
if meritBloopPacts:contains(spell.name) then
equip(sets.midcast.Pet.MeritBP)
eventArgs.handled = true
return
end
end
-- Runs when pet completes an action.
function job_pet_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted and spell.type == 'BloodPactWard' and spellMap ~= 'DebuffBloodPactWard' then
wards.flag = true
wards.spell = spell.english
send_command('wait 4; gs c reset_ward_flag')
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 state.Buff[buff] ~= nil then
handle_equipping_gear(player.status)
elseif storms:contains(buff) then
handle_equipping_gear(player.status)
end
end
-- Called when the player's pet's status changes.
-- This is also called after pet_change after a pet is released. Check for pet validity.
function job_pet_status_change(newStatus, oldStatus, eventArgs)
if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
handle_equipping_gear(player.status, newStatus)
end
end
-- Called when a player gains or loses a pet.
-- pet == pet structure
-- gain == true if the pet was gained, false if it was lost.
function job_pet_change(petparam, gain)
classes.CustomIdleGroups:clear()
if gain then
if avatars:contains(pet.name) then
classes.CustomIdleGroups:append('Avatar')
elseif spirits:contains(pet.name) then
classes.CustomIdleGroups:append('Spirit')
end
-- else
-- select_default_macro_book('reset')
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell)
if spell.type == 'BloodPactRage' then
if magicalRagePacts:contains(spell.english) then
return 'MagicalBloodPactRage'
else
return 'PhysicalBloodPactRage'
end
elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
return 'DebuffBloodPactWard'
elseif spell.type == 'Trust' then
return 'Trust'
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if pet.isvalid then
-- if pet.element == world.day_element then
-- idleSet = set_combine(idleSet, sets.perp.Day)
-- end
-- if pet.element == world.weather_element then
-- idleSet = set_combine(idleSet, sets.perp.Weather)
-- end
-- if sets.perp[pet.name] then
-- idleSet = set_combine(idleSet, sets.perp[pet.name])
-- end
-- gear.perp_staff.name = elements.perpetuance_staff_of[pet.element]
-- if gear.perp_staff.name and (player.inventory[gear.perp_staff.name] or player.wardrobe[gear.perp_staff.name] or player.wardrobe2[gear.perp_staff.name]) then
-- idleSet = set_combine(idleSet, sets.perp.staff_and_grip)
-- end
-- Decide which pet set to equip: Avatar or Spirit
if avatars:contains(pet.name) then
idleSet = sets.idle.Avatar
else
idleSet = sets.idle.Spirit
end
-- Check if Avatar's Favor is active
if state.Buff["Avatar's Favor"] and avatars:contains(pet.name) then
idleSet = set_combine(idleSet, sets.idle.Avatar.Favor)
end
-- Equip TP/Melee set if Engaged
if pet.status == 'Engaged' then
idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
end
else
-- No pet, so just laten refresh
idleSet = sets.idle
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.idle.LatentRefresh)
end
end
-- add_to_chat(100, tostring(pet.isvalid))
-- add_to_chat(100, tostring(pet.name))
-- add_to_chat(100, tostring(state.Buff["Avatar's Favor"]))
-- Return built idle set
return idleSet
end
-- 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)
classes.CustomIdleGroups:clear()
if pet.isvalid then
if avatars:contains(pet.name) then
classes.CustomIdleGroups:append('Avatar')
elseif spirits:contains(pet.name) then
classes.CustomIdleGroups:append('Spirit')
end
end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- User self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'petweather' then
handle_petweather()
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'siphon' then
handle_siphoning()
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'pact' then
handle_pacts(cmdParams)
eventArgs.handled = true
elseif cmdParams[1] == 'reset_ward_flag' then
wards.flag = false
wards.spell = ''
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Cast the appopriate storm for the currently summoned avatar, if possible.
function handle_petweather()
if player.sub_job ~= 'SCH' then
add_to_chat(122, "You can not cast storm spells")
return
end
if not pet.isvalid then
add_to_chat(122, "You do not have an active avatar.")
return
end
local element = pet.element
if element == 'Thunder' then
element = 'Lightning'
end
if S{'Light','Dark','Lightning'}:contains(element) then
add_to_chat(122, 'You do not have access to '..elements.storm_of[element]..'.')
return
end
local storm = elements.storm_of[element]
if storm then
send_command('@input /ma "'..elements.storm_of[element]..'" <me>')
else
add_to_chat(123, 'Error: Unknown element ('..tostring(element)..')')
end
end
-- Custom uber-handling of Elemental Siphon
function handle_siphoning()
if areas.Cities:contains(world.area) then
add_to_chat(122, 'Cannot use Elemental Siphon in a city area.')
return
end
local siphonElement
local stormElementToUse
local releasedAvatar
local dontRelease
-- If we already have a spirit out, just use that.
if pet.isvalid and spirits:contains(pet.name) then
siphonElement = pet.element
dontRelease = true
-- If current weather doesn't match the spirit, but the spirit matches the day, try to cast the storm.
if player.sub_job == 'SCH' and pet.element == world.day_element and pet.element ~= world.weather_element then
if not S{'Light','Dark','Lightning'}:contains(pet.element) then
stormElementToUse = pet.element
end
end
-- If we're subbing /sch, there are some conditions where we want to make sure specific weather is up.
-- If current (single) weather is opposed by the current day, we want to change the weather to match
-- the current day, if possible.
elseif player.sub_job == 'SCH' and world.weather_element ~= 'None' then
-- We can override single-intensity weather; leave double weather alone, since even if
-- it's partially countered by the day, it's not worth changing.
if get_weather_intensity() == 1 then
-- If current weather is weak to the current day, it cancels the benefits for
-- siphon. Change it to the day's weather if possible (+0 to +20%), or any non-weak
-- weather if not.
-- If the current weather matches the current avatar's element (being used to reduce
-- perpetuation), don't change it; just accept the penalty on Siphon.
if world.weather_element == elements.weak_to[world.day_element] and
(not pet.isvalid or world.weather_element ~= pet.element) then
-- We can't cast lightning/dark/light weather, so use a neutral element
if S{'Light','Dark','Lightning'}:contains(world.day_element) then
stormElementToUse = 'Wind'
else
stormElementToUse = world.day_element
end
end
end
end
-- If we decided to use a storm, set that as the spirit element to cast.
if stormElementToUse then
siphonElement = stormElementToUse
elseif world.weather_element ~= 'None' and (get_weather_intensity() == 2 or world.weather_element ~= elements.weak_to[world.day_element]) then
siphonElement = world.weather_element
else
siphonElement = world.day_element
end
local command = ''
local releaseWait = 0
if pet.isvalid and avatars:contains(pet.name) then
command = command..'input /pet "Release" <me>;wait 1.1;'
releasedAvatar = pet.name
releaseWait = 10
end
if stormElementToUse then