im skilling up my enhancing magic, and looking for a way to check for refresh and skillup food, and if the buff/food isnt active, to cast it or eat it when needed. here is my current code
Code:
<!--- Enhancing Magic Skill-Up Segment --->
<elseif spell="Barfire" >
<!--- Check if /Heal Break is active --->
<if advanced='"$SkillUp" == "1"'>
<!--- Fix the SkillCycle varaible in case the SMN SKILL Segment boinked it --->
<if advanced='"$SkillCycle" == "6|7|8|9"'>
<action type="var" cmd="set SkillCycle 1" />
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="cancelspell"/>
</if>
<!--- Check if your MP is low --->
<if Mode="OR" NOTMPGT="100" MP="100">
<if notspell="blink">
<action type="command" when="precast">input /heal on;wait $RestTime4Protect;input /heal off;wait 2;input /ma "Barfire"</action>
<action type="cancelspell"/>
</if>
<else>
<action type="command" when="aftercast">input /heal on;wait $RestTime4Protect;input /heal off;wait 2;input /ma "Barfire"</action>
</else>
</if>
<!--- Enhancing Skill Cycling --->
<elseif advanced='"$SkillCycle" == "1"'>
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="var" cmd="set SkillCycle 2" />
<action type="changespell" spell="Barfire" />
<action type="Changetarget" target="<me>"/>
</elseif>
<elseif advanced='"$SkillCycle" == "2"'>
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="var" cmd="set SkillCycle 3" />
<action type="changespell" spell="Barstone" />
<action type="Changetarget" target="<me>"/>
</elseif>
<elseif advanced='"$SkillCycle" == "3"'>
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="var" cmd="set SkillCycle 4" />
<action type="changespell" spell="Barwater" />
<action type="Changetarget" target="<me>"/>
</elseif>
<elseif advanced='"$SkillCycle" == "4"'>
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="var" cmd="set SkillCycle 5" />
<action type="changespell" spell="Barblizzard" />
<action type="Changetarget" target="<me>"/>
</elseif>
<elseif advanced='"$SkillCycle" == "5"'>
<action type="command" when="aftercast">wait 4;input /ma "Barfire"</action>
<action type="var" cmd="set SkillCycle 1" />
<action type="changespell" spell="Baraero" />
<action type="Changetarget" target="<me>"/>
</elseif>
</if>
</elseif>