Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 113 114 115 ... 183 184 185
 Lakshmi.Rumorian
Offline
Serveur: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2016-11-16 20:36:06
Link | Citer | R
 
I'm trying to incorporate these functions (copied from Krystela of Asura's lua) into my geo.lua:

function pretarget(spell,action)
-- Auto-Echo drop :D --
if spell.action_type == 'Magic' and buffactive['Silence'] then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
-- Auto Blaze of Glory for lazies :p --
elseif string.find(spell.english, 'Geo-') then
if not buffactive['Bolster'] and not buffactive['Amnesia'] and not pet.isvalid and windower.ffxi.get_ability_recasts()[247] < 1 then
cancel_spell()
send_command('input /ja "Blaze of Glory" <me>;wait 2;input /ma "'..spell.english..'" '..spell.target.name)
end
end
end


But the auto-BoG part doesn't work. Is there anything else I need to add?
 Odin.Lygre
Offline
Serveur: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-11-16 20:56:56
Link | Citer | R
 
Code
1
2
3
4
5
6
7
8
9
10
11
12
13
function pretarget(spell,action)
    -- Auto-Echo drop :D --
    if spell.action_type == 'Magic' and buffactive['Silence'] then
        cancel_spell()
        send_command('input /item "Echo Drops" <me>')
    -- Auto Blaze of Glory for lazies :p --
    elseif string.find(spell.english, 'Geo-') then
        if not (buffactive['Bolster'] or  buffactive['Amnesia'] or pet.isvalid) and windower.ffxi.get_ability_recasts()[247] == 0 then
            cancel_spell()
            send_command('input /ja "Blaze of Glory" <me>;wait 2;input /ma "'..spell.english..'" '..spell.target.name)
        end
    end
end

Can try this
 Lakshmi.Rumorian
Offline
Serveur: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2016-11-17 16:36:34
Link | Citer | R
 
Odin.Lygre said: »
Can try this

Thanks, but that didn't work either. I just used Krystela's geo.lua with no changes on my character and it still didn't work. I'm starting to think it's something outside that lua that makes it work and that's missing for me.
 Leviathan.Vow
Offline
Serveur: Leviathan
Game: FFXI
user: woVow
Posts: 125
By Leviathan.Vow 2016-11-17 16:55:45
Link | Citer | R
 
Aren't Geo spells cast on mobs? You'd need to use '<t>' instead of spell.target.name.
Offline
Posts: 319
By aisukage 2016-11-19 05:05:22
Link | Citer | R
 
I am looking for help with my DRK lua.
Basically I want it to swap my gear depending what weapon I have equiped.

I have it set up so when the lua runs, depending which weapon I have equipped when it loads the lua it will select the appropriate gear for that weapon. but if I swap without unloading and reloading the lua it will not swap.

for example:
I have my GS equipped and then load my LUA up when I engage it equips my Enaged set for GS. When I swap to my Apoc it doesn't change even if I disengage and re-engage it will still put my GS gear on. Now at this point if I were to unload and load my LUA and engage with my Apoc it will equip my scythe TP gear and if I swap to GS it will do the same thing as before but with my Scythe gear allways being put on.

Not sure what would cause it to lock depending on when the lua loads like this. I would of thought maybe I would of just needed to cast a spell or Weaponskill or disengage/re-engage again for it to correct the gear but this didn't help.

I'm not great at Gearswap but I believe these to be the important pieces from my LUA
Code
1
2
3
function user_setup()
   update_combat_form()
end
Code
1
2
3
4
5
function user_setup()
   Apoc_weapons = S{'Apocalypse'}
   GS_weapons = S{'Ragnarok'}
   Anguta_weapons = S{'Anguta'}
end
Code
1
2
3
4
function adjust_engaged_sets()
   state.CombatWeapon = player.equipment.main
   adjust_melee_groups()
end
Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function update_combat_form()
   if 
      Apoc_weapons:contains(player.equipment.main) then
      state.CombatForm:set('Apocalypse')
   elseif
      Anguta_weapons:contains(player.equipment.main) then
      state.CombatForm:set('Anguta')
   elseif
      GS_weapons:contains(player.equipment.main) then
      state.CombatForm:set('GreatSword')
   else
      state.CombatForm:reset()
 end
end
Code
1
2
3
function job_update(cmdParams, eventArgs)
   update_combat_form()
end

There's obviously more in some of these functions but I just took what I feel like would be effecting my situation. I might have missed something and if need be will upload to pastebin if this isn't enough to help.

Oh and for example of what my Gearset lines look like
Code
1
2
sets.engaged.GreatSword = {Gear is here ect}
sets.engaged.Apocalypse = {Gear is here ect}

would really appreciate any help with this.
Offline
Posts: 319
By aisukage 2016-11-19 17:17:54
Link | Citer | R
 
Or if I can' get help with the previous question is it possible that someone could help me put a new mode into my lua so I can swap with a custom bind. something like

state.weaponmode:option {'rag, apoc'}

so I can do

sets.engaged.rag
main='ragnarok',
ect.

or

sets.engaged.Apoc
main='apocalypse',
ect.

and able to do
sets.engaged.Apoc.Acc
ect
 Odin.Lygre
Offline
Serveur: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-11-19 19:09:13
Link | Citer | R
 
All you should need is this:
Code
1
2
3
4
5
6
7
8
9
function job_setup()
    update_combat_form()
end
function job_update(cmdParams, eventArgs)
    update_combat_form()
end
function update_combat_form()
    state.CombatWeapon:set(player.equipment.main)
end

If you're using Montenten's include.
You'll just need to hit F12 (job update) after changing weapons sometimes.
 Asura.Azagarth
Offline
Serveur: Asura
Game: FFXI
user: Azagarth
Posts: 1,326
By Asura.Azagarth 2016-11-22 04:59:48
Link | Citer | R
 
How do you get around GS not equipping rings with the same name? This is causing me tons of issues as of late. I have tried moving rings to different wardrobes, placing the rings separated by the rest of the gear in the sets. I am at a loss... It really sucs when you only end up equipping one or the 2 Chirich rings and get 99tp on a 2h job.... Or noticing your ws is only going off with one Ifrit+1 or nuke with one shiva+1, etc etc.
 Sylph.Subadai
Offline
Serveur: Sylph
Game: FFXI
user: Subadai
Posts: 184
By Sylph.Subadai 2016-11-24 05:23:56
Link | Citer | R
 
Asura.Azagarth said: »
How do you get around GS not equipping rings with the same name? This is causing me tons of issues as of late. I have tried moving rings to different wardrobes, placing the rings separated by the rest of the gear in the sets. I am at a loss... It really sucs when you only end up equipping one or the 2 Chirich rings and get 99tp on a 2h job.... Or noticing your ws is only going off with one Ifrit+1 or nuke with one shiva+1, etc etc.
Saw this question somewhere else, the solution I can't personally vouch for, but looks like it will work... Put your rings in different bags and try something like:
Code
1
2
3
sets.midcast['Elemental Magic'] = {
         ring1={name="Shiva Ring", bag="wardrobe2"},
         ring2={name="Shiva Ring", bag="wardrobe3"} }
 Phoenix.Keido
Offline
Serveur: Phoenix
Game: FFXI
user: Keido
Posts: 122
By Phoenix.Keido 2016-11-27 11:08:23
Link | Citer | R
 
Figured it out.
Offline
Posts: 42
By inkydo 2016-11-30 18:18:01
Link | Citer | R
 
I have used this in many Gear swaps and for some reason it is not working In the new BLU one I have Mod from Kinematics/GearSwap-Jobs
Code
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
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)    
    if player.equipment.back == 'Mecisto. Mantle' or player.equipment.back == 'Aptitude Mantle' or player.equipment.back == 'Aptitude Mantle +1' or player.equipment.back == 'Nexus Cape' then
        disable('back')
    else
        enable('back')
    end
        if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Vocation Ring' or player.equipment.ring1 == 'Capacity Ring' then
        disable('ring1')
    else
        enable('ring1')
    end
    if player.equipment.ring2 == 'Warp Ring' or player.equipment.ring2 == 'Vocation Ring' or player.equipment.ring2 == 'Capacity Ring' then
        disable('ring2')
    else
        enable('ring2')
    end
        if player.equipment.range == 'Soultrapper' then
        disable('range')
    else
        enable('range')
    end
        if player.equipment.ammo == 'Blank Soulplate' then
        disable('ammo')
    else
        enable('ammo')
    end
end


