Code
<?xml version="1.0" ?>
<spellcast>
<sets>
<!-- the standard group used for avatars without any special cases -->
<group default="yes" name="Standard">
<!-- reduces avatar perpetuation cost and increase refresh as much as possible -->
<set name="perpetuation">
<main>Chatoyant Staff</main>
<head>Caller's Horn +2</head>
<neck>Caller's Pendant</neck>
<lear>Ruby Earring</lear>
<rear>Moonshade Earring</rear>
<body>Call. Doublet +2</body>
<hands>Nashira Gages</hands>
<rring>Evoker's Ring</rring>
<legs>Nares Trews</legs>
<feet>Caller's Pgch. +2</feet>
</set>
<!-- takes into account the lower cost while using avatar's favor -->
<set name="favor">
<main>Chatoyant Staff</main>
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Caller's Pendant</neck>
<lear>Smn. Earring</lear>
<rear>Moonshade Earring</rear>
<body>Call. Doublet +2</body>
<hands>Smn. Bracers +2</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<legs>Caller's Spats +2</legs>
<feet>Caller's Pgch. +2</feet>
</set>
<!-- caps blood pact ability delay reduction -->
<set name="delay">
<hands>Smn. Bracers +2</hands>
<back>Tiresias' Cape</back>
<legs>Smn. Spats +2</legs>
<feet>Smn. Pigaches +2</feet>
</set>
<!-- adds blood pact damage, attack and accuracy (summoning magic skill) -->
<set name="rage_physical">
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Sacrifice Torque</neck>
<lear>Ruby Earring</lear>
<rear>Gifted Earring</rear>
<body>Call. Doublet +2</body>
<hands>Smn. Bracers +2</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<waist>Mujin Obi</waist>
<legs>Caller's Spats +2</legs>
<feet>Mdk. Crackows +1</feet>
</set>
<!-- adds blood pact damage, magic attack bonus and magic accuracy (summoning magic skill) -->
<set name="rage_magical">
<main>Tuahjebat</main>
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Eidolon Pendant</neck>
<lear>Smn. Earring</lear>
<rear>Gifted Earring</rear>
<body>Call. Doublet +2</body>
<hands>Nares Cuffs</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<back>Tiresias' Cape</back>
<waist>Caller's Sash</waist>
<legs>Caller's Spats +2</legs>
<feet>Caller's Pgch. +2</feet>
</set>
<!-- adds summoning magic skill -->
<set name="ward_skill">
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Caller's Pendant</neck>
<lear>Smn. Earring</lear>
<rear>Gifted Earring</rear>
<body>Anhur Robe</body>
<hands>Smn. Bracers +2</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<legs>Caller's Spats +2</legs>
<feet>Mdk. Crackows +1</feet>
</set>
<!-- adds avatar tp bonus for increasing cure potency of blood pacts -->
<set name="ward_healing">
<legs>Caller's Spats +2</legs>
</set>
<!-- adds summoning magic skill to maximize mp returned with elemental siphon -->
<set name="siphon">
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Caller's Pendant</neck>
<lear>Smn. Earring</lear>
<body>Anhur Robe</body>
<hands>Smn. Bracers +2</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<legs>Tatsu. Sitagoromo</legs>
<feet>Caller's Pgch. +2</feet>
</set>
<!-- increases the effectiveness of mana cede -->
<set name="cede">
<hands>Call. Bracers +2</hands>
</set>
<!-- adds cure potency, healing magic skill, mnd and vit -->
<set name="healing">
<main>Chatoyant Staff</main>
<ammo>Mana Ampulla</ammo>
<neck>Colossus's Torque</neck>
<lear>Magnetic Earring</lear>
<rear>Gifted Earring</rear>
<body>Chelona Blazer</body>
<hands>Augur's Gloves</hands>
<back>Vita Cape</back>
<legs>Nares Trews</legs>
<feet>Chelona Boots</feet>
</set>
<!-- adds stoneskin modifiers, enhancing magic skill and mnd -->
<set name="stoneskin">
<main>Chatoyant Staff</main>
<ammo>Mana Ampulla</ammo>
<neck>Stone Gorget</neck>
<lear>Earthcry Earring</lear>
<rear>Gifted Earring</rear>
<body>Marduk's Jubbah</body>
<hands>Augur's Gloves</hands>
<back>Vita Cape</back>
<waist>Siegel Sash</waist>
<legs>Nares Trews</legs>
<feet>Chelona Boots</feet>
</set>
<!-- adds mp recoved while healing -->
<set name="resting">
<main>Chatoyant Staff</main>
<sub>Vox Grip</sub>
<ammo>Mana Ampulla</ammo>
<head>Caller's Horn +2</head>
<neck>Eidolon Pendant</neck>
<lear>Magnetic Earring</lear>
<rear>Relaxing Earring</rear>
<body>Chelona Blazer</body>
<hands>Nares Cuffs</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<back>Vita Cape</back>
<waist>Hierarch Belt</waist>
<legs>Nares Trews</legs>
<feet>Chelona Boots</feet>
</set>
</group>
<!-- fenrir specific modifications to the standard group -->
<group name="Fenrir" inherit="Standard">
<!-- adds more physical accuracy to fenrir's blood pacts then the standard -->
<set name="rage_physical">
<head>Fenrir's Crown</head>
</set>
</group>
<!-- carbuncle specific modifications to the standard group -->
<group name="Carbuncle" inherit="Standard">
<!-- adds more refresh because of carbuncle's lower perpetuation cost -->
<set name="perpetuation">
<body>Marduk's Jubbah</body>
<hands>Carbuncle Mitts</hands>
<feet>Mdk. Crackows +1</feet>
</set>
<!-- adds more summoning magic skill because of carbuncle's lower perpetuation cost -->
<set name="favor">
<body>Anhur Robe</body>
<hands>Carbuncle Mitts</hands>
<feet>Mdk. Crackows +1</feet>
</set>
</group>
<!-- diabolos specific modifications to the standard group -->
<group name="Diabolos" inherit="Standard">
<!-- further lowers diabolos's perpetuation cost -->
<set name="perpetuation">
<waist>Diabolos's Rope</waist>
</set>
</group>
<!-- leviathan specific modifications to the standard group -->
<group name="Leviathan" inherit="Standard">
<!-- further increases leviathan's attack during physical blood pacts -->
<set name="rage_physical">
<hands>Evoker's Gages</hands>
</set>
</group>
<!-- garuda specific modifications to the standard group -->
<group name="Garuda" inherit="Standard">
<!-- use magian staff and add more accuracy -->
<set name="perpetuation">
<main>Vayuvata III</main>
<hands>Smn. Bracers +2</hands>
</set>
<!-- use magian staff and add summoning magic skill -->
<set name="favor">
<main>Vayuvata III</main>
<body>Anhur Robe</body>
</set>
<!-- further increases garuda's attack during physical blood pacts -->
<set name="rage_physical">
<head>Karura Hachigane</head>
</set>
</group>
<!-- ramuh specific modifications to the standard group -->
<group name="Ramuh" inherit="Standard">
<!-- use magian staff and add more accuracy -->
<set name="perpetuation">
<main>Apamajas III</main>
<hands>Smn. Bracers +2</hands>
</set>
<!-- use magian staff and add summoning magic skill -->
<set name="favor">
<main>Apamajas III</main>
<body>Anhur Robe</body>
</set>
</group>
<!-- elemental spirit specific modifications to the standard group -->
<group name="Spirit" inherit="Standard">
<!-- maximize summoning magic skill to lower the spirit's magic recast time -->
<set name="perpetuation|favor">
<main>Chatoyant Staff</main>
<sub>Vox Grip</sub>
<head>Caller's Horn +2</head>
<neck>Caller's Pendant</neck>
<lear>Smn. Earring</lear>
<rear>Moonshade Earring</rear>
<body>Anhur Robe</body>
<hands>Smn. Bracers +2</hands>
<lring>Fervor Ring</lring>
<rring>Evoker's Ring</rring>
<legs>Smn. Spats +2</legs>
<feet>Mdk. Crackows +1</feet>
</set>
</group>
</sets>
<variables>
<!-- used to select the set group -->
<var name="AvatarGroup">Standard</var>
</variables>
<rules>
<if type="JobAbility|PetCommand|BloodPactRage|BloodPactWard">
<if type="BloodPactRage">
<!-- skip delay set for avatars that already have it capped in their perpetuation set -->
<if NotPetName="Garuda|Ramuh">
<addtochat when="PreCast" color="8">[Blood Pact Delay]</addtochat>
<equip when="PreCast" set="delay" />
<!-- allow a short time for delay set to be equip before using the blood pact -->
<castdelay delay="0.5" />
</if>
<!-- manually set delays since spellcast acts as if blood pacts are instant by default -->
<midcastdelay delay="1" />
<aftercastdelay delay="4" />
<if spell="Fire*|Stone*|Water*|Aero*|Blizard*|Thunder*|Thunderspark|Metoerite|Nether Blast|Heavenly Strike|Thunderstorm|Holy Mist|Lunar Bay|Night Terror">
<addtochat when="MidCast" color="8">[Blood Pact: Rage (Magical)]</addtochat>
<equip when="MidCast" set="rage_magical" />
</if>
<else>
<addtochat when="MidCast" color="8">[Blood Pact: Rage (Physical)]</addtochat>
<equip when="MidCast" set="rage_physical" SetGroup="$AvatarGroup" />
</else>
</if>
<elseif type="BloodPactWard">
<!-- skip delay set for avatars that already have it capped in their perpetuation set -->
<if NotPetName="Garuda|Ramuh">
<addtochat when="PreCast" color="8">[Blood Pact Delay]</addtochat>
<equip when="PreCast" set="delay" />
<!-- allow a short time for delay set to be equip before using the blood pact -->
<castdelay delay="0.5" />
</if>
<!-- manually set delays since spellcast acts as if blood pacts are instant by default -->
<midcastdelay delay="1" />
<aftercastdelay delay="4" />
<if spell="Somnolence">
<!-- special case ward that actually does direct magic damage -->
<addtochat when="MidCast" color="8">[Blood Pact: Ward (Magic Damage)]</addtochat>
<equip when="MidCast" set="rage_magical" />
</if>
<elseif spell="Earthen Ward|Aerial Armor">
<!-- these wards have a fixed duration so no equipment needs to be changed -->
<addtochat when="MidCast" color="8">[Blood Pact: Ward (Fixed)]</addtochat>
</elseif>
<elseif spell="Healing Ruby*|Whispering Wind|Spring Water">
<addtochat when="MidCast" color="8">[Blood Pact: Ward (Healing)]</addtochat>
<equip when="MidCast" set="ward_healing" />
</elseif>
<else>
<!-- for all other blood pacts equip skill for increased duration or magic accuracy -->
<addtochat when="MidCast" color="8">[Blood Pact: Ward (Variable)]</addtochat>
<equip when="MidCast" set="ward_skill" />
</else>
</elseif>
<elseif spell="Elemental Siphon">
<addtochat when="PreCast" color="8">[Elemental Siphon]</addtochat>
<equip when="PreCast" set="siphon" />
<!-- allow a short time for siphon set to be equip before using elemental siphon -->
<castdelay delay="0.5" />
</elseif>
<elseif spell="Mana Cede">
<addtochat when="PreCast" color="8">[Mana Cede]</addtochat>
<equip when="PreCast" set="cede" />
<!-- allow a short time for cene set to be equip before using mana cede -->
<castdelay delay="0.5" />
</elseif>
<elseif spell="Avatar's Favor">
<addtochat when="PreCast" color="8">[Avatar Perpetuation (Favor)]</addtochat>
<equip when="PreCast" set="favor" SetGroup="$AvatarGroup" />
<!-- switch to favor perpetuation when activated and skip the rest of the rules -->
<return />
</elseif>
<else>
<!-- skip the rest of the rules for all other pet commands or job abilities -->
<return />
</else>
<!-- after the blood pact completes return to perpetuation set -->
<if BuffActive="Avatar's Favor">
<addtochat when="AfterCast" color="8">[Avatar Perpetuation (Favor)]</addtochat>
<equip when="AfterCast" set="favor" SetGroup="$AvatarGroup" />
</if>
<else>
<addtochat when="AfterCast" color="8">[Avatar Perpetuation]</addtochat>
<equip when="AfterCast" set="perpetuation" SetGroup="$AvatarGroup" />
</else>
</if>
<elseif type="SummonerPact">
<if spell="*Spirit">
<!-- switch your dark spirit to the best element for using elemental siphon -->
<!-- note: under certain conditions a less then optimal spirit will be chosen but fixing that would require many more rules -->
<if spell="Dark Spirit">
<if mode="OR" WeatherElement="Wind" DayElement="Wind">
<changespell spell="Air Spirit" />
</if>
<elseif WeatherElement="None">
<changespell spell="%DayElement Spirit" />
</elseif>
<else>
<changespell spell="%WeatherElement Spirit" />
</else>
</if>
<!-- set the group variable to the spirit group -->
<var cmd="set AvatarGroup Spirit" />
</if>
<elseif spell="Fenrir|Carbuncle|Diabolos|Garuda|Leviathan|Ramuh">
<!-- set the group variable for avatars that have their own group -->
<var cmd="set AvatarGroup %Spell" />
</elseif>
<else>
<!-- for all other avatars set the standard group -->
<var cmd="set AvatarGroup Standard" />
</else>
<!-- equip the appropraite perpetuation or avatar's favor set -->
<if BuffActive="Avatar's Favor">
<addtochat when="PreCast" color="8">[Avatar Perpetuation (Favor)]</addtochat>
<equip when="PreCast" set="favor" SetGroup="$AvatarGroup" />
</if>
<else>
<addtochat when="PreCast" color="8">[Avatar Perpetuation]</addtochat>
<equip when="PreCast" set="perpetuation" SetGroup="$AvatarGroup" />
</else>
</elseif>
<elseif spell="Cure*|Cura*|Stoneskin">
<if spell="Stoneskin">
<addtochat when="PreCast"color="8">[Stoneskin]</addtochat>
<equip when="PreCast" set="stoneskin" />
</if>
<else>
<addtochat when="PreCast"color="8">[Healing]</addtochat>
<equip when="PreCast" set="healing" />
</else>
<!-- after casting return to perpetuation set if you have an avatar out -->
<if PetIsValid="TRUE">
<if BuffActive="Avatar's Favor">
<addtochat when="AfterCast"color="8">[Avatar Perpetuation (Favor)]</addtochat>
<equip when="AfterCast" set="favor" SetGroup="$AvatarGroup" />
</if>
<else>
<addtochat when="AfterCast" color="8">[Avatar Perpetuation]</addtochat>
<equip when="AfterCast" set="perpetuation" SetGroup="$AvatarGroup" />
</else>
</if>
</elseif>
<!-- do not equip resting set when you have an avatar out (nice when checking voidwalker) -->
<if PetIsValid="FALSE">
<equip when="resting" set="resting" />
</if>
<!-- equip perpetuation set when idle for the refresh -->
<equip when="idle" set="perpetuation" SetGroup="$AvatarGroup" />
</rules>
</spellcast>
