I'm currently going over my personal function library, making it smaller/smarter. I have a function for adventuring with specific settings (fam, fam equip, location and amount of adventures), and I thought it would be nice to add another parameter for adding a goal, but I want that parameter to be optional (like the boolean buy function being able to handle coinmasters optionally). How do I go about doing that?
Here's the function:
Here's the function:
Code:
boolean famadventure ( familiar fam, item fe, location l, int adv )
{
if(fam.have_familiar())
{
use_familiar(fam);
equip($slot[familiar], fe);
adventure(adv, l);
if(!have_equipped(fe))
{
equip($slot[familiar], $item[none]);
}
}
if(!fam.have_familiar())
{
print("You don have a "+ fam +". Unable to adventure.");
}
return(true);
}