Supernova FFXI Wiki
Register
Advertisement

This is essentially what I use on my WHM. Because I don't use any Gearswap stances on WHM, it's a much more straightforward bit of code than either my BLM or THF files. Find me in game if you've got any questions.

Go back to my Gearswap page.

--[[ *************************************************************
 Wren's WHM gearswap .lua for SuperNova FFXI
 Save as windower/addons/GearSwap/data/WHM.lua
 
  2016-07-25 OC  - First version. Commented to help newbies. :)
  2016-08-01 OC  - Rostrum Pumps
 2016-08-25 OC  - Sea Capes
 2016-12-02 OC  - Loquacious Earring, Stone Gorget
************************************************************* --]]
 
 --[[ ******************************************************
  Gearsets - define the various sets of gear we'll wear.
****************************************************** --]]
 
 function get_sets()
 
     -- fashion set is for looking nice while lockstyled.
    -- make sure you include your top-row equipment,
    -- especially if you use a ranged or throwing weapon.
    sets.fashion = {
        main        = "Mjollnir",
        sub         = "Legion Scutum",
        head        = "Lunar Cap",
        body        = "Aristocrat's Coat",
        hands       = "Blessed Mitts +1",
        legs        = "Raven Hose",
        feet        = "Mahatma Pigaches"
    }
 
     -- idle set is worn when we're standing around doing
    -- nothing.  we want auto-refresh, movement, MP
    sets.idle = {
        main        = "Mjollnir",
        sub         = "Legion Scutum",
        ammo        = "Hedgehog Bomb",
        head        = "Walahra Turban",
        neck        = "Beak Necklace +1",
        left_ear    = "Loquac. Earring",
        right_ear   = "Roundel Earring",
        body        = "Aristocrat's Coat",
        hands       = "Blessed Mitts +1",
        left_ring   = "Celestial Ring",
        right_ring  = "Celestial Ring",
        back        = "Invigorating Cape",
        waist       = "Cleric's Belt",
        legs        = "Bls. Trousers +1",
        feet        = "Herald's Gaiters"
    }
 
     -- fast cast set is for casting quickly.  We put
    -- this on before the spell is begun, then switch
    -- to one of the other sets during cast.
    sets.fc = {
         main        = "Chatoyant Staff",
        sub         = "Vivid Strap +1",
        left_ear    = "Loquac. Earring",
        feet        = "Rostrum Pumps"
    }
 
     -- enfeebling set is for sleep, blind, and others.
    -- mostly +Enfeebling Skill and MACC
    sets.enfeebling = {
        main        = "Chatoyant Staff",
        sub         = "Vivid Strap +1",
        head        = "Ree's Headgear",
        neck        = "Enfeebling Torque",
        right_ear   = "Enfeebling Earring",
        body        = "Hlr. Briault +1",
        hands       = "Cleric's Mitts +1",
        back        = "Altruistic Cape",
        waist       = "Witch Sash",
        legs        = "Nashira Seraweels",
        feet        = "Avocat Pigaches"
    }
 
     -- enhancing set is mostly for stoneskin.
    -- mostly +Enhancing Skill and Mind.
    sets.enhancing = {
        main        = "Chatoyant Staff",
        sub         = "Reign Grip",
        head        = "Walahra Turban",
        neck        = "Enhancing Torque",
        right_ear   = "Augment. Earring",
        body        = "Mahatma Hpl.",
        hands       = "Blessed Mitts +1",
        back        = "Merciful Cape",
        legs        = "Bls. Trousers +1",
        feet        = "Clr. Duckbills +1"
    }
 
     -- heal set for getting the most of our cures.
    -- mostly +Cure Potency and Mind.
    sets.heal = {
        main        = "Mjollnir",
        sub         = "Legion Scutum",
        head        = "Walahra Turban",
        neck        = "Fylgja Torque +1",
        right_ear   = "Roundel Earring",
        body        = "Aristocrat's Coat",
        hands       = "Blessed Mitts +1",
        back        = "Altruistic Cape",
        waist       = "Pythia Sash +1",
        legs        = "Bls. Trousers +1",
        feet        = "Blessed Pumps +1"
    }
 
     -- resting set is for recovering MP while /heal.
    -- as much +hMP as possible.
    sets.rest = {
        main        = "Imperial Wand",
        sub         = "Legion Scutum",
        head        = "Mirror Tiara",
        left_ear    = "Antivenom Earring",
        right_ear   = "Relaxing Earring",
        body        = "Mahatma Hpl.",
        hands       = "Oracle's Gloves",
        legs        = "Oracle's Braconi",
        feet        = "Goliard Clogs"
    }
 end
 
 --[[ ******************************************************
  Equip functions - put on the sets we defined above, and
 echo a note to our chat log so we know it worked.
****************************************************** --]]
 
 -- equip our idle set
 function equip_idle()
     windower.add_to_chat(8,'[Idle]')
    equip(sets.idle)