This is the Lua it self
Code
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')
end
 
 
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
    state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
    state.Buff.Convergence = buffactive.Convergence or false
    state.Buff.Diffusion = buffactive.Diffusion or false
    state.Buff.Efflux = buffactive.Efflux or false
     
    state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
 
 
    blue_magic_maps = {}
     
    -- Mappings for gear sets to use for various blue magic spells.
    -- While Str isn't listed for each, it's generally assumed as being at least
    -- moderately signficant, even for spells with other mods.
     
    -- Physical Spells --
     
    -- Physical spells with no particular (or known) stat mods
    blue_magic_maps.Physical = S{
        'Bilgestorm'
    }
 
    -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
    blue_magic_maps.PhysicalAcc = S{
        'Heavy Strike',
    }
 
    -- Physical spells with Str stat mod
    blue_magic_maps.PhysicalStr = S{
        'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
        'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
        'Uppercut','Vertical Cleave'
    }
         
    -- Physical spells with Dex stat mod
    blue_magic_maps.PhysicalDex = S{
        'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
        'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
        'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
        'Vanity Dive'
    }
         
    -- Physical spells with Vit stat mod
    blue_magic_maps.PhysicalVit = S{
        'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
        'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
    }
         
    -- Physical spells with Agi stat mod
    blue_magic_maps.PhysicalAgi = S{
        'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
        'Pinecone Bomb','Spiral Spin','Wild Oats'
    }
 
    -- Physical spells with Int stat mod
    blue_magic_maps.PhysicalInt = S{
        'Mandibular Bite','Queasyshroom'
    }
 
    -- Physical spells with Mnd stat mod
    blue_magic_maps.PhysicalMnd = S{
        'Ram Charge','Screwdriver','Tourbillion'
    }
 
    -- Physical spells with Chr stat mod
    blue_magic_maps.PhysicalChr = S{
        'Bludgeon'
    }
 
    -- Physical spells with HP stat mod
    blue_magic_maps.PhysicalHP = S{
        'Final Sting'
    }
 
    -- Magical Spells --
 
    -- Magical spells with the typical Int mod
    blue_magic_maps.Magical = S{
        'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
        'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
        'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
        'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
    }
 
    -- Magical spells with a primary Mnd mod
    blue_magic_maps.MagicalMnd = S{
        'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
    }
 
    -- Magical spells with a primary Chr mod
    blue_magic_maps.MagicalChr = S{
        'Eyes On Me','Mysterious Light'
    }
 
    -- Magical spells with a Vit stat mod (on top of Int)
    blue_magic_maps.MagicalVit = S{
        'Thermal Pulse'
    }
 
    -- Magical spells with a Dex stat mod (on top of Int)
    blue_magic_maps.MagicalDex = S{
        'Charged Whisker','Gates of Hades'
    }
             
    -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
    -- Add Int for damage where available, though.
    blue_magic_maps.MagicAccuracy = S{
        '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
        'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
        'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
        'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
        'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
        'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
        'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
        'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
    }
         
    -- Breath-based spells
    blue_magic_maps.Breath = S{
        'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
        'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
        'Thunder Breath','Vapor Spray','Wind Breath'
    }
 
    -- Stun spells
    blue_magic_maps.Stun = S{
        'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
        'Thunderbolt','Whirl of Rage'
    }
     
    -- Dark spells
    blue_magic_maps.Dark = S{
        'Tenebral Crush','Palling Salvo'
    }       
    -- Healing spells
    blue_magic_maps.Healing = S{
        'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
        'Wild Carrot'
    }
     
    -- Buffs that depend on blue magic skill
    blue_magic_maps.SkillBasedBuff = S{
        'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
        'Pyric Bulwark','Reactor Cool',
    }
 
    -- Other general buffs
    blue_magic_maps.Buff = S{
        'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
        'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
        'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
        'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
        'Zephyr Mantle'
    }
     
     
    -- Spells that require Unbridled Learning to cast.
    unbridled_spells = S{
        'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
        'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
        'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
    }
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', 'Acc', 'Refresh', 'Learning')
    state.WeaponskillMode:options('Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'Learning')
 
    gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
 
    -- Additional local binds
    send_command('bind ^` input /ja "Chain Affinity" <me>')
    send_command('bind !` input /ja "Efflux" <me>')
    send_command('bind @` input /ja "Burst Affinity" <me>')
 
    update_combat_form()
    select_default_macro_book()
end
 
 
-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind @`')
end
 
 
-- Set up gear sets.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
 
    sets.buff['Burst Affinity'] = {feet="Hashi. Basmak +1"}
    sets.buff['Chain Affinity'] = {head="Hashishin Kavuk +1", feet="Assimilator's Charuqs +1"}
    sets.buff.Convergence = {head="Luhlaza Keffiyeh +1"}
    sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
    sets.buff.Enchainment = {body="Luhlaza Jubbah +1"}
    sets.buff.Efflux = {legs="Hashishin Tayt +1"}
 
     
    -- Precast Sets
     
    -- Precast sets to enhance JAs
    sets.precast.JA['Azure Lore'] = {hands="Luh. Bazubands +1"}
 
 
    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
        --ammo="Sonia's Plectrum",
        --head="Uk'uxkaj Cap",
        --body="Vanir Cotehardie",
        --hands="Buremte Gloves",
        --legs="Hagondes Pants",
        --feet="Iuitl Gaiters +1",
        --waist="Caudata Belt",
        --left_ring="Spiral Ring",
        --back="Iximulew Cape"
    }
         
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}
 
    -- Fast cast sets for spells
     
    sets.precast.FC = {
        ammo="Impatiens",
        head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        body={ name="Taeon Tabard", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+5 DEX+5',}},
        hands={ name="Leyline Gloves", augments={'Accuracy+6','"Mag.Atk.Bns."+9',}},
        legs="Orvail Pants +1",
        feet="Chelona Boots +1",
        waist="Witful Belt",
        left_ear="Cessance Earring",
        right_ear="Loquac. Earring",
        left_ring="Prolix Ring",
        right_ring="Veneficium Ring",
        back="Swith Cape"}
         
    sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})
 
        
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Fotia Gorget",
        waist="Caudata Belt",
        left_ear="Mache Earring",
        right_ear="Brutal Earring",
        left_ring="Ramuh Ring +1",
        right_ring="Epona's Ring",
        back={ name="Mecisto. Mantle", augments={'Cap. Point+32%','Rng.Atk.+3','DEF+11',}}}
        --back="Vespid Mantle"}
     
    sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Buremte Gloves"})
 
    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {left_ring="Aquasoul Ring",feet="Luhlaza Charuqs"})
 
    sets.precast.WS['Sanguine Blade'] = {
        ammo="Ghastly Tathlum +1",
        head="Assim. Keffiyeh +1",
        body="Hashishin Mintan +1",
        hands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+11','Magic crit. hit rate +8',}},
        legs={ name="Luhlaza Shalwar +1", augments={'Enhances "Assimilation" effect',}},
        feet="Hashi. Basmak +1",
        neck="Sanctity Necklace",
        waist="Anguinus Belt",
        left_ear="Sortiarius Earring",
        right_ear="Friomisi Earring",
        left_ring="Fenrir Ring",
        right_ring="Acumen Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+3','"Store TP"+10',}}}
     
     
    -- Midcast Sets
    sets.midcast.FastRecast = {
        waist="Witful Belt",
        right_ear="Loquacious Earring",
        left_ring="Prolix Ring",
        back="Swith Cape"}
         
    sets.midcast['Blue Magic'] = set_combine(sets.midcast.FastRecast, {body="Hashishin Mintan +1"})
     
    -- Physical Spells --
     
    sets.midcast['Blue Magic'].Physical = {
        ammo="Hasty Pinion +1",
        head={ name="Lilitu Headpiece", augments={'STR+8','DEX+8','Attack+14','Weapon skill damage +1%',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Ocachi Gorget",
        waist="Prosilio Belt",
        left_ear="Tati Earring",
        right_ear="Tati Earring",
        left_ring="Ramuh Ring +1",
        right_ring="Epona's Ring",
        back="Vespid Mantle"}
 
    sets.midcast['Blue Magic'].PhysicalAcc = {
        ammo="Hasty Pinion +1",
        head={ name="Lilitu Headpiece", augments={'STR+8','DEX+8','Attack+14','Weapon skill damage +1%',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Ocachi Gorget",
        waist="Prosilio Belt",
        left_ear="Tati Earring",
        right_ear="Tati Earring",
        left_ring="Ramuh Ring +1",
        right_ring="Epona's Ring",
        back="Vespid Mantle"}
 
    sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
        {})
 
    sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
        {ammo="Hasty Pinion +1"})
 
    sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
        {})
        --{body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",back="Iximulew Cape"})
 
    sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
        {})
        --{body="Vanir Cotehardie",hands="Iuitl Wristbands",right_ring="Stormsoul Ring",
         --waist="Chaac Belt",feet="Iuitl Gaiters +1"})
 
    sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
        {back="Cornflower Cape"})
        --{left_ear="Psystorm Earring",body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",
         --right_ring="Icesoul Ring",back="Toro Cape",feet="Hagondes Sabots"})
 
    sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
        {right_ring="Leviathan Ring +1",back="Cornflower Cape"})
        --{left_ear="Lifestorm Earring",body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",
         --right_ring="Aquasoul Ring",back="Refraction Cape"})
 
    sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
        {right_ring="Leviathan Ring +1",back="Cornflower Cape"})
        --{body="Vanir Cotehardie",hands="Assimilator's Bazubands +1",back="Refraction Cape",
         --waist="Chaac Belt"})
 
    sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
 
 
    -- Magical Spells --
     
    sets.midcast['Blue Magic'].Magical = {
        ammo="Ghastly Tathlum +1",
        head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
        hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
        feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
        neck="Deviant Necklace",
        waist="Salire Belt",
        left_ear="Hecate's Earring",
        right_ear="Friomisi Earring",
        left_ring="Shiva Ring",
        right_ring="Acumen Ring",
        back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}
         
 
    sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{})
     
    sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{left_ring="Aquasoul Ring"})
 
    sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
 
    sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical)--,
        --{left_ring="Spiral Ring"})
 
    sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)
 
    sets.midcast['Blue Magic'].MagicAccuracy = {
        ammo="Ghastly Tathlum +1",
        head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
        hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
        feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
        neck="Deviant Necklace",
        waist="Salire Belt",
        left_ear="Hecate's Earring",
        right_ear="Friomisi Earring",
        left_ring="Shiva Ring",
        right_ring="Acumen Ring",
        back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}
 
    -- Breath Spells --
     
    sets.midcast['Blue Magic'].Breath = {
        ammo="Mavi Tathlum",
        head={ name="Amalric Coif", augments={'MP+60','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        body={ name="Samnuha Coat", augments={'Mag. Acc.+10','"Mag.Atk.Bns."+9','"Fast Cast"+2',}},
        hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
        legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
        feet={ name="Amalric Nails", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Conserve MP"+6',}},
        neck="Deviant Necklace",
        waist="Salire Belt",
        left_ear="Hecate's Earring",
        right_ear="Friomisi Earring",
        left_ring="Shiva Ring",
        right_ring="Acumen Ring",
        back={ name="Cornflower Cape", augments={'MP+30','DEX+5','Accuracy+1','Blue Magic skill +10',}}}
 
    -- Other Types --
     
    sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
        {waist="Chaac Belt"})
     
    sets.midcast['Blue Magic'].Dark = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,{
        head="Pixie Hairpin +1",
        waist="Chaac Belt"
        --left_ring="Archon Ring"
    })
         
    sets.midcast['Blue Magic']['White Wind'] = {}
 
    sets.midcast['Blue Magic'].Healing = {
        ammo="Mavi Tathlum",
        head={ name="Luh. Keffiyeh +1", augments={'Enhances "Convergence" effect',}},
        body="Hashishin Mintan +1",
        hands="Hegira Wristbands",
        legs={ name="Luhlaza Shalwar +1", augments={'Enhances "Assimilation" effect',}},
        feet="Hashi. Basmak +1",
        neck="Sanctity Necklace",
        left_ear="Lifestorm Earring",
        right_ear="Loquac. Earring",
        left_ring="Levia. Ring +1",
        right_ring="Sirona's Ring",
        back="Pahtli Cape"}
 
    sets.midcast['Blue Magic'].SkillBasedBuff = {
        ammo="Mavi Tathlum",
        head="Luh. Keffiyeh +1",
        body="Assimilator's Jubbah",
        legs="Hashishin Tayt +1",
        feet="Luhlaza Charuqs",
        back="Cornflower Cape"}
 
    sets.midcast['Blue Magic'].Buff = {}
     
    sets.midcast.Protect = {left_ring="Sheltered Ring"}
    sets.midcast.Protectra = {left_ring="Sheltered Ring"}
    sets.midcast.Shell = {left_ring="Sheltered Ring"}
    sets.midcast.Shellra = {left_ring="Sheltered Ring"}
     
 
     
     
    -- Sets to return to when not performing an action.
 
    -- Gear for learning spells: +skill and AF hands.
    sets.Learning = {ammo="Mavi Tathlum",hands="Assimilator's Bazubands"}
        --head="Luhlaza Keffiyeh", 
        --body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
        --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
 
 
    sets.latent_refresh = {waist="Fucho-no-obi"}
 
    -- Resting sets
    sets.resting = {
        --head="Ocelomeh Headpiece +1",
        --neck="Wiglen Gorget",
        body="Assimilator's Jubbah +1",
        hands="Serpentes Cuffs",
        feet="Chelona Boots +1",
        --waist="Austerity Belt",
        left_ring="Sheltered Ring",
        right_ring="Paguroidea Ring"}
     
    -- Idle sets
    sets.idle = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body="Assimilator's Jubbah +1",
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Brutal Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
         
         
        --ammo="Impatiens",
        --head="Whirlpool Mask",
        --body="Hagondes Coat",
        --hands="Serpentes Cuffs",
        --legs="Crimson Cuisses",
        --feet="Serpentes Sabots",
        --neck="Wiglen Gorget",
        --waist="Flume Belt",
        --left_ear="Bloodgem Earring",
        --right_ear="Loquacious Earring",
        --left_ring="Defending Ring",
        --right_ring="Paguroidea Ring",
        --back="Shadow Mantle"}
 
    --[[sets.idle.PDT = {
        ammo="Impatiens",
        head="Whirlpool Mask",neck="Wiglen Gorget",left_ear="Bloodgem Earring",right_ear="Loquacious Earring",
        body="Hagondes Coat",hands="Iuitl Wristbands",left_ring="Defending Ring",right_ring="Paguroidea Ring",
        back="Shadow Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Iuitl Gaiters +1"}
 
    sets.idle.Town = {
        ammo="Impatiens",
        head="Mavi Kavuk +2",neck="Wiglen Gorget",left_ear="Bloodgem Earring",right_ear="Loquacious Earring",
        body="Luhlaza Jubbah",hands="Assimilator's Bazubands +1",left_ring="Sheltered Ring",right_ring="Paguroidea Ring",
        back="Atheling Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Luhlaza Charuqs"}]]
 
    sets.idle.Learning = set_combine(sets.idle, sets.Learning)
 
     
    -- Defense sets
    sets.defense.PDT = {   
        ammo="Iron Gobbet",
        head="Whirlpool Mask",
        body="Iuitl Vest",
        hands="Iuitl Wristbands",
        legs="Nahtirah Trousers",
        feet="Iuitl Gaiters +1",
        neck="Wiglen Gorget",
        waist="Flume Belt",
        --left_ear="Bloodgem Earring",
        --left_ring="Defending Ring",
        --right_ring=gear.DarkRing.physical,
        back="Shadow Mantle"}
 
    sets.defense.MDT = {
        ammo="Demonry Stone",
        head="Whirlpool Mask",
        body="Hagondes Coat",
        hands="Iuitl Wristbands",
        legs="Nahtirah Trousers",
        feet="Iuitl Gaiters +1",
        neck="Twilight Torque",
        waist="Flume Belt",
        left_ear="Bloodgem Earring",
        left_ring="Defending Ring",
        right_ring="Shadow Ring",
        back="Engulfer Cape"}
 
    sets.Kiting = { back={ name="Mecisto. Mantle", augments={'Cap. Point+32%','Rng.Atk.+3','DEF+11',}}}
 
    -- 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 = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Brutal Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.Acc = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Zennaroi Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.Refresh = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Brutal Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.DW = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Brutal Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.DW.Acc = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Zennaroi Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.DW.Refresh = {
        ammo="Jukukik Feather",
        head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
        body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
        hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
        legs={ name="Herculean Trousers", augments={'Accuracy+23 Attack+23','"Store TP"+1','DEX+6','Accuracy+15',}},
        feet={ name="Adhemar Gamashes", augments={'STR+10','DEX+10','Attack+15',}},
        neck="Asperity Necklace",
        waist="Windbuffet Belt +1",
        left_ear="Cessance Earring",
        right_ear="Brutal Earring",
        left_ring="Epona's Ring",
        right_ring="Petrov Ring",
        back="Buquwik Cape"}
 
    sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
    sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)
 
 
    sets.self_healing = {left_ring="Kunaji Ring",right_ring="Asklepian Ring"}
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
        eventArgs.cancel = true
        windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
    end
end
 
-- Run after the default 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)
    -- Add enhancement gear for Chain Affinity, etc.
    if spell.skill == 'Blue Magic' then
        for buff,active in pairs(state.Buff) do
            if active and sets.buff[buff] then
                equip(sets.buff[buff])
            end
        end
        if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
            equip(sets.self_healing)
        end
    end
 
    -- If in learning mode, keep on gear intended to help with that, regardless of action.
    if state.OffenseMode.value == 'Learning' then
        equip(sets.Learning)
    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 state.Buff[buff] ~= nil then
        state.Buff[buff] = gain
    end
end
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
 
-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == 'Blue Magic' then
        for category,spell_list in pairs(blue_magic_maps) do
            if spell_list:contains(spell.english) then
                return category
            end
        end
    end
end
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end
 
-- 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_update(cmdParams, eventArgs)
    update_combat_form()
end
 
 
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)    
    if player.equipment.back == 'Mecisto. Mantle' or player.equipment.back == 'Aptitude Mantle' or player.equipment.back == 'Aptitude Mantle +1' or player.equipment.back == 'Nexus Cape' then
        disable('back')
    else
        enable('back')
    end
        if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Vocation Ring' or player.equipment.ring1 == 'Capacity Ring' then
        disable('ring1')
    else
        enable('ring1')
    end
    if player.equipment.ring2 == 'Warp Ring' or player.equipment.ring2 == 'Vocation Ring' or player.equipment.ring2 == 'Capacity Ring' then
        disable('ring2')
    else
        enable('ring2')
    end
        if player.equipment.range == 'Soultrapper' then
        disable('range')
    else
        enable('range')
    end
        if player.equipment.ammo == 'Blank Soulplate' then
        disable('ammo')
    else
        enable('ammo')
    end
end
 
 
function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
        state.CombatForm:reset()
    else
        state.CombatForm:set('DW')
    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 == 'WAR' then
        set_macro_page(1, 9)
    elseif player.sub_job == 'RDM' then
        set_macro_page(1, 9)
    else
        set_macro_page(1, 9)
    end
end
Offline
Posts: 256
By Brynach 2016-12-04 23:15:28
Link | Citer | R
 
Hey all

Ive been working on creating a lua for WAR, and i've run into a small issue where Mighty Strikes is concerned. I am attempting to set my lua up so that certain crit dmg gear is equipped for weaponskill while MS is active. As of yet, I haven't been able to figure it out. Any help would be appreciated.

Its apparent that the buffactive portion of my rule is totally missing the mark, but im not sure what else to use to fix.

Thanks for any help
 Odin.Lygre
Offline
Serveur: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-12-05 05:49:58
Link | Citer | R
 
Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Mighty Strikes WS Set --
    sets.MS_WS = {ammo="Yetshila", feet="Boii Calligae +1"}
  
function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if world.time >= (17*60) or world.time <= (7*60) then
            equip({ear1="Lugra Earring +1",ear2="Lugra Earring"})
        end
        if moonshade_WS:contains(spell.english) and player.tp<2950 then 
            equip({ear2="Moonshade Earring"})
        end
        if buffactive['Mighty Strikes'] then
            if sets.precast.WS[spell] then
                equipSet = sets.precast.WS[spell]
                equipSet = set_combine(equipSet,sets.MS_WS)
                equip(equipSet)
            else
                equipSet = sets.precast.WS
                equipSet = set_combine(equipSet,sets.MS_WS)
                equip(equipSet)
            end
        end
    end
end


This should work. Sorry, have a lot going on and don't have time to test right now.
Offline
Posts: 256
By Brynach 2016-12-05 08:43:30
Link | Citer | R
 
Nah man, no need for apologies. Thanks for checking this out.

I tested ws with MS up and this pulled in the gear as designed.

Thanks again
 Asura.Taruranto
Offline
Serveur: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-05 13:31:50
Link | Citer | R
 
I figured I'll ask here:
Code
1
2
3
4
5
6
7
if spell.element == world.day_element then
            equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
end
 
if spell.element == 'Earth' then
            equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
end


This is fine and dandy, and it works, but the problem is that I end up casting in these all the time, even for the MB and Accuracy sets. How the heck do I make so that it only works with the default nuke set and not the acc and mb one?

Basically I need to tell GS to only use these in sets.midcast['Elemental Magic'] but not in sets.midcast['Elemental Magic'].Resistant and sets.midcast['Elemental Magic'].MB. How do I accomplish that? :(
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2016-12-05 14:42:13
Link | Citer | R
 
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
end

Sets.obi defines my day/weather items. Obi,Zodiac,Cape

As far as sets.MB go. I use a toggle mode to turn on MB set, four items make up my mb set, rest is stored in midcast.Elemagic. If I'm not mistaking, Resistant is also a toggled mode. GS doesn't swap to MB or resistant based off events happening ingame, those are toggled on/off, gotta tell gs youre fighting something resistant or youre about to mb, turn those modes on.
 Asura.Taruranto
Offline
Serveur: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-05 15:58:36
Link | Citer | R
 
Asura.Pintseyes said: »
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
end

Sets.obi defines my day/weather items. Obi,Zodiac,Cape

As far as sets.MB go. I use a toggle mode to turn on MB set, four items make up my mb set, rest is stored in midcast.Elemagic. If I'm not mistaking, Resistant is also a toggled mode. GS doesn't swap to MB or resistant based off events happening ingame, those are toggled on/off, gotta tell gs youre fighting something resistant or youre about to mb, turn those modes on.

I do have "modes", but they are like this:
Code
1
state.CastingMode:options('Normal','Accuracy','MB')


and
Code
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
-- Elemental Magic sets are default for handling low-tier nukes.
    sets.midcast['Elemental Magic'] = {
    main="Akademos",
    sub="Thrace strap",
    ammo="ghastly tathlum +1",
    head="Merlinic hood",
    body="Amalric doublet",
    hands="Jhakri cuffs +1",
    legs="Merlinic shalwar",
    feet="Amalric nails",
    neck="Eddy necklace",
    waist="Refoccilation stone",
    left_ear="Friomisi earring",
    right_ear="Barkarole earring",
    left_ring="Fenrir ring +1",
    right_ring="Weatherspoon Ring",
    back="Bookworm's cape",
    ammo="ghastly tathlum +1",
 
}
 
    sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
    left_ear="Gwati earring",
    sub="Niobid strap",
    body="Amalric doublet",
    hands="Psycloth manillas",
    left_ring="Resonance ring",
    legs="Merlinic shalwar",
    feet="Arbatel Loafers +1",
    neck="Incanter's torque",
    ammo="Kalboron stone",
  
  })
 
sets.midcast['Elemental Magic'].MB = set_combine(sets.midcast['Elemental Magic'], {
    body="Amalric doublet",
    feet="Jhakri pigaches +1",
    legs="Merlinic shalwar",
    neck="Mizukage-no-Kubikazari",
    left_ear="Friomisi earring",
    right_ear="Barkarole earring",
    left_ring="Locus Ring",
    right_ring="Mujin band",
})
 
    -- Custom refinements for certain nuke tiers
    sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
 
    sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {
    left_ear="Gwati earring",
    body="Amalric doublet",
    legs="Merlinic shalwar",
    feet="Jhakri pigaches +1",
    neck="Incanter's torque",
    left_ring="Resonance ring",
    ammo="Kalboron stone",
})
 
 
 
    sets.midcast['Elemental Magic'].HighTierNuke.MB = set_combine(sets.midcast['Elemental Magic'], {
    body="Amalric doublet",
    feet="Jhakri pigaches +1",
    legs="Merlinic shalwar",
    neck="Mizukage-no-Kubikazari",
    right_ear="Barkarole earring",
    left_ear="Friomisi earring",
    left_ring="Locus Ring",
    right_ring="Mujin band",
})


So no on/off button. I switch them with ctrl+ff11. There is just no way to refer
Code
1
2
3
4
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
        equip(sets.Obi)
    end


specifically to "normal"

with my current setup?
 Odin.Lygre
Offline
Serveur: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-12-06 14:02:22
Link | Citer | R
 
Code
1
2
3
4
5
6
7
8
if state.CastingMode.value == 'Normal' then
    if spell.element == world.day_element then
        equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
    end
    if spell.element == 'Earth' then
        equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
    end
end

I think this is what you're looking for.
 Asura.Taruranto
Offline
Serveur: Asura
Game: FFXI
user: Tarlant
Posts: 34
By Asura.Taruranto 2016-12-08 16:02:43
Link | Citer | R
 
Odin.Lygre said: »
Code
1
2
3
4
5
6
7
8
if state.CastingMode.value == 'Normal' then
    if spell.element == world.day_element then
        equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
    end
    if spell.element == 'Earth' then
        equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
    end
end

I think this is what you're looking for.

Perfect, thanks a lot!
 Odin.Psycooo
Offline
Serveur: Odin
Game: FFXI
user: Psycooo
Posts: 42
By Odin.Psycooo 2016-12-10 17:15:21
Link | Citer | R
 
I just realized my cancel buff copy image isn't working. I was hoping to make shadows cancel each other and place utsusemi and stoneskin in a toggle for +enmity in the event I am tanking on rdm. (surprisingly more often than I thought would be possible up to tanking maju on rdm now, only 145 or higher nm I have tried so far) This way I can spam shadows and stoneskin, build hate and take minimal dmg.
Code
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
-------------------------------------------------------------------------------------------------------------------
-- 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()
    determine_haste_group()
    update_combat_form()
    LowNukes = S{'Stone' , 'Aero' , 'Blizzard' , 'Fire' , 'Water' , 'Thunder' ,
                'Stone II' , 'Aero II' , 'Blizzard II' , 'Fire II' , 'Water II' , 'Thunder II',
                'Stonega' , 'Aeroga' , 'Blizzaga' , 'Firaga' , 'Waterga' , 'Thundaga',
                'Stonega II' , 'Aeroga II' , 'Blizzaga II' , 'Firaga II' , 'Waterga II' , 'Thundaga II'}
    MndEnfeebles = S{'Slow' , 'Silence' , 'Paralyze' , 'Addle' , 'Slow II' , 'Paralyze II' , 'Addle II'}
    IntEnfeebles = S{'Bind' , 'Break' , 'Gravity' , 'Poison' , 'Sleep' , 'Gravity II' , 'Poison II' , 'Sleep II'}
  
    state.Buff.Saboteur = buffactive.saboteur or false
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', 'Mid', 'Acc')
    state.HybridMode:options('Normal', 'PDT', 'Evasion')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
   
    select_default_macro_book()
    gear.CureStaff = {name=""}
    gear.CureFeet = {name=""}
       
    state.MagicBurst = M(false, 'Magic Burst')
    state.CureHate = M(false, 'Cure Hate')
   
  
    
    send_command('bind !` gs c toggle MagicBurst')
    send_command('bind ^` gs c toggle CureHate')
    
end
   
   
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
  
    -- Precast Sets
    -- Precast sets to enhance JAs
    sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
       
   
    -- Waltz set (chr and vit)
    sets.precast.Waltz = {}
   
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}
   
    -- Fast cast sets for spells
   
    -- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
    -- No other FC sets necessary.
    sets.precast.FC = {}
   
    sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
   
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {}
   
    sets.precast.WS['Circle Blade'] = set_combine(sets.precast.WS, {})
   
    sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {})
   
    sets.precast.WS['Requiescat'] = {}
   
    sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {})
   
    sets.precast.WS['Savage Blade'] = {}
   
    sets.precast.WS['Chant du Cygne'] = {}
   
    sets.precast.WS['True Strike'] = {}
   
    sets.precast.WS['Exenterator'] = {}
   
    sets.precast.WS['Evisceration'] = {}
   
    sets.precast.WS['Death Blossom'] = {}
     
    -- Midcast Sets
    sets.midcast.Cure = {}
     
    sets.midcast.Curaga = sets.midcast.Cure
    
    sets.midcast.CureWeather = {}
    
    sets.midcast.CureSelf = {}
     
    sets.midcast.CureMelee = {}
     
    sets.midcast['Enhancing Magic'] = {}
     
    sets.midcast['Enhancing Magic'].Temper = {}
       
    sets.midcast['Enhancing Magic'].RegenSelf = {}
     
    sets.midcast['Enhancing Magic'].RefreshSelf = {}
     
    sets.midcast['Enhancing Magic'].HasteSelf = {}
       
    sets.midcast['Enhancing Magic'].EnSpells = set_combine(sets.midcast['Enhancing Magic'],{})
     
    sets.midcast['Enhancing Magic'].GainSpells = set_combine(sets.midcast['Enhancing Magic'],{})
       
    sets.midcast['Enhancing Magic'].BarSpells = set_combine(sets.midcast['Enhancing Magic'],{})
        
    sets.buff.ComposureOther = {head="Lethargy Chappel +1",body="Lethargy Sayon +1",
        legs="Lethargy Fuseau +1",feet="Lethargy Houseaux +1"}
     
    sets.midcast.Protect = {}
       
    sets.midcast.Shell = sets.midcast.Protect
     
    sets.midcast['Enhancing Magic'].Phalanx = {}
     
    sets.midcast.Cursna = {}
     
    sets.midcast.Stoneskin = {}
     
    sets.midcast['Enfeebling Magic'] = {}
       
    sets.midcast.MndEnfeebles = {}
   
    sets.midcast.IntEnfeebles = {}
   
       
    sets.midcast.Blind = {}
       
    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
       
    sets.midcast.Distract = {}
   
    sets.midcast.Frazzle = {}
     
    sets.midcast['Distract II'] = sets.midcast.Distract
    sets.midcast['Distract III'] = sets.midcast.Distract
   
    sets.midcast['Frazzle II'] = {}
    sets.midcast['Frazzle III'] = sets.midcast.Frazzle
   
     
    sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
    sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
       
    sets.Lunge = {}
   
    sets.Convert = {main="Murgleis"}
       
    sets.midcast['Elemental Magic'] ={}
         
       
    sets.midcast['Elemental Magic']['Low'] = {}
         
    sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
     
    sets.midcast['Stun'] = {}
     
    sets.midcast.Drain = {}
             
    sets.midcast.Aspir = sets.midcast.Drain
               
    -- Sets to return to when not performing an action.
     
    -- Resting sets
    sets.resting = {}
     
    -- Idle sets
    sets.idle = {}
     
    sets.idle.Town = {}
     
    sets.idle.Weak = {}
     
    -- Defense sets
    sets.defense.PDT = {}
     
    sets.defense.MDT = {}
     
    sets.Kiting = {}
     
    sets.latent_refresh = {}
     
    -- 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 = {}
       
    sets.engaged.Mid = {}
   
    sets.engaged.Acc = {}  
                
    sets.engaged.Evasion = sets.engaged
    sets.engaged.Mid.Evasion = sets.engaged.Mid
    sets.engaged.Acc.Evasion = sets.engaged.Acc
       
    sets.engaged.PDT = sets.defense.PDT
    sets.engaged.Mid.PDT = sets.defense.MDT
    sets.engaged.Acc.PDT = sets.defense.PDT
   
           
    -- Haste 43%
    sets.engaged.Haste_43 = set_combine(sets.engaged, {})
    sets.engaged.Mid.Haste_43 = sets.engaged.Mid
    sets.engaged.Acc.Haste_43 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_43 = sets.engaged.Haste_43
    sets.engaged.PDT.Haste_43 = sets.defense.PDT
   
    -- 40
    sets.engaged.Haste_40 = set_combine(sets.engaged.Haste_43, {})
    sets.engaged.Mid.Haste_40 = sets.engaged.Mid
    sets.engaged.Acc.Haste_40 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_40 = sets.engaged.Haste_40
    sets.engaged.PDT.Haste_40 = sets.defense.PDT
   
    -- 30
    sets.engaged.Haste_30 = sets.engaged
    sets.engaged.Mid.Haste_30 = sets.engaged.Mid
    sets.engaged.Acc.Haste_30 = sets.engaged.Acc
    sets.engaged.Evasion.Haste_30 = sets.engaged
    sets.engaged.PDT.Haste_30 = sets.defense.PDT
   
        -- 25
    sets.engaged.Haste_25 = set_combine(sets.engaged.Haste_30, {})
    sets.engaged.Acc.Haste_25 = sets.engaged.Acc
    sets.engaged.Mid.Haste_25 = sets.engaged.Mid
    sets.engaged.Evasion.Haste_25 = sets.engaged
    sets.engaged.PDT.Haste_25 = sets.defense.PDT
   
     -- DW nin sub melee group
    sets.engaged.DW_nin = {}
       
    sets.engaged.DW_nin.Mid = {}
   
    sets.engaged.DW_nin.Acc = {}  
                
    sets.engaged.DW_nin.Evasion = sets.engaged.DW_nin
    sets.engaged.DW_nin.Mid.Evasion = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Evasion = sets.engaged.DW_nin.Acc
       
    sets.engaged.DW_nin.PDT = sets.defense.PDT
    sets.engaged.DW_nin.Mid.PDT = sets.defense.MDT
    sets.engaged.DW_nin.Acc.PDT = sets.defense.PDT
   
           
    -- Haste 43%
    sets.engaged.DW_nin.Haste_43 = set_combine(sets.engaged.DW_nin, {})
    sets.engaged.DW_nin.Mid.Haste_43 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_43 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_43 = sets.engaged.DW_nin.Haste_43
    sets.engaged.DW_nin.PDT.Haste_43 = sets.defense.PDT
   
    -- 40
    sets.engaged.DW_nin.Haste_40 = set_combine(sets.engaged.DW_nin.Haste_43, {})
    sets.engaged.DW_nin.Mid.Haste_40 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_40 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_40 = sets.engaged.DW_nin.Haste_40
    sets.engaged.DW_nin.PDT.Haste_40 = sets.defense.PDT
   
    -- 30
    sets.engaged.DW_nin.Haste_30 = {}
    sets.engaged.DW_nin.Mid.Haste_30 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Acc.Haste_30 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Evasion.Haste_30 = sets.engaged.DW_nin
    sets.engaged.DW_nin.PDT.Haste_30 = sets.defense.PDT
   
        -- 25
    sets.engaged.DW_nin.Haste_25 = set_combine(sets.engaged.DW_nin.Haste_30, {})
    sets.engaged.DW_nin.Acc.Haste_25 = sets.engaged.DW_nin.Acc
    sets.engaged.DW_nin.Mid.Haste_25 = sets.engaged.DW_nin.Mid
    sets.engaged.DW_nin.Evasion.Haste_25 = sets.engaged.DW_nin
    sets.engaged.DW_nin.PDT.Haste_25 = sets.defense.PDT
  
     -- DW dnc sub melee group
    sets.engaged.DW_dnc = {}
       
    sets.engaged.DW_dnc.Mid = {}
   
    sets.engaged.DW_dnc.Acc = {}  
                
    sets.engaged.DW_dnc.Evasion = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.Mid.Evasion = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Evasion = sets.engaged.DW_dnc.Acc
       
    sets.engaged.DW_dnc.PDT = sets.defense.PDT
    sets.engaged.DW_dnc.Mid.PDT = sets.defense.MDT
    sets.engaged.DW_dnc.Acc.PDT = sets.defense.PDT
   
           
    -- Haste 43%
    sets.engaged.DW_dnc.Haste_43 = set_combine(sets.engaged.DW_dnc, {})
    sets.engaged.DW_dnc.Mid.Haste_43 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_43 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_43 = sets.engaged.DW_dnc.Haste_43
    sets.engaged.DW_dnc.PDT.Haste_43 = sets.defense.PDT
   
    -- 40
    sets.engaged.DW_dnc.Haste_40 = set_combine(sets.engaged.DW_dnc.Haste_43, {})
    sets.engaged.DW_dnc.Mid.Haste_40 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_40 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_40 = sets.engaged.DW_dnc.Haste_40
    sets.engaged.DW_dnc.PDT.Haste_40 = sets.defense.PDT
   
    -- 30
    sets.engaged.DW_dnc.Haste_30 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.Mid.Haste_30 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Acc.Haste_30 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Evasion.Haste_30 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.PDT.Haste_30 = sets.defense.PDT
   
        -- 25
    sets.engaged.DW_dnc.Haste_25 = set_combine(sets.engaged.DW_dnc.Haste_30, {})
    sets.engaged.DW_dnc.Acc.Haste_25 = sets.engaged.DW_dnc.Acc
    sets.engaged.DW_dnc.Mid.Haste_25 = sets.engaged.DW_dnc.Mid
    sets.engaged.DW_dnc.Evasion.Haste_25 = sets.engaged.DW_dnc
    sets.engaged.DW_dnc.PDT.Haste_25 = sets.defense.PDT
   
   
      
    sets.magic_burst = {}
       
    sets.cure_hate = {}
           
    sets.Enmity = {}
           
    -- Sets for special buff conditions on spells.
    sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
