| -Post Information- |
| Author: | Genesisx |
| Last Updated: | 7/22/09 |
| Comment: | Might be a bit buggy, |
This SpellCast code is used to reduce some Healing Magic and Enhancing Magic to the correct spell for you level when Level Sync is active.
I wrote this code to save users time from altering their cure protect etc macros when leveling a WHM or a RDM job. This code will tier reduce Cure, Cureaga, Protect, Shell, Protectra, and Shellra.
You can just copy and paste this code into your spellcast XMLs. This code may contain bugs or flaws. This code was last updated: 7/20/09
<if skill="EnhancingMagic|HealingMagic" advanced='"$HealingMagicSync"=="1"'> <!--- Healing Magic Tier Sync --->
<if mode= "OR" mainjob="RDM" subjob="RDM"> <!--- Adjust Cure* by RDM LVL --->
<if skill="HealingMagic">
<if Spell="Cure*">
<if mainjob="RDM">
<if MLvlGT="47">
<if Spell="Cure V">
<action type="changespell" spell="Cure IV" />
</if>
</if>
<elseif mode="AND" MLvlGT="25" MLvlLT="48">
<if Spell="Cure V|Cure IV">
<action type="changespell" spell="Cure III" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="13" MLvlLT="26">
<if Spell="Cure V|Cure IV|Cure III">
<action type="changespell" spell="Cure II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="2" MLvlLT="14">
<if Spell="Cure V|Cure IV|Cure III|Cure II">
<action type="changespell" spell="Cure" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="RDM" notmainjob="WHM">
<if SLvlGT="47">
<if Spell="Cure V">
<action type="changespell" spell="Cure IV" />
</if>
</if>
<elseif mode="AND" SLvlGT="25" SLvlLT="48">
<if Spell="Cure V|Cure IV">
<action type="changespell" spell="Cure III" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="13" SLvlLT="26">
<if Spell="Cure V|Cure IV|Cure III">
<action type="changespell" spell="Cure II" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="2" SLvlLT="14">
<if Spell="Cure V|Cure IV|Cure III|Cure II">
<action type="changespell" spell="Cure" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</if>
</if>
<elseif skill="EnhancingMagic">
<if Spell="Protect*">
<if mainjob="RDM">
<if mode="AND" MLvlGT="46" MLvlLT="63">
<if Spell="Protect IV">
<action type="changespell" spell="Protect III" />
</if>
</if>
<elseif mode="AND" MLvlGT="26" MLvlLT="47">
<if Spell="Protect IV|Protect III">
<action type="changespell" spell="Protect II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="6" MLvlLT="27">
<if Spell="Protect IV|Protect III|Protect II">
<action type="changespell" spell="Protect" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="RDM" NotMainJob="WHM">
<if mode="AND" SLvlGT="26" SLvlLT="47">
<if Spell="Protect IV|Protect III">
<action type="changespell" spell="Protect II" />
</if>
</if>
<elseif mode="AND" SLvlGT="6" SLvlLT="27">
<if Spell="Protect IV|Protect III|Protect II">
<action type="changespell" spell="Protect" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</if>
<elseif Spell="Shell*">
<if mainjob="RDM">
<if mode="AND" MLvlGT="56" MLvlLT="68">
<if Spell="Shell IV">
<action type="changespell" spell="Shell III" />
</if>
</if>
<elseif mode="AND" MLvlGT="36" MLvlLT="57">
<if Spell="Shell IV|Shell III">
<action type="changespell" spell="Shell II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="16" MLvlLT="37">
<if Spell="Shell IV|Shell III|Shell II">
<action type="changespell" spell="Shell" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="RDM" NotMainJob="WHM">
<if mode="AND" SLvlGT="36">
<if Spell="Shell IV|Shell III">
<action type="changespell" spell="Shell II" />
</if>
</if>
<elseif mode="AND" SLvlGT="16" SLvlLT="37">
<if Spell="Shell IV|Shell III|Shell II">
<action type="changespell" spell="Shell" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</elseif>
</elseif>
</if>
<if mode="OR" mainjob="WHM" subjob="WHM"> <!--- Adjust spell by WHM LVL --->
<if skill="HealingMagic">
<if Spell="Cure*"> <!--- Adjust Cure* by WHM LVL --->
<if mainjob="WHM">
<if MLvlGT="40" MLvlLt="61">
<if Spell="Cure V">
<action type="changespell" spell="Cure IV" />
</if>
</if>
<elseif mode="AND" MLvlGT="20" MLvlLT="41">
<if Spell="Cure V|Cure IV">
<action type="changespell" spell="Cure III" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="10" MLvlLT="21">
<if Spell="Cure V|Cure IV|Cure III">
<action type="changespell" spell="Cure II" />
</if>
</elseif>
<elseif MLvlLT="11">
<if Spell="Cure V|Cure IV|Cure III|Cure II">
<action type="changespell" spell="Cure" />
</if>
</elseif>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<elseif SLvlGT="40" SLvlLt="61">
<if Spell="Cure V">
<action type="changespell" spell="Cure IV" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="20" SLvlLT="41">
<if Spell="Cure V|Cure IV">
<action type="changespell" spell="Cure III" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="10" SLvlLT="21">
<if Spell="Cure V|Cure IV|Cure III">
<action type="changespell" spell="Cure II" />
</if>
</elseif>
<elseif SLvlLT="11">
<if Spell="Cure V|Cure IV|Cure III|Cure II">
<action type="changespell" spell="Cure" />
</if>
</elseif>
<else>
<action type="return" />
</else>
</elseif>
</if>
<elseif Spell="Cura*"> <!--- Adjust Curaga* by WHM LVL --->
<if mainjob="WHM">
<if MLvlGT="50" MLvlLt="71">
<if Spell="Curaga IV">
<action type="changespell" spell="Curaga III" />
</if>
</if>
<elseif mode="AND" MLvlGT="30" MLvlLT="51">
<if Spell="Curaga IV|Curaga III">
<action type="changespell" spell="Curaga II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="15" MLvlLT="31">
<if Spell="Curaga IV|Curaga III|Curaga II">
<action type="changespell" spell="Curaga" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<elseif SLvlGT="50" SLvlLt="71">
<if Spell="Curaga IV">
<action type="changespell" spell="Curaga III" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="30" SLvlLT="51">
<if Spell="Curaga IV|Curaga III">
<action type="changespell" spell="Curaga II" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="15" SLvlLT="31">
<if Spell="Curaga IV|Curaga III|Curaga II">
<action type="changespell" spell="Curaga" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</elseif>
</if>
<elseif skill="EnhancingMagic">
<if Spell="Protect*" notSpell="Protectra*">
<if mainjob="WHM">
<if mode="AND" MLvlGT="46" MLvlLT="63">
<if Spell="Protect IV">
<action type="changespell" spell="Protect III" />
</if>
</if>
<elseif mode="AND" MLvlGT="26" MLvlLT="47">
<if Spell="Protect IV|Protect III">
<action type="changespell" spell="Protect II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="6" MLvlLT="27">
<if Spell="Protect IV|Protect III|Protect II">
<action type="changespell" spell="Protect" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<if mode="AND" SLvlGT="26">
<if Spell="Protect IV|Protect III">
<action type="changespell" spell="Protect II" />
</if>
</if>
<elseif mode="AND" SLvlGT="6" SLvlLT="27">
<if Spell="Protect IV|Protect III|Protect II">
<action type="changespell" spell="Protect" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</if>
<elseif Spell="Shell*" notSpell="Shellra*">
<if mainjob="WHM">
<if mode="AND" MLvlGT="56" MLvlLT="68">
<if Spell="Shell IV">
<action type="changespell" spell="Shell III" />
</if>
</if>
<elseif mode="AND" MLvlGT="36" MLvlLT="57">
<if Spell="Shell IV|Shell III">
<action type="changespell" spell="Shell II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="16" MLvlLT="37">
<if Spell="Shell IV|Shell III|Shell II">
<action type="changespell" spell="Shell" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<if mode="AND" SLvlGT="36">
<if Spell="Shell IV|Shell III">
<action type="changespell" spell="Shell II" />
</if>
</if>
<elseif mode="AND" SLvlGT="16" SLvlLT="37">
<if Spell="Shell IV|Shell III|Shell II">
<action type="changespell" spell="Shell" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</elseif>
<elseif Spell="Protectra*">
<if mainjob="WHM">
<if mode="AND" MLvlGT="62" MLvlLT="75">
<if Spell="Protectra V">
<action type="changespell" spell="Protectra IV" />
</if>
</if>
<elseif mode="AND" MLvlGT="46" MLvlLT="63">
<if Spell="Protectra V|Protectra IV">
<action type="changespell" spell="Protectra III" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="26" MLvlLT="47">
<if Spell="Protectra V|Protectra IV|Protectra III">
<action type="changespell" spell="Protectra II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="6" MLvlLT="27">
<if Spell="Protectra V|Protectra IV|Protectra III|Protectra II">
<action type="changespell" spell="Protectra" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<elseif mode="AND" SLvlGT="26">
<if Spell="Protectra V|Protectra IV|Protectra III">
<action type="changespell" spell="Protectra II" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="6" SLvlLT="27">
<if Spell="Protectra V|Protectra IV|Protectra III|Protectra II">
<action type="changespell" spell="Protectra" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</elseif>
<elseif Spell="shellra*">
<if mainjob="WHM">
<if mode="AND" MLvlGT="62" MLvlLT="75">
<if Spell="shellra V">
<action type="changespell" spell="shellra IV" />
</if>
</if>
<elseif mode="AND" MLvlGT="46" MLvlLT="63">
<if Spell="shellra V|shellra IV">
<action type="changespell" spell="shellra III" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="26" MLvlLT="47">
<if Spell="shellra V|shellra IV|shellra III">
<action type="changespell" spell="shellra II" />
</if>
</elseif>
<elseif mode="AND" MLvlGT="6" MLvlLT="27">
<if Spell="shellra V|shellra IV|shellra III|shellra II">
<action type="changespell" spell="shellra" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</if>
<elseif subjob="WHM" NotMainJob="RDM">
<elseif mode="AND" SLvlGT="26">
<if Spell="shellra V|shellra IV|shellra III">
<action type="changespell" spell="shellra II" />
</if>
</elseif>
<elseif mode="AND" SLvlGT="6" SLvlLT="27">
<if Spell="shellra V|shellra IV|shellra III|shellra II">
<action type="changespell" spell="shellra" />
</if>
</elseif>
<else>
<action type="addtochat">You do not meet the level requirements for this spell.</action>
</else>
</elseif>
</elseif>
</elseif>
</if>
</if>