Buying seltzers from the Lab

Tirian

Member
This has been a good week for MP restoration options, what with the new drinks from the White Citadel and also the fact that the Knob Goblin Laboratory store now stocks seltzers. I've been using the latter quite a bit, especially since my fighter runs are the ones where I get stuck fighting in the Treasury for a long time and it's the fighter time of the month.

I'm not someone who feels bad about reasonable server overload issues, but even I wouldn't feel right switching in and out of costumes to buy MP restoration as often as the need comes up, so I wrote up the following quickie function and codelet to manage things pretty well:

Code:
boolean can_and_should_use_seltzer()
{
	if (my_primestat()==$stat[mysticality]) return false;
	if (my_class() == $class[accordion thief] && my_level() >= 9) return false;
	return have_outfit("knob goblin elite guard uniform");
}

[and then later, in some function you call regularly...]
	item seltzer = $item[seltzer];
	if (can_and_should_use_seltzer() && item_amount(seltzer) < 5)
	{
		buy (20, seltzer);
	}	
[...]

I'm fairly comfortable believing that this is even easier on the server than the "normal" method of buying 50 soda waters in fits and starts to gain the same MP restorage. But the combination of outfit-required regular NPC buying and the notion of overstocking is probably not in the cards for KoLmafia soon, so you might enjoy the switch.
 
Top