end
   
   
               
               
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
    
function job_precast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Healing Magic' and spellMap ~= 'StatusRemoval' then
        gear.CureFeet.name = "Vanya Clogs"
        if player.status == 'Engaged' then
            gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
            if spell.target.type == 'SELF' then
                gear.CureFeet.name = "Medium's Sabots"
            else
                gear.CureFeet.name = "Vanya Clogs"
            end
        else
            gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
        end
        if spell.target.type == 'SELF' then
            gear.default.obi_waist = "Chuq'aba Belt"
        else
            gear.default.obi_waist = "Salire belt"
        end
        if world.weather_element == 'Light' then
            gear.CureStaff.name = "Chatoyant Staff"
        else
            gear.CureStaff.name = "Serenity"
        end
        else
        gear.default.obi_waist = "Salire belt"
        gear.default.obi_back = { name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Cure" potency +10%',}}
    end
        if spell.name == 'Lunge' or spell.name == 'Swipe' then
            equip(sets.Lunge)
            end
        if spell.name == 'Vallation' then
            equip(sets.Enmity)
        end 
        if spell.name == 'Pflug' then
            equip(sets.Enmity)
        end
        if spell.name == 'Warcry'
        or spell.name == 'Swordplay' or spell.name == 'Rayke' or spell.name == 'Meditate' or spell.name == 'Provoke' then  
            equip(sets.Enmity)
        end
        --prevents casting Utsusemi if you already have 3 or more shadows
        if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' and (buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)']) then
            cancel_spell()
        end
        if buffactive['terror'] or buffactive['petrification'] or buffactive['stun'] or buffactive['sleep'] then
            if TP_ind == 4 then
                equip(sets.defense.MDT) else
                equip(sets.defense.PDT)
            end
        end
        if spell.name == 'Convert' then
            equip(sets.Convert)
        end
    if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
        cancel_spell()
        send_command('input /item "Echo Drops" <me>')
    end