end

-- equip our hMP set
function equip_rest()
    windower.add_to_chat(8,'[Resting]')
    equip(sets.rest)
end

-- equip our enfeebling set
function equip_enfeebling()
    windower.add_to_chat(8,'[Enfeebling]')
    equip(sets.enfeebling)
end

-- equip our enhancing set, including the relic pieces
-- for barspells and regen
function equip_enhancing(spell)
    windower.add_to_chat(8,'[Enhancing]')
    if spell.name:contains('Bar') then
        equip(sets.enhancing,{legs="Clr. Pantaln. +1"})
    elseif spell.name:contains('Regen') then
        equip(sets.enhancing,{body="Clr. Briault +1"})
    elseif spell.name == 'Stoneskin' then
        equip(sets.enhancing,{neck="Stone Gorget"})
    else
         equip(sets.enhancing)
    end
 end
 
 -- equip our healing magic set
 function equip_heal()
     windower.add_to_chat(8,'[Healing]')
    equip(sets.heal)
end

--[[ ******************************************************
 Casting functions - these functions run automatically when
 we cast a spell, use a job ability, rest for MP, and so on
****************************************************** --]]
 
 -- the precast function runs automatically BEFORE we
 -- begin casting a spell or job ability.  For our WHM,
 -- we want to equip fast cast gear prior to casting.
 -- If casting a cure spell, wear clogs instead of rostrum.
 function precast(spell)
     if spell.type:contains('Magic') then
        if spell.name:contains('Cure') then
            equip(sets.fc,{feet="Cure Clogs"})
        else
             equip(sets.fc)
        end
     end
 end
 
 -- now that we've already gained the benefit of fast cast,
 -- the midcast function swaps in a new set of gear during
 -- the cast, which will make the spell effect more potent.
 function midcast(spell)
     if spell.skill == 'Healing Magic' then
        equip_heal()
    elseif spell.skill == 'Enfeebling Magic' then
        equip_enfeebling()
    elseif spell.skill == 'Enhancing Magic' then
        equip_enhancing(spell)
    end
 end
 
 -- we're done with our spell or job ability, so the aftercast
 -- function makes sure we return to our idle gear to benefit
 -- from auto-refresh and movement speed.
 function aftercast(spell)
     equip_idle()
end

-- the status_change function runs automatically whenever we
-- engage, disengage, kneel, or stand.  As a WHM we use this
-- to equip our +hMP gear when we /heal, and return to our
-- idle gear when we stand up.
function status_change(new,old)
    if new == 'Resting' then
        equip_rest()
    else
         equip_idle()
    end
 end
 
 --[[ ******************************************************
  Code that runs once, when we first swap to our WHM job
****************************************************** --]]
 
 -- Puts on our fashion set, lockstyle it, then switch
 -- to our idle set.
 send_command('wait 1;gs equip fashion;wait 1;input /lockstyle on;wait 1;gs equip idle')
Advertisement