Whew! That's a whole lot of rules. It was actually really hard to read. Even if you don't care very much about formatting it for your own use, keep in mind that others are less likely to look at your code and help you if you make it difficult for them to do so. Always indent sections that are "inside" of other sections.
Code
<?xml version="1.0" ?>
<spellcast xmlns:xi="http://www.w3.org/2001/XInclude">
<config
RequireVersion="2.3"
Debug="True"
HideErrors="False"
ShowGearSwaps="False"
QuickCommands="True"
ShowSpellInfo="False"
/>
<variables>
<!-- Elemental Staves, input what staff to use for each element here. -->
<var name="IceStaff">Chatoyant Staff</var>
<var name="DarkStaff">Chatoyant Staff</var>
<var name="ThunderStaff">Chatoyant Staff</var>
<var name="WindStaff">Chatoyant Staff</var>
<var name="FireStaff">Chatoyant Staff</var>
<var name="EarthStaff">Chatoyant Staff</var>
<var name="LightStaff">Chatoyant Staff</var>
<var name="WaterStaff">Chatoyant Staff</var>
<!-- Elemental Obi's, set to 1 for the ones you have. -->
<var name="DarkObi">1</var>
<var name="LightObi">1</var>
<var name="ThunderObi">0</var>
<var name="IceObi">0</var>
<var name="FireObi">0</var>
<var name="WindObi">0</var>
<var name="WaterObi">0</var>
<var name="EarthObi">0</var>
<!-- Twilight Cape. -->
<var name="DarkCape">1</var>
<var name="LightCape">1</var>
<var name="ThunderCape">0</var>
<var name="IceCape">0</var>
<var name="FireCape">0</var>
<var name="WindCape">0</var>
<var name="WaterCape">0</var>
<var name="EarthCape">0</var>
</variables>
<sets>
<group name="WHM" default="true">
<set name="Idle">
<lring>Maquette Ring</lring>
<main>Owleyes</main>
<sub>Genbu's Shield</sub>
<ammo>Impatiens</ammo>
<head>Orison Cap +2</head>
<neck>Twilight Torque</neck>
<lear>Moonshade Earring</lear>
<rear>Mujin Stud</rear>
<body>Orison Bliaud +2</body>
<hands>Serpentes Cuffs</hands>
<back>Umbra Cape</back>
<waist>Slipor Sash</waist>
<legs>Nares trews</legs>
<feet>Serpentes Sabots</feet>
<rring>Dark Ring</rring>
</set>
<set name="Resting" baseset="Idle">
<lring>Star Ring</lring>
<main>$DarkStaff</main>
<sub>Ariesian Grip</sub>
<ammo>Clarus Stone</ammo>
<head>Orison Cap +2</head>
<neck>Eidolon Pendant</neck>
<lear>Moonshade Earring</lear>
<rear>Relaxing Earring</rear>
<back>Vita Cape</back>
<waist>Austerity Belt</waist>
<legs>Nares Trews</legs>
<rring>Star Ring</rring>
</set>
<set name="FastCast" baseset="Idle">
<main>Winged Wand</main>
<ammo>Impatiens</ammo>
<head>Nares Cap</head>
<neck>Orison Locket</neck>
<body>Anhur Robe</body>
<lear>Loquac. Earring</lear>
<back>Swith Cape</back>
<waist>Witful Belt</waist>
<feet>Rostrum Pumps</feet>
<rring>Prolix Ring</rring>
<lring>Ephedra Ring</lring>
</set>
<set name="ConserveMP" baseset="FastCast">
<main>Capricorn Staff</main>
<sub>Wizzan Grip</sub>
<ammo>Clarus Stone</ammo>
<head>Laurel Wreath</head>
<lear>Gifted Earring</lear>
<body>Hedera Cotehardie</body>
<hands>Blessed mitts</hands>
<back>Vita Cape</back>
<waist>Austerity Belt</waist>
<legs>Nashira seraweels</legs>
<feet>Blessed pumps</feet>
<lear>Loquacious Earring</lear>
<rring>Prolix Ring</rring>
</set>
<set name="Melee" baseset="Idle">
<ammo>Smart Grenade</ammo>
<head>Zelus Tiara</head>
<neck>Peacock Amulet</neck>
<lear>Brutal Earring</lear>
<rear>Diabolos's Earring</rear>
<body>Hedera Cotehardie</body>
<hands>Blessed Mitts</hands>
<lring>Thundersoul ring</lring>
<rring>Rajas Ring</rring>
<back>Umbra Cape</back>
<waist>Goading Belt</waist>
<legs>Nashira Seraweels</legs>
<feet>Blessed pumps</feet>
</set>
<set name="WS" baseset="Melee">
<ammo>Flame Sachet</ammo>
<head></head>
<rear>Vulcan's Pearl</rear>
<body>Praeco Doublet</body>
<hands>Hlr. Mitts +1</hands>
<lring>Karka Ring</lring>
<waist>Ocean Sash</waist>
</set>
<set name="Hexa" baseset="WS">
<neck>Light Gorget</neck>
<waist>Light Belt</waist>
<legs>Prince's Slops</legs>
</set>
<set name="Boon" baseset="WS">
<neck>Prudence Torque</neck>
<waist>Ocean Sash</waist>
</set>
<set name="FlashNova" baseset="WS">
<neck>Aqua Gorget</neck>
</set>
<set name="SpiritTaker" baseset="WS">
<ammo>Aqua Sachet</ammo>
<neck>Temp. Torque</neck>
<lring>Spiral Ring</lring>
<waist>Cascade Belt</waist>
</set>
<set name="Retribution" baseset="WS">
<neck>Soil Gorget</neck>
<lring>Spiral Ring</lring>
</set>
<set name="Cataclysm" baseset="WS">
<ammo>Witchstone</ammo>
<neck>Prudence Torque</neck>
<lear>Hecate's Earring</lear>
<rear>Moldavite Earring</rear>
<hands>Eradico Mitts</hands>
<lring>Spiral Ring</lring>
<back>Searing Cape</back>
<waist>Cognition Belt</waist>
<legs>Nisse Slacks</legs>
</set>
<set name="Healing" baseset="Idle">
<main>Arka IV</main>
<sub>Curatio Grip</sub>
<ammo>Clarus Stone</ammo>
<neck>Phalaina Locket</neck>
<lear>Roundel Earring</lear>
<rear>Novia Earring</rear>
<body>Orison Bliaud +2</body>
<hands>Augur's Gloves</hands>
<lring>Ephedra Ring</lring>
<rring>Sirona's Ring</rring>
<back>Tempered Cape</back>
<waist>Pythia Sash</waist>
<head>Orison Cap +2</head>
<legs>Orsn. Pantaln. +2</legs>
<feet>Orsn. Duckbills +2</feet>
</set>
<set name="Cursna" baseset="FastCast">
<main>Beneficus</main>
<ammo>Clarus Stone</ammo>
<head>Orison Cap +2</head>
<neck>Orison Locket</neck>
<body>Orison Bliaud +2</body>
<hands>Augur's Gloves</hands>
<back>Tempered Cape</back>
<waist>Goading Belt</waist>
<legs>Clr. Pantaln. +2</legs>
<feet>Blessed Pumps</feet>
<rring>Sirona's Ring</rring>
<lring>Ephedra Ring</lring>
<rear>Gifted Earring</rear>
<lear>Loquacious Earring</lear>
</set>
<set name="Enhancing" baseset="Idle">
<main>Beneficus</main>
<sub>Genbu's Shield</sub>
<ammo>Clarus Stone</ammo>
<head>Laurel Wreath</head>
<neck>Colossus's Torque</neck>
<lear>Augment. Earring</lear>
<rear>Gifted Earring</rear>
<body>Anhur Robe</body>
<hands>Augur's Gloves</hands>
<back>Merciful Cape</back>
<waist>Olympus Sash</waist>
<legs>Clr. Pantaln. +2</legs>
<feet>Orsn. Duckbills +2</feet>
<rring>Prolix Ring</rring>
</set>
<set name="Bar" baseset="Enhancing">
<head>Orison Cap +2</head>
<body>Orison Bliaud +2</body>
<legs>Clr. Pantaln. +2</legs>
</set>
<set name="Stoneskin" baseset="Enhancing">
<main>Fourth Mace</main>
<ammo>Clarus Stone</ammo>
<head>Zelus Tiara</head>
<neck>Stone Gorget</neck>
<lear>Earthcry Earring</lear>
<rear>Magnetic Earring</rear>
<body>Goliard Saio</body>
<hands>Blessed Mitts +1</hands>
<back>Vita Cape</back>
<waist>Siegel Sash</waist>
<legs>Haven Hose</legs>
<feet>Rostrum Pumps</feet>
</set>
<set name="Regen" baseset="ConserveMP">
<body>Clr. Briault +2</body>
<hands>Orison Mitts +2</hands>
</set>
<set name="Divine" baseset="Idle">
<main>$LightStaff</main>
<sub>Verse Strap +1</sub>
<head>Hyksos Khat +1</head>
<neck>Divine Torque</neck>
<lear>Aredan Earring</lear>
<rear>Divine Earring</rear>
<body>Praeco Doublet</body>
<hands>Clr. Mitts +2</hands>
<lring>Karka Ring</lring>
<rring>Omega Ring</rring>
<back>Veela Cape</back>
<waist>Witful Belt</waist>
<legs>Healer's Pantaln.</legs>
<feet>Rostrum Pumps</feet>
</set>
<set name="Banish" BaseSet="Divine">
<ammo>Aqua Sachet</ammo>
<neck>Stoicheion Medal</neck>
<hands>Blessed Mitts +1</hands>
<back>Sunbeam Cape</back>
<waist>Cascade Belt</waist>
<legs>Bls. Trousers +1</legs>
<feet>Orsn. Duckbills +2</feet>
</set>
<set name="Elemental" baseset="Idle">
<main>$%SpellElementStaff</main>
</set>
<set name="Dark" baseset="Idle">
<main>$DarkStaff</main>
<sub>Caecus Grip</sub>
<ammo>Clarus Stone</ammo>
<head>Nashira Turban</head>
<neck>Aesir Torque</neck>
<lear>Aredan Earring</lear>
<rear>Dark Earring</rear>
<body>Goliard Saio</body>
<hands>Blessed Mitts +1</hands>
<lring>Karka Ring</lring>
<rring>Omega Ring</rring>
<back>Merciful Cape</back>
<waist>Casso Sash</waist>
<legs>Portent Pants</legs>
<feet>Goliard Clogs</feet>
</set>
<set name="Stun" baseset="Dark">
<main>$ThunderStaff</main>
<lear>Loquac. Earring</lear>
</set>
<set name="EnfeeblingBase" baseset="Idle">
<main>$%SpellElementStaff</main>
<sub>Macero Grip</sub>
<head>Hyksos Khat +1</head>
<neck>Enfeebling Torque</neck>
<lear>Aredan Earring</lear>
<rear>Enfeebling Earring</rear>
<body>Anhur Robe</body>
<hands>Clr. Mitts +2</hands>
<lring>Karka Ring</lring>
<rring>Omega Ring</rring>
<waist>Casso Sash</waist>
<legs>Portent Pants</legs>
<feet>Clr. Duckbills +2</feet>
</set>
<set name="Enfeebling-BlackMagic" baseset="EnfeeblingBase">
<ammo>Clarus Stone</ammo>
<back>Vita Cape</back>
</set>
<set name="Enfeebling-WhiteMagic" baseset="EnfeeblingBase">
<ammo>Aqua Sachet</ammo>
<back>Sunbeam Cape</back>
</set>
<set name="Waltz" baseset="Idle" />
<set name="Utsusemi" baseset="Idle">
<head>Zelus Tiara</head>
<neck>Orison Locket</neck>
<lear>Loquac. Earring</lear>
<rear>Magnetic Earring</rear>
<body>Goliard Saio</body>
<hands>Blessed Mitts +1</hands>
<back>Veela Cape</back>
<waist>Witful Belt</waist>
<legs>Bls. Trousers +1</legs>
<feet>Rostrum Pumps</feet>
</set>
</group>
</sets>
<rules>
<if spell="Escape|Warp|Warp II|Recall-*|Teleport-*">
<return />
</if>
<if status="engaged">
<equip when="engaged|aftercast" set="Melee" />
<if SubJob="DNC|NIN">
<equip when="engaged|aftercast" set="Melee">
<rear>Suppanomimi</rear>
</equip>
</if>
</if>
<elseif notstatus="engaged">
<equip when="idle|aftercast" set="Idle" />
<equip when="resting" set="Resting" />
</elseif>
<if TPGT="300">
<equip when="precast|midcast|aftercast|idle|resting">
<main lock="true" />
<sub lock="true" />
<range lock="true" />
</equip>
</if>
<if type="WeaponSkill">
<precastdelay delay=".2" />
<if spell="Hexa Strike">
<equip set="Hexa" />
</if>
<elseif spell="Mystic Boon">
<equip set="Boon" />
</elseif>
<elseif spell="Flash Nova">
<equip set="FlashNova" />
</elseif>
<elseif spell="Spirit Taker">
<equip set="SpiritTaker" />
</elseif>
<elseif spell="Retribution">
<equip set="Retribution" />
</elseif>
<elseif spell="Cataclysm">
<equip set="Cataclysm" />
</elseif>
<else>
<equip set="WS" />
</else>
</if>
<if skill="HealingMagic">
<equip when="precast" set="FastCast">
<legs>Orsn. Pantaln. +2</legs>
</equip>
<action type="MidCastDelay" delay="0.3" />
<equip when="midcast" set="ConserveMP" />
<if spell="Cure*|Curaga*|Cura*">
<equip when="midcast" set="Healing" />
<if MPLT="60">
<!-- Show Spell Info for cures only when low on MP -->
<ShowSpellInfo />
</if>
<if NotBuffActive="Light Arts">
<if Spell="Cure VI" MPLT="227">
<changespell Spell="Cure V" />
</if>
<if Spell="Cure V" MPLT="135">
<changespell Spell="Cure IV" />
</if>
<if Spell="Cure IV" MPLT="88">
<changespell Spell="Cure III" />
</if>
<if Spell="Cure III" MPLT="46">
<changespell Spell="Cure II" />
</if>
<if Spell="Cure II" MPLT="24">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Cure! ~</AddToChat>
</if>
</if>
<else> <!-- Light Arts is Active - -10% MP Cost -->
<if NotBuffActive="Penury">
<if Spell="Cure VI" MPLT="205">
<changespell Spell="Cure V" />
</if>
<if Spell="Cure V" MPLT="122">
<changespell Spell="Cure IV" />
</if>
<if Spell="Cure IV" MPLT="80">
<changespell Spell="Cure III" />
</if>
<if Spell="Cure III" MPLT="42">
<changespell Spell="Cure II" />
</if>
<if Spell="Cure II" MPLT="22">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Cure! ~</AddToChat>
</if>
</if>
<else> <!-- Penury is Active - -50% MP Cost -->
<if Spell="Cure VI" MPLT="114">
<changespell Spell="Cure V" />
</if>
<if Spell="Cure V" MPLT="68">
<changespell Spell="Cure IV" />
</if>
<if Spell="Cure IV" MPLT="44">
<changespell Spell="Cure III" />
</if>
<if Spell="Cure III" MPLT="23">
<changespell Spell="Cure II" />
</if>
<if Spell="Cure II" MPLT="12">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Cure! ~</AddToChat>
</if>
</else>
</else>
<!-- Handle Elemental Obi's -->
<if Advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementObi" = "1"'>
<if Element="Light"><equip when="midcast"><waist lock="true">Korin Obi</waist></equip></if>
</if>
<if advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementCape" = "1"'>
<if Element="Light"><equip when="midcast"><back lock="true">Twilight Cape</back></equip></if>
</if>
</if>
<elseif spell="Cursna">
<equip when="midcast" set="Cursna" />
</elseif>
<elseif spell="*na">
<equip when="midcast" set="ConserveMP">
<head>Orison Cap +2</head>
</equip>
</elseif>
</if>
<elseif skill="EnhancingMagic">
<equip when="precast" set="FastCast">
<waist></waist>
</equip>
<equip when="midcast" set="Enhancing" />
<if spell="Bar*">
<PreCastDelay delay="0.2" />
<equip when="precast|midcast" Set="Bar" />
</if>
<elseif spell="Stoneskin">
<equip when="precast" set="FastCast">
<hands>Carapacho Cuffs</hands>
<waist>Siegel Sash</waist>
</equip>
<equip when="midcast" set="Stoneskin" />
</elseif>
<elseif spell="Regen*">
<equip when="Midcast" Set="Regen" />
<if NotBuffActive="Light Arts">
<if spell="Regen IV" MPLT="82">
<changespell Spell="Regen III" />
</if>
<if spell="Regen III" MPLT="64">
<changespell Spell="Regen II" />
</if>
<if spell="Regen II" MPLT="36">
<changespell Spell="Regen" />
</if>
<if spell="Regen" MPLT="15">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Regen! ~</AddToChat>
</if>
</if>
<else> <!-- Light Arts is Active - -10% MP Cost -->
<if NotBuffActive="Penury">
<if spell="Regen IV" MPLT="74">
<changespell Spell="Regen III" />
</if>
<if spell="Regen III" MPLT="58">
<changespell Spell="Regen II" />
</if>
<if spell="Regen II" MPLT="33">
<changespell Spell="Regen" />
</if>
<if spell="Regen" MPLT="14">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Regen! ~</AddToChat>
</if>
</if>
<else> <!-- Penury is Active - -50% MP Cost -->
<if spell="Regen IV" MPLT="41">
<changespell Spell="Regen III" />
</if>
<if spell="Regen III" MPLT="32">
<changespell Spell="Regen II" />
</if>
<if spell="Regen II" MPLT="18">
<changespell Spell="Regen" />
</if>
<if spell="Regen" MPLT="8">
<CancelSpell />
<AddToChat color="56">[ERROR] Not enough MP To cast Regen! ~</AddToChat>
</if>
</else>
</else>
</elseif>
<elseif spell="Erase">
<equip when="precast" set="FastCast">
<waist>Siegel Sash</waist>
<legs>Orsn. Pantaln. +2</legs>
</equip>
<equip when="midcast" set="ConserveMP">
<head>Orison Cap +2</head>
<legs>Orsn. Pantaln. +2</legs>
</equip>
</elseif>
<elseif spell="Protect|Protect II|Protect III|Protect IV|Protectra I|Protectra II|Protectra III|Protectra IV|Shell I|Shell II|Shell III|Shell IV|Shell V|Shellra I|Shellra II|Shellra III|Shellra IV|Haste|Refresh|Blink|Aquaveil|*storm|Tractor|Raise*|Arise">
<equip when="midcast" set="ConserveMP" />
</elseif>
<elseif spell="Shellra V">
<equip when="midcast" set="ConserveMP">
<legs>Clr. Pantaln. +2</legs>
<lring>Sheltered Ring</lring>
</equip>
</elseif>
<elseif spell="Protectra V">
<equip when="midcast" set="ConserveMP">
<feet>Cleric's Duckbills +2</feet>
<lring>Sheltered Ring</lring>
</equip>
</elseif>
</elseif>
<elseif skill="DivineMagic">
<equip when="precast" set="FastCast" />
<equip when="midcast" set="Divine" />
<if spell="Flash">
<PreCastDelay delay="0.2" />
<equip when="precast|midcast" set="Divine" />
</if>
<if spell="Holy*">
<PreCastDelay delay="0.2" />
<equip when="precast|midcast" set="Banish" />
<!-- Handle Elemental Obi's -->
<if Advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementObi" = "1"'>
<if Element="Light"><equip when="midcast"><waist lock="true">Korin Obi</waist></equip></if>
</if>
<if advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementCape" = "1"'>
<if Element="Light"><equip when="midcast"><back lock="true">Twilight Cape</back></equip></if>
</if>
</if>
<if spell="Banish*">
<equip when="midcast" set="Banish" />
<!-- Handle Elemental Obi's -->
<if Advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementObi" = "1"'>
<if Element="Light"><equip when="midcast"><waist lock="true">Korin Obi</waist></equip></if>
</if>
<if advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementCape" = "1"'>
<if Element="Light"><equip when="midcast"><back lock="true">Twilight Cape</back></equip></if>
</if>
</if>
<if spell="Repose">
<command when="aftercast">spellcast var inc sleepid;wait 45;input /echo [$sleepid:%spell] %Target Wearing off in 45s</command>
<command when="aftercast">wait 75;input /echo [$sleepid:%spell] %TargetWearing off in 15s</command>
<command when="aftercast">wait 85;input /echo [$sleepid:%spell] %TargetWearing off in 5s;spellcast var dec sleepid;</command>
</if>
</elseif>
<elseif skill="ElementalMagic">
<equip when="precast" set="FastCast" />
<equip when="midcast" set="Elemental" />
</elseif>
<elseif skill="DarkMagic">
<equip when="precast" set="FastCast" />
<equip when="midcast" set="Dark" />
<if spell="Stun">
<!-- equip gear that helps stun, and nothing else -->
<equip when="precast|midcast" set="Stun" />
<!-- These codes just print Stun in auto translate into chat. -->
<command>input /p \xFD\x07\x02\x12\xFC\xFD >> %SpellTarget</command>
</if>
</elseif>
<elseif skill="EnfeeblingMagic">
<equip when="precast" set="FastCast" />
<equip when="midcast" set="Enfeebling-%Type" />
<!-- Timers for when sleep is wearing off. -->
<if spell="Sleep II|Sleepga II">
<command when="aftercast">spellcast var inc sleepid;wait 45;input /echo [$sleepid:%spell] %target Wearing off in 45s</command>
<command when="aftercast">wait 75;input /echo [$sleepid:%spell] %target Wearing off in 15s</command>
<command when="aftercast">wait 85;input /echo [$sleepid:%spell] %target Wearing off in 5s;spellcast var dec sleepid;</command>
</if>
<elseif spell="Sleep|Sleepga">
<command when="aftercast">spellcast var inc sleepid;wait 45;input /echo [$sleepid:%spell] %target Wearing off in 15s</command>
<command when="aftercast">wait 55;input /echo [$sleepid:%spell] %target Wearing off in 5s;spellcast var dec sleepid;</command>
</elseif>
</elseif>
<elseif skill="Ninjutsu">
<equip when="precast" set="FastCast" />
<equip when="midcast" set="Utsusemi" />
</elseif>
<if spell="Curing Waltz*|Divine Waltz*">
<equip when="precast|midcast" set="Waltz" />
</if>
<!-- utility: if targetting a monster, but casting a spell that can not be cast on monsters, then cast on self (buffs). -->
<if SpellTargetType="MONSTER" NotValidTarget="*Enemy*" ValidTarget="*Self*">
<changetarget target="<stpc>" />
</if>
<if SpellTargetType="NONE" ValidTarget="*Self*">
<changetarget target="<stpc>" />
</if>
<if spell="Divine Caress">
<equip when="precast|midcast">
<hands>Orison Mitts +2</hands>
</equip>
</if>
<if spell="Martyr">
<equip when="precast|midcast">
<hands>Clr. Mitts +2</hands>
</equip>
</if>
<if spell="Benediction">
<equip when="precast|midcast">
<body>Clr. Briault +2</body>
</equip>
</if>
<!-- auto cancel sneak/utsu/stoneskin/blink when recasting them. Requires Cancel Plugin -->
<if spell="Sneak" BuffActive="Sneak" SpellTargetType="Self">
<command when="midcast">cancel 71</command>
<midcastdelay delay="2.2" />
</if>
<elseif spell="Stoneskin" BuffActive="Stoneskin">
<command when="midcast">cancel 37</command>
<midcastdelay delay="3.8" />
</elseif>
<elseif spell="Spectral Jig">
<command when="precast">cancel 71</command>
</elseif>
</rules>
</spellcast>
Things to note:
1. I formatted it with indents. Much easier to read, just generally speaking, and a lot easier to follow the code, especially the rules section.
2. I set midcast time to 0.3, specifically for your Cures; hopefully this should fix your problem. If it still switches too late, try lowering the time. I have 0.6 for mine, but I have quite a bit less FC than you. Keep in mind that you can't swap in time for Quickening procs.
3. You didn't actually fix the Cursna issue, unless you didn't update this after fixing it. Any na spell is going to be "caught" by your first elseif spell="*na", so if you cast Cursna, it is not going to check the next condition (elseif spell="Cursna"), and simply use your normal na set. Cursna should be the first check to catch, then followed by the *na check. I reordered them and got rid of the redundant *na check.
4. I got rid of the less than and greater than signs in some of your echos. Not a big deal, I just took them out because they break the tag matches in Notepad++, which made it annoying to format your indents. It's an fyi in case you notice it later when you cast Repose^^;
5. As for zones, the condition would be if area="zone name." You can use Wildcards to your advantage here by saying if area="*Remnants" for all Salvage zones.
If these are just for idle sets, you could set it up like:
Code
<if status="engaged">
<equip when="engaged|aftercast" set="Melee" />
<if SubJob="DNC|NIN">
<equip when="engaged|aftercast" set="Melee">
<rear>Suppanomimi</rear>
</equip>
</if>
</if>
<elseif status="idle">
<equip when="idle|aftercast" set="Idle" />
<if area="*Remnants">
<equip>
<lring>ring</lring>
</equip>
</if>
<elseif area="*Legion">
<equip>
<lring>ring</lring>
</equip>
</elseif>
</elseif>
<else>
<equip when="resting" set="Resting" />
</else>
I think that covers everything :o