First if this has been answered elsewhere let me say sorry and ask that you direct me there. That said I have a function that I use between ascensions to prep my soft-core characters for the next run. Now when I run the command in 8.8 it seems to error getting from stash or closet. Running the take_stash command on its own gives a "No available namespace with function" error. I have included a small cut from the main to show how the function is called.
Code:
void check_buy(int qty, item item_to_get)
{
int amt_needed;
amt_needed = qty-item_amount(item_to_get);
while (amt_needed>0)
{if(take_storage(1,item_to_get)){amt_needed = amt_needed - 1;}else{break;}}
while (amt_needed>0)
{if(take_stash( 1, item_to_get)){amt_needed = amt_needed - 1;}else{break;}}
if (amt_needed>0)
{buy(amt_needed,item_to_get);}
}
void main()
{
// Campground Accessories
check_buy(1,$item[beanbag chair]);
check_buy(1,$item[cottage]);
return;
}