-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathCOR.lua
More file actions
1411 lines (1276 loc) · 53.6 KB
/
COR.lua
File metadata and controls
1411 lines (1276 loc) · 53.6 KB
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
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
--[[
gs c toggle luzaf -- Toggles use of Luzaf Ring on and off
gs c toggle compensator -- Toggles use of Compensator for rolls on and off. helpful when you don't want to lose TP
This lua assumes you have 3 macros or keybinds to cycle GunMode, ShootingMode, and FightingModes. You may not like this, but
i find it very convenient to easily switch between weapons / modes while playing COR
NOTE: GunMode is automatically set to whichever weapon is equipped when this lua is loaded. You can also hit F12 to update it.
NOTE: Cycling through Fighting Mode resets Shooting mode, and cycling through Shooting Mode resets Fighting Mode. These two modes
do not combine. Only one can be used at a time. They were broken into two because I got tired of cycling through so many groups.
NOTE: if you don't like cycles, you can do macro's for specific modes. i.e. - /console gs c set FightingMode Melee
Fighting Modes
sets.engaged.Melee applies when Melee or DualSword fighting modes are selected
sets.engaged.Sword is a single handed melee mode
Shooting Modes
sets.engaged is used for all these sets.
Note: if you want to prevent losing TP when doing rolls, you can toggle compensator mode to off, and set your shooting mode to 'Single'
this should put your Rollstam in your main hand and keep it there.
Aftermath
the 'AME' set is used when empyrean aftermath is up
Haste modes
You are welcome to use Haste_15, and Haste_30 sets, but it's too much hassle so I'm only using the MaxHaste set to take what little few
pieces of dual weild gear COR wears off in favor of better pieces
--]]
---------------------------- SET ORDER OF PRECEDENCE ----------------------------------
-- sets.engaged.[CombatForm][CombatWeapon][Offense or HybridMode][CustomMeleeGroups or CustomClass]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
-- Whether to use Luzaf's Ring
state.LuzafRing = M(false, "Luzaf's Ring")
state.Compensator = M(true, "Compensator")
state.warned = M(false)
state.CapacityMode = M(false, 'Capacity Point Mantle')
state.FlurryMode = M{['description']='Flurry Mode', 'Normal', 'Hi'}
state.HasteMode = M{['description']='Haste Mode', 'Hi', 'Low'}
state.Buff['Triple Shot'] = buffactive['Triple Shot'] or false
include('Mote-TreasureHunter')
state.TreasureMode:set('None')
state.AutoRA = M{['description']='Auto RA', 'Normal', 'Shoot', 'WS' }
state.GunSelector = M{['description']='Gun Selector', 'DeathPenalty', 'Fomalhaut', 'Armageddon', 'Anarchy'}
state.FightingMode = M{['description']='Fighting Mode', 'Default', 'Melee', 'Sword', 'DualSword'}
state.ShootingMode = M{['description']='Shooting Mode', 'Default', 'Shooting', 'Magic', 'Single'}
cor_sub_weapons = S{"Nusku Shield"}
auto_gun_ws = "Leaden Salute"
define_roll_values()
determine_haste_group()
get_combat_form()
initialize_weapons()
get_custom_ranged_groups()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.RangedMode:options('Normal', 'Mid', 'Acc')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options('Normal', 'PDT' )
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
gear.RAbullet = "Chrono Bullet"
gear.Accbullet = "Devastating Bullet"
gear.WSbullet = "Chrono Bullet"
gear.MAbullet = "Living Bullet"
gear.QDbullet = "Hauksbok Bullet"
--gear.QDbullet = "Adlivun Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
-- Cor doesn't use hybrid defense mode; using that for ranged mode adjustments.
send_command('bind f9 gs c cycle OffenseMode')
send_command('bind !f9 gs c toggle FightingMode')
send_command('bind @f9 gs c cycle GunSelector')
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
send_command('bind != gs c toggle CapacityMode')
send_command('bind ^= gs c cycle treasuremode')
send_command('bind @= gs c cycle FlurryMode')
send_command('bind ^- gs c cycle AutoRA')
select_default_macro_book()
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
end
-- Called when this job file is unloaded (eg: job change)
function job_file_unload()
send_command('unbind ^`')
send_command('unbind !=')
send_command('unbind !`')
send_command('unbind ^-')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.Obi = { waist="Anrin Obi" }
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Triple Shot'] = {body="Chasseur's Frac +1"}
--sets.precast.JA['Snake Eye'] = {legs="Commodore Culottes +1"}
sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +3"}
sets.precast.JA['Random Deal'] = {body="Lanun Frac +3"}
--sets.precast.JA['Fold'] = {hands="Commodore Gants +2"}}
sets.CapacityMantle = {back="Mecistopins Mantle"}
TaeonHead = {}
TaeonHead.Snap = { name="Taeon Chapeau", augments={'Accuracy+20 Attack+20','"Snapshot"+5','"Snapshot"+4',}}
Camulus = {}
Camulus.STP = { name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10','Phys. dmg. taken-10%',}}
Camulus.WSD = { name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','Weapon skill damage +10%',}}
Camulus.Snap = { name="Camulus's Mantle", augments={'"Snapshot"+10',}}
Camulus.MAB = { name="Camulus's Mantle", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','AGI+10','Weapon skill damage +10%',}}
Camulus.DA = { name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10',}}
HercFeet = {}
HercHead = {}
HercLegs = {}
HercHands = {}
HercBody = {}
HercHands.R = { name="Herculean Gloves", augments={'AGI+9','Accuracy+3','"Refresh"+1',}}
--HercHands.MAB = { name="Herculean Gloves", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','INT+4','Mag. Acc.+8','"Mag.Atk.Bns."+13',}}
--HercBody.MAB = { name="Herculean Vest", augments={'Haste+1','"Mag.Atk.Bns."+27','Mag. Acc.+19 "Mag.Atk.Bns."+19',}}
HercBody.WSD = { name="Herculean Vest", augments={'"Blood Pact" ability delay -4','AGI+3','Weapon skill damage +9%','Mag. Acc.+4 "Mag.Atk.Bns."+4',}}
HercFeet.MAB = { name="Herculean Boots", augments={'Mag. Acc.+30','"Mag.Atk.Bns."+25','Accuracy+3 Attack+3','Mag. Acc.+12 "Mag.Atk.Bns."+12',}}
HercFeet.TP = { name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+4','DEX+8',}}
--HercHead.MAB = {name="Herculean Helm", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Weapon skill damage +3%','INT+1','Mag. Acc.+3','"Mag.Atk.Bns."+8',}}
HercHead.TP = { name="Herculean Helm", augments={'Accuracy+25','"Triple Atk."+4','AGI+6','Attack+14',}}
HercHead.DM = { name="Herculean Helm", augments={'Pet: STR+9','Mag. Acc.+10 "Mag.Atk.Bns."+10','Weapon skill damage +9%','Accuracy+12 Attack+12',}}
HercLegs.MAB = { name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+14',}}
HercLegs.TH = { name="Herculean Trousers", augments={'Phys. dmg. taken -1%','VIT+10','"Treasure Hunter"+2','Accuracy+10 Attack+10','Mag. Acc.+19 "Mag.Atk.Bns."+19',}}
AdhemarLegs = {}
AdhemarLegs.Snap = { name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}}
AdhemarLegs.TP = { name="Adhemar Kecks", augments={'AGI+10','Rng.Acc.+15','Rng.Atk.+15',}}
sets.roll = {
head="Lanun Tricorne +3",
hands="Chasseur's Gants +1",
ear2="Etiolation Earring",
neck="Regal Necklace",
body="Nyame Mail",
ring1="Dark Ring",
ring2="Defending Ring",
back=Camulus.STP,
legs="Nyame Flanchard",
feet="Lanun Bottes +3"
}
sets.precast.CorsairRoll = set_combine(sets.roll, {
main={name="Rostam", bag="Wardrobe 4", priority=1},
sub={name="Tauret", priority=2},
})
sets.precast.CorsairRoll.Single = set_combine(sets.roll, {
main={name="Rostam", bag="Wardrobe 4", priority=1},
})
sets.Nyame = {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
}
sets.TreasureHunter = { head="White Rarab Cap +1", waist="Chaac Belt", legs=HercLegs.TH }
--sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Navarch's Culottes +1"})
sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Navarch's Bottes +2"})
sets.precast.CorsairRoll["Courser's Roll"].Single = set_combine(sets.precast.CorsairRoll.Single, {feet="Navarch's Bottes +2"})
--sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Navarch's Tricorne +1"})
sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Chasseur's Frac +1"})
sets.precast.CorsairRoll["Tactician's Roll"].Single = set_combine(sets.precast.CorsairRoll.Single, {body="Chasseur's Frac +1"})
sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Chasseur's Gants +1"})
sets.precast.CorsairRoll["Allies' Roll"].Single = set_combine(sets.precast.CorsairRoll.Single, {hands="Chasseur's Gants +1"})
sets.precast.LuzafRing = {ring1="Luzaf's Ring"}
sets.precast.Compensator = {range="Compensator"}
sets.precast.FoldDoubleBust = {hands="Lanun Gants +3"}
sets.Melee = {
--main={name="Lanun Knife", bag="Wardrobe 4", priority=2},
main={name="Lanun Knife", bag="Inventory", priority=1},
sub={name="Blurred Knife +1", bag="Inventory", priority=2},
ranged=state.GunSelector.current
}
-- sets.Melee.engaged = set_combine(sets.Melee, {
-- head="Adhemar Bonnet +1",
-- ear1="Telos Earring",
-- ear2="Suppanomimi",
-- neck="Iskur gorget",
-- hands="Adhemar Wristbands +1",
-- body="Adhemar Jacket +1",
-- legs="Meghanada Chausses +2",
-- ring1="Petrov Ring",
-- ring2="Epona's Ring",
-- waist="Shetal Stone",
-- back=Camulus.DA,
-- feet=HercFeet.TP
-- })
-- sets.Melee.engaged.PDT = set_combine(sets.Melee.engaged, sets.Nyame)
sets.Sword = {
main={name="Naegling", bag="Inventory", priority=1},
sub={name="Nusku Shield", priority=2},
ranged=state.GunSelector.current
}
-- sets.Sword.engaged = set_combine(sets.Melee, sets.Sword, {
-- ear2="Cessance Earring",
-- hands="Adhemar Wristbands +1",
-- waist="Windbuffet Belt +1",
-- })
-- sets.Sword.engaged.PDT = set_combine(sets.Sword.engaged, sets.Nyame)
sets.DualSword = {
main={name="Naegling", bag="Inventory", priority=1},
sub={name="Blurred Knife +1", bag="Inventory", priority=2},
ranged=state.GunSelector.current
}
-- sets.DualSword.engaged = set_combine(sets.Melee, sets.DualSword)
-- sets.DualSword.engaged.PDT = set_combine(sets.DualSword.engaged, sets.Nyame)
sets.Magic = {
--main={name="Lanun Knife", bag="Wardrobe 4", priority=2},
main={name="Lanun Knife", bag="Inventory", priority=1},
sub={name="Tauret", bag="Inventory", priority=2},
ranged=state.GunSelector.current
}
-- sets.Magic.engaged = sets.Magic
-- sets.Magic.engaged.PDT = sets.Magic
sets.DeathPenalty = {
range="Death Penalty"
}
sets.Armageddon = {
range="Armageddon"
}
sets.Fomalhaut = {
range="Fomalhaut"
}
sets.Anarchy = {
range="Anarchy +2"
}
sets.Shooting = {
main={name="Lanun Knife", bag="Inventory", priority=2},
sub={name="Rostam", bag="Wardrobe 4", priority=1},
ranged=state.GunSelector.current
}
-- sets.Shooting.engaged = sets.Shooting
-- sets.Shooting.engaged.PDT = sets.Shooting
sets.Single = {
main={name="Rostam", bag="Wardrobe 4", priority=1},
sub={name="Nusku Shield", priority=2},
ranged=state.GunSelector.current
}
-- sets.Single.engaged = sets.Single
-- sets.Single.engaged.PDT = sets.Single
-- this allows you to equip any weapon in main + sub without this code forcing other weapons
sets.Default = {
ranged=state.GunSelector.current
} -- do nothing. useful for equipping whateveer you want
-- sets.Default.engaged = sets.Default
-- sets.Default.engaged.PDT = sets.Default
sets.precast.CorsairShot = { head="Laksamana's Tricorne +2" }
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Mummu Bonnet +2",
hands="Meghanada Gloves +2",
legs=AdhemarLegs.TP,
}
sets.Organizer = {
main="Tauret",
sub="Fomalhaut",
range="Death Penalty",
ear1="Nusku Shield",
ear2="Armageddon",
hands="Compensator",
ammo="Nusku Shield",
back="Linkpearl",
waist="Lanun Knife",
ring1="Naegling",
ring2="Anarchy +2",
legs="Blurred Knife +1"
}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {
--ammo="Impatiens",
head=HercHead.TP,
ear1="Loquacious Earring",
ear2="Etiolation Earring",
body="Dread Jupon",
hands="Leyline Gloves",
ring1="Weatherspoon Ring",
ring2="Kishar Ring",
legs="Quiahuiz Trousers",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.RA = {
ammo=gear.RAbullet,
head="Chasseur's Tricorne +1",
neck="Commodore Charm +2", -- 4
hands="Lanun Gants +3", -- 13
back=Camulus.Snap, -- 10
body="Oshosi Vest", -- 12
ring2="Crepuscular Ring", -- 3
waist="Yemaya Belt", -- 0 / 5 rapid
legs=AdhemarLegs.Snap, -- 9 / 10 rapid
feet="Meghanada Jambeaux +2" -- 10
}
sets.precast.RA.F1 = set_combine(sets.precast.RA, {
body="Laksamana's Frac +3",
})
sets.precast.RA.F2 = set_combine(sets.precast.RA.F1, {
body="Laksamana's Frac +3",
hands="Carmine Finger Gauntlets +1", -- 8 / 11 rapid
-- waist="Yemaya Belt",
-- feet="Pursuer's Gaiters"
})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head=HercHead.DM,
--neck="Iskur Gorget",
neck="Commodore Charm +2",
ear1="Ishvara Earring",
ear2="Moonshade Earring",
body="Laksamana's Frac +3",
hands="Meghanada Gloves +2",
ring1="Regal Ring",
ring2="Ilabrat Ring",
back=Camulus.WSD,
waist="Kwahu Kachina Belt",
legs="Meghanada Chausses +2",
feet="Lanun Bottes +3"
}
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
head=HercHead.DM,
neck="Breeze Gorget",
body="Laksamana's Frac +3",
hands="Meghanada Gloves +2",
ear1="Ishvara Earring",
ear2="Moonshade Earring",
ring1="Regal Ring",
ring2="Ifrit Ring",
waist="Sailfi Belt +1",
waist="Thunder Belt",
feet="Lanun Bottes +3"
})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {
head="Adhemar Bonnet +1",
ear1="Odr Earring",
ear2="Moonshade Earring",
body="Adhemar Jacket +1",
neck="Shadow Gorget",
hands="Mummu Wrists +2",
ring1="Regal Ring",
ring2="Ilabrat Ring",
waist="Soil Belt",
legs="Meghanada Chausses +2",
feet="Lanun Bottes +3"
})
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Samnuha Tights"})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {
head="Adhemar Bonnet +1",
body="Adhemar Jacket +1",
neck="Shadow Gorget",
ear1="Telos Earring",
ear2="Moonshade Earring",
hands="Meghanada Gloves +2",
ring1="Regal Ring",
ring2="Ilabrat Ring",
waist="Soil Belt",
})
sets.precast.WS['Last Stand'] = set_combine(sets.precast.WS, {
ammo=gear.WSbullet,
head="Lanun Tricorne +3",
neck="Aqua Gorget",
ear1="Ishvara Earring",
ear2="Moonshade Earring",
body="Laksamana's Frac +3",
ring1="Regal Ring",
ring2="Dingir Ring",
waist="Light Belt",
feet="Lanun Bottes +3"
})
sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {
ammo=gear.WSbullet,
head="Lanun Tricorne +3",
ear1="Beyla Earring",
ear2="Moonshade Earring",
back=Camulus.WSD,
legs="Meghanada Chausses +2",
feet="Lanun Bottes +3"
})
sets.precast.WS['Wildfire'] = {
ammo=gear.MAbullet,
head=HercHead.DM,
neck="Commodore Charm +2",
ear1="Friomisi Earring",
ear2="Crematio Earring",
body="Lanun Frac +3",
hands="Carmine Finger Gauntlets +1",
ring1="Regal Ring",
ring2="Dingir Ring",
back=Camulus.MAB,
waist="Sveltesse Gouriz +1",
legs=HercLegs.MAB,
feet="Lanun Bottes +3"
}
sets.precast.WS['Wildfire'].Acc = set_combine(sets.precast.WS['Wildfire'], {
head=HercHead.DM,
body="Lanun Frac +3",
hands="Nyame Gauntlets"
})
sets.precast.WS['Leaden Salute'] = {
ammo=gear.MAbullet,
head="Pixie Hairpin +1",
neck="Commodore Charm +2",
ear1="Friomisi Earring",
ear2="Moonshade Earring",
body="Lanun Frac +3",
hands="Carmine Finger Gauntlets +1",
ring1="Archon Ring",
ring2="Dingir Ring",
back=Camulus.MAB,
waist="Sveltesse Gouriz +1",
legs=HercLegs.MAB,
feet="Lanun Bottes +3"
}
sets.precast.WS['Leaden Salute'].Mid = set_combine(sets.precast.WS['Leaden Salute'], {
body="Lanun Frac +3",
hands="Carmine Finger Gauntlets +1",
feet="Lanun Bottes +3"
})
sets.precast.WS['Leaden Salute'].Acc = set_combine(sets.precast.WS['Leaden Salute'], {
body="Lanun Frac +3",
ear1="Crepuscular Earring",
hands="Nyame Gauntlets",
feet="Lanun Bottes +3"
})
sets.precast.WS['Hot Shot'] = set_combine(sets.precast.WS['Wildfire'], {
ear2="Moonshade Earring"
})
sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS['Wildfire'], {
ear2="Moonshade Earring"
})
-- Midcast Sets
sets.midcast.FastRecast = {
head="Malignance Chapeau",
hands="Malignance Gloves",
body="Malignance Tabard",
back=Camulus.STP,
ring1="Weatherspoon Ring",
ring2="Kishar Ring",
legs="Malignance Tights",
feet="Malignance Boots"
}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
sets.midcast.CorsairShot = {
ammo=gear.QDbullet,
head="Laksamana's Tricorne +2",
neck="Commodore Charm +2",
ear1="Friomisi Earring",
ear2="Crematio Earring",
body="Lanun Frac +3",
hands="Carmine Finger Gauntlets +1",
ring1="Regal Ring",
ring2="Dingir Ring",
back=Camulus.MAB,
waist="Eschan Stone",
--waist="Chaac Belt",
legs=HercLegs.MAB,
feet="Lanun Bottes +3"
}
sets.midcast.CorsairShot.Acc = set_combine(sets.midcast.CorsairShot, {
body="Lanun Frac +3",
head="Laksamana's Tricorne +2",
ear1="Crepuscular Earring",
feet="Malignance Boots"
})
sets.midcast.CorsairShot['Light Shot'] = sets.midcast.CorsairShot.Acc
sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot['Light Shot']
-- Ranged gear
sets.midcast.RA = {
ammo=gear.RAbullet,
head="Malignance Chapeau",
neck="Iskur Gorget",
--neck="Commodore Charm +1",
ear1="Telos Earring",
ear2="Dedition Earring",
body="Nisroch Jerkin",
hands="Malignance Gloves",
ring1="Crepuscular Ring",
ring2="Ilabrat Ring",
back=Camulus.STP,
waist="Yemaya Belt",
legs="Malignance Tights",
feet="Malignance Boots"
}
sets.midcast.RA.AME = set_combine(sets.midcast.RA, {
head="Meghanada Visor +2",
body="Nisroch Jerkin",
hands="Mummu Wrists +2",
waist="Kwahu Kachina Belt",
})
sets.midcast.RA.Mid = set_combine(sets.midcast.RA, {
ear2="Crepuscular Earring",
body="Malignance Tabard",
})
sets.midcast.RA.Mid.AME = set_combine(sets.midcast.RA.Mid, {
head="Meghanada Visor +2",
body="Nisroch Jerkin",
waist="Kwahu Kachina Belt",
})
sets.midcast.RA.Acc = set_combine(sets.midcast.RA.Mid, {
--ring1="Hajduk Ring",
ammo=gear.Accbullet,
ear2="Beyla Earring",
neck="Commodore Charm +2",
body="Laksamana's Frac +3",
ring1="Crepuscular Ring",
ring2="Regal Ring",
feet="Malignance Boots",
waist="Kwahu Kachina Belt",
})
sets.midcast.RA.Acc.AME = set_combine(sets.midcast.RA.Acc, {
head="Meghanada Visor +2",
waist="Kwahu Kachina Belt",
})
sets.midcast.RA.TripleShot = set_combine(sets.midcast.RA, {
head="Oshosi Mask",
body="Chasseur's Frac +1",
hands="Lanun Gants +3",
--ring1="Regal Ring",
legs="Oshosi Trousers",
feet="Oshosi Leggings"
})
sets.midcast.RA.TripleShot.Mid = set_combine(sets.midcast.RA.Mid, {
head="Oshosi Mask",
body="Oshosi Vest",
hands="Lanun Gants +3",
--ring1="Regal Ring",
legs="Oshosi Trousers",
feet="Oshosi Leggings"
})
sets.midcast.RA.TripleShot.Acc = set_combine(sets.midcast.RA.Acc, {
ammo=gear.Accbullet,
head="Malignance Chapeau",
body="Oshosi Vest",
hands="Lanun Gants +3",
--ring1="Regal Ring",
feet="Malignance Boots"
})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {
ammo=gear.RAbullet,
--range="Fomalhaut",
head="Nyame Helm",
neck="Sanctity Necklace",
--neck="Commodore Charm +1",
ear1="Genmei Earring",
ear2="Etiolation Earring",
--body="Mekosuchinae Harness",
body="Nyame Mail",
hands="Nyame Gauntlets",
ring1="Roller's Ring",
ring2="Defending Ring",
back=Camulus.STP,
waist="Flume Belt",
legs="Carmine Cuisses +1",
feet="Nyame Sollerets"
}
sets.idle.Regen = set_combine(sets.idle, {
head="Meghanada Visor +2",
neck="Sanctity Necklace",
hands="Meghanada Gloves +2",
ear1="Infused Earring",
--neck="Commodore Charm +1",
body="Nyame Mail",
ring1="Meghanada Ring",
ring2="Paguroidea Ring"
})
sets.idle.Town = {
ammo=gear.MAbullet,
head="Lanun Tricorne +3",
neck="Commodore Charm +2",
ear1="Telos Earring",
ear2="Crepuscular Earring",
body="Lanun Frac +3",
hands="Lanun Gants +3",
ring1="Ilabrat Ring",
ring2="Regal Ring",
back=Camulus.STP,
waist="Sailfi Belt +1",
legs="Carmine Cuisses +1",
feet="Lanun Bottes +3"
}
sets.idle.PDT = set_combine(sets.idle.Town, sets.Nyame)
-- Defense sets
sets.defense.PDT = set_combine(sets.idle, sets.Nyame, {
neck="Twilight Torque",
ring2="Patricius Ring",
ring1="Defending Ring",
back=Camulus.STP,
waist="Flume Belt",
})
sets.defense.MDT = sets.defense.PDT
sets.Kiting = {legs="Carmine Cuisses +1"}
-- Engaged sets
sets.engaged = {
ammo=gear.RAbullet,
head="Malignance Chapeau",
neck="Iskur Gorget",
ear1="Telos Earring",
ear2="Crepuscular Earring",
body="Malignance Tabard",
hands="Malignance Gloves",
ring1="Crepuscular Ring",
ring2="Defending Ring",
back=Camulus.STP,
waist="Flume Belt",
legs="Malignance Tights",
feet="Malignance Boots"
}
sets.engaged.PDT = set_combine(sets.engaged, sets.defense.PDT)
-- TODO: Get rid of haste sets
sets.engaged.Melee = set_combine(sets.engaged, {
head="Adhemar Bonnet +1",
ear1="Eabani Earring",
ear2="Suppanomimi",
neck="Iskur gorget",
hands="Floral Gauntlets",
body="Adhemar Jacket +1",
legs="Meghanada Chausses +2",
ring1="Petrov Ring",
ring2="Epona's Ring",
waist="Shetal Stone",
back=Camulus.DA,
feet="Taeon Boots"
})
sets.engaged.Melee.Haste_30 = set_combine(sets.engaged.Melee, {
hands="Adhemar Wristbands +1",
feet=HercFeet.TP
})
sets.engaged.Melee.MaxHaste = set_combine(sets.engaged.Melee.Haste_30, {
ear1="Telos Earring",
ear2="Cessance Earring",
waist="Sailfi Belt +1",
})
sets.engaged.Melee.PDT = set_combine(sets.engaged.Melee, {
head="Nyame Helm",
body="Nyame Mail",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Melee.PDT.Haste_30 = set_combine(sets.engaged.Melee.Haste_30, {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Melee.PDT.MaxHaste = set_combine(sets.engaged.Melee.MaxHaste, {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Mid = sets.engaged -- just for shooting
sets.engaged.Mid.PDT = set_combine(sets.engaged.Mid, sets.defense.PDT)
sets.engaged.Melee.Mid = set_combine(sets.engaged.Melee, {
neck="Lissome Necklace",
ring2="Ilabrat Ring",
feet=HercFeet.TP
})
sets.engaged.Melee.Mid.Haste_30 = set_combine(sets.engaged.Melee.Mid, {
hands="Adhemar Wristbands +1",
})
sets.engaged.Melee.Mid.MaxHaste = set_combine(sets.engaged.Melee.Mid, {
waist="Olseni Belt",
ear1="Telos Earring",
ear2="Odr Earring",
hands="Adhemar Wristbands +1",
})
sets.engaged.Melee.Mid.PDT = set_combine(sets.engaged.Melee.Mid, {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Melee.Mid.PDT.Haste_30 = set_combine(sets.engaged.Melee.Mid.Haste_30, {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Melee.Mid.PDT.MaxHaste = set_combine(sets.engaged.Melee.Mid.MaxHaste, {
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.engaged.Acc = sets.engaged -- just for shooting
sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, sets.defense.PDT)
sets.engaged.Melee.Acc = set_combine(sets.engaged.Melee.Mid, {
head="Malignance Chapeau",
ear1="Telos Earring",
ear2="Odr Earring",
waist="Olseni Belt",
feet="Malignance Boots"
})
sets.engaged.Melee.Acc.Haste_30 = set_combine(sets.engaged.Melee.Acc, {
waist="Shetal Stone",
})
sets.engaged.Melee.Acc.MaxHaste = set_combine(sets.engaged.Melee.Acc, {
hands="Adhemar Wristbands +1",
feet="Malignance Boots",
})
sets.engaged.Melee.Acc.PDT = set_combine(sets.engaged.Melee.Acc, sets.Nyame)
sets.engaged.Melee.Acc.PDT.Haste_30 = set_combine(sets.engaged.Melee.Acc.Haste_30, sets.Nyame)
sets.engaged.Melee.Acc.PDT.MaxHaste = set_combine(sets.engaged.Melee.Acc.MaxHaste, sets.Nyame)
sets.engaged.Sword = set_combine(sets.engaged, {
head="Adhemar Bonnet +1",
ear1="Telos Earring",
ear2="Cessance Earring",
neck="Iskur gorget",
hands="Adhemar Wristbands +1",
body="Adhemar Jacket +1",
legs="Meghanada Chausses +2",
ring1="Petrov Ring",
ring2="Epona's Ring",
waist="Windbuffet Belt +1",
back=Camulus.DA,
feet=HercFeet.TP
})
sets.engaged.Sword.Haste_30 = sets.engaged.Sword
sets.engaged.Sword.MaxHaste = sets.engaged.Sword
sets.engaged.Sword.PDT = set_combine(sets.engaged.Sword, sets.Nyame)
sets.engaged.Sword.PDT.Haste_30 = set_combine(sets.engaged.Sword, sets.Nyame)
sets.engaged.Sword.PDT.MaxHaste = set_combine(sets.engaged.Sword, sets.Nyame)
sets.engaged.Sword.Mid = set_combine(sets.engaged.Sword, {
neck="Lissome Necklace",
ring2="Ilabrat Ring"
})
sets.engaged.Sword.Mid.Haste_30 = sets.engaged.Sword.Mid
sets.engaged.Sword.Mid.MaxHaste = sets.engaged.Sword.Mid
sets.engaged.Sword.Mid.PDT = set_combine(sets.engaged.Sword.Mid, sets.Nyame)
sets.engaged.Sword.Mid.PDT.Haste_30 = set_combine(sets.engaged.Sword.Mid, sets.Nyame)
sets.engaged.Sword.Mid.PDT.MaxHaste = set_combine(sets.engaged.Sword.Mid, sets.Nyame)
sets.engaged.Sword.Acc = set_combine(sets.engaged.Sword.Mid, {
ear2="Odr Earring",
waist="Olseni Belt",
feet="Malignance Boots"
})
sets.engaged.Sword.Acc.Haste_30 = sets.engaged.Sword.Acc
sets.engaged.Sword.Acc.MaxHaste = sets.engaged.Sword.Acc
sets.engaged.Sword.Acc.PDT = set_combine(sets.engaged.Sword.Acc, sets.Nyame)
sets.engaged.Sword.Acc.PDT.Haste_30 = set_combine(sets.engaged.Sword.Acc, sets.Nyame)
sets.engaged.Sword.Acc.PDT.MaxHaste = set_combine(sets.engaged.Sword.Acc, sets.Nyame)
end
function get_cor_gearset()
local set = {}
if state.FightingMode.current ~= 'Default' then
---------------------------------------
set = set_combine(sets[state.FightingMode.current], sets[state.GunSelector.current])
---------------------------------------
elseif state.ShootingMode.current ~= 'Default' then
---------------------------------------
set = set_combine(sets[state.ShootingMode.current], sets[state.GunSelector.current])
---------------------------------------
end
return set
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
function job_pretarget(spell, action, spellMap, eventArgs)
-- If autora enabled, use WS automatically at 100+ TP
if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' then
if state.OffenseMode.current ~= 'Normal' and state.RangedMode:contains(state.OffenseMode.current) then
state.RangedMode:set(state.OffenseMode.current)
end
if player.tp >= 1000 and state.AutoRA.value == 'WS' and not buffactive.amnesia then
cancel_spell()
use_weaponskill()
end
end
end
-- 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)
-- Check that proper ammo is available if we're using ranged attacks or similar.
if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
do_bullet_checks(spell, spellMap, eventArgs)
if state.OffenseMode.current ~= 'Normal' and state.RangedMode:contains(state.OffenseMode.current) then
state.RangedMode:set(state.OffenseMode.current)
end
end
if spell.type:lower() == 'weaponskill' then
if player.tp < 1000 then
eventArgs.cancel = true
return
end
if ((spell.target.distance >8 and spell.skill ~= 'Marksmanship') or (spell.target.distance >21)) then
-- Cancel Action if distance is too great, saving TP
add_to_chat(122,"Outside WS Range! /Canceling")
eventArgs.cancel = true
return
elseif state.DefenseMode.value ~= 'None' then
-- Don't gearswap for weaponskills when Defense is on.
eventArgs.handled = true
end
end
if (spell.type == 'CorsairRoll') then
if state.ShootingMode.current == 'Single' then
classes.CustomClass = 'Single'
end
end
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.LuzafRing.value then
equip(sets.precast.LuzafRing)
elseif (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.Compensator.value then
equip(sets.precast.Compensator)
elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
classes.CustomClass = 'Acc'
elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
if sets.precast.FoldDoubleBust then
equip(sets.precast.FoldDoubleBust)
eventArgs.handled = true
end
end
local gearset = get_cor_gearset()
equip(gearset)
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if spell.english == 'Leaden Salute' then
if world.weather_element == 'Dark' or world.day_element == 'Dark' then
equip(sets.Obi)
end
end
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
end
end
function job_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairShot' or spell.action_type == 'Ranged Attack' then
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairRoll' and not spell.interrupted then
display_roll_info(spell)
end
if state.AutoRA.value ~= 'Normal' then
use_ra(spell)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, action, default_wsmode)
--if buffactive['Transcendancy'] then
-- return 'Brew'
--end
end
function customize_idle_set(idleSet)
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
local gearset = get_cor_gearset()
return set_combine(idleSet, gearset)
end
function customize_melee_set(meleeSet)
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
local gearset = get_cor_gearset()
return set_combine(meleeSet, gearset)
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)
if newStatus == 'Engaged' then
get_combat_form()
end