-
Notifications
You must be signed in to change notification settings - Fork 1
/
Anukk_GEO.lua
824 lines (683 loc) · 32.1 KB
/
Anukk_GEO.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
-------------------------------------------------------------------------------------------------------------------
-- 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')
-- VARIABLES --
auto_action = 'Off'
geo_mode = 'Fury'
blaze = 'Off'
windower.register_event('tp change', function(new, old)
if new > 349
and auto_action == 'On' then
relaxed_play_mode()
end
end)
windower.register_event('time change', function(time)
if auto_action == 'On' then
relaxed_play_mode()
end
end)
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast = {}
sets.precast.JA = {}
sets.precast.JA.Bolster = {body="Bagua Tunic"}
sets.precast.JA['Life cycle'] = {body="Geomancy Tunic"}
sets.precast.JA['Full cycle'] = {head="Azimuth Hood +1"}
sets.precast.JA['Radial Arcana'] = {feet="Bagua sandals"}
-- Fast cast sets for spells
sets.precast.FastCast = {range="Dunna",
head="Merlinic hood", ear1="Etiolation Earring", ear2="Loquacious Earring",
body="Vrikodara Jupon", ring1="Lebeche Ring", hands="Amalric gages",
back="Lifestream Cape",waist="Cetl Belt",legs="Geomancy Pants",feet="Merlinic Crackows"}
--sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Tamaxchi",sub="Sors Shield",back="Pahtli Cape"})
--sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {hands="Bagua mitaines"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Amar cluster",
head="Merlinic hood",neck="Fotia gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Hagondes Coat +1",hands="Amalric gages",ring1="Rajas Ring",ring2="Rufescent Ring",
back="Rancorous Mantle",waist="Fotia Belt",legs="Merlinic shalwar",feet="Battlecast Gaiters"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Flash Nova'] = {ammo="Ghastly Tathlum",
head="Merlinic hood",neck="Incanter's torque",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric doublet",hands="Amalric gages",ring1="Acumen Ring",ring2="Etana ring",
back="Toro Cape",waist="Fotia Belt", legs="Merlinic shalwar", feet="Merlinic Crackows"}
sets.precast.WS['Starlight'] = {ear2="Moonshade Earring"}
sets.precast.WS['Moonlight'] = {ear2="Moonshade Earring"}
--------------------------------------
-- Midcast sets
--------------------------------------
-- Base fast recast for spells
sets.midcast = {}
sets.midcast.FastRecast = {
head="Merlinic hood",ear2="Loquacious Earring",
body="Vrikodara Jupon",hands="Geomancy Mitaines +1",ring1="Prolix Ring",
back="Lifestream Cape",waist="Witful Belt",legs="Geomancy Pants",feet="Merlinic Crackows"}
sets.midcast.Geomancy = {main="Rubicundity", sub="Niobid Strap", range="Dunna",
head="Azimuth Hood", body="Bagua Tunic", hands="Geomancy Mitaines +1", lear="Mendi. Earring", rear="Gifted earring",
neck="Incanter's torque", rring="Renaye Ring", feet="Medium's sabots", back="Lifestream Cape"}
sets.midcast.Geomancy.Indi = {main="Rubicundity", sub="Niobid Strap", range="Dunna",
head="Azimuth Hood", body="Bagua Tunic", lear="Mendi. Earring", rear="Gifted earring", neck="Incanter's torque", rring="Renaye Ring",
legs="Bagua Pants", hands="Geomancy Mitaines +1", feet="Medium's sabots", back="Lifestream Cape"}
sets.midcast.Cure = {main="Tamaxchi",sub="Sors Shield", lear="Novia Earring", rear="Mendicant's Earring",
head="Vanya hood", body="Vrikodara Jupon",hands="Telchine Gloves", lring="Sirona's ring", rring="Lebeche ring",
waist="Ovate Rope", back="Lifestream Cape", legs="Assiduity Pants +1",feet="Medium's sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Protectra = {ring1="Sheltered Ring"}
sets.midcast.Shellra = {ring1="Sheltered Ring"}
sets.midcast['Enhancing Magic'] = {
head="Befouled Crown", neck="Incanter's torque", ear1="Etiolation Earring", ear2="Loquacious Earring",
body="Telchine Chasuble",hands="Amalric gages", lring="Metamor. Ring +1", rring="Perception ring",
back="Merciful Cape",waist="Refoccilation Stone",legs="Assiduity Pants +1", feet="Azimuth Gaiters +1"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash", neck="Stone gorget"})
sets.midcast['Enfeebling Magic'] = {main="Marin staff +1", sub="Niobid Strap", range="Aureole",
head="Befouled Crown", neck="Incanter's torque", rear="Barkarole Earring", lear="Psystorm Earring",
body="Vanya Robe", hands="Azimuth Gloves", lring="Metamor. Ring +1", rring="Perception ring",
back="Lifestream Cape", waist="Ovate Rope", legs="Psycloth Lappas", feet="Merlinic Crackows"}
sets.midcast['Elemental Magic'] = {main="Marin staff +1", sub="Niobid Strap", ammo="Ghastly Tathlum",
head="Merlinic hood", neck="Incanter's torque", lear="Barkarole Earring", rear="Friomisi Earring",
body="Amalric doublet", hands="Amalric gages", lring="Metamor. Ring +1", rring="Perception ring",
back="Toro Cape", waist="Refoccilation Stone", legs="Merlinic shalwar", feet="Merlinic Crackows"}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Dark Magic'] = {main="Marin staff +1", sub="Niobid Strap", range="Dunna",
head="Bagua Galero", neck="Incanter's torque", rear="Lifestorm Earring", lear="Psystorm Earring",
body="Geomancy Tunic", hands="Amalric gages", lring="Metamor. Ring +1", rring="Perception ring",
back="Lifestream Cape", waist="Ovate Rope", legs="Merlinic shalwar", feet="Merlinic Crackows"}
sets.magic_burst = {main="Marin staff +1", sub="Niobid Strap", ammo="Ghastly Tathlum",
head="Merlinic hood", neck="Mizu. Kubikazari", lear="Barkarole Earring", rear="Friomisi Earring",
body="Amalric doublet", hands="Amalric gages", lring="Mujin Band", rring="Locus ring",
back="Seshaw cape", waist="Refoccilation Stone", legs="Merlinic shalwar", feet="Merlinic Crackows"}
sets.obi = {
Fire = {waist="Karin Obi"},
Earth = {waist="Dorin Obi"},
Water = {waist="Suirin Obi"},
Wind = {waist="Furin Obi"},
Ice = {waist="Hyorin Obi"},
Lightning = {waist="Rairin Obi"},
Light = {waist="Korin Obi"},
Dark = {waist="Anrin Obi"},
}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
sets.resting = {main="Pluto's Staff", range="Dunna",
head="Azimuth Hood +1", neck="Incanter's torque", rear="Etiolation Earring", lear="Ethereal Earring",
body="Amalric doublet", hands="Bagua Mitaines", lring="Paguroidea Ring", rring="Renaye Ring",
back="Toro Cape", waist="Refoccilation Stone", legs="Assiduity Pants +1", feet="Azimuth Gaiters +1"}
-- Idle sets
sets.idle = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.idle.PDT = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
-- .Pet sets are for when Luopan is present.
sets.idle.Pet = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.idle.PDT.Pet = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
-- .Indi sets are for when an Indi-spell is active.
--sets.idle.Indi = set_combine(sets.idle, {legs="Bagua Pants"})
--sets.idle.Pet.Indi = set_combine(sets.idle.Pet, {legs="Bagua Pants"})
--sets.idle.PDT.Indi = set_combine(sets.idle.PDT, {legs="Bagua Pants"})
--sets.idle.PDT.Pet.Indi = set_combine(sets.idle.PDT.Pet, {legs="Bagua Pants"})
sets.idle.Town = {main="Marin staff +1", sub="Niobid Strap", range="Dunna",
head="Befouled Crown",neck="Incanter's torque",rear="Etiolation Earring", lear="Handler's Earring +1",
body="Amalric doublet",hands="Bagua Mitaines", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Refoccilation Stone",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.idle.Weak = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {main="Marin staff +1", sub="Volos Strap", range="Dunna",
head="Vanya Hood",neck="Loricate Torque +1",ear1="Handler's Earring +1", ear2="Handler's Earring",
body="Vanya Robe",hands="Geomancy Mitaines +1", lring="Paguroidea Ring", rring="Renaye Ring",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
end
do
--[[ Author: Arcon
The three next "do" sections are used to aid in checking recast
times, can check multiple recast times at once ]]
local cache = {}
function j(str)
if not cache[str] then
cache[str] = gearswap.res.job_abilities:with('name', str)
end
return cache[str]
end
end
do
local cache = {}
function s(str)
if not cache[str] then
cache[str] = gearswap.res.spells:with('name', str)
end
return cache[str]
end
end
do
local ja_types = S(gearswap.res.job_abilities:map(table.get-{'type'}))
function check_recasts(...)
local spells = S{...}
for spell in spells:it() do
local fn = 'get_' .. (ja_types:contains(spell.type)
and 'ability'
or 'spell') ..'_recasts'
if windower.ffxi[fn]()[spell.recast_id] > 0 then
return false
end
end
return true
end
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
indi_timer = ''
indi_duration = 180
-- VARIABLES --
auto_action = 'Off'
geo_mode = 'Fury'
blaze = 'Off'
windower.register_event('tp change', function(new, old)
if new > 349
and auto_action == 'On' then
relaxed_play_mode()
end
end)
windower.register_event('time change', function(time)
if auto_action == 'On' then
relaxed_play_mode()
end
end)
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
state.MagicBurst = M(false, 'Magic Burst')
-- Additional local binds
send_command('bind ^` gs c toggle MagicBurst')
end
function self_command(str)
-- Use an in game macro "/con gs c auto_action" to toggle bot Off and On
--macro: "/con send Anukk gs c auto_action"
if str == 'auto_action' then
if auto_action == 'Off' then
auto_action = 'On'
else
auto_action = 'Off'
end
windower.add_to_chat(8,'Auto fire event set to: '..auto_action)
windower.send_command('input /tell Amunaptra Auto_action: '..auto_action)
elseif str == 'geo_mode' then
if geo_mode == 'Fury' then
geo_mode = 'Attunement'
elseif geo_mode == 'Attunement' then
geo_mode = 'Acumen'
elseif geo_mode == 'Acumen' then
geo_mode = 'Precision'
elseif geo_mode == 'Precision' then
geo_mode = 'Focus'
elseif geo_mode == 'Focus' then
geo_mode = 'Fury'
end
windower.add_to_chat(8,'Geo set mode: '..geo_mode)
windower.send_command('input /tell Amunaptra Geo_mode: '..geo_mode)
elseif str == 'entrust_acc' then
if not check_buffs('silence', 'mute')
and check_recasts(s('Indi-Precision'))
and check_recasts(s('Entrust')) then
windower.send_command('Entrust <me>;wait 1;Indi-Precision <p1>')
end
elseif str == 'entrust_focus' then
if not check_buffs('silence', 'mute')
and check_recasts(s('Indi-Focus'))
and check_recasts(s('Entrust')) then
windower.send_command('Entrust <me>;wait 1;Indi-Focus <p1>')
end
elseif str == 'entrust_fury' then
if not check_buffs('silence', 'mute')
and check_recasts(s('Indi-Fury'))
and check_recasts(s('Entrust')) then
windower.send_command('Entrust <me>;wait 1;Indi-Fury <p1>')
end
elseif str == 'entrust_haste' then
if not check_buffs('silence', 'mute')
and check_recasts(s('Indi-Haste'))
and check_recasts(s('Entrust')) then
windower.send_command('Entrust <me>;wait 1;Indi-Haste <p1>')
end
elseif str == 'blaze' then
if not check_buffs('silence', 'mute')
and player.mp > 379
and check_recasts(s('Radial Arcana'))
and check_recasts(s('Blaze of Glory'))
and check_recasts(s('Dematerialize')) then
blaze = 'On'
end
end
end
function relaxed_play_mode()
-- This can be used as a mini bot to automate actions
if not midaction() then
if player.hpp < 70
and not check_buffs('silence', 'mute')
and check_recasts(s('cure4')) then
windower.send_command('cure4 <me>')
elseif player.hpp > 90
and player.mpp < 10
and check_recasts(s('Convert')) then
windower.send_command('Convert;wait 1;cure4 <me>')
elseif not check_buffs('Refresh')
and not check_buffs('silence', 'mute')
and check_recasts(s('Refresh')) then
windower.send_command('Refresh <me>')
--Indi
elseif not check_buffs('Attack Boost')
and not check_buffs('silence', 'mute')
and geo_mode == 'Fury'
and check_recasts(s('Indi-Fury')) then
windower.send_command('Indi-Fury')
elseif not check_buffs('Magic Evasion Boost')
and not check_buffs('silence', 'mute')
and geo_mode == 'Attunement'
and check_recasts(s('Indi-Attunement')) then
windower.send_command('Indi-Attunement')
elseif not check_buffs('Magic Atk. Boost')
and not check_buffs('silence', 'mute')
and geo_mode == 'Acumen'
and check_recasts(s('Indi-Acumen')) then
windower.send_command('Indi-Acumen')
elseif not check_buffs('Accuracy Boost')
and not check_buffs('silence', 'mute')
and geo_mode == 'Precision'
and check_recasts(s('Indi-Precision')) then
windower.send_command('Indi-Precision')
elseif not check_buffs('Magic Accuracy Boost')
and not check_buffs('silence', 'mute')
and geo_mode == 'Focus'
and check_recasts(s('Indi-Focus')) then
windower.send_command('Indi-Focus')
--blaze of glory
elseif blaze == 'On'
and not check_buffs('silence', 'mute')
and check_recasts(s('Geo-Frailty'))
and player.mp > 379
and check_recasts(s('Radial Arcana'))
and check_recasts(s('Blaze of Glory'))
and check_recasts(s('Dematerialize')) then
if geo_mode == 'Fury' then
windower.send_command('Radial Arcana <me>;wait 1;Blaze of Glory <me>;wait 2;Geo-Frailty <bt>;wait 6;Dematerialize <me>;wait 1;Life Cycle <me>;wait 1;Lasting Emanation <me>;wait 1;Dia2 <bt>')
elseif geo_mode == 'Attunement' then
windower.send_command('Radial Arcana <me>;wait 1;Blaze of Glory <me>;wait 2;Geo-Vex <bt>;wait 6;Dematerialize <me>;wait 1;Life Cycle <me>;wait 1;Lasting Emanation <me>;wait 1;Dia2 <bt>')
elseif geo_mode == 'Acumen' then
windower.send_command('Radial Arcana <me>;wait 1;Blaze of Glory <me>;wait 2;Geo-Malaise <bt>;wait 6;Dematerialize <me>;wait 1;Life Cycle <me>;wait 1;Lasting Emanation <me>;wait 1;Dia2 <bt>')
elseif geo_mode == 'Precision' then
windower.send_command('Radial Arcana <me>;wait 1;Blaze of Glory <me>;wait 2;Geo-Torpor <bt>;wait 6;Dematerialize <me>;wait 1;Life Cycle <me>;wait 1;Lasting Emanation <me>;wait 1;Dia2 <bt>')
elseif geo_mode == 'Focus' then
windower.send_command('Radial Arcana <me>;wait 1;Blaze of Glory <me>;wait 2;Geo-Languor <bt>;wait 6;Dematerialize <me>;wait 1;Life Cycle <me>;wait 1;Lasting Emanation <me>;wait 1;Dia2 <bt>')
end
blaze = 'Off'
--Geo
elseif not pet.isvalid
and not check_buffs('silence', 'mute')
and check_recasts(s('Geo-Frailty'))
and check_recasts(s('Geo-Vex'))
and check_recasts(s('Geo-Malaise'))
and check_recasts(s('Geo-Torpor')) then
if player.mp > 305 and geo_mode == 'Fury' then
windower.send_command('wait 1;Geo-Frailty <bt>;wait 7;Dia2 <bt>;wait 3;Distract <bt>')
elseif player.mp > 302 and geo_mode == 'Attunement' then
windower.send_command('wait 1;Geo-Vex <bt>;wait 7;Dia2 <bt>;wait 3;Distract <bt>')
elseif player.mp > 379 and geo_mode == 'Acumen' then
windower.send_command('wait 1;Geo-Malaise <bt>;wait 7;Dia2 <bt>;wait 3;Frazzle <bt>')
elseif player.mp > 203 and geo_mode == 'Precision' then
windower.send_command('wait 1;Geo-Torpor <bt>;wait 7;Dia2 <bt>;wait 3;Distract <bt>')
elseif player.mp > 249 and geo_mode == 'Focus' then
windower.send_command('wait 1;Geo-Languor <bt>;wait 7;Dia2 <bt>;wait 3;Frazzle <bt>')
end
end
end
if not midaction() then
if not check_buffs('Stoneskin')
and not check_buffs('silence', 'mute')
and check_recasts(s('Stoneskin')) then
windower.send_command('Stoneskin')
end
--if not check_buffs('Phalanx')
-- and not check_buffs('silence', 'mute')
-- and check_recasts(s('Phalanx')) then
-- windower.send_command('Phalanx')
--end
end
end
function relaxed_play_mode2()
-- Skillup Elemental/Enfeebling/Dark
if not midaction() then
if player.hpp < 70
and not check_buffs('silence', 'mute')
and check_recasts(s('cure4')) then
windower.send_command('cure4 <me>')
elseif player.hpp > 90
and player.mpp < 10
and check_recasts(s('Convert')) then
windower.send_command('Convert;wait 1;cure4 <me>')
elseif not check_buffs('Regen')
and not check_buffs('silence', 'mute')
and check_recasts(s('Indi-Regen')) then
windower.send_command('Indi-Regen')
elseif not pet.isvalid
and not check_buffs('silence', 'mute')
and check_recasts(s('Geo-Refresh')) then
windower.send_command('Geo-Refresh <me>')
elseif not check_buffs('silence', 'mute') then
--windower.send_command('fire <bt>')
--windower.send_command('dia <bt>')
windower.send_command('bio <bt>')
end
end
end
-- Define sets and vars used by this job file.
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Geomancy' then
if spell.english:startswith('Indi') then
return 'Indi'
end
end
end
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
classes.CustomIdleGroups:clear()
if player.indi then
classes.CustomIdleGroups:append('Indi')
end
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
local msg = 'Offense'
msg = msg .. ': [' .. state.OffenseMode.value .. '], '
msg = msg .. 'Casting'
msg = msg .. ': [' .. state.CastingMode.value .. '], '
msg = msg .. 'Idle'
msg = msg .. ': [' .. state.IdleMode.value .. '], '
if state.MagicBurst.value == true then
msg = msg .. 'Magic Burst: [On]'
elseif state.MagicBurst.value == false then
msg = msg .. 'Magic Burst: [Off]'
end
add_to_chat(122, msg)
eventArgs.handled = true
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == "Magic" then
if spell.element == world.weather_element or spell.element == world.day_element then
equip(sets.obi[spell.element])
end
end
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.magic_burst)
end
end
function check_buffs(...)
--[[ Function Author: Arcon
Simple check before attempting to auto activate Job Abilities that
check active buffs and debuffs ]]
return table.any({...}, table.get+{buffactive})
end
function check_set_spells(...)
--[[ Function Author: Arcon
Used to pull list of currently set spells, this is useful for
determining traits such as Dual Wield IV
Also used to determine the Cure spell set, when used with a
self_command ]]
set_spells = set_spells
or gearswap.res.spells:type('BlueMagic'):rekey('name')
return table.all({...}, function(name)
return S(windower.ffxi.get_mjob_data().spells)
:contains(set_spells[name].id)
end)
end
function gear_modes()
-- User created bridge for aftercast and status_change functions
-- Sequential gear sets used to easily allow for changing player needs
--slot_disabling()
local attack_preference = 'null'
if player.status == 'Engaged' then
--[[ This will adjust the amount of Dual Wield used based on if Magic
Haste is capped from March song, It is assumed that March is
sung with an instrument that will allow you to hit the cap ]]
if (check_buffs('Haste') and check_buffs('March')) or
(check_buffs('Haste') and check_buffs('Mighty Guard')) or
buffactive.haste == 2 then
attack_preference = 'Multiattack'
else
attack_preference = 'Dual Wield'
end
equip(sets.engaged)
elseif player.status == 'Idle' then
equip(sets.idle)
if dt_mode == 'None' then
--print(party.count)
if party.count > 1 then
equip(sets.idle.SphereRefresh)
end
if player.mpp < 50 then
equip(sets.idle.under_50mpp)
end
if check_buffs('Reive Mark') then
equip(sets.misc.Reive)
end
end
end
-- Will inform you if no weapon is equiped and re-equip once able
if player.equipment.main == 'empty' then
equip(sets.weapon[weapon_combo])
windower.add_to_chat(8,'No Weapon, trying to re-equip: '..weapon_combo)
end
end
function precast(spell,arg)
gear_change_ok = false
slot_disabling()
--[[ Generic equip command for Job Abilities and Weaponskills that have
a gear set listed in get_sets()
If Idle and a weaponskill macro is pressed you will change to
current Idle/DT set, useful as a fast way to equip proper gear
For then in game macros the quotations("") and <t> aren't needed
EX: /ws Expiacion ]]
if sets.precast.JA[spell.name] then
equip(sets.precast.JA[spell.name])
elseif sets.precast.WS[spell.name] then
if player.status == 'Engaged' then
equip(sets.precast.WS[spell.name])
if check_buffs('Reive Mark') then
equip(sets.misc.Reive)
end
else
cancel_spell()
gear_modes()
return
end
end
-- Magic spell gear handling(Precast)
if spell.prefix == '/magic'
or spell.prefix == '/ninjutsu'
or spell.prefix == '/song' then
if spell.type == 'BlueMagic' then
equip(sets.precast.FastCast.BlueMagic)
else
equip(sets.precast.FastCast)
end
if spell.name == 'Utsusemi: Ichi'
and check_recasts(spell)
and shadow_type == 'Ni' then
if check_buffs(
'Copy Image',
'Copy Image (2)',
'Copy Image (3)') then
windower.send_command('cancel copy image;'
..'cancel copy image (2); cancel copy image (3)')
end
elseif (spell.name == 'Monomi: Ichi' or spell.name == 'Sneak')
and check_buffs('Sneak')
and check_recasts(spell)
and spell.target.type == 'SELF' then
windower.send_command('cancel sneak')
elseif (spell.name == 'Diamondhide'
or spell.name == 'Metallic body'
or spell.name == 'Stoneskin')
and check_buffs('Stoneskin')
and check_recasts(spell) then
windower.send_command('cancel stoneskin')
end
end
-- Dancer Sub Job
if spell.name == 'Spectral Jig'
and check_buffs('Sneak')
and check_recasts(spell) then
windower.send_command('cancel sneak')
cast_delay(0.3)
elseif windower.wc_match(spell.name,'*Step') then
equip(sets.TP['Accuracy High'])
end
end
function midcast(spell,arg)
-- Special handling for Spell Mappings outlined in get_maps()
local stat
if spell.english:startswith('Indi') or spell.english:startswith('Geo') then
equip(sets.midcast.Geomancy)
if spell.skill == 'Healing Magic' or spell.skill == 'Enhancing Magic'
or spell.type == 'Trust' then
equip(sets.midcast.FastRecast)
if spell.name:startswith('Cure') then
equip(sets.midcast.Cure)
if spell.target.type == 'SELF' then
equip(sets.midcast.Cure)
end
end
elseif spell.skill == 'Elemental Magic' then
equip(sets.midcast.BlueMagic.Nuke)
end
if spell.name:startswith('Utsusemi') then
equip(sets.misc.DT.Active)
end
end
end
function aftercast(spell,arg)
gear_change_ok = true
gear_modes()
-- Gear info, useful if using DressUp or BlinkMeNot
if not spell.interrupted then
-- Changes shadow type variable to allow cancel Copy Image
-- if last cast was Utsusemi: Ni
if spell.name == 'Utsusemi: Ni' then
shadow_type = 'Ni'
elseif spell.name == 'Utsusemi: Ichi' then
shadow_type = 'Ichi'
end
-- If you have spells under a different macro set in game this will let
-- you change to that set quickly and then change back once finished
if spell.name:startswith('Unbridled') then
windower.send_command('input /macro set 3')
end
-- TIMERS PLUGIN: Dream Flower
if spell.name == 'Dream Flower' then
windower.add_to_chat(8,'NOTE: 1:30 general timer set, '
..'max sleep can last 2:00')
windower.send_command('timers c "Dream Flower" 90 down'
..'spells/00521.png')
end
-- TIMERS PLUGIN: Since Aftermath: Lv.1 can overwrite itself this
-- will delete and re-create this specific timer
if spell.name == 'Expiacion' and player.equipment.main == 'Tizona'
and check_buffs('Aftermath: Lv.1') then
windower.send_command('timers d "Aftermath: Lv.1"; wait 0.3;'
..'timers c "Aftermath: Lv.1" 90 down abilities/00027.png')
end
end
end
function slot_disabling()
-- Disable slots for items you don't want removed when performing actions
if player.equipment.head == 'Reraise Hairpin' then
disable('head')
windower.add_to_chat(8,'Reraise Hairpin equiped on head')
else
enable('head')
end
if player.equipment.left_ear == 'Reraise Earring' then
disable('left_ear')
windower.add_to_chat(8,'Reraise Earring equiped on left ear')
else
enable('left_ear')
end
if player.equipment.right_ear == 'Reraise Earring' then
disable('right_ear')
windower.add_to_chat(8,'Reraise Earring equiped on right ear')
else
enable('right_ear')
end
--[[ count_msg_mecisto can be adjusted to the value you want for periodic
reminders that you have slot locked, count is incresed twice by
most actions due to slot_disabling() being called in precast
and again after the cast in gear_modes() ]]
if player.equipment.back == 'Mecisto. Mantle' then
disable('back')
if count_msg_mecisto == 0 then
windower.add_to_chat(8,'REMINDER: '
..'Mecistopins mantle equiped on back')
end
count_msg_mecisto = (count_msg_mecisto + 1) % 30
else
enable('back')
count_msg_mecisto = 0
end
end
function status_change(new,old)
if T{'Idle','Engaged'}:contains(new) and gear_change_ok then
gear_modes()
end
end