Gearswap Support Thread

Eorzea Time
 
 
 
Language: JP EN FR DE
9225 users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 190 191
 Asura.Sechs
Online
Server: Asura
Game: FFXI
User: Akumasama
Posts: 11580
By Asura.Sechs 2026-08-27 07:26:01
Link | Quote | Reply
 
Bahamut.Illumin said: »
A few random questions:

- In default GearSwap or Selindrile's, is there a way to make a set given a subjob? For instance, adding `.RDM` to the end of a set to only trigger when I'm subbing RDM? (Fast Cast sets, for instance).
No clue about Selindrile's Luas specifically, but in general it's absolutely possible.
Player.subjob is a stat you can check and as such you can make decision according to it being true/false or many other options.
I'm sure Selindrile has a keen way to handle it but no clue which exactly.
I can just tell you that it's theoretically absolutely possible, as a matter of fact I do it in many of my luas.

Quote:
- For Scholar, is there any selector for "casting the same spell type as the current Arts" (aka "Grimoire" on equipment)? For instance, on something like Fast Cast sets, if I can "overcompensate" with Fast Cast given the +20% speed wrong-grimoire tax
Absolutely.
Each spell has a series of variables.
For instance there's the skill var (enhancing, elemental, dark etc) but there's also the type var (white, black, blue etc).
Light Arts and Dark Arts work with White and Black magic respectively, so that's the var you want to check.
If you want to use different precast sets you would have to check the spell being cast with one of the many available ways, then check the spell.type, if it's white magic equip sets.precast.white if it's black magic equip sets.precast.black.

Altough you speak about "compensating", so probably you want a different scenario.
We should define three different sets, probably:
1) Spell being cast matches current Grimoire
2) Spell being cast is of the opposite Grimoire
3) Everything else

For 1) you want to equip those gear that grant you additional casting time-, for case 2) you probably want a special set that exceeds the 80% cap to compensate for the malus you get from casting spell of the opposite grimoire, for 3) you use your basic default FC set.

The logic would be something like that, mind that there are plentiful ways of obtaining this, I'm just giving an oversimplified silly example
Code
if spell.type == 'White Magic' then
    if grimoire == 'Light Arts' then
        equip(sets.precast.grimoire)
    elseif grimoire == 'Dark Arts' then
        equip(sets.precast.compensate)
    else
        equip(sets.precast.fastcast)
    end
elseif spell.type == 'Black Magic' then
    if grimoire == 'Dark Arts' then
        equip(sets.precast.grimoire)
    elseif grimoire == 'Light Arts' then
        equip(sets.precast.compensate)
    else
        equip(sets.precast.fastcast)
    end
else
    equip(sets.precast.fastcast)
end


Again, it's just a simple example to show one of the many possible logics you could apply.
"Grimoire" doesn't even exist, unless you define a specific function for that. You would have to check that with buffactive I guess, for each grimoire you need a double condition wether or not the addendum white/black are active, because the buff name changes. Other than this silly difference, the logic is solid and should work.


