Fujiiwara said:
<if SpellTargetType="SELF">
<if spell="Cure IV">
<if HPGT="%HPMAX - 250">
<action type="castdelay" delay="1" />
<action type="equip" when="precast">
<lring>Serket Ring</lring>
<rring>Ether Ring</rring>
<neck>Morgana's Choker</neck>
<Back>Remove</Back>
</action>
<action type="castdelay" delay="0.5" />
<action type="equip" when="midcast">
<lring>R.K. Sigil Ring</lring>
<rring>Bomb Queen Ring</rring>
<neck>Ritter Gorget</neck>
<Back>Gigant Mantle</Back>
</action>
</if>
</if>
</if>
something like this?
You don't actually need to set castdelay twice there. Spellcast will parse these lines all at once, everytime cureiv is used, so castdelay will always be 0.5. If you hp was higher then max-250, the castdelay set to 1 will just be overwritten by the 0.5 one.
Other than that, i'm not fond of castdelay. I find it counter productive, because well, anything can happen in that extra second you are adding there. Still, considering you are trying to put pre and midcast sets on cure4, which is a pretty fast casting spell, casting delay will be necessary to make sure presets are going to be fully equiped. I would just remove that second castdelay though. Because you only need to delay your casting when you are going to equip both pre and midcast sets.
There is a turnaround over castdelay. You can use cancellspell if your hp is greater than max-250. And make spellcast parse again by inputing cure4 again thru command. It's very similar to what you did there (adding some extra lines), and this is something i do on brd songs:
**This code was not created by me. I got it on windower.net, can't remember from who though.**
<if spell="Cure IV">
<!-- Checks if we need to check our Hp before casting -->
<if advanced='"$skiphpcheck" == "no" AND "$usehpcheat" =="yes"'>
<!-- Set skiphpcheck var to skip next parse -->
<action Type = "Var" cmd = "set skiphpcheck yes" />
<!-- Checks our Hp before casting.-->
<if HPPGT="%HPMAX - 250" >
<action type="command">sc set HPDOWN;input /ma "Cure IV"</action>
<action type="cancelspell"/>
<action type="return" />
</if>
</if>
<else>
<!-- Set skiphpcheck var to parse next time -->
<action Type = "Var" cmd = "set skiphpcheck no" />
<action type="Equip" when="precast" set="enmity/HPUP">
</else>
</if>
Idk how fast this is compared to setting castdelay. But it's faster lol.