-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTristamgreen_BLU.lua
758 lines (685 loc) · 23.8 KB
/
Tristamgreen_BLU.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
--[[*********************************************
Tristamgreen BLU v2 - 2021
********************************************* --]]
-- Update Notes
-- Sep 25 2020 - entirely rewritten from scratch
-- Sep 28 2020 - all modes (mage, melee, dual wield, mdef) established
-- Sep 29 2020 - all blue magic handlers established
-- Sep 30 2020 - all white mage sub job functionality established
-- May 29 2021 - better handling on blue magic enhancing. breath set reworked.
-- May 30 2021 - realigned all ammo and ranged options, set ammo to bibiki+disable for tank mode
-- Jun 02 2021 - set weapons to disable (main,sub,ranged,ammo) when in MELEE or TANK.
-- weapons will re-enable when swapped to MAGE.
-- Jun 07 2021 - realigned physical magic set and created "undefined" blue mage set for outlier spells
-- Jul 02 2021 - set up self_commands to help pre-select azure set for certain subjobs
-- Jul 08 2021 - refine the initial gear loads via subjob
require("common_gs_functions")
--[[ **********
Gearsets
************ --]]
function get_sets()
-- idle sets
-- Generic Idle
-- prioritize Regen and Refresh with Evasion
sets.idle = {
-- ammo = "Fenrir's Stone",
ranged = "Aureole",
head = "Blood Mask",
body = "Mirage Jubbah +1",
hands = "Denali Wristbands",
legs = "Blood Cuisses",
feet = "Magus Charuqs",
neck = "Orochi Nodowa +1",
waist = "Scouter's Rope",
left_ear = "Novia Earring",
right_ear = "Ethereal Earring",
left_ring = "Shadow Ring",
right_ring = "Patronus Ring",
back = "Boxer's Mantle"
}
-- terra's staff for damage mitigation
sets.terra = {
main = "Terra's Staff",
sub = "Magic Strap"
}
-- combat sets
-- engaged set prioritizes haste and accuracy, engaged function assumes Sea Torques over PCA
sets.engaged = {
-- ammo = "White Tathlum",
head = "Walahra Turban",
body = "Homam Corazza",
hands = "Homam Manopolas",
legs = "Homam Cosciales",
feet = "Homam Gambieras",
neck = "Peacock Amulet",
waist = "Ninurta's Sash",
left_ear = "Brutal Earring",
right_ear = "Ethereal Earring",
right_ring = "Mars's Ring",
left_ring = "Toreador's Ring",
back = "Cuchulain's Mantle"
}
-- max evasion set, toggled by macro /console gs c eva
sets.evasion = {
-- ammo = "Fenrir's Stone",
head = "Wivre Mask +1",
neck = "Evasion Torque",
left_ear = "Triton Earring",
right_ear = "Triton Earring",
body = "Scp. Harness +1",
hands = "Denali Wristbands",
left_ring = "Wivre Ring +1",
right_ring = "Wivre Ring +1",
back = "Boxer's Mantle",
waist = "Scouter's Rope",
legs = "Denali Kecks",
feet = "Magus Charuqs"
}
-- Tank Set - Maximize Defense, Enmity
-- toggled by macro /console gs c tank
sets.tank = {
ammo = "Bibiki Seashell",
head = "Denali Bonnet",
body = "Blood Scale Mail",
hands = "Denali Wristbands",
legs = "Enkidu's Subligar",
feet = "Homam Gambieras",
neck = "Harmonia's Torque",
waist = "Trance Belt",
left_ear = "Brutal Earring",
right_ear = "Ethereal Earring",
left_ring = "Shadow Ring",
right_ring = "Patronus Ring",
back = "Shadow Mantle"
}
-- magic defense set
-- toggled via macro /console gs c defmode
sets.mdef = {
left_ear = "Merman's Earring",
right_ear = "Merman's Earring",
left_ring = "Merman's Ring",
right_ring = "Minerva's Ring"
}
sets.HPMP = {
main = "Imperial Wand",
sub = "Legion Scutum",
-- ammo = "White Tathlum",
head = "Mirror Tiara",
body = "Mahatma Hpl.",
hands = "Genie Gages",
legs = "Blood Cuisses",
feet = "Numerist Pumps",
neck = "Grandiose Chain",
waist = "Qiqirn Sash +1",
left_ear = "Relaxing Earring",
right_ear = "Antivenom Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Invigorating Cape"
}
-- specific weapon sets. toggled via macro
-- "Mode Switch" macro is /console gs c mode
--Dual-Wield Set
sets.dualwield = {
main = "Excalibur",
sub = "Perdu Hanger"
}
sets.shield = {
main = "Excalibur",
sub = "Genbu's Shield"
}
--staff set
sets.staff = {
main = "Chatoyant Staff",
}
-- Daylight Regen set
sets.dayregen = {
hands = "Feronia's Bangles",
waist = "Lycopodium Sash"
}
-- fast cast set
sets.fc = {
left_ear = "Loquacious Earring",
legs = "Homam Cosciales"
}
-- Haste set
-- used basically for Utsusemi only
sets.haste = {
head = "Walahra Turban",
neck = "Tiercel Necklace",
hands = "Homam Manopolas",
feet = "Homam Gambieras",
legs = "Homam Cosciales",
body = "Nashira Manteel",
waist = "Ninurta's Sash"
}
-- *** Enhancing and Healing Sets ***
-- Healing Magic Potency set
sets.healing = {
-- ammo = "Jasper Tathlum",
head = "Denali Bonnet",
body = "Blood Scale Mail",
hands = "Mirage Bazubands +1",
legs = "Mahatma Slops",
feet = "Denali Gamashes",
neck = "Gnole Torque",
waist = "Pythia Sash +1",
left_ear = "Celestial Earring",
right_ear = "Celestial Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Dew Silk Cape +1"
}
-- *** SETS FOR OFFENSIVE SPELLS***
-- STR set for physical spells
sets.phys = {
ranged = "Aureole",
head = "Gnadbhod's Helm",
body = "Magus Jubbah +1",
hands = "Alkyoneus's Bracelets",
legs = "Enkidu's Subligar",
feet = "Denali Gamashes",
neck = "Ancient Torque",
waist = "Fierce Belt",
left_ear = "Harmonius Earring",
right_ear = "Harmonius Earring",
left_ring = "Mars's Ring",
right_ring = "Harmonius Ring",
back = "Cuchulain's Mantle"
}
-- int set for INT-based spells
sets.int = {
ranged = "Aureole",
head = "Ree's Headgear",
body = "Blood Scale Mail",
hands = "Mahatma Cuffs",
legs = "Denali Kecks",
feet = "Denali Gamashes",
neck = "Lemegeton Medallion +1",
waist = "Penitent's Rope",
left_ear = "Incubus Earring +1",
right_ear = "Incubus Earring +1",
left_ring = "Galdr Ring",
right_ring = "Omn. Ring +1",
back = "Prism Cape"
}
-- mind set for MND-based spells
sets.mnd = {
ranged = "Aureole",
head = "Maat's Cap",
body = "Blood Scale Mail",
hands = "Mirage Bazubands +1",
legs = "Mahatma Slops",
feet = "Denali Gamashes",
neck = "Gnole Torque",
waist = "Salire Belt",
left_ear = "Novio Earring",
right_ear = "Moldavite Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Hecate's Cape"
}
-- HP Set for Breaths
-- 1617 HP @ lv75 without food
sets.breath = {
ammo = "Verthandi's Gem",
head = "Saurian Helm", -- (more HP, same breath % boost)
body = "Blood Scale Mail",
hands = "Creek M Mitts",
legs = "Homam Cosciales",
feet = "Homam Gambieras",
neck = "Bloodbead Gorget",
waist = "Steppe Sash",
left_ear = "Cassie Earring",
right_ear = "Harmonius Earring",
left_ring = "Bloodbead Ring",
right_ring = "Bomb Queen Ring",
back = "Gigant Mantle"
}
-- Set for Blue-based Enfeebling Magic (tanking)
sets.enfeeblu = {
ranged = "Aureole",
head = "Mirage Keffiyeh +1",
body = "Magus Jubbah +1",
neck = "Tiercel Necklace",
left_ear = "Incubus Earring +1",
right_ear = "Incubus Earring +1",
left_ring = "Antica Ring",
right_ring = "Celestial Ring",
back = "Hecate's Cape",
waist = "Salire Belt",
legs = "Homam Cosciales",
feet = "Homam Gambieras"
}
-- basic catch-all Blue Magic skill set
sets.bluemagic = {
head = "Mirage Keffiyeh +1",
body = "Magus Jubbah +1",
ring1 = "Antica Ring"
}
-- prioritize skill, macc, and mind for Enfeebling Magic (while subbing WHM)
sets.enfeebling = {
head = "Walahra Turban",
body = "Nashira Manteel",
neck = "Enfeebling Torque",
left_ear = "Lycopodium Earring",
right_ear = "Enfeebling Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Altruistic Cape",
waist = "Salire Belt",
legs = "Denali Kecks",
feet = "Homam Gambieras"
}
-- prioritize skill and haste for Enhancing Magic (while subbing WHM)
sets.enhancing = {
head = "Walahra Turban",
body = "Nashira Manteel",
neck = "Enhancing Torque",
left_ear = "Celestial Earring",
right_ear = "Augmenting Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Merciful Cape",
waist = "Ninurta's Sash",
legs = "Mahatma Slops",
feet = "Homam Gambieras"
}
sets.enhancblu = set_combine(
sets.enhancing,
{
head = "Mirage Keffiyeh +1",
body = "Magus Jubbah +1",
left_ring = "Antica Ring",
right_ear = "Celestial Earring"
})
-- stack MND for Stoneskin potency
sets.enhancing.stoneskin = {
head = "Maat's Cap",
body = "Blood Scale Mail",
neck = "Stone Gorget",
hands = "Stone Mufflers",
left_ear = "Celestial Earring",
right_ear = "Celestial Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Dew Silk Cape +1",
waist = "Pythia Sash +1",
legs = "Mahatma Slops",
feet = "Denali Gamashes"
}
-- *** WEAPON SKILL SETS FOR SWORDS ***
sets.ws = {}
sets.ws.knights = {
-- ammo = "White Tathlum",
head = "Maat's Cap",
neck = "Fotia Gorget",
body = "Homam Corazza",
hands = "Denali Wristbands",
legs = "Mirage Shalwar +1",
feet = "Rutter Sabatons",
back = "Cerberus Mantle +1",
left_ear = "Brutal Earring",
right_ear = "Harmonius Earring",
left_ring = "Rajas Ring",
right_ring = "Mars's Ring",
waist = "Virtuoso Belt"
}
sets.ws.vorpal = {
-- ammo = "White Tathlum",
head = "Gnadbhod's Helm",
neck = "Fotia Gorget",
body = "Enkidu's Harness",
hands = "Alkyoneus's Bracelets",
legs = "Mirage Shalwar +1",
feet = "Rutter Sabatons",
back = "Cerberus Mantle +1",
left_ear = "Brutal Earring",
right_ear = "Harmonius Earring",
left_ring = "Rajas Ring",
right_ring = "Harmonius Ring",
waist = "Warwolf Belt"
}
end
--[[ ******************************************************
Equip functions - put on the sets we defined above, and
echo a note to our chat log so we know it worked.
****************************************************** --]]
-- equip our idle set
function equip_idle()
equip(sets.idle)
windower.add_to_chat(8,'[Blue Mage - Idle]')
if world.time <= 1080 and world.time >= 360 then
windower.add_to_chat(8,'[Daylight Bonus Regen]')
equip(sets.idle,sets.dayregen)
end
if mode == "mage" then
equip(sets.terra)
end
if defmode == "magical" then
equip(sets.mdef)
end
end
-- equip our engaged set
function equip_engaged()
windower.add_to_chat(8,'[Engaged]')
equip(sets.engaged)
if ev == true then
windower.add_to_chat(8,'[Max Evasion]')
equip(sets.engaged,sets.evasion)
elseif mode == "melee" then
if tank == true then
equip(sets.tank,sets.shield,{neck="Fortitude Torque"})
else
if player.sub_job == "NIN" or player.sub_job == "DNC" then
equip(sets.dualwield,{neck="Fortitude Torque"})
else
equip(sets.shield,{neck="Fortitude Torque"})
end
end
if world.time <= 1080 and world.time >= 360 then
windower.add_to_chat(8,"[Engaged - Daylight Bonus]")
equip({right_ear="Fenrir's Earring"})
end
end
if defmode == "magical" then
equip(sets.mdef)
end
end
-- equip appropriate Weapon Skill set
function equip_ws(name)
if name == "Knights of Round" or name == "Savage Blade" then
equip(sets.ws.knights)
elseif name == "Vorpal Blade" then
equip(sets.ws.vorpal)
end
if world.time <= 1080 and world.time >= 360 then
windower.add_to_chat(8,"[Engaged - Daylight Bonus]")
equip({left_ear="Fenrir's Earring"})
end
end
-- equip our hMP set when resting
function equip_rest()
windower.add_to_chat(8,'[Resting]')
equip(sets.HPMP)
end
-- pick between our idle set and engaged set, depending on
-- whether we're currently engaged with a mob.
function choose_set()
if mode == "mage" then
enable('ammo','ranged','main','sub')
equip(sets.terra)
elseif mode == "melee" then
if tank == true then
enable('ammo','ranged','main','sub')
equip(sets.tank,sets.shield)
disable('ammo','ranged','main','sub')
else
enable('ammo','ranged','main','sub')
if player.sub_job == "NIN" or player.sub_job == "DNC" then
windower.add_to_chat(8,'[Dual Wield Selected]')
equip(sets.dualwield)
else
windower.add_to_chat(8,'[Sword + Shield Selected]')
equip(sets.shield)
end
disable('ammo','ranged','main','sub')
end
end
if player.status == "Engaged" then
equip_engaged()
else
equip_idle()
end
end
--[[ ******************************************************
Casting functions - these functions run automatically when
we cast a spell, use a job ability, rest for MP, and so on
****************************************************** --]]
-- the precast function runs automatically BEFORE we
-- begin casting a spell or job ability.
function precast(spell)
if spell.action_type == 'Magic' then
local magictype = get_magic_type(spell)
-- Cancel magic when it is not up yet
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 60 then -- 1s margin
add_to_chat(167,spell.english .. ' is still on cooldown!')
cancel_spell()
else
-- Fast cast for all spells
equip(sets.fc)
if mode == "mage" then
equip({sub="Vivid Strap +1"})
end
-- Cancel status effects for spells that don't overwrite themselves
if spell.name == "Sneak" then send_command("cancel sneak") end
if spell.name == "Stoneskin" then send_command("wait 4;cancel stoneskin") end
if spell.name == "Reraise" then send_command("cancel reraise") end
if spell.name == "Blink" then send_command("wait 4;cancel blink") end
if spell.name == "Aquaveil" then send_command("wait 4;cancel aquaveil") end
end
end
-- Abilities
if spell.type == 'WeaponSkill' then
equip_ws(spell)
end
end
-- Midcast is for all Blue Magic Spells and other spells.
function midcast(spell)
if spell.skill == "Blue Magic" then
local magictype = get_magic_type(spell)
if magictype == 'physBlu' then
equip(sets.phys)
if mode == 'mage' then
equip(sets.staff,{sub="Wise Strap"})
end
elseif magictype == 'intBlu' then
equip(sets.int)
if mode == 'mage' then
equip(sets.staff,{sub="Wise Strap"})
end
elseif magictype == 'mndBlu' then
equip(sets.mnd)
if mode == 'mage' then
equip(sets.staff,{sub="Reign Grip"})
end
elseif magictype == 'breathBlu' then
equip(sets.breath)
if mode == 'mage' then
equip(sets.staff,{sub="Raptor Strap +1"})
end
elseif magictype == 'healBlu' then
equip(sets.healing)
if mode == 'mage' then
equip(sets.staff,{sub="Reign Grip"})
end
elseif magictype == 'enfBlu' then
equip(sets.enfeeblu)
if mode == 'mage' then
equip(sets.staff,{sub="Reign Grip"})
end
elseif magictype == 'enhBlu' then
equip(sets.enhancblu)
if mode == 'mage' then
equip(sets.staff,{sub="Vivid Strap +1"})
end
end
end
if spell.skill == 'Enhancing Magic' then
windower.add_to_chat(8,'[Enhancing Magic - ' .. spell.english .. ']')
equip(sets.enhancing)
if mode == 'mage' then
equip(sets.staff,{sub="Reign Grip"})
end
if spell.name == 'Stoneskin' then
equip(sets.enhancing.stoneskin)
end
end
if spell.skill == 'Enfeebling Magic' then
windower.add_to_chat(8,'[Enf. Magic - ' .. spell.english .. ']')
equip(sets.enfeebling)
if mode == 'mage' then
equip(sets.staff,{sub="Reign Grip"})
end
end
if spell.name:contains('Utsusemi') then
windower.add_to_chat(8,'[Utsusemi]')
equip(sets.haste)
end
end
-- when we're done with our spell or ability, return to either
-- our idle or engaged gear.
function aftercast(spell)
choose_set()
end
-- Get Blue Magic type
function get_magic_type(spell)
if spell.skill == 'Blue Magic' then
if physBlueMagic:contains(spell.english)then
windower.add_to_chat(8,'[Physical Blue Magic - ' .. spell.english .. ']')
return 'physBlu'
elseif intBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[INT-based Blue Magic - ' .. spell.english .. ']')
return 'intBlu'
elseif mndBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[MND-based Blue Magic - ' .. spell.english .. ']')
return 'mndBlu'
elseif chrBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[CHR-based Blue Magic - ' .. spell.english .. ']')
return 'chrBlu'
elseif brBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[Blue Magic Breath - ' .. spell.english .. ']')
return 'breathBlu'
elseif healBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[Healing Blue Magic - ' .. spell.english .. ']')
return 'healBlu'
elseif enfBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[Enfeebling Blue Magic - ' .. spell.english .. ']')
return 'enfBlu'
elseif enhBlueMagic:contains(spell.english) then
windower.add_to_chat(8,'[Enhancing Blue Magic - ' .. spell.english .. ']')
return 'enhBlu'
else
windower.add_to_chat(8,'[Undefined Blue Magic - ' .. spell.english .. ']')
equip(sets.bluemagic)
end
end
end
-- swap into hMP gear when we /heal, and return to idle gear
-- when we stand up.
function status_change(new,old)
if new == 'Resting' then
equip_rest()
else
choose_set()
end
end
function buff_change(new,old)
debuff_items()
end
function setup_job()
magic_define()
end
function self_command(m)
-- mode selectors are run by the macro command /console gs c [modename]
-- modes included here are:
-- W+ - cycles selected weaponskill between Vorpal Blade and Knights of Round; extensible for others.
-- WS - executes currently selected WS defined in W+
-- EVA - equips Evasion Gearsets
-- M+ - cycles Elemental Magic Mode between Damage and Accuracy
-- mode - generic mode that toggles pure mage mode or melee mode for Red Mage
-- tank - toggles sword/shield for Red Mage. Must be activated when mode is set to MELEE
-- defmode - toggles normal Red Mage and Magical Defense Mode
if m == "W+" then
if ws == "Knights of Round" then
ws = "Vorpal Blade"
else
ws = "Knights of Round"
end
windower.add_to_chat(222,'[Current WS: ' .. ws .. ']')
elseif m == "WS" then
send_command('input /ws "' .. ws .. '" <t>')
elseif m == "EVA" then
if ev == false then
ev = true
windower.add_to_chat(8,'[Evasion during combat: ON]')
choose_set()
else
ev = false
windower.add_to_chat(8,'[Evasion during combat: OFF]')
choose_set()
end
elseif m == "mode" then
if mode == "mage" then
windower.add_to_chat(8,'[Combat mode: MELEE]')
mode = "melee"
choose_set()
else
windower.add_to_chat(8,'[Combat mode: MAGE]')
mode = "mage"
choose_set()
end
elseif m == "tank" then
if mode == "melee" then
if tank == false then
windower.add_to_chat(8,'[Tank mode: ACTIVE]')
tank = true
choose_set()
else
windower.add_to_chat(8,'[Tank mode: DEACTIVATED]')
tank = false
choose_set()
enable('ammo')
end
else
windower.add_to_chat(8,'[Cannot activate Tank Mode when in Mage Mode.]')
end
elseif m == "defmode" then
if defmode == "normal" then
windower.add_to_chat(8,'[Defense Mode: MDT]')
defmode = "magical"
choose_set()
else
windower.add_to_chat(8,'[Defense Mode: Normal]')
defmode = "normal"
choose_set()
end
end
end
--[[ ******************************************************
Code that runs once, when we first swap to Blue Mage
****************************************************** --]]
-- mode decides if we are melee or mage mode
-- mode = "melee"
-- ev determines whether we should wear our evasion gear in combat
ev = false
-- tank determines if we should go tank mode or dual-wield in melee combat
tank = false
-- defmode outlins defensive mode while tank mode is active.
defmode = "normal"
-- ws determines which weapon skill we'll use. Mercy Stroke by default.
ws = "Knights of Round"
-- Runs the job setup function to populate list of spells
setup_job()
-- Send default text commands to Windower
--Set Macro Book
send_command('input /macro book 16; wait 0.1; input /macro set 1')
-- Set up Style Lock, equip Idle set, and equip Terra's Staff for idle Damage Mitigation
send_command('gs enable all;wait 1; input /lockstyleset 16; wait 1; gs equip idle')
send_command('input //dp magic; wait 1; input //dp height')
-- below commands set azureset based entirely on subjob selection
send_command('wait 2; input //asets removeall')
if player.sub_job == "NIN" or player.sub_job == "THF" or player.sub_job == "MNK" then
send_command('wait 2; input //asets spellset physical')
mode = "melee"
if player.sub_job == "NIN" then
send_command('gs equip dualwield')
else
send_command('gs equip tank')
tank = true
end
else
send_command('wait 2; input //asets spellset mindblast; gs equip terra')
mode = "mage"
end