void OpenGuild(int level)
{
MainStat(level, 17);
boolean werked;
if (my_buffedstat(my_primestat()) < 22)
{
if (have_skill($skill[The Magical Mojomuscular Melody]) == true && my_primestat() == $stat[mysticality])
{ werked = use_skill(1, $skill[The Magical Mojomuscular Melody]); }
if (have_skill($skill[The Power Ballad of the Arrowsmith]) == true && my_primestat() == $stat[muscle])
{ werked = use_skill(1, $skill[The Power Ballad of the Arrowsmith]); }
if (have_skill($skill[The Moxious Madrigal]) == true && my_primestat() == $stat[moxie])
{ werked = use_skill(1, $skill[The Moxious Madrigal]); }
if (have_skill($skill[summon candy heart]) == true) cli_execute("cast 4 candy heart");
if (item_amount($item[pink candy heart]) > 0)
{ use(1, $item[pink candy heart]); }
else if (item_amount($item[white candy heart]) > 0)
{ use(1, $item[white candy heart]); }
else if (item_amount($item[orange candy heart]) > 0)
{ use(1, $item[orange candy heart]); }
else if (item_amount($item[yellow candy heart]) > 0)
{ use(1, $item[yellow candy heart]); }
else if (item_amount($item[lavender candy heart]) > 0)
{ use(1, $item[lavender candy heart]); }
else if (item_amount($item[green candy heart]) > 0)
{ use(1, $item[green candy heart]); }
}
cli_execute("guild");
}