end     
   
   
    
-- Run after the default 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 spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    elseif spell.skill == 'Enhancing Magic' and not spell.english == 'Stoneskin' then
        equip(sets.midcast.EnhancingDuration)
        if buffactive.composure and spell.target.type == 'PLAYER' then
            equip(sets.buff.ComposureOther)
        end
    elseif spellMap == 'Cure' then
        if spell.target.type == 'SELF' then
            equip(sets.midcast.CureSelf)
        end
        if state.CureHate.value then
            equip(sets.cure_hate)
        end
        if world.weather_element == 'Light' then
            equip(sets.midcast.CureWeather)
        end
    elseif spell.skill == 'Elemental Magic' 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({waist="Hachirin-no-Obi"})
        end
    elseif spell.skill == "Ninjutsu" then
            equip(sets.midcast.Recast)
            if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
                if buffactive['Copy Image'] then
                    windower.ffxi.cancel_buff(66)
                elseif buffactive['Copy Image (2)'] then
                    windower.ffxi.cancel_buff(444)
                elseif buffactive['Copy Image (3)'] then
                    windower.ffxi.cancel_buff(445)
                elseif buffactive['Copy Image (4+)'] then
                    windower.ffxi.cancel_buff(446)
            end
        elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
            windower.ffxi.cancel_buff(71)
        end
    end
    if spell.name == 'Foil' or spell.name == 'Flash' or spell.name == 'Blank Gaze'
        or spell.name == 'Geist Wall' or spell.name == 'Poison Breath' or spell.name == 'Jettatura'
        or spell.name == 'Cocoon' or spell.name == 'Soporific' or spell.name == 'Sheep Song'
        or spell.name == 'Refueling' then
        equip(sets.Enmity)
    end
