-
Notifications
You must be signed in to change notification settings - Fork 1
/
Amunaptra_THF.lua
856 lines (760 loc) · 29.1 KB
/
Amunaptra_THF.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
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
mote_include_version = 2
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Sneak Attack'] = buffactive['sneak attack'] or false
state.Buff['Trick Attack'] = buffactive['trick attack'] or false
state.Buff['Feint'] = buffactive['feint'] or false
include('Mote-TreasureHunter')
determine_haste_group()
state.CapacityMode = M(false, 'Capacity Point Mantle')
-- 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
-- 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.HybridMode:options('Normal', 'Evasion', 'PDT')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('Evasion', 'PDT')
state.MagicalDefenseMode:options('MDT')
state.RangedMode:options('Normal')
-- Additional local binds
send_command('bind ^= gs c cycle treasuremode')
send_command('bind !- gs c cycle targetmode')
send_command('bind != gs c toggle CapacityMode')
send_command('bind ^[ input /lockstyle on')
send_command('bind ![ input /lockstyle off')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
send_command('unbind !-')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ![')
end
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
TaeonHands = {}
TaeonHands.TA = {name="Plunderer's Armlets +1", augments={'DEX+6','Accuracy+17 Attack+17','"Triple Atk."+2'}}
TaeonHands.Snap = {name="Plunderer's Armlets +1", augments={'Attack+22','"Snapshot"+8'}}
sets.TreasureHunter = {hands="Plunderer's Armlets +1", feet="Raider's Poulaines +2", waist="Chaac Belt"}
sets.ExtraRegen = { head="Ocelomeh Headpiece +1" }
sets.CapacityMantle = {back="Mecistopins Mantle"}
sets.Organizer = {
main="Odium",
sub="Jugo Kukri",
ammo="Izhiikoh",
range="Raider's Boomerang"
}
sets.buff['Sneak Attack'] = {
head="Uk'uxkaj Cap",
neck="Moepapa Medal",
ear1="Dudgeon Earring",
ear2="Heartseeker Earring",
body="Dread Jupon",
hands="Pillager's Armlets +1",
ring1="Ramuh Ring +1",
ring2="Rajas Ring",
back="Toutatis's Cape",
waist="Chaac Belt",
legs="Samnuha Tights",
feet="Raider's Poulaines +2"
}
sets.buff['Trick Attack'] = {
head="Uk'uxkaj Cap",
neck="Moepapa Medal",
ear1="Dudgeon Earring",
ear2="Heartseeker Earring",
body="Dread Jupon",
hands="Pillager's Armlets +1",
ring2="Garuda Ring",
back="Toutatis's Cape",
waist="Chaac Belt",
legs="Adhemar Kecks",
feet="Raider's Poulaines +2"
}
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Collaborator'] = {}
sets.precast.JA['Accomplice'] = {}
sets.precast.JA['Flee'] = { feet="Rogue's Poulaines" }
sets.precast.JA['Hide'] = {}
sets.precast.JA['Conspirator'] = {} -- {body="Raider's Vest +2"}
sets.precast.JA['Steal'] = {
hands="Pillager's Armlets +1",
legs="Pillager's Culottes +1"
}
sets.precast.JA['Despoil'] = {}
sets.precast.JA['Perfect Dodge'] = {hands="Plunderer's Armlets +1"}
sets.precast.JA['Feint'] = {hands="Plunderer's Armlets"} -- {legs="Assassin's Culottes +2"}
sets.precast.JA['Sneak Attack'] = sets.buff['Sneak Attack']
sets.precast.JA['Trick Attack'] = sets.buff['Trick Attack']
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",
body="Mekosuchinae Harness",
legs="Nahtirah Trousers",
}
-- TH actions
sets.precast.Step = {
head="Teon Chapeau",
neck="Sanctity Necklace",
ear1="Dudgeon Earring",
ear2="Heartseeker Earring",
hands=TaeonHands.TA,
back="Toutatis's Cape",
ring1="Patricius Ring",
ring2="Epona's Ring",
waist="Chaac Belt",
legs="Samnuha Tights",
feet="Raider's Poulaines +2"
}
sets.precast.Flourish1 = sets.TreasureHunter
sets.precast.JA.Provoke = sets.TreasureHunter
-- Fast cast sets for spells
sets.precast.FC = {
--ammo="Impatiens",
head="Teon Chapeau",
ear1="Loquacious Earring",
hands="Buremte Gloves",
body="Dread Jupon",
ring1="Prolix Ring",
legs="Limbo Trousers",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
neck="Magoraga Beads"
})
-- Ranged snapshot gear
sets.precast.RA = {
head="Uk'uxkaj Cap",
hands=TaeonHands.Snap,
legs="Nahtirah Trousers",
feet="Wurrukatte Boots"
}
sets.midcast.RA = {
head="Umbani Cap",
neck="Ocachi Gorget",
ear1="Tripudio Earring",
ear2="Enervating Earring",
body="Mekosuchinae Harness",
ring1="Rajas Ring",
ring2="K'ayres Ring",
waist="Patentia Sash",
legs="Samnuha Tights",
feet="Scopuli Nails +1"
}
--sets.midcast['Enfeebling Magic'] = sets.midcast.RA
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Skulker's bonnet +1",
neck="Fotia gorget",
body="Adhemar Jacket",
hands="Adhemar Wristbands",
ring1="Epona's Ring",
ring2="Ramuh Ring +1",
ear1="Brutal Earring",
ear2="Moonshade Earring",
back="Toutatis's Cape",
waist="Fotia Belt",
legs="Samnuha Tights",
feet="Herculean Boots"
}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {
hands="Adhemar Wristbands",
ring2="Patricius Ring",
back="Toutatis's Cape",
waist="Olseni Belt"
})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMid version isn't found.
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {
head="Teon Chapeau",
neck="Fotia Gorget",
ear1="Brutal Earring",
ear2="Moonshade Earring",
ring1="Garuda Ring",
legs="Samnuha Tights",
waist="Fotia Belt",
back="Toutatis's Cape"
})
sets.precast.WS['Exenterator'].Mid = set_combine(sets.precast.WS['Exenterator'], {waist="Thunder Belt"})
sets.precast.WS['Exenterator'].Acc = set_combine(sets.precast.WS['Exenterator'].Mid, {
back="Toutatis's Cape"
})
sets.precast.WS['Exenterator'].SA = set_combine(sets.precast.WS['Exenterator'].Mid, {
neck="Fotia Gorget",
hands="Pillager's Armlets +1",
legs="Samnuha Tights",
})
sets.precast.WS['Exenterator'].TA = set_combine(sets.precast.WS['Exenterator'].Mid, {
neck="Breeze Gorget",
hands="Pillager's Armlets +1"
})
sets.precast.WS['Exenterator'].SATA = set_combine(sets.precast.WS['Exenterator'].SA, {neck="Fotia Gorget"})
sets.precast.WS['Dancing Edge'] = set_combine(sets.precast.WS, {neck="Breeze Gorget", waist="Thunder Belt"})
sets.precast.WS['Dancing Edge'].Mid = set_combine(sets.precast.WS['Dancing Edge'], {waist="Thunder Belt"})
sets.precast.WS['Dancing Edge'].Acc = set_combine(sets.precast.WS['Dancing Edge'], {head="Skulker's bonnet +1", waist="Olseni Belt"})
sets.precast.WS['Dancing Edge'].SA = set_combine(sets.precast.WS['Dancing Edge'].Mid, {neck="Breeze Gorget"})
sets.precast.WS['Dancing Edge'].TA = set_combine(sets.precast.WS['Dancing Edge'].Mid, {neck="Breeze Gorget"})
sets.precast.WS['Dancing Edge'].SATA = set_combine(sets.precast.WS['Dancing Edge'].Mid, {neck="Breeze Gorget"})
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {
head="Uk'uxkaj Cap",
neck="Fotia gorget",
hands="Adhemar Wristbands",
ring1="Ramuh Ring +1",
waist="Fotia Belt",
legs="Samnuha Tights",
back="Toutatis's Cape",
feet="Thereoid Greaves"
})
sets.precast.WS['Evisceration'].Mid = set_combine(sets.precast.WS['Evisceration'], {back="Toutatis's Cape"})
sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {
hands="Adhemar Wristbands",
ring1="Epona's Ring",
ring2="Ramuh Ring +1",
back="Toutatis's Cape",
waist="Olseni Belt"
})
sets.precast.WS['Evisceration'].SA = set_combine(sets.precast.WS['Evisceration'].Mid, {neck="Shadow Gorget"})
sets.precast.WS['Evisceration'].TA = set_combine(sets.precast.WS['Evisceration'].Mid, {neck="Shadow Gorget"})
sets.precast.WS['Evisceration'].SATA = set_combine(sets.precast.WS['Evisceration'].Mid, {neck="Shadow Gorget"})
sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {
head="Skulker's bonnet +1",
neck="Fotia gorget",
hands="Adhemar Wristbands",
ring1="Epona's Ring",
ring2="Ramuh Ring +1",
ear1="Brutal Earring",
ear2="Moonshade Earring",
waist="Fotia Belt",
legs="Samnuha Tights",
back="Toutatis's Cape",
feet="Thereoid Greaves"
})
sets.precast.WS["Rudra's Storm"].Mid = set_combine(sets.precast.WS["Rudra's Storm"], {back="Toutatis's Cape"})
sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS["Rudra's Storm"], {
ring1="Epona's Ring",
ring2="Ramuh Ring +1",
back="Toutatis's Cape",
waist="Olseni Belt"
})
sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"].Mid, {neck="Aqua Gorget"})
sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"].Mid, {neck="Aqua Gorget"})
sets.precast.WS["Rudra's Storm"].SATA = set_combine(sets.precast.WS["Rudra's Storm"].Mid, {neck="Aqua Gorget"})
sets.precast.WS["Shark Bite"] = set_combine(sets.precast.WS, {head="Uk'uxkaj Cap", neck="Breeze Gorget",
ear1="Brutal Earring",ear2="Trux Earring", hands="Pillager's Armlets +1", ring1="Ramuh Ring +1", ring2="Rajas Ring",
legs="Samnuha Tights",
})
sets.precast.WS['Shark Bite'].Acc = set_combine(sets.precast.WS['Shark Bite'], {head="Skulker's bonnet +1"})
sets.precast.WS['Shark Bite'].Mid = set_combine(sets.precast.WS['Shark Bite'], {waist="Thunder Belt"})
sets.precast.WS['Shark Bite'].SA = set_combine(sets.precast.WS['Shark Bite'].Mid, {neck="Breeze Gorget", ring1="Ramuh Ring +1"})
sets.precast.WS['Shark Bite'].TA = set_combine(sets.precast.WS['Shark Bite'].Mid, {neck="Breeze Gorget"})
sets.precast.WS['Shark Bite'].SATA = set_combine(sets.precast.WS['Shark Bite'].Mid, {neck="Breeze Gorget"})
sets.precast.WS['Aeolian Edge'] = {
neck="Stoicheion Medal",
ear1="Crematio Earring",
head="Umbani Cap",
body="Samnuha Coat",
hands="Leyline Gloves",
ring1="Acumen Ring",
ring2="Garuda Ring",
back="Argochampsa Mantle",
waist="Thunder Belt",
legs="Limbo Trousers",
feet="Herculean Boots"
}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Felistris Mask",
hands="Iuitl Wristbands +1",
legs="Quiahuiz Trousers"
}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
-- Ranged gear -- acc + TH
sets.midcast.RA.TH = set_combine(sets.midcast.RA, set.TreasureHunter)
sets.midcast.RA.Acc = sets.midcast.RA
-- Resting sets
sets.resting = {ring2="Paguroidea Ring"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
head="Iuitl Headgear +1",
neck="Sanctity Necklace",
lear="Ethereal earring",
rear="Etiolation Earring",
body="Emet Harness +1",
hands="Iuitl Wristbands +1",
ring1="Gelatinous Ring +1",
ring2="Defending Ring",
back="Solemnity Cape",
waist="Flume Belt",
legs="Samnuha Tights",
feet="Jute boots +1"
}
sets.idle.Town = set_combine(sets.idle, {
head="Lithelimb Cap",
back="Toutatis's Cape",
neck="Sanctity Necklace",
body="Councilor's Garb",
hands="Leyline Gloves",
ring1="Karieyh Ring",
ring2="Defending Ring",
legs="Samnuha Tights",
waist="Windbuffet Belt +1",
feet="Jute boots +1"
})
sets.idle.Regen = set_combine(sets.idle, {
head="Ocelomeh Headpiece +1",
body="Kheper Jacket",
ring2="Paguroidea Ring",
})
sets.idle.Weak = sets.idle
-- Defense sets
sets.defense.Evasion = {
head="Felistris Mask",
neck="Defiant Collar",
body="Adhemar Jacket",
hands="Adhemar Wristbands",
ring1="Beeline Ring",
ring2="Defending Ring",
back="Toutatis's Cape",
legs="Samnuha Tights",
feet="Herculean Boots"
}
sets.defense.PDT = {
head="Iuitl Headgear +1",
neck="Loricate Torque",
body="Emet Harness +1",
hands="Adhemar Wristbands",
ring1="Gelatinous Ring +1",
ring2="Defending Ring",
back="Solemnity Cape",
waist="Flume Belt",
legs="Iuitl Tights +1",
}
sets.defense.MDT = {
head="Whirlpool Mask",
neck="Loricate Torque",
body="Adhemar Jacket",
hands="Adhemar Wristbands",
ring1="Dark Ring",
ring2="Defending Ring",
back="Solemnity Cape",
legs="Nahtirah Trousers",
feet="Herculean Boots"
}
sets.Kiting = {feet="Skadi's Jambeaux +1"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
head="Adhemar Bonnet",
neck="Asperity Necklace",
ear1="Brutal Earring",
ear2="Suppanomimi",
body="Adhemar Jacket",
hands="Adhemar Wristbands",
ring1="Epona's ring",
ring2="Petrov Ring",
back="Toutatis's Cape",
waist="Windbuffet Belt +1",
legs="Samnuha Tights",
feet="Herculean Boots"
}
sets.engaged.Mid = set_combine(sets.engaged, {
neck="Sanctity Necklace"
})
sets.engaged.Acc = set_combine(sets.engaged.Mid, {
body="Samnuha Coat",
hands=TaeonHands.TA,
neck="Sanctity Necklace",
ear1="Steelflash Earring",
ear2="Bladeborn Earring",
ring1="Patricius Ring",
waist="Kentarch Belt +1",
feet="Herculean Boots"
})
sets.engaged.Evasion = set_combine(sets.engaged, {
body="Adhemar Jacket",
ring1="Beeline Ring",
feet="Herculean Boots"
})
sets.engaged.Mid.Evasion = sets.engaged.Evasion
sets.engaged.Acc.Evasion = set_combine(sets.engaged.Evasion, {
head="Whirlpool Mask",
ring1="Patricius Ring",
waist="Olseni Belt"
})
sets.engaged.PDT = set_combine(sets.engaged, {
head="Iuitl Headgear +1",
neck="Loricate Torque",
body="Emet Harness +1",
ring1="Patricius Ring",
back="Solemnity Cape",
waist="Flume Belt",
legs="Iuitl Tights +1",
})
sets.engaged.Mid.PDT = set_combine(sets.engaged.PDT, {
ring1="Patricius Ring",
body="Emet Harness +1",
})
sets.engaged.Acc.PDT = set_combine(sets.engaged.PDT, {
head="Whirlpool Mask",
body="Emet Harness +1",
ring2="Epona's Ring",
waist="Olseni Belt"
})
-- Haste 43%
sets.engaged.Haste_43 = set_combine(sets.engaged, {
head="Adhemar Bonnet",
ear1="Steelflash Earring",
ear2="Bladeborn Earring",
body="Adhemar Jacket",
hands=TaeonHands.TA,
back="Toutatis's Cape",
waist="Windbuffet Belt +1",
legs="Samnuha Tights",
feet="Herculean Boots"
})
sets.engaged.Mid.Haste_43 = set_combine(sets.engaged.Haste_43, {
body="Adhemar Jacket",
ring1="Patricius Ring",
feet="Herculean Boots"
})
sets.engaged.Acc.Haste_43 = set_combine(sets.engaged.Haste_43, {
body="Adhemar Jacket",
neck="Sanctity Necklace",
hands="Leyline Gloves",
ear1="Steelflash Earring",
ear2="Bladeborn Earring",
ring1="Petrov Ring",
ring2="Patricius Ring",
waist="Windbuffet Belt +1",
back="Toutatis's Cape"
})
sets.engaged.Evasion.Haste_43 = set_combine(sets.engaged.Haste_43, { body="Adhemar Jacket", ring1="Beeline Ring", feet="Herculean Boots"})
sets.engaged.PDT.Haste_43 = set_combine(sets.engaged.Haste_43, {
head="Iuitl Headgear +1",
neck="Loricate Torque",
body="Adhemar Jacket",
ring1="Patricius Ring",
ring2="Dark Ring",
back="Solemnity Cape",
legs="Iuitl Tights +1",
feet="Herculean Boots"
})
-- 40
sets.engaged.Haste_40 = set_combine(sets.engaged.Haste_43, {
body="Samnuha Coat",
ear1="Brutal Earring",
ear2="Suppanomimi"
})
sets.engaged.Mid.Haste_40 = set_combine(sets.engaged.Haste_40, { body="Samnuha Coat" })
sets.engaged.Acc.Haste_40 = set_combine(sets.engaged.Acc.Haste_43, {
ear1="Brutal Earring",
ear2="Suppanomimi"
})
sets.engaged.Evasion.Haste_40 = set_combine(sets.engaged.Haste_40, {
body="Adhemar Jacket",
ring1="Beeline Ring",
feet="Herculean Boots"
})
sets.engaged.PDT.Haste_40 = set_combine(sets.engaged.Haste_40, {
head="Lithelimb Cap",
neck="Loricate Torque",
body="Adhemar Jacket",
ring1="Patricius Ring",
ring2="Dark Ring",
back="Solemnity Cape",
legs="Iuitl Tights +1",
feet="Herculean Boots"
})
-- 30
sets.engaged.Haste_30 = set_combine(sets.engaged.Haste_40, {
back="Toutatis's Cape",
feet="Herculean Boots"
})
sets.engaged.Mid.Haste_30 = set_combine(sets.engaged.Haste_30, {
body="Samnuha Coat",
feet="Herculean Boots"
})
sets.engaged.Acc.Haste_30 = set_combine(sets.engaged.Acc.Haste_40, {
waist="Windbuffet belt +1",
feet="Herculean Boots"
})
sets.engaged.Evasion.Haste_30 = set_combine(sets.engaged.Haste_30, { body="Samnuha Coat", ring1="Beeline Ring", feet="Herculean Boots"})
sets.engaged.PDT.Haste_30 = set_combine(sets.engaged.Haste_30, {
head="Lithelimb Cap",
neck="Loricate Torque",
body="Adhemar Jacket",
ring1="Patricius Ring",
ring2="Dark Ring",
back="Solemnity Cape",
legs="Iuitl Tights +1",
feet="Herculean Boots" })
-- 25
sets.engaged.Haste_25 = set_combine(sets.engaged.Haste_30, {
hands=TaeonHands.TA,
ear1="Heartseeker Earring",
ear2="Dudgeon Earring"
})
sets.engaged.Acc.Haste_25 = set_combine(sets.engaged.Acc.Haste_30, {
ear1="Heartseeker Earring",
ear2="Dudgeon Earring"
})
sets.engaged.Mid.Haste_25 = set_combine(sets.engaged.Haste_25, { body="Samnuha Coat" })
sets.engaged.Evasion.Haste_25 = set_combine(sets.engaged.Haste_25, { body="Samnuha Coat", ring1="Beeline Ring", feet="Herculean Boots"})
sets.engaged.PDT.Haste_25 = set_combine(sets.engaged.Haste_25, {
head="Lithelimb Cap",
neck="Loricate Torque",
body="Adhemar Jacket",
ring1="Patricius Ring",
ring2="Dark Ring",
back="Solemnity Cape",
legs="Iuitl Tights +1",
feet="Herculean Boots" })
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end
-- Run after the general precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Aeolian Edge' and state.TreasureMode.value ~= 'None' then
equip(sets.TreasureHunter)
elseif spell.english=='Sneak Attack' or spell.english=='Trick Attack' or spell.type == 'WeaponSkill' then
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
end
if spell.type == 'WeaponSkill' then
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
end
end
-- Run after the general midcast() set is constructed.
function job_post_midcast(spell, action, spellMap, eventArgs)
if state.TreasureMode.value ~= 'None' and spell.action_type == 'Ranged Attack' then
equip(sets.TreasureHunter)
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 state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
-- Weaponskills wipe SATA/Feint. Turn those state vars off before default gearing is attempted.
if spell.type == 'WeaponSkill' and not spell.interrupted then
state.Buff['Sneak Attack'] = false
state.Buff['Trick Attack'] = false
state.Buff['Feint'] = false
end
end
-- Called after the default aftercast handling is complete.
function job_post_aftercast(spell, action, spellMap, eventArgs)
-- If Feint is active, put that gear set on on top of regular gear.
-- This includes overlaying SATA gear.
check_buff('Feint', eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks.
-------------------------------------------------------------------------------------------------------------------
function get_custom_wsmode(spell, spellMap, defaut_wsmode)
local wsmode
if state.Buff['Sneak Attack'] then
wsmode = 'SA'
end
if state.Buff['Trick Attack'] then
wsmode = (wsmode or '') .. 'TA'
end
return wsmode
end
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)
-- Check that ranged slot is locked, if necessary
check_range_lock()
-- Check for SATA when equipping gear. If either is active, equip
-- that gear specifically, and block equipping default gear.
check_buff('Sneak Attack', eventArgs)
check_buff('Trick Attack', eventArgs)
end
function customize_idle_set(idleSet)
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
return idleSet
end
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
return meleeSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for change 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 we gain or lose any haste buffs, adjust which gear set we target.
if S{'haste','march', 'madrigal','embrava','haste samba'}:contains(buff:lower()) then
determine_haste_group()
handle_equipping_gear(player.status)
end
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
if not midaction() then
handle_equipping_gear(player.status)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Various update events.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
th_update(cmdParams, eventArgs)
determine_haste_group()
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 msg = 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ': '
msg = msg .. state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. ', WS: ' .. state.WeaponskillMode.value
if state.DefenseMode.value ~= 'None' then
msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
end
if state.Kiting.value == true then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value == true then
msg = msg .. ', Target NPCs'
end
msg = msg .. ', TH: ' .. state.TreasureMode.value
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
if state.Buff[buff_name] then
equip(sets.buff[buff_name] or {})
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
eventArgs.handled = true
end
end
function status_change(new,action)
send_command('input /lockstyle on')
end
function precast(spell,action)
if (string.find(spell.type,'Magic') or spell.type == "Ninjutsu" or spell.type == "Geomancy") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
if spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function determine_haste_group()
classes.CustomMeleeGroups:clear()
-- Haste (white magic) 15%
-- Haste Samba (Sub) 5%
-- Haste (Merited DNC) 10%
-- Victory March +3/+4/+5 14%/15.6%/17.1%
-- Advancing March +3/+4/+5 10.9%/12.5%/14%
-- Embrava 25%
if (buffactive.embrava or buffactive.haste) and buffactive.march == 2 then
add_to_chat(8, '-------------Haste 43%-------------')
classes.CustomMeleeGroups:append('Haste_43')
elseif buffactive.embrava and buffactive.haste then
add_to_chat(8, '-------------Haste 40%-------------')
classes.CustomMeleeGroups:append('Haste_40')
elseif (buffactive.haste and buffactive.march == 1) or (buffactive.march == 2 and buffactive['haste samba']) then
add_to_chat(8, '-------------Haste 30%-------------')
classes.CustomMeleeGroups:append('Haste_30')
elseif buffactive.embrava or buffactive.march == 2 then
add_to_chat(8, '-------------Haste 25%-------------')
classes.CustomMeleeGroups:append('Haste_25')
end
end
-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
if category == 2 or -- any ranged attack
--category == 4 or -- any magic action
(category == 3 and param == 30) or -- Aeolian Edge
(category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
then return true
end
end
-- Function to lock the ranged slot if we have a ranged weapon equipped.
function check_range_lock()
if player.equipment.range ~= 'empty' then
disable('range', 'ammo')
else
enable('range', 'ammo')
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 2)
elseif player.sub_job == 'WAR' then
set_macro_page(1, 2)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 2)
else
set_macro_page(1, 2)
end
end