Here's a slightly modified version of this one to use green cupcakes (+MonsterLevel) and orange snowcones (+Stats):
void main()
{
boolean x;
if( have_effect( $effect[the cupcake of wrath]) < 1)
{
x = use(1, $item[green-frosted astral cupcake]);
}
if( have_effect(...