end
       
       
   
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if spell.skill == 'Enhancing Magic' then
            if spell.english:startswith('En') then
                return 'EnSpells'
            elseif spell.english:startswith('Gain') then
                return 'GainSpells'
            elseif spell.english:startswith('Phalanx') then
                return 'Phalanx'
            elseif spell.english:startswith('Bar') then
                return 'Bar'
            elseif spell.english:startswith('Temper') then
                return 'Temper'
            elseif spell.english:startswith('Haste') then
                if spell.target.type == 'SELF' then
                return 'HasteSelf'
                end
            elseif spell.english:startswith('Refresh') then
                if spell.target.type == 'SELF' then
                return 'RefreshSelf'
                end
            end
        elseif default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if player.status == 'Engaged' then
                return "CureMelee"
            end
        end
        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 == 'Elemental Magic' then
                if LowNukes:contains(spell.name) then
                    return 'Low'
                else
                    return
                end
                   
            end
        end
    end
end
   
     
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
     
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
    determine_haste_group()
    handle_equipping_gear(player.status)
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','mighty guard'}: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
   
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
     
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    return idleSet
end
     
-- function customize_melee_set(meleeSet)
--     if player.sub_job == 'DNC' or player.sub_job == 'NIN' then
--         meleeSet = set_combine(meleeSet, sets.engaged.DW)
--     end
--     return meleeSet
-- end
  
  
function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == 'empty' then
        state.CombatForm:reset()
    end
    if S{'Culminus','Genmei Shield'}:contains(player.equipment.sub) then
        state.CombatForm:reset()
    elseif player.sub_job == 'NIN' then
        state.CombatForm:set('DW_nin')
    elseif player.sub_job == 'DNC' then
        state.CombatForm:set('DW_dnc')
    end    
