-
Notifications
You must be signed in to change notification settings - Fork 67
/
Arislan-NIN.lua
1192 lines (1023 loc) · 41.2 KB
/
Arislan-NIN.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- Original: Motenten / Modified: Arislan
-- Haste/DW Detection Requires Gearinfo Addon
-------------------------------------------------------------------------------------------------------------------
-- Keybinds
-------------------------------------------------------------------------------------------------------------------
-- Modes: [ F9 ] Cycle Offense Modes
-- [ CTRL+F9 ] Cycle Hybrid Modes
-- [ WIN+F9 ] Cycle Weapon Skill Modes
-- [ 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
-- [ CTRL+` ] Toggle Treasure Hunter Mode
-- [ ALT+` ] Toggle Magic Burst Mode
-- [ WIN+C ] Toggle Capacity Points Mode
--
-- Abilities: [ CTRL+- ] Yonin
-- [ CTRL+= ] Innin
-- [ CTRL+Numpad/ ] Berserk
-- [ CTRL+Numpad* ] Warcry
-- [ CTRL+Numpad- ] Aggressor
--
-- Spells: [ WIN+, ] Utsusemi: Ichi
-- [ WIN+. ] Utsusemi: Ni
-- [ WIN+/ ] Utsusemi: San
-- [ ALT+, ] Monomi: Ichi
-- [ ALT+. ] Tonko: Ni
--
-- WS: [ CTRL+Numpad7 ] Blade: Kamu
-- [ CTRL+Numpad8 ] Blade: Shun
-- [ CTRL+Numpad4 ] Blade: Ten
-- [ CTRL+Numpad6 ] Blade: Hi
-- [ CTRL+Numpad1 ] Blade: Yu
--
--
-- (Global-Binds.lua contains additional non-job-related keybinds)
-------------------------------------------------------------------------------------------------------------------
-- 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.Migawari = buffactive.migawari or false
state.Buff.Doom = buffactive.doom or false
state.Buff.Yonin = buffactive.Yonin or false
state.Buff.Innin = buffactive.Innin or false
state.Buff.Futae = buffactive.Futae or false
state.Buff.Sange = buffactive.Sange or false
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
include('Mote-TreasureHunter')
-- 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}
lugra_ws = S{'Blade: Kamu', 'Blade: Shun', 'Blade: Ten'}
lockstyleset = 1
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', 'LowAcc', 'MidAcc', 'HighAcc', 'STP')
state.HybridMode:options('Normal', 'DT')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'DT')
state.PhysicalDefenseMode:options('PDT', 'Evasion')
state.WeaponSet = M{['description']='Weapon Set', 'Kikoku', 'Heishi', 'Hitaki', 'Tanking'}
state.WeaponLock = M(false, 'Weapon Lock')
state.MagicBurst = M(false, 'Magic Burst')
-- state.CP = M(false, "Capacity Points Mode")
options.ninja_tool_warning_limit = 10
-- Additional local binds
include('Global-Binds.lua') -- OK to remove this line
include('Global-GEO-Binds.lua') -- OK to remove this line
send_command('bind @t gs c cycle treasuremode')
send_command('bind !` gs c toggle MagicBurst')
send_command('bind ^- input /ja "Yonin" <me>')
send_command('bind ^= input /ja "Innin" <me>')
send_command('bind ^, input /nin "Monomi: Ichi" <me>')
send_command('bind ^. input /ma "Tonko: Ni" <me>')
send_command('bind @, input /ma "Utsusemi: Ichi" <me>')
send_command('bind @. input /ma "Utsusemi: Ni" <me>')
send_command('bind @/ input /ma "Utsusemi: San" <me>')
send_command('bind @w gs c toggle WeaponLock')
-- send_command('bind @c gs c toggle CP')
send_command('bind @e gs c cycleback WeaponSet')
send_command('bind @r gs c cycle WeaponSet')
send_command('bind ^numlock input /ja "Innin" <me>')
send_command('bind !numlock input /ja "Yonin" <me>')
if player.sub_job == 'WAR' then
send_command('bind ^numpad/ input /ja "Berserk" <me>')
send_command('bind !numpad/ input /ja "Defender" <me>')
send_command('bind ^numpad* input /ja "Warcry" <me>')
send_command('bind ^numpad- input /ja "Aggressor" <me>')
end
send_command('bind ^numpad7 input /ws "Blade: Metsu" <t>')
send_command('bind ^numpad8 input /ws "Blade: Shun" <t>')
send_command('bind ^numpad4 input /ws "Blade: Ten" <t>')
send_command('bind ^numpad6 input /ws "Blade: Hi" <t>')
send_command('bind ^numpad1 input /ws "Blade: Yu" <t>')
send_command('bind ^numpad2 input /ws "Blade: Chi" <t>')
-- Whether a warning has been given for low ninja tools
state.warned = M(false)
select_default_macro_book()
set_lockstyle()
state.Auto_Kite = M(false, 'Auto_Kite')
Haste = 0
DW_needed = 0
DW = false
moving = false
update_combat_form()
determine_haste_group()
end
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind @/')
send_command('unbind @w')
-- send_command('unbind @c')
send_command('unbind @e')
send_command('unbind @r')
send_command('unbind @t')
send_command('unbind ^numlock')
send_command('unbind !numlock')
send_command('unbind ^numpad/')
send_command('unbind !numpad/')
send_command('unbind ^numpad*')
send_command('unbind ^numpad-')
send_command('unbind ^numpad+')
send_command('unbind !numpad+')
send_command('unbind ^numpad7')
send_command('unbind ^numpad8')
send_command('unbind ^numpad4')
send_command('unbind ^numpad6')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
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()
--------------------------------------
-- Precast sets
--------------------------------------
-- Enmity set
sets.Enmity = {
ammo="Sapience Orb", --2
body="Emet Harness +1", --10
hands="Kurys Gloves", --9
feet="Mochi. Kyahan +3", --8
neck="Moonlight Necklace", --15
ear1="Cryptic Earring", --4
ear2="Trux Earring", --5
ring1="Pernicious Ring", --5
ring2="Eihwaz Ring", --5
waist="Kasiri Belt", --3
}
sets.precast.JA['Provoke'] = sets.Enmity
sets.precast.JA['Mijin Gakure'] = {legs="Mochi. Hakama +3"}
sets.precast.JA['Futae'] = {hands="Hattori Tekko +1"}
sets.precast.JA['Sange'] = {body="Mochi. Chainmail +3"}
sets.precast.JA['Innin'] = {head="Mochi. Hatsuburi +3"}
sets.precast.JA['Yonin'] = {head="Mochi. Hatsuburi +3"}
sets.precast.Waltz = {
ammo="Yamarang",
body="Passion Jacket",
legs="Dashing Subligar",
ring1="Asklepian Ring",
waist="Gishdubar Sash",
}
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Sapience Orb", --2
head=gear.Herc_MAB_head, --7
body=gear.Taeon_FC_body, --9
hands="Leyline Gloves", --8
legs="Rawhide Trousers", --5
feet=gear.Herc_MAB_feet, --2
neck="Orunmila's Torque", --5
ear1="Loquacious Earring", --2
ear2="Enchntr. Earring +1", --2
ring1="Kishar Ring", --4
ring2="Weather. Ring +1", --6(4)
back=gear.NIN_FC_Cape, --10
waist="Sailfi Belt +1",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
body="Mochi. Chainmail +3", --14
})
sets.precast.RA = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
ammo="Seeth. Bomblet +1",
head="Hachiya Hatsu. +3",
body=gear.Herc_WS_body,
hands=gear.Adhemar_B_hands,
legs="Mochi. Hakama +3",
feet=gear.Herc_WSD_feet,
neck="Fotia Gorget",
ear1="Moonshade Earring",
ear2="Ishvara Earring",
ring1="Regal Ring",
ring2="Epaminondas's Ring",
back=gear.NIN_WS2_Cape,
waist="Fotia Belt",
} -- default set
sets.precast.WS.Acc = set_combine(sets.precast.WS, {
ammo="Voluspa Tathlum",
hands=gear.Adhemar_A_hands,
legs=gear.Herc_WS_legs,
ear2="Telos Earring",
})
sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS, {
ammo="Yetshila +1",
head=gear.Adhemar_B_head,
body="Ken. Samue +1",
hands="Mummu Wrists +2",
feet="Mummu Gamash. +2",
neck="Ninja Nodowa +2",
ear1="Odr Earring",
ear2="Lugra Earring +1",
ring2="Gere Ring",
back=gear.NIN_WS2_Cape,
})
sets.precast.WS['Blade: Hi'].Acc = set_combine(sets.precast.WS['Blade: Hi'], {})
sets.precast.WS['Blade: Metsu'] = set_combine(sets.precast.WS, {
ammo="Aurgelmir Orb +1",
neck="Ninja Nodowa +2",
ear1="Odr Earring",
ear2="Lugra Earring +1",
waist="Sailfi Belt +1",
back=gear.NIN_WS3_Cape,
})
sets.precast.WS['Blade: Metsu'].Acc = set_combine(sets.precast.WS['Blade: Metsu'], {})
sets.precast.WS['Blade: Ten'] = set_combine(sets.precast.WS, {
neck="Ninja Nodowa +2",
back=gear.NIN_WS2_Cape,
waist="Sailfi Belt +1",
})
sets.precast.WS['Blade: Ten'].Acc = set_combine(sets.precast.WS['Blade: Ten'], {
ammo="Voluspa Tathlum",
ear2="Telos Earring",
})
sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS, {
ammo="C. Palug Stone",
head="Ken. Jinpachi +1",
body="Ken. Samue +1",
hands="Ken. Tekko +1",
legs="Jokushu Haidate",
feet="Ken. Sune-Ate +1",
ear1="Mache Earring +1",
ear2="Lugra Earring +1",
ring1="Gere Ring",
ring2="Ilabrat Ring",
back=gear.NIN_WS1_Cape,
})
sets.precast.WS['Blade: Shun'].Acc = set_combine(sets.precast.WS['Blade: Shun'], {
ammo="Voluspa Tathlum",
legs="Ken. Hakama +1",
})
sets.precast.WS['Blade: Ku'] = set_combine(sets.precast.WS['Blade: Shun'], {})
sets.precast.WS['Blade: Ku'].Acc = set_combine(sets.precast.WS['Blade: Ku'], {})
sets.precast.WS['Blade: Kamu'] = set_combine(sets.precast.WS, {
ring2="Ilabrat Ring",
})
sets.precast.WS['Blade: Yu'] = set_combine(sets.precast.WS, {
ammo="Seeth. Bomblet +1",
head="Hachiya Hatsu. +3",
body="Samnuha Coat",
hands="Leyline Gloves",
legs=gear.Herc_WSD_legs,
feet=gear.Herc_MAB_feet,
neck="Baetyl Pendant",
ear1="Crematio Earring",
ear2="Friomisi Earring",
ring1="Dingir Ring",
back=gear.NIN_MAB_Cape,
waist="Eschan Stone",
})
sets.Lugra = {ear2="Lugra Earring +1"}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
ammo="Staunch Tathlum +1", --11
body=gear.Taeon_Phalanx_body, --10
hands="Rawhide Gloves", --15
legs=gear.Taeon_Phalanx_legs, --10
feet=gear.Taeon_Phalanx_feet, --10
neck="Moonlight Necklace", --15
ear1="Halasz Earring", --5
ear2="Magnetic Earring", --8
ring1="Evanescence Ring", --5
back=gear.NIN_FC_Cape, --10
waist="Audumbla Sash", --10
}
-- Specific spells
sets.midcast.Utsusemi = set_combine(sets.midcast.SpellInterrupt, {feet="Hattori Kyahan +1", back=gear.NIN_FC_Cape,})
sets.midcast.ElementalNinjutsu = {
ammo="Ghastly Tathlum +1",
head="Mochi. Hatsuburi +3",
body="Samnuha Coat",
hands="Leyline Gloves",
legs=gear.Herc_MAB_legs,
feet=gear.Herc_MAB_feet,
neck="Baetyl Pendant",
ear1="Crematio Earring",
ear2="Friomisi Earring",
ring1="Shiva Ring +1",
ring2="Metamor. Ring +1",
back=gear.NIN_MAB_Cape,
waist="Eschan Stone",
}
sets.midcast.ElementalNinjutsu.Resistant = set_combine(sets.midcast.Ninjutsu, {
ammo="Pemphredo Tathlum",
neck="Sanctity Necklace",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
ear1="Enchntr. Earring +1",
})
sets.midcast.EnfeeblingNinjutsu = {
ammo="Yamarang",
head="Hachiya Hatsu. +3",
body="Mummu Jacket +2",
hands="Mummu Wrists +2",
legs="Mummu Kecks +2",
feet="Hachiya Kyahan +3",
neck="Sanctity Necklace",
ear1="Enchntr. Earring +1",
ear2="Digni. Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back=gear.NIN_MAB_Cape,
waist="Eschan Stone",
}
sets.midcast.EnhancingNinjutsu = {
head="Hachiya Hatsu. +3",
feet="Mochi. Kyahan +3",
neck="Incanter's Torque",
ear1="Stealth Earring",
ring1={name="Stikini Ring +1", bag="wardrobe3"},
ring2={name="Stikini Ring +1", bag="wardrobe4"},
back="Astute Cape",
waist="Cimmerian Sash",
}
sets.midcast.Stun = sets.midcast.EnfeeblingNinjutsu
sets.midcast.RA = {
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Malignance Boots",
neck="Iskur Gorget",
ear1="Enervating Earring",
ear2="Telos Earring",
ring1="Dingir Ring",
ring2="Hajduk Ring +1",
back=gear.NIN_TP_Cape,
waist="Yemaya Belt",
}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
-- sets.resting = {}
-- Idle sets
sets.idle = {
ammo="Seki Shuriken",
head="Malignance Chapeau",
body="Hiza. Haramaki +2",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Malignance Boots",
neck="Bathy Choker +1",
ear1="Eabani Earring",
ear2="Sanare Earring",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
back=gear.NIN_FC_Cape,
waist="Engraved Belt",
}
sets.idle.DT = set_combine(sets.idle, {
head="Malignance Chapeau", --6/6
body="Malignance Tabard", --9/9
hands="Malignance Gloves", --5/5
legs="Malignance Tights", --7/7
feet="Malignance Boots", --4/4
neck="Warder's Charm +1",
ear1="Sanare Earring",
ring1="Purity Ring", --0/4
ring2="Defending Ring", --10/10
back="Moonlight Cape", --6/6
})
sets.idle.Town = set_combine(sets.idle, {
ammo="Aurgelmir Orb +1",
head="Ken. Jinpachi +1",
body="Ken. Samue +1",
hands="Ken. Tekko +1",
legs="Mochi. Hakama +3",
feet="Ken. Sune-Ate +1",
neck="Ninja Nodowa +2",
ear1="Cessance Earring",
ear2="Telos Earring",
back=gear.NIN_TP_Cape,
waist="Windbuffet Belt +1",
})
-- Defense sets
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = sets.idle.DT
sets.Kiting = {feet="Danzo sune-ate"}
sets.DayMovement = {feet="Danzo sune-ate"}
sets.NightMovement = {feet="Hachiya Kyahan +3"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- 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
-- * NIN Native DW Trait: 35% DW
-- No Magic Haste (74% DW to cap)
sets.engaged = {
ammo="Seki Shuriken",
head="Ryuo Somen +1", --9
body="Mochi. Chainmail +3", --9
hands=gear.Adhemar_B_hands,
legs="Ken. Hakama +1",
feet="Hiza. Sune-Ate +2", --8
neck="Ninja Nodowa +2",
ear1="Cessance Earring",
ear2="Suppanomimi", --5
ring1="Gere Ring",
ring2="Epona's Ring",
back=gear.NIN_TP_Cape,
waist="Reiki Yotai", --7
} -- 38%
sets.engaged.LowAcc = set_combine(sets.engaged, {
hands=gear.Adhemar_A_hands,
})
sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {
ring2="Ilabrat Ring",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
})
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {
ring1="Regal Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
sets.engaged.STP = set_combine(sets.engaged, {
legs="Samnuha Tights",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
-- 15% Magic Haste (67% DW to cap)
sets.engaged.LowHaste = {
ammo="Seki Shuriken",
head="Ryuo Somen +1", --9
body="Mochi. Chainmail +3", --9
hands=gear.Adhemar_B_hands,
legs="Ken. Hakama +1",
feet="Ken. Sune-Ate +1",
neck="Ninja Nodowa +2",
ear1="Cessance Earring",
ear2="Suppanomimi", --5
ring1="Gere Ring",
ring2="Epona's Ring",
back=gear.NIN_TP_Cape,
waist="Reiki Yotai", --7
} -- 30%
sets.engaged.LowAcc.LowHaste = set_combine(sets.engaged.LowHaste, {
hands=gear.Adhemar_A_hands,
})
sets.engaged.MidAcc.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, {
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2="Ilabrat Ring",
})
sets.engaged.HighAcc.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, {
ring1="Regal Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
sets.engaged.STP.LowHaste = set_combine(sets.engaged.LowHaste, {
legs="Samnuha Tights",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
-- 30% Magic Haste (56% DW to cap)
sets.engaged.MidHaste = {
ammo="Seki Shuriken",
head="Ken. Jinpachi +1",
body="Mochi. Chainmail +3", --9
hands=gear.Adhemar_B_hands,
legs="Ken. Hakama +1",
feet="Ken. Sune-Ate +1",
neck="Ninja Nodowa +2",
ear1="Cessance Earring",
ear2="Suppanomimi", --5
ring1="Gere Ring",
ring2="Epona's Ring",
back=gear.NIN_TP_Cape,
waist="Reiki Yotai", --7
} -- 21%
sets.engaged.LowAcc.MidHaste = set_combine(sets.engaged.MidHaste, {
hands=gear.Adhemar_A_hands,
})
sets.engaged.MidAcc.MidHaste = set_combine(sets.engaged.LowAcc.MidHaste, {
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2="Ilabrat Ring",
})
sets.engaged.HighAcc.MidHaste = set_combine(sets.engaged.MidHaste.MidAcc, {
ring1="Regal Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
sets.engaged.STP.MidHaste = set_combine(sets.engaged.MidHaste, {
legs="Samnuha Tights",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
-- 35% Magic Haste (51% DW to cap)
sets.engaged.HighHaste = {
ammo="Seki Shuriken",
head="Ken. Jinpachi +1",
body="Ken. Samue +1",
hands=gear.Adhemar_B_hands,
legs="Ken. Hakama +1",
feet="Ken. Sune-Ate +1",
neck="Ninja Nodowa +2",
ear1="Eabani Earring", --4
ear2="Suppanomimi", --5
ring1="Gere Ring",
ring2="Epona's Ring",
back=gear.NIN_TP_Cape,
waist="Reiki Yotai", --7
} -- 16%
sets.engaged.LowAcc.HighHaste = set_combine(sets.engaged.HighHaste, {
hands=gear.Adhemar_A_hands,
})
sets.engaged.MidAcc.HighHaste = set_combine(sets.engaged.LowAcc.HighHaste, {
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2="Ilabrat Ring",
})
sets.engaged.HighAcc.HighHaste = set_combine(sets.engaged.MidAcc.HighHaste, {
ring1="Regal Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
})
sets.engaged.STP.HighHaste = set_combine(sets.engaged.HighHaste, {
legs="Samnuha Tights",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
waist="Kentarch Belt +1",
})
-- 45% Magic Haste (36% DW to cap)
sets.engaged.MaxHaste = {
ammo="Seki Shuriken",
head="Ken. Jinpachi +1",
body="Ken. Samue +1",
hands=gear.Adhemar_B_hands,
legs="Ken. Hakama +1",
feet="Ken. Sune-Ate +1",
neck="Ninja Nodowa +2",
ear1="Cessance Earring",
ear2="Telos Earring",
ring1="Gere Ring",
ring2="Epona's Ring",
back=gear.NIN_TP_Cape,
waist="Windbuffet Belt +1",
} -- 0%
sets.engaged.LowAcc.MaxHaste = set_combine(sets.engaged.MaxHaste, {
hands=gear.Adhemar_A_hands,
waist="Kentarch Belt +1",
})
sets.engaged.MidAcc.MaxHaste = set_combine(sets.engaged.LowAcc.MaxHaste, {
ear1="Cessance Earring",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2="Ilabrat Ring",
})
sets.engaged.HighAcc.MaxHaste = set_combine(sets.engaged.MidAcc.MaxHaste, {
ring1="Regal Ring",
ring2={name="Chirich Ring +1", bag="wardrobe4"},
waist="Olseni Belt",
})
sets.engaged.STP.MaxHaste = set_combine(sets.engaged.MaxHaste, {
legs="Samnuha Tights",
ear1="Dedition Earring",
ear2="Telos Earring",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
waist="Kentarch Belt +1",
})
sets.engaged.Hybrid = {
head="Malignance Chapeau", --6/6
legs="Malignance Tights", --7/7
feet="Malignance Boots", --4/4
ring2="Defending Ring", --10/10
back=gear.NIN_WS1_Cape, --10/0
}
sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)
sets.engaged.DT.LowHaste = set_combine(sets.engaged.LowHaste, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT.LowHaste = set_combine(sets.engaged.MidAcc.LowHaste, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT.LowHaste = set_combine(sets.engaged.HighAcc.LowHaste, sets.engaged.Hybrid)
sets.engaged.STP.DT.LowHaste = set_combine(sets.engaged.STP.LowHaste, sets.engaged.Hybrid)
sets.engaged.DT.MidHaste = set_combine(sets.engaged.MidHaste, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT.MidHaste = set_combine(sets.engaged.LowAcc.MidHaste, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT.MidHaste = set_combine(sets.engaged.MidAcc.MidHaste, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT.MidHaste = set_combine(sets.engaged.HighAcc.MidHaste, sets.engaged.Hybrid)
sets.engaged.STP.DT.MidHaste = set_combine(sets.engaged.STP.MidHaste, sets.engaged.Hybrid)
sets.engaged.DT.HighHaste = set_combine(sets.engaged.HighHaste, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT.HighHaste = set_combine(sets.engaged.LowAcc.HighHaste, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT.HighHaste = set_combine(sets.engaged.MidAcc.HighHaste, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT.HighHaste = set_combine(sets.engaged.HighAcc.HighHaste, sets.engaged.Hybrid)
sets.engaged.STP.DT.HighHaste = set_combine(sets.engaged.HighHaste.STP, sets.engaged.Hybrid)
sets.engaged.DT.MaxHaste = set_combine(sets.engaged.MaxHaste, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT.MaxHaste = set_combine(sets.engaged.LowAcc.MaxHaste, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT.MaxHaste = set_combine(sets.engaged.MidAcc.MaxHaste, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT.MaxHaste = set_combine(sets.engaged.HighAcc.MaxHaste, sets.engaged.Hybrid)
sets.engaged.STP.DT.MaxHaste = set_combine(sets.engaged.STP.MaxHaste, sets.engaged.Hybrid)
--------------------------------------
-- Custom buff sets
--------------------------------------
sets.buff.Migawari = {}
sets.buff.Yonin = {}
sets.buff.Innin = {}
sets.buff.Sange = {ammo="Hachiya Shuriken"}
sets.magic_burst = {
feet="Hachiya Kyahan +3",
ring1="Locus Ring",
ring2="Mujin Band", --(5)
}
-- sets.buff.Migawari = {body="Iga Ningi +2"}
sets.buff.Doom = {
neck="Nicander's Necklace", --20
ring1={name="Eshmun's Ring", bag="wardrobe3"}, --20
ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
-- sets.CP = {back="Mecisto. Mantle"}
sets.TreasureHunter = {head="Volte Cap", hands=gear.Herc_TH_hands, waist="Chaac Belt"}
--sets.Reive = {neck="Ygnas's Resolve +1"}
sets.Kikoku = {main="Kikoku", sub="Ternion Dagger +1"}
sets.Heishi = {main="Heishi Shorinken", sub="Ternion Dagger +1"}
sets.Hitaki = {main="Heishi Shorinken", sub="Hitaki"}
sets.Tanking = {main="Fudo Masamune", sub="Ternion Dagger +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == "Ninjutsu" then
do_ninja_tool_checks(spell, spellMap, eventArgs)
end
if spellMap == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if lugra_ws:contains(spell.english) and (world.time >= (17*60) or world.time <= (7*60)) then
equip(sets.Lugra)
end
if spell.english == 'Blade: Yu' and (world.weather_element == 'Water' or world.day_element == 'Water') then
equip(sets.Obi)
end
end
end
-- Run after the general midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'ElementalNinjutsu' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if (spell.element == world.day_element or spell.element == world.weather_element) then
equip(sets.Obi)
end
if state.Buff.Futae then
equip(sets.precast.JA['Futae'])
end
end
if state.Buff.Doom then
equip(sets.buff.Doom)
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 not spell.interrupted and spell.english == "Migawari: Ichi" then
state.Buff.Migawari = true
end
if player.status ~= 'Engaged' and state.WeaponLock.value == false then
check_weaponset()
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- if buffactive['Reive Mark'] then
-- if gain then
-- equip(sets.Reive)
-- disable('neck')
-- else
-- enable('neck')
-- end
-- end
if buff == "Migawari" and not gain then
add_to_chat(61, "*** MIGAWARI DOWN ***")
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
check_weaponset()
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
update_combat_form()
determine_haste_group()
check_moving()
end
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
th_update(cmdParams, eventArgs)
end
function update_combat_form()
if DW == true then
state.CombatForm:set('DW')
elseif DW == false then
state.CombatForm:reset()
end
end
function get_custom_wsmode(spell, action, spellMap)
local wsmode
if state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
wsmode = 'Acc'
end
return wsmode
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.Buff.Migawari then
idleSet = set_combine(idleSet, sets.buff.Migawari)
end
-- if state.CP.current == 'on' then
-- equip(sets.CP)
-- disable('back')
-- else
-- enable('back')
-- end
if state.Auto_Kite.value == true then
if world.time >= (17*60) or world.time <= (7*60) then
idleSet = set_combine(idleSet, sets.NightMovement)
else
idleSet = set_combine(idleSet, sets.DayMovement)
end
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Buff.Migawari then
meleeSet = set_combine(meleeSet, sets.buff.Migawari)
end
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.Buff.Sange then
meleeSet = set_combine(meleeSet, sets.buff.Sange)
end
check_weaponset()
return meleeSet
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
local cf_msg = ''
if state.CombatForm.has_value then
cf_msg = ' (' ..state.CombatForm.value.. ')'
end
local m_msg = state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
m_msg = m_msg .. '/' ..state.HybridMode.value
end
local ws_msg = state.WeaponskillMode.value
local c_msg = state.CastingMode.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.TreasureMode.value == 'Tag' then
msg = msg .. ' TH: Tag |'
end