-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathSafiyeh-WHM.lua
954 lines (829 loc) · 32.9 KB
/
Safiyeh-WHM.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
-- Original: Motenten / Modified: Arislan
-------------------------------------------------------------------------------------------------------------------
-- Keybinds
-------------------------------------------------------------------------------------------------------------------
-- Modes: [ F9 ] Cycle Offense Mode
-- [ 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
-- [ WIN+R ] Toggle Regen Mode
-- [ WIN+C ] Toggle Capacity Points Mode
--
-- Abilities: [ CTRL+` ] Afflatus Solace
-- [ ALT+` ] Afflatus Misery
-- [ CTRL+[ ] Divine Seal
-- [ CTRL+] ] Divine Caress
-- [ CTRL+` ] Composure
-- [ CTRL+- ] Light Arts/Addendum: White
-- [ CTRL+= ] Dark Arts/Addendum: Black
-- [ CTRL+; ] Celerity/Alacrity
-- [ ALT+[ ] Accesion/Manifestation
-- [ ALT+; ] Penury/Parsimony
--
-- Spells: [ ALT+O ] Regen IV
--
-- Weapons: [ CTRL+W ] Toggles Weapon Lock
--
-- WS: [ CTRL+Numpad7 ] Black Halo
-- [ CTRL+Numpad8 ] Hexa Strike
-- [ CTRL+Numpad9 ] Realmrazer
-- [ CTRL+Numpad1 ] Flash Nova
-- [ CTRL+Numpad0 ] Mystic Boon
--
--
-- (Global-Binds.lua contains additional non-job-related keybinds)
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Addendum 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 addendum Addendum: White Addendum: Black
-------------------------------------------------------------------------------------------------------------------
-- 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.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
state.RegenMode = M{['description']='Regen Mode', 'Duration', 'Potency'}
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
lockstyleset = 2
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('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'DT', 'MEva')
state.BarElement = M{['description']='BarElement', 'Barfira', 'Barblizzara', 'Baraera', 'Barstonra', 'Barthundra', 'Barwatera'}
state.BarStatus = M{['description']='BarStatus', 'Baramnesra', 'Barvira', 'Barparalyzra', 'Barsilencera', 'Barpetra', 'Barpoisonra', 'Barblindra', 'Barsleepra'}
state.BoostSpell = M{['description']='BoostSpell', 'Boost-STR', 'Boost-INT', 'Boost-AGI', 'Boost-VIT', 'Boost-DEX', 'Boost-MND', 'Boost-CHR'}
state.WeaponLock = M(false, 'Weapon Lock')
-- state.CP = M(false, "Capacity Points Mode")
-- Additional local binds
include('Global-Binds.lua') -- OK to remove this line
send_command('bind ^` input /ja "Afflatus Solace" <me>')
send_command('bind !` input /ja "Afflatus Misery" <me>')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind !- gs c scholar addendum')
send_command('bind != gs c scholar addendum')
send_command('bind ^; gs c scholar speed')
send_command('bind ![ gs c scholar aoe')
send_command('bind !; gs c scholar cost')
send_command('bind ^insert gs c cycleback BoostSpell')
send_command('bind ^delete gs c cycle BoostSpell')
send_command('bind ^home gs c cycleback BarElement')
send_command('bind ^end gs c cycle BarElement')
send_command('bind ^pageup gs c cycleback BarStatus')
send_command('bind ^pagedown gs c cycle BarStatus')
send_command('bind ^[ input /ja "Divine Seal" <me>')
send_command('bind ^] input /ja "Divine Caress" <me>')
send_command('bind !o input /ma "Regen IV" <stpc>')
-- send_command('bind @c gs c toggle CP')
send_command('bind @r gs c cycle RegenMode')
send_command('bind @w gs c toggle WeaponLock')
send_command('bind ^numpad7 input /ws "Black Halo" <t>')
send_command('bind ^numpad8 input /ws "Hexa Strike" <t>')
send_command('bind ^numpad5 input /ws "Realmrazer" <t>')
send_command('bind ^numpad1 input /ws "Flash Nova" <t>')
send_command('bind ^numpad0 input /ws "Mystic Boon" <t>')
select_default_macro_book()
set_lockstyle()
state.Auto_Kite = M(false, 'Auto_Kite')
moving = false
end
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind !-')
send_command('unbind !=')
send_command('unbind ^;')
send_command('unbind ![')
send_command('unbind !;')
send_command('unbind ^insert')
send_command('unbind ^delete')
send_command('unbind ^home')
send_command('unbind ^end')
send_command('unbind ^pageup')
send_command('unbind ^pagedown')
send_command('unbind ^[')
send_command('unbind ^]')
send_command('unbind !o')
-- send_command('unbind @c')
send_command('unbind @r')
send_command('unbind @w')
send_command('unbind ^numpad7')
send_command('unbind ^numpad8')
send_command('unbind ^numpad5')
send_command('unbind ^numpad1')
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
-- Fast cast sets for spells
sets.precast.FC = {
-- /SCH --3
main="Sucellus", --5
sub="Chanter's Shield", --8
ammo="Sapience Orb", --2
head="Volte Beret", --6
body="Inyanga Jubbah +2", --14
hands="Gende. Gages +1", --7
legs="Volte Brais", --8
feet="Volte Gaiters", --6
neck="Baetyl Pendant", --4
ear1="Loquacious Earring", --2
ear2="Etiolation Earring", --1
ring1="Kishar Ring", --4
ring2="Weather. Ring +1", --6(4)
back=gear.WHM_FC_Cape, --10
waist="Shinjutsu-no-Obi +1", --5
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
waist="Siegel Sash",
})
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {
--ammo="Impatiens",
head="Piety Cap +1", --13
legs="Ebers Pant. +1", --13
ear1="Nourish. Earring +1", --4
ear2="Mendi. Earring", --5
ring1="Lebeche Ring", --(2)
back="Perimede Cape", --(4)
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.CureSolace = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty, body="Twilight Cloak"})
sets.precast.FC.Dispelga = set_combine(sets.precast.FC, {main="Daybreak", sub="Ammurapi Shield"})
-- Precast sets to enhance JAs
--sets.precast.JA.Benediction = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
body="Piety Briault +3",
}
-- Midcast Sets
sets.midcast.FC = sets.precast.FC
sets.midcast.ConserveMP = {
main="Sucellus",
--sub="Thuellaic Ecu +1",
head="Vanya Hood",
--body="Vedic Coat",
hands="Shrieker's Cuffs",
--legs="Vanya Slops",
--feet="Kaykaus Boots +1",
ear2="Mendi. Earring",
waist="Shinjutsu-no-Obi +1",
back="Fi Follet Cape +1",
}
-- Cure sets
sets.midcast.CureSolace = {
main="Queller Rod", --15(+2)/(-15)
sub="Sors Shield", --3/(-5)
ammo="Esper Stone +1", --0/(-5)
head="Gende. Caubeen +1", --18/(-8)
body="Ebers Bliaud +1",
hands="Theophany Mitts +3", --(+4)/(-7)
legs="Ebers Pant. +1",
feet="Piety Duckbills +1", --10/(-5)
neck="Incanter's Torque",
ear1="Glorious Earring", -- (+2)/(-5)
ear2="Meili Earring",
ring1="Lebeche Ring", --3/(-5)
ring2={name="Haoma's Ring", bag="wardrobe3"},
back=gear.WHM_Cure_Cape, --0/(-10)
waist="Bishop's Sash",
}
sets.midcast.CureSolaceWeather = set_combine(sets.midcast.CureSolace, {
main="Chatoyant Staff", --10
sub="Achaq Grip", --0/(-4)
hands="Telchine Gloves", --17
back="Twilight Cape",
waist="Hachirin-no-Obi",
})
sets.midcast.CureNormal = set_combine(sets.midcast.CureSolace, {
body="Theo. Briault +3", --0(+3)/(-5)
})
sets.midcast.CureWeather = set_combine(sets.midcast.CureNormal, {
main="Chatoyant Staff", --10
sub="Achaq Grip", --0/(-4)
back="Twilight Cape",
waist="Hachirin-no-Obi",
})
sets.midcast.CuragaNormal = set_combine(sets.midcast.CureNormal, {
body="Theo. Briault +3", --0(+3)/(-5)
neck="Nuna Gorget +1",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2="Metamor. Ring +1",
waist="Luminary Sash",
})
sets.midcast.CuragaWeather = {
main="Chatoyant Staff", --10
sub="Achaq Grip", --0/(-4)
body="Theo. Briault +3", --0(+3)/(-5)
neck="Nuna Gorget +1",
back="Twilight Cape",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2="Metamor. Ring +1",
waist="Hachirin-no-Obi",
}
--sets.midcast.CureMelee = sets.midcast.CureSolace
sets.midcast.StatusRemoval = {
main="Yagrush",
sub="Chanter's Shield",
head="Vanya Hood",
body="Inyanga Jubbah +2",
hands="Fanatic Gloves",
legs="Aya. Cosciales +2",
feet="Regal Pumps +1",
neck="Baetyl Pendant",
ear1="Loquacious Earring",
ear2="Etiolation Earring",
ring1={name="Haoma's Ring", bag="wardrobe3"},
ring2={name="Haoma's Ring", bag="wardrobe4"},
back=gear.WHM_FC_Cape,
waist="Shinjutsu-no-Obi +1",
}
sets.midcast.Cursna = set_combine(sets.midcast.StatusRemoval, {
main="Yagrush",
sub="Chanter's Shield",
body="Ebers Bliaud +1",
hands="Fanatic Gloves", --15
legs="Th. Pantaloons +2", --21
feet="Vanya Clogs", --5
neck="Malison Medallion", --10
ear1="Beatific Earring",
ear2="Meili Earring",
ring1={name="Haoma's Ring", bag="wardrobe3"},
ring2={name="Haoma's Ring", bag="wardrobe4"},
back=gear.WHM_FC_Cape, --25
waist="Bishop's Sash",
})
sets.midcast.Erase = set_combine(sets.midcast.StatusRemoval, {neck="Cleric's Torque"})
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {
main=gear.Gada_ENH,
sub="Ammurapi Shield",
head="Telchine Cap",
body="Telchine Chas.",
hands="Dynasty Mitts",
legs="Telchine Braconi",
feet="Theo. Duckbills +3",
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="Telchine Cap",
body="Telchine Chas.",
hands="Telchine Gloves",
legs="Telchine Braconi",
feet="Theo. Duckbills +3",
waist="Embla Sash",
}
sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {
main="Bolelabunga",
sub="Ammurapi Shield",
head="Inyanga Tiara +2",
body="Piety Briault +3",
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
})
sets.midcast.RegenDuration = set_combine(sets.midcast.EnhancingDuration, {
body="Telchine Chas.",
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
})
sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
--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",
ear2="Magnetic Earring",
--waist="Emphatikos Rope",
})
sets.midcast.Auspice = set_combine(sets.midcast.EnhancingDuration, {
feet="Ebers Duckbills +1",
})
sets.midcast.BarElement = set_combine(sets.midcast['Enhancing Magic'], {
--main="Beneficus",
--sub="Ammurapi Shield",
head="Ebers Cap +1",
body="Ebers Bliaud +1",
hands="Ebers Mitts +1",
legs="Piety Pantaln. +2",
feet="Ebers Duckbills +1",
})
sets.midcast.BoostStat = set_combine(sets.midcast['Enhancing Magic'], {
feet="Ebers Duckbills +1"
})
sets.midcast.Protect = set_combine(sets.midcast.ConserveMP, 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['Divine Magic'] = {
main="Daybreak",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Befouled Crown",
body="Vanya Robe",
hands="Inyan. Dastanas +2",
legs="Th. Pantaloons +2",
neck="Incanter's Torque",
ear1="Digni. Earring",
ear2="Regal Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2="Metamor. Ring +1",
back="Aurist's Cape +1",
waist="Refoccilation Stone",
}
sets.midcast.Banish = set_combine(sets.midcast['Divine Magic'], {
head="Inyanga Tiara +2",
--body="Witching Robe",
legs="Kaykaus Tights",
neck="Baetyl Pendant",
ear1="Friomisi Earring",
ear2="Regal Earring",
ring2="Weather. Ring +1",
waist="Refoccilation Stone",
})
sets.midcast.Holy = sets.midcast.Banish
sets.midcast['Dark Magic'] = {
main="Rubicundity",
sub="Ammurapi Shield",
ammo="Pemphredo Tathlum",
head="Befouled Crown",
body="Inyanga Jubbah +2",
hands="Theophany Mitts +3",
legs="Chironic Hose",
feet="Inyan. Crackows +2",
neck="Erra Pendant",
ear1="Digni. Earring",
ear2="Mani Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Aurist's Cape +1",
waist="Acuity Belt +1",
}
-- Custom spell classes
sets.midcast.MndEnfeebles = {
main="Maxentius",
sub="Ammurapi Shield",
ammo="Hydrocera",
head=empty,
body="Cohort Cloak +1",
hands="Inyan. Dastanas +2",
legs="Chironic Hose",
feet="Theo. Duckbills +3",
neck="Erra Pendant",
ear1="Digni. Earring",
ear2="Vor Earring",
ring1="Kishar Ring",
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Aurist's Cape +1",
waist="Luminary Sash",
}
sets.midcast.IntEnfeebles = set_combine(sets.midcast.MndEnfeebles, {
ammo="Pemphredo Tathlum",
waist="Acuity Belt +1",
})
sets.midcast.Dispelga = set_combine(sets.midcast.IntEnfeebles, {main="Daybreak", sub="Ammurapi Shield"})
sets.midcast.Impact = {
main="Grioavolr",
sub="Enki Strap",
head=empty,
body="Twilight Cloak",
hands="Inyan. Dastanas +2",
legs="Inyanga Shalwar +1",
feet="Theo. Duckbills +3",
ring2="Archon Ring",
}
-- Initializes trusts at iLvl 119
sets.midcast.Trust = sets.precast.FC
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {
main="Chatoyant Staff",
waist="Shinjutsu-no-Obi +1",
}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
main="Bolelabunga",
sub="Genmei Shield",
ammo="Homiliary",
head="Volte Beret",
body="Piety Briault +3",
hands="Inyan. Dastanas +2",
legs="Volte Brais",
feet="Volte Gaiters",
neck="Bathy Choker +1",
ear1="Genmei Earring",
ear2="Odnowa Earring +1",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back=gear.WHM_FC_Cape,
waist="Slipor Sash",
}
sets.idle.DT = set_combine(sets.idle, {
main="Bolelabunga",
sub="Genmei Shield", --10/0
ammo="Staunch Tathlum +1", --3/3
head="Inyanga Tiara +2", --0/5
body="Inyanga Jubbah +2", --0/8
hands="Inyan. Dastanas +2", --0/4
legs="Inyanga Shalwar +1", --0/5
feet="Inyan. Crackows +2", --0/3
neck="Loricate Torque +1", --6/6
ear2="Odnowa Earring +1", --3/3
ring1="Gelatinous Ring +1", --7/(-1)
ring2="Defending Ring", --10/10
back=gear.WHM_FC_Cape, --10/0
waist="Slipor Sash", --0/3
})
sets.idle.MEva = set_combine(sets.idle.DT, {
main="Daybreak",
sub="Genmei Shield",
ammo="Staunch Tathlum +1",
head="Inyanga Tiara +2",
body="Inyanga Jubbah +2",
hands="Inyan. Dastanas +2",
legs="Inyanga Shalwar +1",
feet="Inyan. Crackows +2",
ring1="Inyanga Ring",
back=gear.WHM_FC_Cape,
})
sets.idle.Town = set_combine(sets.idle, {
main="Yagrush",
sub="Ammurapi Shield",
head="Inyanga Tiara +2",
hands="Theophany Mitts +3",
feet="Theo. Duckbills +3",
ear1="Glorious Earring",
back=gear.WHM_Cure_Cape,
waist="Acuity Belt +1",
})
--sets.idle.Weak = sets.idle.DT
-- Defense sets
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = sets.idle.DT
sets.Kiting = {feet="Crier'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
-- Basic set for if no TP weapon is defined.
sets.engaged = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Ebers Mitts +1", back="Mending Cape"}
sets.buff['Devotion'] = {head="Piety Cap +1"}
sets.buff.Sublimation = {waist="Embla Sash"}
sets.buff.Doom = {ring1={name="Saida Ring", bag="wardrobe3"}, ring2={name="Saida Ring", bag="wardrobe4"},}
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.english == "Paralyna" and buffactive.Paralyzed then
-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
eventArgs.handled = true
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.name == 'Impact' then
equip(sets.precast.FC.Impact)
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
if spellMap == 'Banish' or spellMap == "Holy" then
if (world.weather_element == 'Light' or world.day_element == 'Light') then
equip(sets.Obi)
end
end
if spell.skill == 'Enhancing Magic' then
if classes.NoSkillSpells:contains(spell.english) then
equip(sets.midcast.EnhancingDuration)
if spellMap == 'Refresh' then
equip(sets.midcast.Refresh)
end
end
if spellMap == "Regen" and state.RegenMode.value == 'Duration' then
equip(sets.midcast.RegenDuration)
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english == "Sleep 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 == "Repose" then
send_command('@timers c "Repose ['..spell.target.name..']" 90 down spells/00098.png')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff,gain)
if buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
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
-------------------------------------------------------------------------------------------------------------------
-- 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)
update_sublimation()
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') and player.status == 'Engaged' then
-- return "CureMelee"
if default_spell_map == 'Cure' then
if buffactive['Afflatus Solace'] then
if (world.weather_element == 'Light' or world.day_element == 'Light') then
return "CureSolaceWeather"
else
return "CureSolace"
end
else
if (world.weather_element == 'Light' or world.day_element == 'Light') then
return "CureWeather"
else
return "CureNormal"
end
end
elseif default_spell_map == 'Curaga' then
if (world.weather_element == 'Light' or world.day_element == 'Light') then
return "CuragaWeather"
else
return "CuragaNormal"
end
elseif spell.skill == "Enfeebling Magic" then
if spell.type == "WhiteMagic" then
return "MndEnfeebles"
else
return "IntEnfeebles"
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
idleSet = set_combine(idleSet, sets.buff.Sublimation)
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
-- if state.CP.current == 'on' then
-- equip(sets.CP)
-- disable('back')
-- else
-- enable('back')
-- end
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
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 r_msg = state.RegenMode.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.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,060).. ' Regen: ' ..string.char(31,001)..r_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
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function job_self_command(cmdParams, eventArgs)
gearinfo(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'nuke' then
handle_nuking(cmdParams)
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'barelement' then
send_command('@input /ma '..state.BarElement.value..' <me>')
elseif cmdParams[1]:lower() == 'barstatus' then
send_command('@input /ma '..state.BarStatus.value..' <me>')
elseif cmdParams[1]:lower() == 'boostspell' then
send_command('@input /ma '..state.BoostSpell.value..' <me>')
end
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 update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
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 == '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 == '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
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()
-- Default macro set/book
set_macro_page(1, 3)
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end