end
  
function job_update(cmdParams, eventArgs)
    update_combat_form()
    determine_haste_group()
end
  
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end
     
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
    function determine_haste_group()
   
        classes.CustomMeleeGroups:clear()
        -- assuming +4 for marches (ghorn has +5)
        -- Haste (white magic) 15%
        -- Haste Samba (Sub) 5%
        -- Haste (Merited DNC) 10% (never account for this)
        -- Victory March +0/+3/+4/+5    9.4/14%/15.6%/17.1% +0
        -- Advancing March +0/+3/+4/+5  6.3/10.9%/12.5%/14%  +0
        -- Embrava 30% with 500 enhancing skill
        -- Mighty Guard - 15%
        -- buffactive[580] = geo haste
        -- buffactive[33] = regular haste
        -- buffactive[604] = mighty guard
        -- state.HasteMode = toggle for when you know Haste II is being cast on you
        -- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
       if ( ( (buffactive[33] or buffactive[580] or buffactive.embrava) and (buffactive.march or buffactive[604]) ) or
             ( buffactive[33] and (buffactive[580] or buffactive.embrava) ) or
             ( buffactive.march == 2 and buffactive[604] ) ) 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[33] or buffactive.march == 2 or buffactive[580]) and buffactive['haste samba'] ) then
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( ( buffactive[580] or buffactive[33] or buffactive.march == 2 ) or
                 ( buffactive.march == 1 and buffactive[604] ) ) then
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif ( buffactive.march == 1 or buffactive[604] ) then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        elseif ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or  -- geo haste + anything
           ( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or  -- embrava + anything
           ( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or  -- two marches + anything
           ( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
            add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
            classes.CustomMeleeGroups:append('Haste_43')
        elseif ( (buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
               ( buffactive.march == 2 and buffactive['haste samba'] ) or
               ( buffactive[580] and buffactive['haste samba'] ) then
            add_to_chat(8, '-------------Haste 35%-------------')
            classes.CustomMeleeGroups:append('Haste_35')
        elseif ( buffactive.march == 2 ) or -- two marches from ghorn
               ( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or  -- MG or haste + 1 march
               ( buffactive[580] ) or  -- geo haste
               ( buffactive[33] and buffactive[604] ) then  -- haste with MG
            add_to_chat(8, '-------------Haste 30%-------------')
            classes.CustomMeleeGroups:append('Haste_30')
        elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
            add_to_chat(8, '-------------Haste 15%-------------')
            classes.CustomMeleeGroups:append('Haste_15')
        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(2, 4)
    elseif player.sub_job == 'WHM' then
        set_macro_page(3, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(10, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(4, 4)
    elseif player.sub_job == 'BLM' then
        set_macro_page(5, 4)
    else
        set_macro_page(1, 4)
    end
end
 Asura.Patb
Offline
Serveur: Asura
Game: FFXI
user: Patbee
Posts: 87
By Asura.Patb 2016-12-13 22:32:45
Link | Citer | R
 
Wondering if anyone can help me change my pup lua from setting petmode based on frame head, and turn it into a toggle on alt+f9.

http://pastebin.com/RBw1wc84
Code
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
-------------------------------------------------------------------------------------------------------------------
-- 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()
  mote_include_version = 2
  -- Load and initialize the include file.
  include('Mote-Include.lua')
end
 
include('organizer-lib')
-- Setup vars that are user-independent.
function job_setup()
  -- List of pet weaponskills to check for
  petWeaponskills = S{"Slapstick", "Knockout", "Magic Mortar",
    "Chimera Ripper", "String Clipper",  "Cannibal Blade", "Bone Crusher", "String Shredder",
    "Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
 
  -- Map automaton heads to combat roles
  petModes = {
    ['Harlequin Head'] = 'Melee',
    ['Sharpshot Head'] = 'Ranged',
    ['Valoredge Head'] = 'Tank',
    ['Stormwaker Head'] = 'Magic',
    ['Soulsoother Head'] = 'Tank',
    ['Spiritreaver Head'] = 'Nuke'
    }
 
  -- Subset of modes that use magic
  magicPetModes = S{'Nuke','Heal','Magic'}
 
  -- Var to track the current pet mode.
  state.PetMode = M{['description']='Pet Mode', 'None', 'Melee', 'Ranged', 'Tank', 'Magic', 'Heal', 'Nuke'}
 
  include('Mote-TreasureHunter')
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', 'Acc', 'Fodder')
  state.WeaponskillMode:options('Normal', 'Acc', 'Fodder')
  state.PhysicalDefenseMode:options('PDT', 'Evasion', "Pulling")
  state.MagicalDefenseMode:options('MDT')
 
  send_command('bind ^= gs c cycle treasuremode')
 
  update_pet_mode()
  select_default_macro_book()
end
 
 
-- Define sets used by this job file.
function init_gear_sets()
 
sets.Organizer = {
        main="Animator P",
        sub="Eminent Animator II",
        neck="Midnights",
        body="Ohtas",
 
    }
 
 
  sets.TreasureHunter = {waist="Chaac Belt"}
  -- Precast Sets
 
  -- Fast cast sets for spells
  sets.precast.FC = {
    head="Rawhide Mask",neck="Orunmila's Torque",ear1="Loquacious Earring",
    body="Anhur Robe",ring1="Veneficium Ring",ring2="Prolix Ring",
    back="Swith Cape",waist="Hurch'lan Sash",feet="Regal Pumps +1"
  }
 
  sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
 
 
  -- Precast sets to enhance JAs
  sets.precast.JA['Tactical Switch'] = {feet="Karagoz Scarpe +1"}
 
  sets.precast.JA['Repair'] = {
    ammo="Automaton Oil +3",
    ear1="Guignol Earring",ear2="Pratik Earring",
    legs="Desultor Tassets",feet="Foire Bab. +1"
  }
 
  sets.precast.JA['Maintenance'] = {ammo="Automaton Oil"}
 
  sets.precast.JA.Maneuver = {neck="Buffoon's Collar",ear2="Burana Earring",body="Karagoz Farsetto",hands="Puppetry Dastanas",back="Visucius's Mantle"}
 
  -- Waltz set (chr and vit)
  sets.precast.Waltz = {
    ear1="Roundel Earring",
    body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Spiral Ring",
    back="Refraction Cape",legs="Naga Hakama",feet="Dance Shoes"}
 
  -- Don't need any special gear for Healing Waltz.
  sets.precast.Waltz['Healing Waltz'] = {}
 
 
  -- Weaponskill sets
  -- Default set for any weaponskill that isn't any more specifically defined
  sets.precast.WS = {
    neck="Fotia Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    ring1="Rajas Ring",ring2="Epona's Ring",
    back="Dispersal Mantle",waist="Fotia Belt",legs="Samnuha Tights",}
 
  -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  sets.precast.WS['Stringing Pummel'] = set_combine(sets.precast.WS, {
    ear1="Brutal Earring",ear2="Moonshade Earring",
    ring1="Spiral Ring"})
 
  sets.precast.WS['Victory Smite'] = set_combine(sets.precast.WS, {
    ear1="Brutal Earring",ear2="Moonshade Earring",
    ring1="Pyrosoul Ring"})
 
  -- Midcast Sets
 
  -- Midcast sets for pet actions
  sets.midcast.Pet.Cure = {
    head="Naga Somen",
    body="Naga Samue",hands="Regimen Mittens",ring1="Kunaji Ring",ring2="Thurandaut Ring",
    back="Refraction Cape",waist="Ukko Sash",legs="Naga Hakama",feet="Foire Bab. +1"}
 
  sets.midcast.Pet['Elemental Magic'] = {
    head="Rawhide Mask",
    neck="Deino Collar",
    ear1="Charivari Earring",
    ear2="Burana Earring",
    hands="Naga Tekko",
    ring1="",
    ring2="Thurandaut Ring",
    back="Argochampsa Mantle",
    waist="Ukko Sash",
    legs={ name="Herculean Trousers", augments={'Pet: "Mag.Atk.Bns."+29','Pet: "Store TP"+5','Pet: INT+10','Pet: Attack+9 Pet: Rng.Atk.+9',}},
    feet={ name="Herculean Boots", augments={'Pet: "Mag.Atk.Bns."+23','Pet: "Dbl.Atk."+1 Pet: Crit.hit rate +1','Pet: INT+7','Pet: Attack+12 Pet: Rng.Atk.+12',}},}
 
  sets.midcast.Pet.WeaponSkill = {
    head="Karagoz Capello +1",neck="Empath Necklace",ear1="Charivari Earring",ear2="Burana Earring",
    body="Pitre Tobe +1",hands="Karagoz Guanti +1",ring1="Overbearing Ring",ring2="Thurandaut Ring",
    back="Dispersal Mantle",waist="Ukko Sash",legs="Karaggoz Pantaloni +1",feet="Naga Kyahan"}
 
 
  -- Sets to return to when not performing an action.
 
  -- Resting sets
  sets.resting = {
    head="Pitre Taj +1",neck="Wiglen Gorget",ear1="Infused Earring",ear2="Burana Earring",
    ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Contriver's Cape"}
 
  -- Idle sets
  sets.idle = {
    ammo="Automat. Oil +3",
    head="Rao Kabuto",neck="Wiglen Gorget",ear1="Infused Earring",ear2="Burana Earring",
    body="Rao Togi", hands="Rao Kote",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Mecistopins Mantle",waist="Lycopodium Sash",legs="Rao Haidate",feet="Hermes' Sandals"}
 
    sets.idle.PDT = {
    main="Earth Staff",
    head="Rao Kabuto",neck="Twilight Torque",ear1="Heartseeker Earring",
    body="Qaaxo Harness",hands="Rao Kote", ring1="Defending Ring",ring2="Dark Ring",
    back="Cheviot Cape",waist="Flume Belt",legs=="Rao Haidate", feet="Hermes' Sandals",
  }
 
  -- Set for idle while pet is out (eg: pet regen gear)
  sets.idle.Pet = set_combine(sets.idle, {neck="Empath Necklace",ring2="Thurandaut Ring",back="Mecistopins Mantle",waist="Isa Belt"})
  sets.idle.PDT.Pet = sets.idle.PDT
  -- Idle sets to wear while pet is engaged
  sets.idle.Pet.Engaged = {
    range="Animator P",
    ammo="Automat. Oil +3",
    head="Tali'ah Turban +1",
    body="Tali'ah Manteel +1",
    hands="Tali'ah Gages +1",
    legs="Tali'ah Seraweels +1",
    feet="Tali'ah Crackows +1",
    neck="Empath Necklace",
    waist="Hurch'lan Sash",
    left_ear="Zennaroi Earring",
    right_ear="Steelflash Earring",
    left_ring="Overbearing Ring",
    right_ring="Paguroidea Ring",
    back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}}
    }
 
  sets.idle.Pet.Engaged.Ranged = {
      main={ name="Ohtas", augments={'Accuracy+70','Pet: Accuracy+70','Pet: Haste+10%',}},
      range="Animator P",
      ammo="Automat. Oil +3",
      head="Tali'ah Turban +1",
      body="Tali'ah Manteel +1",
      hands="Tali'ah Gages +1",
      legs="Tali'ah Seraweels +1",
      feet="Tali'ah Crackows +1",
      neck="Empath Necklace",
      waist="Incarnation Sash",
      left_ear="Domesticator's Earring",
      right_ear="Rimeice Earring",
      left_ring="Varar Ring",
      right_ring="Varar Ring",
      back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}},
    }
  sets.idle.Pet.Engaged.Nuke = set_combine(sets.idle.Pet.Engaged, {legs="Karaggoz Pantaloni +1",feet="Pitre Babouches +1"})
  sets.idle.Pet.Engaged.Magic = sets.idle.Pet.Engaged
 
    sets.idle.Pet.Engaged.Tank = {
      ammo="Automat. Oil +3",
    head="Rao Kabuto",
    body="Rao Togi",
    hands="Rao Kote",
    legs="Rao Haidate",
    feet="Rao Sune-Ate",
    neck="Empath Necklace",
    waist="Isa Belt",
    left_ear="Domesticator's Earring",
    right_ear="Handler's Earring +1",
    left_ring="Varar Ring",
    right_ring="Varar Ring",
    back="Visucius's Mantle",}
 
 
  -- 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
sets.inwkr = {
        neck="Ygnas's Resolve +1"}
  -- Normal melee group
  sets.engaged = {
    head="Tali'ah Turban +1",
    body="Tali'ah Manteel +1",
    hands="Tali'ah gages +1",
    legs="Samnuha Tights",
    feet={ name="Herculean Boots", augments={'Accuracy+28','"Triple Atk."+3','Attack+15',}},
    neck="Clotharius Torque",
    waist="Grunfeld Rope",
    left_ear="Bladeborn Earring",
    right_ear="Steelflash Earring",
    left_ring="Apate Ring",
    right_ring="Cacoethic Ring",
    back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10',}},
    }
 
  sets.engaged.Acc = set_combine(sets.engaged, {
  })
 
end
 
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
 
-- Called when player is about to perform an action
function job_precast(spell, action, spellMap, eventArgs)
  custom_aftermath_timers_precast(spell)
end
 
function job_aftercast(spell, action, spellMap, eventArgs)
  custom_aftermath_timers_aftercast(spell)
end
 
-- Called when pet is about to perform an action
function job_pet_midcast(spell, action, spellMap, eventArgs)
  if petWeaponskills:contains(spell.english) then
    classes.CustomClass = "Weaponskill"
  end
end
 
 
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other game 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 buff == 'Wind Maneuver' then
    handle_equipping_gear(player.status)
  end
end
 
-- Called when a player gains or loses a pet.
-- pet == pet gained or lost
-- gain == true if the pet was gained, false if it was lost.
function job_pet_change(pet, gain)
  update_pet_mode()
end
 
-- Called when the pet's status changes.
function job_pet_status_change(newStatus, oldStatus)
  if newStatus == 'Engaged' then
    display_pet_status()
  end
end
if buffactive["reive mark"] then
        equip(sets.inwkr)
end
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
 
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
  if cmdParams[1] == 'maneuver' then
    if pet.isvalid then
      local man = defaultManeuvers[state.PetMode]
      if man and tonumber(cmdParams[2]) then
        man = man[tonumber(cmdParams[2])]
      end
 
      if man then
        send_command('input /pet "'..man..'" <me>')
      end
    else
      add_to_chat(123,'No valid pet.')
    end
  end
end
 
 
-- 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_update(cmdParams, eventArgs)
  update_pet_mode()
end
 
 
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
  local defenseString = ''
  if state.Defense.Active then
    local defMode = state.Defense.PhysicalMode
    if state.Defense.Type == 'Magical' then
      defMode = state.Defense.MagicalMode
    end
 
    defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
  end
 
  add_to_chat(122,'Melee: '..state.OffenseMode..'/'..state.DefenseMode..', WS: '..state.WeaponskillMode..', '..defenseString..
    'Kiting: '..on_off_names[state.Kiting])
 
  display_pet_status()
 
  eventArgs.handled = true
end
 
 
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
 
-- Get the pet mode value based on the equipped head of the automaton.
-- Returns nil if pet is not valid.
function get_pet_mode()
  if pet.isvalid then
    return petModes[pet.head] or 'None'
  else
    return 'None'
  end
end
 
-- Update state.PetMode, as well as functions that use it for set determination.
function update_pet_mode()
  state.PetMode:set(get_pet_mode())
  update_custom_groups()
end
 
-- Update custom groups based on the current pet.
function update_custom_groups()
  classes.CustomIdleGroups:clear()
  if pet.isvalid then
    classes.CustomIdleGroups:append(state.PetMode.value)
  end
end
 
-- Display current pet status.
function display_pet_status()
  if pet.isvalid then
    local petInfoString = pet.name..' ['..pet.head..']: '..tostring(pet.status)..'  TP='..tostring(pet.tp)..'  HP%='..tostring(pet.hpp)
 
    if magicPetModes:contains(state.PetMode) then
      petInfoString = petInfoString..'  MP%='..tostring(pet.mpp)
    end
 
    add_to_chat(122,petInfoString)
  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, 13)
  elseif player.sub_job == 'NIN' then
    set_macro_page(1, 13)
  elseif player.sub_job == 'THF' then
    set_macro_page(1, 13)
  else
    set_macro_page(1, 13)
  end
end
Offline
Posts: 429
By Selindrile 2016-12-14 08:10:46
Link | Citer | R
 
As always, make a backup but I think this should be pretty easy.

Delete lines: 52 and 295 and 334 and 375. (Where the functions update_pet_mode() and get_pet_mode() are called because these are what automatically changes the modes.)

Delete lines: 23-30 and replace with:
Code
1
petModes = {'Melee','Ranged','Tank','Magic','Heal','Nuke'}


Also add this in user_setup() :

send_command('bind !f9 gs c cycle petMode')

See if that does the trick for you.
Offline
Posts: 429
By Selindrile 2016-12-14 08:27:13
Link | Citer | R
 
@Psycooo Do you have the addon cancel active? Where the buff cancelling is done in Motetenten's gearswaps is actually in the libs, not in your job file.
 Odin.Psycooo
Offline
Serveur: Odin
Game: FFXI
user: Psycooo
Posts: 42
By Odin.Psycooo 2016-12-14 13:10:59
Link | Citer | R
 
Selindrile said: »
@Psycooo Do you have the addon cancel active? Where the buff cancelling is done in Motetenten's gearswaps is actually in the libs, not in your job file.

I didn't for a while, but then I finally added it both with and without the cancel buff code and it still didn't remove shadows, removed sneak though(spell didn't try ninjustu sneak)

I can cast ichi and ni over ichi, but not have ichi cast over Ni, which is the point that I would like as well. (I know that sounds kinda stupid, but my recast on shadows is so low I can keep shadows/stoneskin up full time that way.)

Keeps showing up as Utsusemi: Ichi has no effect.
 Cerberus.Kvazz
Offline
Serveur: Cerberus
Game: FFXI
user: kvazz
Posts: 5,345
By Cerberus.Kvazz 2016-12-14 13:19:06
Link | Citer | R
 
Hi!

This might not be the right place to ask at all.

Buuut I have'nt played since the spellcast days, this "gearswap" seems to be the new plugin all the cool kids are using?

Is there any database with good... .xmls? .gearswaps? (what kinda files are these? .lua?)

I want to know what I'm up against before I reinstall the game O.O
 Bismarck.Mitchel
Offline
Serveur: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-12-14 16:16:07
Link | Citer | R
 
Could anyone figure out why my gun keeps getting unequipped since the update? Thanks.

Edit - Disregard, I am dumb, had Sapience Orb in FC set
 Asura.Pintseyes
Offline
Serveur: Asura
Game: FFXI
user: yurmy123
Posts: 115
By Asura.Pintseyes 2016-12-14 16:30:13
Link | Citer | R
 
Cerberus.Kvazz said: »
Hi!

This might not be the right place to ask at all.

Buuut I have'nt played since the spellcast days, this "gearswap" seems to be the new plugin all the cool kids are using?

Is there any database with good... .xmls? .gearswaps? (what kinda files are these? .lua?)

I want to know what I'm up against before I reinstall the game O.O

I don't know about cool kids as I'm not one. But gearswap is the "new" spellcast. The files used are LUA. You can find some lua's in the beta_examples_and_information folder inside the gearswap folder.

A lot of people use something called "Motes". Here is the website for that.

https://github.com/Kinematics/GearSwap-Jobs

welcome back and best of luck with your endeavors.
[+]
 Asura.Patb
Offline
Serveur: Asura
Game: FFXI
user: Patbee
Posts: 87
By Asura.Patb 2016-12-15 00:48:17
Link | Citer | R
 
Selindrile said: »
As always, make a backup but I think this should be pretty easy.
Delete lines: 52 and 295 and 334 and 375. (Where the functions update_pet_mode() and get_pet_mode() are called because these are what automatically changes the modes.)
Delete lines: 23-30 and replace with:
Code
1
petModes = {'Melee','Ranged','Tank','Magic','Heal','Nuke'}

Also add this in user_setup() :
send_command('bind !f9 gs c cycle petMode')
See if that does the trick for you.

Yes this worked amazingly thank you very much!
[+]
First Page 2 3 ... 113 114 115 ... 183 184 185
Log in to post.