Banana Lord
This is a copy of Izchak's code for the still:
# this tries to use the still, improving whatever you have that can be improved
# however, it will only improve a single item, basically.
# I coded this the way I did on the assumption that one would have multiples of ten
# of several base drinks/mixers, eg. 10 lemons, 30 olives, 10 wines, etc.
boolean utilize_still(){
if(my_primestat() != $stat[moxie]) {
print("youre not a moxie class, and hence cannot use the still");
return false;
}
if(stills_available() == 0) {
print("you have no uses left at the still");
return false;
}
item [item] spirits_n_mixers;
spirits_n_mixers[ $item[grapefruit] ] = $item[tangerine];
spirits_n_mixers[ $item[lemon] ] = $item[kiwi];
spirits_n_mixers[ $item[olive] ] = $item[cocktail onion];
spirits_n_mixers[ $item[orange] ] = $item[kumquat];
spirits_n_mixers[ $item[soda water] ] = $item[tonic water];
spirits_n_mixers[ $item[strawberry] ] = $item[raspberry];
spirits_n_mixers[ $item[bottle of gin] ] = $item[bottle of Calcutta Emerald];
spirits_n_mixers[ $item[bottle of rum] ] = $item[bottle of Lieutenant Freeman];
spirits_n_mixers[ $item[bottle of tequila] ] = $item[bottle of Jorge Sinsonte];
spirits_n_mixers[ $item[bottle of vodka] ] = $item[bottle of Definit];
spirits_n_mixers[ $item[bottle of whiskey] ] = $item[bottle of Domesticated Turkey];
spirits_n_mixers[ $item[boxed wine] ] = $item[boxed champagne];
print("checking spirits, mixers, and crosby nash's still...");
foreach key in spirits_n_mixers {
if( item_amount( key ) > 0 && stills_available() > 0 && item_amount(key) >= stills_available() ) {
print( "hey, you have " + item_amount(key) + " " + key );
print( "you have " + stills_available() + " uses left at the still");
print( "making " + stills_available() + " " + spirits_n_mixers[key]);
return create(stills_available(), spirits_n_mixers[key]);
}
}
print("hmm, you didnt have much, so I made " + stills_available() + " tonic waters");
buy (stills_available(), $item[soda water]);
return create(stills_available(), $item[tonic water]);
}
I am going to mash this into your script and see if it works. Cheers!
EDIT: heh, reviewing the code I see Bale already has this in place. Damn, back to square one. I will force this to use up the still and not waste it should I forget to do so
Edit Edit: Went into OCD and set it to craft soda water into tonic water. Not sure if this will fly, see tomorrow