Quote:
- Is there a way to change sets based on whether you're casting the spell on yourself vs a party member?
Absolutely, there's a specific variable for that, spell.target
You can find a full description with all the possible sub variables (there's a lot!) in the examples.xls file that you can find in one of the sub-folders of Gearswap.
There's also a comparison between the old Spellcast variables and the new Gearswap substitutes.


Mind all of my answers are "generic" for gearswap, I'm not talking specifically about Selindrile's luas because I know nothing of them.
 Bahamut.Illumin
Offline
Server: Bahamut
Game: FFXI
User: sylvanica
Posts: 19
By Bahamut.Illumin 2026-08-27 07:37:55
Link | Quote | Reply
 
Thanks for the detailed reply!

I figured it was possible, as you mention, doing custom logic. I was mostly seeing if this was already possible or available just through naming sets properly rather than implementing the logic again, which I don't mind doing, but I was trying to avoid it due to possible edge cases I'm missing.

Specifically for SCH it probably makes sense to just code it there, but I was hoping for more general set-naming mechanics in case the GearSwap/Selindrile's harness gets updated (rather than mucking around inside the non-character lua files)
Offline
By kaffy 2026-08-27 08:37:07
Link | Quote | Reply
 
if you have a basic understanding of programming logic, you can use this as a reference to tailor things specific to your needs

https://docs.windower.net/addons/gearswap/reference/
 Asura.Sechs
Online
Server: Asura
Game: FFXI
User: Akumasama
Posts: 11580
By Asura.Sechs 2026-08-27 13:38:40
Link | Quote | Reply
 
Bahamut.Illumin said: »
Thanks for the detailed reply!

I figured it was possible, as you mention, doing custom logic. I was mostly seeing if this was already possible or available just through naming sets properly rather than implementing the logic again, which I don't mind doing, but I was trying to avoid it due to possible edge cases I'm missing.

Specifically for SCH it probably makes sense to just code it there, but I was hoping for more general set-naming mechanics in case the GearSwap/Selindrile's harness gets updated (rather than mucking around inside the non-character lua files)
Your question is perfectly valid and meaningful, but for that you would need to ask Selindrile himself or people competent with the way his Luas work.
Sadly I can't help you with that specific knowledge, I'm sorry :-(


Personally I can tell you I USED to have different precast set on SCH but a long time ago I removed the logic and defaulted to a slightly overloaded FC set (there's more theoretical reduction than the 80% cap) for everything.
Why you might ask?
Well, simply because of inventory starving, I needed to remove some items to get back some inventory space and this one was such a minimal difference (especially for me, I don't play SCH often) that it made sense to default to a generic set.
 Odin.Messmer
Offline
Server: Odin
Game: FFXI
Posts: 2
By Odin.Messmer 2026-09-15 16:54:05
Link | Quote | Reply
 
Hi all,
I'm wondering if anyone would be able to help me troubleshoot a specific item that I've been unable to resolve by researching prior posts.

Base lua: Arislan-DNC.lua
Goal: I want the "Charis Feather" to override all other ammo slot items when Climactic Flourish is active, with the exception of Hoxne Ampulla when it is active.
Problem: The lua recognizes "Maculele Tiara +3" and "Charis Feather" as precast set items, but they are not maintained in their respective slots when I trigger a WS with Climactic Flourish active. If I activate showswaps and debugmode and trigger a WS (e.g. Rudra's Storm), the lua does not seem to recognize that Climactic Flourish is active, and it defaults to the base Rudra's WS set.

I've tried a few different permutations of this, including using the base code from the publically-available lua:
Code
function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == "WeaponSkill" then
        if state.Buff['Sneak Attack'] == true then
            equip(sets.precast.WS.Critical)
        end
        if state.Buff['Climactic Flourish'] then
            equip(sets.buff['Climactic Flourish'])
        end
    end
    if spell.type=='Waltz' and spell.english:startswith('Curing') and spell.target.type == 'SELF' then
        equip(sets.precast.WaltzSelf)
    end
end


I have also attempted a function posted by another user 6 years ago when someone was attempting to solve this similar problem (https://www.ffxiah.com/forum/topic/54942/simple-lua-request/). I created a separate set for sets.precast.WS["Rudra's Storm"].Clim, as indicated:
Code
function job_post_precast(spell, action, spellMap, eventArgs)
    if buffactive['Climactic Flourish'] and spell.english:contains("Rudra's Storm") then
        equip(sets.precast.WS["Rudra's Storm"].Clim)
    elseif spell.english:contains("Rudra's Storm") then
        equip(sets.precast.WS["Rudra's Storm"])
    end
    if spell.type=='Waltz' and spell.english:startswith('Curing') and spell.target.type == 'SELF' then
        equip(sets.precast.WaltzSelf)
    end
end


Neither of these seemed to work for me -- "Charis Feather" is always getting swapped out with the base ammo slot item for the respective WS precast set. I've included my standard DNC lua. Any troubleshooting would be supremely appreciated!

Code
-------------------------------------------------------------------------------------------------------------------
--  Keybinds
-------------------------------------------------------------------------------------------------------------------

--  Modes:      [ F9 ]              Cycle Offense Modes
--              [ CTRL+F9 ]         Cycle Hybrid Modes
--              [ WIN+F9 ]          Cycle Weapon Skill Modes
--              [ F10 ]             Emergency -PDT Mode
--              [ ALT+F10 ]         Toggle Kiting Mode
--              [ F11 ]             Emergency -MDT Mode
--              [ F12 ]             Update Current Gear / Report Current Status
--              [ CTRL+F12 ]        Cycle Idle Modes
--              [ ALT+F12 ]         Cancel Emergency -PDT/-MDT Mode
--              [ WIN+F ]           Toggle Closed Position (Facing) Mode
--              [ WIN+C ]           Toggle Capacity Points Mode
--
--  Abilities:  [ CTRL+- ]          Primary step element cycle forward.
--              [ CTRL+= ]          Primary step element cycle backward.
--              [ ALT+- ]           Secondary step element cycle forward.
--              [ ALT+= ]           Secondary step element cycle backward.
--              [ CTRL+[ ]          Toggle step target type.
--              [ CTRL+] ]          Toggle use secondary step.
--              [ Numpad0 ]         Perform Current Step
--
--              [ CTRL+` ]          Saber Dance
--              [ ALT+` ]           Chocobo Jig II
--              [ ALT+[ ]           Contradance
--              [ CTRL+Numlock ]    Reverse Flourish
--              [ CTRL+Numpad/ ]    Berserk/Meditate
--              [ CTRL+Numpad* ]    Warcry/Sekkanoki
--              [ CTRL+Numpad- ]    Aggressor/Third Eye
--              [ CTRL+Numpad+ ]    Climactic Flourish
--              [ CTRL+NumpadEnter ]Building Flourish
--              [ CTRL+Numpad0 ]    Sneak Attack
--              [ CTRL+Numpad. ]    Trick Attack
--
--  Spells:     [ WIN+, ]           Utsusemi: Ichi
--              [ WIN+. ]           Utsusemi: Ni
--
--  WS:         [ CTRL+Numpad7 ]    Exenterator
--              [ CTRL+Numpad4 ]    Evisceration
--              [ CTRL+Numpad5 ]    Rudra's Storm
--              [ CTRL+Numpad6 ]    Pyrrhic Kleos
--              [ CTRL+Numpad1 ]    Aeolian Edge
--
--
--              (Global-Binds.lua contains additional non-job-related keybinds)


-------------------------------------------------------------------------------------------------------------------
--  Custom Commands (preface with /console to use these in macros)
-------------------------------------------------------------------------------------------------------------------

--  gs c step                       Uses the currently configured step on the target, with either <t> or
--                                  <stnpc> depending on setting.
--  gs c step t                     Uses the currently configured step on the target, but forces use of <t>.
--
--  gs c cycle mainstep             Cycles through the available steps to use as the primary step when using
--                                  one of the above commands.
--  gs c cycle altstep              Cycles through the available steps to use for alternating with the
--                                  configured main step.
--  gs c toggle usealtstep          Toggles whether or not to use an alternate step.
--  gs c toggle selectsteptarget    Toggles whether or not to use <stnpc> (as opposed to <t>) when using a step.


-------------------------------------------------------------------------------------------------------------------
-- 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['Climactic Flourish'] = buffactive['Climactic Flourish'] or false
    state.Buff['Sneak Attack'] = buffactive['Sneak Attack'] or false

    state.MainStep = M{['description']='Main Step', 'Box Step', 'Quickstep', 'Feather Step', 'Stutter Step'}
    state.AltStep = M{['description']='Alt Step', 'Quickstep', 'Feather Step', 'Stutter Step', 'Box Step'}
    state.UseAltStep = M(false, 'Use Alt Step')
    state.SelectStepTarget = M(false, 'Select Step Target')
    state.IgnoreTargetting = M(true, 'Ignore Targetting')

    state.ClosedPosition = M(false, 'Closed Position')

    state.CurrentStep = M{['description']='Current Step', 'Main', 'Alt'}
--  state.SkillchainPending = M(false, 'Skillchain Pending')

    state.CP = M(false, "Capacity Points Mode")

    no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
              "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring", "Hoxne Ampulla"}

    lockstyleset = 41
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('GletiDMG', 'HighSTP', 'HighDT')
    state.HybridMode:options('Normal')
    state.WeaponskillMode:options('Normal','PDLSet')
    state.IdleMode:options('Normal', 'DT')

    send_command('bind ^- gs c cycleback mainstep')
    send_command('bind ^= gs c cycle mainstep')
    send_command('bind !- gs c cycleback altstep')
    send_command('bind != gs c cycle altstep')
    send_command('bind ^] gs c toggle usealtstep')
    send_command('bind ![ input /ja "Contradance" <me>')
    send_command('bind ^` input /ja "Saber Dance" <me>')
    send_command('bind !` input /ja "Fan Dance" <me>')
    send_command('bind @` input /ja "Chocobo Jig II" <me>')
    send_command('bind @f gs c toggle ClosedPosition')
    send_command('bind ^numlock input /ja "Reverse Flourish" <me>')

    send_command('bind @c gs c toggle CP')

    if player.sub_job == 'WAR' then
        send_command('bind ^numpad/ input /ja "Berserk" <me>')
        send_command('bind ^numpad* input /ja "Warcry" <me>')
        send_command('bind ^numpad- input /ja "Aggressor" <me>')
    elseif player.sub_job == 'SAM' then
        send_command('bind ^numpad/ input /ja "Meditate" <me>')
        send_command('bind ^numpad* input /ja "Sekkanoki" <me>')
        send_command('bind ^numpad- input /ja "Third Eye" <me>')
    elseif player.sub_job == 'THF' then
        send_command('bind ^numpad0 input /ja "Sneak Attack" <me>')
        send_command('bind ^numpad. input /ja "Trick Attack" <me>')
    end

    send_command('bind ^numpad+ input /ja "Climactic Flourish" <me>')
    send_command('bind ^numpadenter input /ja "Building Flourish" <me>')

    send_command('bind ^numpad7 input /ws "Exenterator" <t>')
    send_command('bind ^numpad4 input /ws "Evisceration" <t>')
    send_command('bind ^numpad5 input /ws "Rudra\'s Storm" <t>')
    send_command('bind ^numpad6 input /ws "Pyrrhic Kleos" <t>')
    send_command('bind ^numpad1 input /ws "Aeolian Edge" <t>')

    send_command('bind %numpad0 gs c step t')

    select_default_macro_book()
    set_lockstyle()

    state.Auto_Kite = M(false, 'Auto_Kite')
    Haste = 0
    DW_needed = 0
    DW = false
    moving = false
    update_combat_form()
    determine_haste_group()
end


-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^-')
    send_command('unbind ^=')
    send_command('unbind !-')
    send_command('unbind !=')
    send_command('unbind ^]')
    send_command('unbind ^[')
    send_command('unbind ^]')
    send_command('unbind ![')
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind @`')
    send_command('unbind ^,')
    send_command('unbind @f')
    send_command('unbind @c')
    send_command('unbind ^numlock')
    send_command('unbind ^numpad/')
    send_command('unbind ^numpad*')
    send_command('unbind ^numpad-')
    send_command('unbind ^numpad+')
    send_command('unbind ^numpadenter')
    send_command('unbind ^numpad7')
    send_command('unbind ^numpad4')
    send_command('unbind ^numpad5')
    send_command('unbind ^numpad6')
    send_command('unbind ^numpad1')
    send_command('unbind numpad0')
    send_command('unbind ^numpad0')
    send_command('unbind ^numpad.')

    send_command('unbind #`')
    send_command('unbind #1')
    send_command('unbind #2')
    send_command('unbind #3')
    send_command('unbind #4')
    send_command('unbind #5')
    send_command('unbind #6')
    send_command('unbind #7')
    send_command('unbind #8')
    send_command('unbind #9')
    send_command('unbind #0')
end


-- Define sets and vars used by this job file.
function init_gear_sets()

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Precast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    -- Enmity set
    sets.Enmity = {}

    sets.precast.JA['Provoke'] = sets.Enmity
    sets.precast.JA['No Foot Rise'] = {body="Horos Casaque +3"}
    sets.precast.JA['Trance'] = {head="Horos Tiara +3"}

    sets.precast.Waltz = {    
		ammo="Staunch Tathlum +1",
		head="Horos Tiara +3",
		body="Maxixi Casaque +3",
		hands="Nyame Gauntlets",
		legs="Dashing Subligar",
		feet="Nyame Sollerets",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Plat. Mog. Belt",
		left_ear="Enchntr. Earring +1",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Moonlight Ring",
		right_ring="Defending Ring",
		back="Null Shawl",
        }

    sets.precast.WaltzSelf = set_combine(sets.precast.Waltz, {left_ring="Asklepian Ring"})
	
    sets.precast.Waltz['Healing Waltz'] = sets.precast.Waltz
    sets.precast.Samba = {head="Maxixi Tiara +3", back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Damage taken-5%',}}}
    sets.precast.Jig = {legs="Horos Tights +4", feet="Maxixi Toe Shoes +3"}

    sets.precast.Step = {
		ammo="Yamarang",
		head="Maxixi Tiara +3",
		body="Maculele Casaque +3",
		hands="Maxixi Bangles +4",
		legs="Malignance Tights",
		feet="Horos Toe Shoes +4",
		neck="Null Loop",
		waist="Null Belt",
		left_ear="Telos Earring",
		right_ear="Alabaster Earring",
		left_ring="Chirich Ring +1",
		right_ring="Chirich Ring +1",
		back="Null Shawl",
        }

    sets.precast.Step['Feather Step'] = set_combine(sets.precast.Step, {feet="Maculele Toe Shoes +3"})
    sets.precast.Flourish1 = {}
    sets.precast.Flourish1['Animated Flourish'] = sets.Enmity

    sets.precast.Flourish1['Violent Flourish'] = {
        ammo="Yamarang",
		head="Malignance Chapeau",
		body="Horos Casaque +3",
		hands="Malignance Gloves",
		legs="Malignance Tights",
		feet="Maculele Toe Shoes +3",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Eschan Stone",
		left_ear="Enchntr. Earring +1",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Stikini Ring +1",
		right_ring="Crepuscular Ring",
		back="Null Shawl",
        } -- Magic Accuracy

    sets.precast.Flourish1['Desperate Flourish'] = sets.precast.Step

    sets.precast.Flourish2 = {}
    sets.precast.Flourish2['Reverse Flourish'] = {hands="Macu. Bangles +3", back={ name="Toetapper Mantle", augments={'"Store TP"+2','"Dual Wield"+3','"Rev. Flourish"+30',}}}
    sets.precast.Flourish3 = {}
    sets.precast.Flourish3['Striking Flourish'] = {body="Macu. Casaque +2"}
    sets.precast.Flourish3['Climactic Flourish'] = {head="Maculele Tiara +3", ammo="Charis Feather"}

    sets.precast.FC = {
        ammo="Sapience Orb",
		head="Malignance Chapeau",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Maculele Toe Shoes +3",
		neck="Elite Royal Collar",
		waist="Plat. Mog. Belt",
		left_ear="Enchntr. Earring +1",
		right_ear="Loquac. Earring",
		left_ring="Weather. Ring +1",
		right_ring="Prolix Ring",
		back="Null Shawl",
        }

    sets.precast.FC.Utsusemi = sets.precast.FC


    ------------------------------------------------------------------------------------------------
    ------------------------------------- Weapon Skill Sets ----------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.precast.WS = {
        ammo="C. Palug Stone",
		head="Maculele Tiara +3",
		body="Nyame Mail",
		hands="Maxixi Bangles +4",
		legs="Nyame Flanchard",
		feet="Nyame Sollerets",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Kentarch Belt +1",
		left_ear="Moonshade Earring",
		right_ear="Hoxne Earring",
		left_ring="Regal Ring",
		right_ring="Cornelia's Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Damage taken-5%',}},
        }

    sets.precast.WS.PDLSet = set_combine(sets.precast.WS, {
		ammo="Crepuscular Pebble",
		body="Gleti's Cuirass",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Epaminondas's Ring",
		back="Sacro Mantle",
		})
		
    sets.precast.WS.Critical = set_combine(sets.precast.WS, {
		ammo="Charis Feather",
		})
		
	sets.precast.WS.PDLSet.Critical = set_combine(sets.precast.WS.PDLSet, {
		ammo="Charis Feather",
		})
		
	sets.precast.WS['Ruthless Stroke'] = {
		ammo="C. Palug Stone",
		head="Maculele Tiara +3",
		body="Nyame Mail",
		hands="Maxixi Bangles +4",
		legs="Nyame Flanchard",
		feet="Nyame Sollerets",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Kentarch Belt +1",
		left_ear="Moonshade Earring",
		right_ear="Hoxne Earring",
		left_ring="Regal Ring",
		right_ring="Cornelia's Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Damage taken-5%',}},
		}
	
	sets.precast.WS['Ruthless Stroke'].PDLSet = set_combine(sets.precast.WS['Ruthless Stroke'], {
		ammo="Crepuscular Pebble",
		body="Gleti's Cuirass",
		legs="Nyame Flanchard",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Epaminondas's Ring",
		back="Sacro Mantle",
		})

    sets.precast.WS['Exenterator'] = {
		ammo="Charis Feather",
		head="Maculele Tiara +3",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Mummu Gamash. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Odr Earring",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Regal Ring",
		right_ring="Gere Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+2','Crit.hit rate+10','Damage taken-5%',}},
        }

    sets.precast.WS['Pyrrhic Kleos'] = {
		ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Mummu Gamash. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Sherida Earring",
		right_ear="Odr Earring",
		left_ring="Regal Ring",
		right_ring="Gere Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+2','Crit.hit rate+10','Damage taken-5%',}},	
        }

    sets.precast.WS['Evisceration'] = {
		ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Mummu Gamash. +2",
		neck="Fotia Gorget",
		waist="Fotia Belt",
		left_ear="Odr Earring",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Regal Ring",
		right_ring="Gere Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+2','Crit.hit rate+10','Damage taken-5%',}},
		}

    sets.precast.WS['Rudra\'s Storm'] = {
		ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Nyame Mail",
		hands="Maxixi Bangles +4",
		legs="Horos Tights +4",
		feet="Nyame Sollerets",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Kentarch Belt +1",
		left_ear="Moonshade Earring",
		right_ear="Hoxne Earring",
		left_ring="Regal Ring",
		right_ring="Cornelia's Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Damage taken-5%',}},
        }

    sets.precast.WS['Rudra\'s Storm'].PDLSet = set_combine(sets.precast.WS['Rudra\'s Storm'], {
		ammo="Crepuscular Pebble",
		body="Gleti's Cuirass",
		legs="Nyame Flanchard",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Epaminondas's Ring",
		})

    sets.precast.WS['Aeolian Edge'] = {
        ammo="Ghastly Tathlum +1",
		head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Nyame Sollerets",
		neck="Sibyl Scarf",
		waist="Orpheus's Sash",
		left_ear="Moonshade Earring",
		right_ear="Friomisi Earring",
		left_ring="Epaminondas's Ring",
		right_ring="Cornelia's Ring",
		back={ name="Senuna's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%','Damage taken-5%',}},
        }

    sets.precast.Skillchain = {}

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Midcast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.SpellInterrupt = {      
		ammo="Staunch Tathlum +1",
		head="Malignance Chapeau",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Maculele Toe Shoes +3",
		neck="Elite Royal Collar",
		waist="Plat. Mog. Belt",
		left_ear="Enchntr. Earring +1",
		right_ear="Loquac. Earring",
		left_ring="Weather. Ring +1",
		right_ring="Moonlight Ring",
		back="Null Shawl",
        }

    sets.midcast.Utsusemi = sets.midcast.SpellInterrupt

    ------------------------------------------------------------------------------------------------
    ----------------------------------------- Idle Sets --------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.resting = {}

    sets.idle = {
        ammo="Staunch Tathlum +1",
		head="Turms Cap +1",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Skd. Jambeaux +1",
		neck="Elite Royal Collar",
		waist="Plat. Mog. Belt",
		left_ear="Arete del Luna +1",
		right_ear="Alabaster Earring",
		left_ring={name="Chirich Ring +1", bag="wardrobe4"},
		right_ring={name="Chirich Ring +1", bag="wardrobe6"},
		back="Moonlight Cape",
        }

    sets.idle.DT = {
		ammo="Staunch Tathlum +1",
		head="Turms Cap +1",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Skd. Jambeaux +1",
		neck="Elite Royal Collar",
		waist="Plat. Mog. Belt",
		left_ear="Arete del Luna +1",
		right_ear="Alabaster Earring",
		left_ring={name="Moonlight Ring", bag="wardrobe3"},
		right_ring="Defending Ring",
		back="Moonlight Cape",
		}

    sets.idle.Town = {    
		ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Skd. Jambeaux +1",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Sailfi Belt +1",
		left_ear="Sherida Earring",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Ilabrat Ring",
		right_ring="Gere Ring",
		back="Moonlight Cape",
		}

    sets.idle.Weak = sets.idle.DT

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Defense Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.defense.PDT = sets.idle.DT
    sets.defense.MDT = sets.idle.DT

    sets.Kiting = {feet="Skd. Jambeaux +1"}

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Engaged Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion


    state.OffenseMode:options('GletiDMG', 'HighSTP', 'HighDT')

    sets.engaged = {
		ammo="Aurgelmir Orb +1",
		head="Malignance Chapeau",
		body="Malignance Tabard",
		hands="Malignance Gloves",
		legs="Gleti's Breeches",
		feet="Maculele Toe Shoes +3",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Plat. Mog. Belt",
		left_ear="Sherida Earring",
		right_ear="Telos Earring",
		left_ring={name="Moonlight Ring", bag="wardrobe3"},
		right_ring={name="Moonlight Ring", bag="wardrobe7"},
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Damage taken-5%',}},
        }

    sets.engaged.GletiDMG = {
	    ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Gleti's Cuirass",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Horos Toe Shoes +4",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Sailfi Belt +1",
		left_ear="Sherida Earring",
		right_ear={ name="Macu. Earring +1", augments={'System: 1 ID: 1676 Val: 0','Accuracy+11','Mag. Acc.+11','"Store TP"+3',}},
		left_ring="Ilabrat Ring",
		right_ring="Gere Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Damage taken-5%',}}
        }

    sets.engaged.HighSTP = {
		ammo="Aurgelmir Orb +1",
		head="Maculele Tiara +3",
		body="Malignance Tabard",
		hands="Gleti's Gauntlets",
		legs="Gleti's Breeches",
		feet="Horos Toe Shoes +4",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Sailfi Belt +1",
		left_ear="Sherida Earring",
		right_ear="Telos Earring",
		left_ring="Ilabrat Ring",
		right_ring="Gere Ring",
		back={ name="Senuna's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Damage taken-5%',}},
        }

    sets.engaged.HighDT = {
		ammo="Aurgelmir Orb +1",
		head="Malignance Chapeau",
		body="Malignance Tabard",
		hands="Malignance Gloves",
		legs="Malignance Tights",
		feet="Maculele Toe Shoes +3",
		neck={ name="Etoile Gorget +2", augments={'Path: A',}},
		waist="Null Belt",
		left_ear="Sherida Earring",
		right_ear="Telos Earring",
		left_ring={name="Moonlight Ring", bag="wardrobe3"},
		right_ring={name="Moonlight Ring", bag="wardrobe7"},
		back="Null Shawl",
        }

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Hybrid Sets -------------------------------------------
    ------------------------------------------------------------------------------------------------

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Special Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.buff['Saber Dance'] = {legs="Horos Tights +4"}
    sets.buff['Fan Dance'] = {body="Horos Bangles +3"}
    sets.buff['Climactic Flourish'] = {head="Maculele Tiara +3", ammo="Charis Feather"}
    sets.buff['Closed Position'] = {feet="Horos T. Shoes +4"}

    sets.buff.Doom = {
        neck="Nicander's Necklace",
		left_ring={name="Blenmot's Ring +1", bag="wardrobe6"},
		right_ring={name="Blenmot's Ring +1", bag="wardrobe7"},
        waist="Gishdubar Sash",
        }
	
	sets.Reive = {neck="Ygnas's Resolve +1"}

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)
    --auto_presto(spell)
    if spellMap == 'Utsusemi' then
        if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
            cancel_spell()
            add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
            eventArgs.handled = true
            return
        elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
            send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
        end
    end
end

function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == "WeaponSkill" then
        if state.Buff['Sneak Attack'] == true then
            equip(sets.precast.WS.Critical)
        end
        if state.Buff['Climactic Flourish'] then
            equip(sets.buff['Climactic Flourish'])
        end
    end
    if spell.type=='Waltz' and spell.english:startswith('Curing') and spell.target.type == 'SELF' then
        equip(sets.precast.WaltzSelf)
    end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
    -- Weaponskills wipe SATA.  Turn those state vars off before default gearing is attempted.
    if spell.type == 'WeaponSkill' and not spell.interrupted then
        state.Buff['Sneak Attack'] = false
    end
end

function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if player.tp >= 2750 then
            equip({left_ear="Odr Earring"}) -- Replace with your preferred non-TP earring
        end
    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 buff == 'Saber Dance' or buff == 'Climactic Flourish' or buff == 'Fan Dance' then
        handle_equipping_gear(player.status)
    end
	
	if buffactive['Reive Mark'] then
		if gain then
			equip(sets.Reive)
			disable('neck')
		else	
			enable('neck')
		end
	end

    if buff == "doom" then
        if gain then
            equip(sets.buff.Doom)
            send_command('@input /p Doomed.')
             disable('ring1','ring2','waist')
        else
            enable('ring1','ring2','waist')
            handle_equipping_gear(player.status)
        end
    end

end

function check_weaponset()
    if state.OffenseMode.value == 'LowAcc' or state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
        equip(sets[state.WeaponSet.current])
    else
        equip(sets[state.WeaponSet.current])
    end
    if (player.sub_job ~= 'NIN' and player.sub_job ~= 'DNC') then
        equip(sets.DefaultShield)
    elseif player.sub_job == 'NIN' and player.sub_job_level < 10 or player.sub_job == 'DNC' and player.sub_job_level < 20 then
        equip(sets.DefaultShield)
    end
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
    check_gear()
    update_combat_form()
    determine_haste_group()
    check_moving()
end

function job_update(cmdParams, eventArgs)
    handle_equipping_gear(player.status)
end

function update_combat_form()
    if DW == true then
        state.CombatForm:set('DW')
    elseif DW == false then
        state.CombatForm:reset()
    end
end

function get_custom_wsmode(spell, action, spellMap)
    local wsmode
    if state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
        wsmode = 'Acc'
    end

    return wsmode
end

function customize_idle_set(idleSet)
    if state.CP.current == 'on' then
        equip(sets.CP)
        disable('back')
    else
        enable('back')
    end
    if state.Auto_Kite.value == true then
       idleSet = set_combine(idleSet, sets.Kiting)
    end

    return idleSet
end

function customize_melee_set(meleeSet)
    --if state.Buff['Climactic Flourish'] then
    --    meleeSet = set_combine(meleeSet, sets.buff['Climactic Flourish'])
    --end
    if state.ClosedPosition.value == true then
        meleeSet = set_combine(meleeSet, sets.buff['Closed Position'])
    end

    return meleeSet
end

-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
    if spell.type == 'Step' then
        if state.IgnoreTargetting.value == true then
            state.IgnoreTargetting:reset()
            eventArgs.handled = true
        end

        eventArgs.SelectNPCTargets = state.SelectStepTarget.value
    end
end


-- Function to display the current relevant user state when doing an update.
-- Set eventArgs.handled to true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
    local cf_msg = ''
    if state.CombatForm.has_value then
        cf_msg = ' (' ..state.CombatForm.value.. ')'
    end

    local m_msg = state.OffenseMode.value
    if state.HybridMode.value ~= 'Normal' then
        m_msg = m_msg .. '/' ..state.HybridMode.value
    end

    local ws_msg = state.WeaponskillMode.value

    local s_msg = state.MainStep.current
    if state.UseAltStep.value == true then
        s_msg = s_msg .. '/'..state.AltStep.current
    end

    local d_msg = 'None'
    if state.DefenseMode.value ~= 'None' then
        d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
    end

    local i_msg = state.IdleMode.value

    local msg = ''
    if state.Kiting.value then
        msg = msg .. ' Kiting: On |'
    end

    add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002)..  ' |'
        ..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002)..  ' |'
        ..string.char(31,060).. ' Step: '  ..string.char(31,001)..s_msg.. string.char(31,002)..  ' |'
        ..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002)..  ' |'
        ..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002)..  ' |'
        ..string.char(31,002)..msg)

    eventArgs.handled = true
end


-------------------------------------------------------------------------------------------------------------------
-- User self-commands.
-------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function determine_haste_group()
    classes.CustomMeleeGroups:clear()
    if DW == true then
        if DW_needed <= 1 then
            classes.CustomMeleeGroups:append('MaxHaste')
        elseif DW_needed > 1 and DW_needed <= 9 then
            classes.CustomMeleeGroups:append('HighHaste')
        elseif DW_needed > 9 and DW_needed <= 21 then
            classes.CustomMeleeGroups:append('MidHaste')
        elseif DW_needed > 21 and DW_needed <= 39 then
            classes.CustomMeleeGroups:append('LowHaste')
        elseif DW_needed > 39 then
            classes.CustomMeleeGroups:append('')
        end
    end
end

function job_self_command(cmdParams, eventArgs)
    if cmdParams[1] == 'step' then
        if cmdParams[2] == 't' then
            state.IgnoreTargetting:set()
        end

        local doStep = ''
        if state.UseAltStep.value == true then
            doStep = state[state.CurrentStep.current..'Step'].current
            state.CurrentStep:cycle()
        else
            doStep = state.MainStep.current
        end

        send_command('@input /ja "'..doStep..'" <t>')
    end

    gearinfo(cmdParams, eventArgs)
end

function gearinfo(cmdParams, eventArgs)
    if cmdParams[1] == 'gearinfo' then
        if type(tonumber(cmdParams[2])) == 'number' then
            if tonumber(cmdParams[2]) ~= DW_needed then
            DW_needed = tonumber(cmdParams[2])
            DW = true
            end
        elseif type(cmdParams[2]) == 'string' then
            if cmdParams[2] == 'false' then
                DW_needed = 0
                DW = false
            end
        end
        if type(tonumber(cmdParams[3])) == 'number' then
            if tonumber(cmdParams[3]) ~= Haste then
                Haste = tonumber(cmdParams[3])
            end
        end
        if type(cmdParams[4]) == 'string' then
            if cmdParams[4] == 'true' then
                moving = true
            elseif cmdParams[4] == 'false' then
                moving = false
            end
        end
        if not midaction() then
            job_update()
        end
    end
end


-- Automatically use Presto for steps when it's available and we have less than 3 finishing moves
function job_pretarget(spell, action, spellMap, eventArgs)
    if spell.type == 'Step' then
        local allRecasts = windower.ffxi.get_ability_recasts()
        local prestoCooldown = allRecasts[236]
        --local under3FMs = not buffactive['Finishing Move 3'] and not buffactive['Finishing Move 4'] and not buffactive['Finishing Move 5']

        if player.main_job_level >= 77 and prestoCooldown < 1 then --and under3FMs then
            cast_delay(1.1)
            send_command('input /ja "Presto" <me>')
        end
    end
end

function check_moving()
    if state.DefenseMode.value == 'None'  and state.Kiting.value == false then
        if state.Auto_Kite.value == false and moving then
            state.Auto_Kite:set(true)
        elseif state.Auto_Kite.value == true and moving == false then
            state.Auto_Kite:set(false)
        end
    end
end

function check_gear()
    if no_swap_gear:contains(player.equipment.left_ring) then
        disable("ring1")
    else
        enable("ring1")
    end
    if no_swap_gear:contains(player.equipment.right_ring) then
        disable("ring2")
    else
        enable("ring2")
    end
	if no_swap_gear:contains(player.equipment.ammo) then
        disable("ammo")
	else
		enable("ammo")
	end
end

windower.register_event('zone change',
    function()
        if no_swap_gear:contains(player.equipment.left_ring) then
            enable("ring1")
            equip(sets.idle)
        end
        if no_swap_gear:contains(player.equipment.right_ring) then
            enable("ring2")
            equip(sets.idle)
        end
    end
)

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book: (set, book)
    if player.sub_job == 'WAR' then
        set_macro_page(1, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(1, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(1, 4)
    elseif player.sub_job == 'RUN' then
        set_macro_page(1, 4)
    elseif player.sub_job == 'SAM' then
        set_macro_page(1, 4)
    else
        set_macro_page(1, 4)
    end
end

function set_lockstyle()
    send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
 Bismarck.Radec
Offline
Server: Bismarck
Game: FFXI
User: Radec
Posts: 225
By Bismarck.Radec 2026-09-15 23:34:45
Link | Quote | Reply
 
You have two job_post_precast functions, lines 670 and 692. Only the later one will run, and it's overwriting everything you're trying to do around climactic. Combine them so there's only one, and it looks like it should work.
 Odin.Messmer
Offline
Server: Odin
Game: FFXI
Posts: 2
By Odin.Messmer 2026-09-16 18:51:22
Link | Quote | Reply
 
Working now. Thank you so much.
First Page 2 3 ... 190 191