Right now this is a work in progress, I just started working on it. If you notice any error's please let me know or feel free to edit. Some of the set's are still not complete. Locks seem to be working ok for different gear sets now, so I don't lose MP on gear changes when at full MP.
<?xml version="1.0" ?>
<spellcast>
<config
HideErrors="false"
Normalset="Standard"
RestingSet="Resting Gear"
ShowGearSwaps="false"
Debug="true"
ShowspellInfo="false"
/>
<sets>
<group default="yes" name="WHMMain">
<set name="Standard">
<main>Dryad Staff</main>
<sub>Staff Strap</sub>
<ammo>Phantom tathlum</ammo>
<head>Walahra Turban</head>
<neck>Ajari Necklace</neck>
<lear>Loquac. Earring</lear>
<rear>Antivenom Earring</rear>
<body>Noble's Tunic</body>
<hands>Blessed mitts</hands>
<lring>Electrum Ring</lring>
<rring>Electrum Ring</rring>
<back>Rainbow Cape</back>
<waist>Penitent's Rope</waist>
<legs>Blessed Trousers</legs>
<feet>Rostrum Pumps</feet>
</set>
<set name="Resting Gear" baseset="Standard">
<main>Dark Staff</main>
<body>Errant Hpl.</body>
</set>
<set name="Stoneskin" baseset="Standard">
<main>Water Staff</main>
<head>Zenith crown</head>
<hands>Devotee's mitts</hands>
<body>Errant Hpl.</body>
</set>
<set name="Enf" baseset="Standard">
<main>$SetStaff</main>
<body>Errant Hpl.</body>
<legs>Errant slops</legs>
<back>Rainbow cape</back>
</set>
<!--Sets staves for varibles-->
<set name="Earth Staff">
<main>Earth Staff</main>
</set>
<set name="Ice Staff">
<main>Aquilo's Staff</main>
</set>
<set name="Thunder Staff">
<main>Jupiter's Staff</main>
</set>
<set name="Wind Staff">
<main>Wind Staff</main>
</set>
<set name="Water Staff">
<main>Water Staff</main>
</set>
<set name="Fire Staff">
<main>Fire Staff</main>
</set>
<set name="Light Staff">
<main>Light Staff</main>
</set>
<set name="Dark Staff">
<main>Dark Staff</main>
</set>
</group>
</sets>
<!--Sets up varibles for all staves-->
<variables>
<var name="SetStaff">Aquilo's Staff</var>
<var name="Light">"Light Staff"</var>
<var name="Dark">"Dark Staff"</var>
<var name="Earth">"Earth Staff"</var>
<var name="Water">"Water Staff"</var>
<var name="Wind">"Wind Staff"</var>
<var name="Fire">"Fire Staff"</var>
<var name="Ice">"Aquilo's Staff"</var>
<var name="Thunder">"Jupiter's Staff"</var>
<var name="HighMP">877</var>
</variables>
<rules>
<if advanced='%MP>=$HighMP'>
<action type="Disable" slot="neck|hands|back" />
<!-- disable ALL +MP GEAR slots-->
</if>
<!--Locks gear slots according to MP used/notused so i dont lose MP on some spells-->
<if advanced='%MP<($HighMP-21)'>
<action type="Enable" slot="back" />
</if>
<if advanced='%MP<($HighMP-35)'>
<action type="Enable" slot="head" />
</if>
<if advanced='%MP<($HighMP-47)'>
<action type="Enable" slot="neck" />
</if>
<if advanced='%MP<($HighMP-71)'>
<action type="Enable" slot="hands" />
</if>
<if skill="ElementalMagic|EnfeeblingMagic">
<!--%SpellElement will process first. If ThunderIV is cast then $SetStaff will be set to $Thunder -->
<action type="Var" cmd="set SetStaff $%SpellElement"/>
<action type="equip" when="precast" set= "Enf"/>
<action type="equip" when="midcast" set= "$Setstaff"/>
<action type="equip" when="aftercast" set="Standard"/>
</if>
<elseif skill="HealingMagic">
<action type="Var" cmd="set SetStaff $%SpellElement"/>
<action type="equip" when="precast" set= "Standard"/>
</elseif>
<elseif skill="DarkMagic">
<action type="Var" cmd="set SetStaff $%SpellElement"/>
<action type="equip" when="precast" set= "Standard"/>
</elseif>
<elseif skill="DivineMagic">
<action type="Var" cmd="set SetStaff $%SpellElement"/>
<action type="equip" when="precast" set= "Standard"/>
</elseif>
<if Spell="Cure IV">
<!-- Evil Spell -->
<action type="ChangeSpell" Spell="Cure V"/>
</if>
<if Spell="Cure V" MPLT="135">
<action type="ChangeSpell" Spell="Cure III"/>
</if>
<if Spell="Cure III" MPLT="46">
<action type="ChangeSpell" Spell="Cure II"/>
</if>
<if Spell="Cure II" MPLT="24">
<action type="CancelSpell"/>
<action type="addtochat" color="56">[ERROR] Not enough MP To cast Cure! ~</action>
</if>
<elseif spell="Stoneskin">
<action type="equip" when="precast" set= "Stoneskin"/>
<!--A delay of 6.5 worked fine on my whm, so atleast .5 sec buffer-->
<action type="midcastdelay" delay="6" />
<!--Cancel currently active stoneskin-->
<action type="Command" when="MidCast">cancel 37</action>
<action type="equip" when="aftercast" set= "Standard"/>
</elseif>
</rules>
</spellcast>