Ok, first time poster here, go easy 
I have written some very simple scripts to try and learn how ASH works. I recently added to a script to try and cast as many 'Summon Candy Hearts' as I had mana but whenever I run it Kolmafia buys MP restorers when I don't have enough mana. The relevant script part is below, any way to stop the purchase of mana restorers and only cast when I do have enough ?

I have written some very simple scripts to try and learn how ASH works. I recently added to a script to try and cast as many 'Summon Candy Hearts' as I had mana but whenever I run it Kolmafia buys MP restorers when I don't have enough mana. The relevant script part is below, any way to stop the purchase of mana restorers and only cast when I do have enough ?
Code:
if ( have_skill( $skill[Summon Candy Hearts] ) || my_mp() > mp_cost( $skill[Summon Candy Hearts] ) )
{
use_skill( 1, $skill[Summon Candy Hearts] ) ;
}