How to stop Kolmafia buying / using MP restorers ?

cxthomps

New member
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 ?

Code:
    if ( have_skill( $skill[Summon Candy Hearts] ) || my_mp() > mp_cost( $skill[Summon Candy Hearts] ) )
    {
    use_skill( 1, $skill[Summon Candy Hearts] ) ;
    }
 

exdeath

Member
Yeah you could always throw it in a loop to burn your mp on them too like this.

Code:
void main()
{
	while( my_mp() >= mp_cost($skill[Summon Candy Hearts]) )
    {
    use_skill( 1, $skill[Summon Candy Hearts] ) ;
    }
}
 

gravymonkey

New member
I tryed running this script and nothing happened even though I had plenty of MP. Should I be running this as a custom battle script?

Thanks
 
Top