Can you use the still from ASH?

fxer

Member
So can you script using the still 10 times daily for moxie classes? I see a function to see how many stills you have remaining, but not how to actually still something. Using the cli "create" command somehow?
 
This will figure out which still improvement offers the most profit and then do it. The little script contains everything you asked about and more:

Code:
item improvement(item [item] upgrade){
	item best;
	int profit = 0;
	int test_profit;
	foreach key in upgrade {
		if(historical_age(upgrade[key])>2) mall_price(upgrade[key]);
		if(historical_age(key)>2) mall_price(key);
		test_profit = historical_price(upgrade[key]) - historical_price(key);
		if(test_profit > profit) {
			best = key;
			profit = test_profit;
		}
	}
	return best;
}

boolean improve_spirits() {
	if(my_class() != $class[disco bandit] && my_class() != $class[accordion thief]) {
		print("You're not a moxie class, so no booze refinement for you.", "blue");
		return false;
	}
	if(stills_available() == 0) {
		print("you have no uses left at the still", "#FFA500");
		return false;
	}
	item [item] upgrade;
	upgrade[$item[bottle of gin]] = $item[bottle of Calcutta Emerald];
	upgrade[$item[bottle of rum]] = $item[bottle of Lieutenant Freeman];
	upgrade[$item[bottle of tequila]] = $item[bottle of Jorge Sinsonte];
	upgrade[$item[bottle of vodka]] = $item[bottle of Definit];
	upgrade[$item[bottle of whiskey]] = $item[bottle of Domesticated Turkey];
	upgrade[$item[boxed wine]] = $item[boxed champagne];
	upgrade[$item[grapefruit]] = $item[tangerine];
	upgrade[$item[lemon]] = $item[kiwi];
	upgrade[$item[olive]] = $item[cocktail onion];
	upgrade[$item[orange]] = $item[kumquat];
	upgrade[$item[soda water]] = $item[tonic water];
	upgrade[$item[strawberry]] = $item[raspberry];
	upgrade[$item[bottle of sewage schnapps]] = $item[bottle of Ooze-O];
	upgrade[$item[bottle of sake]] = $item[bottle of Pete's Sake];
	item still = improvement(upgrade);
	print("Creating " + stills_available()+ " " +upgrade[still]+ " to sell @ "+historical_price(upgrade[still]), "blue");
	retrieve_item(stills_available(), still);
	create(stills_available(), upgrade[still]);
	cli_execute("mallsell * "+ upgrade[still]+ " @ "+ historical_price(upgrade[still]));
	return true;
}

void main() {
	improve_spirits();
}

Oh. The function you were asking about is create(int quantity, item it)
 
I'm always glad to share and teach. If there's anything in that script which you want explained, please just ask.
 
Back
Top