Carriageman Feeder

guyy

Member
A pretty simple thingy, but I haven't seen it yet, so here it is!

This--DreadDrunk.ash--will find the most cost-efficient booze (given a non-insane number of mall searches) for making the Carriageman drunk as a Dreadsylvanian skunk, buy as much as it needs, and dump it down his throat. By default, it'll buy enough to unlock the Castle, but you can use "dreaddrunk village" to go halfway, or enter an exact number of sheets between 1 and 2000 to aim for.

For now, going from 0 to the Castle costs 52,000 meat-worth of Typical Tavern Swill, but this will vary with mall prices.

Please report any weird sheets values, because some of them are...weird, and must be adjusted for manually.

Installin': Paste this into the CLI:

Code:
svn checkout https://svn.code.sf.net/p/guyymafia/code/dreaddrunk

Then type "DreadDrunk [input]" to run it.
 
Last edited:
Interesting. Thank you.

On scripts like this, when possible, I am always comfortable with a simulation mode - tell me what will be done but don't do it. That might not make sense with mall prices changing but optionally dumping a table of drink, price, sheets per drink and meat per sheet sorted by the latter would scratch the same itch.
 
I see that you are using item.adventures to get the adventure range of a booze. Cool! But, I am curious about the "weird" ones that require manual adjustment.

A "snifter of thoroughly aged brandy" (supposedly) has an adventure range of 2-6, average 4 - but yields 3 sheets.
A "Corpsedriver" (supposedly) has an adventure range of 19-25, average 22 - but yields 21 sheets.
(ditto for all the other "big" corpse drinks).

Since I assume that KoL's "sheets" value is based on the same calculation - average adventures - if their number disagrees with ours, I suspect that our data is wrong - one (or both) of the ends of the adventure range is off, say.

I agree with frono (again :)) that a "simulation" mode would be nice; there are some things I'd rather not use for this - like buckets of wine that I made myself. But, nice job!
 
The trouble with doing a sim-mode is that I can't find any way to determine how much of something is left at a certain price without buying it. (cli "searchmall" works, but seemingly can't send its output to a script.) Or how to tell Mafia to ignore low-priced items in a mall search. Usually it ends up buying several different things, switching between them when the mall runs out of something, often buying the same thing at different prices with other things bought in between, so it's kind of a mess.

Listing the available drinks wouldn't be hard to do, though.

Edit: The corpse drinks have a claimed range of 19-23, average 21, on the wiki. Aged brandy is 2-6 on the wiki, too, but apparently this is wrong. Probably should be 2-4 or something. (Could also be 3-4; the sheets value is rounded down.)
 
Last edited:
Revision 12367 fixes the adventure range for the big corpse drinks. I am now pondering the brandy.
 
The trouble with doing a sim-mode is that I can't find any way to determine how much of something is left at a certain price without buying it.

That is deliberate on the part of mafia, to inhibit it being used for mall bots. What I have done for pseudo simulation in cases like this is to report the results as if an infinite number of items are available at the historical price. That is usually "close enough" and doesn't have many server hits.

I would use such a simulation mode in two cases. First, it would give me a ballpark cost so I could choose to not run the script or to closet meat before running, "just in case". Second, I have a display case full of summoned drinks that I never consume because I have a TPS. So I might choose to pull some of them out of my DC and "feed" them manually rather than have the script buy something else.
 
There was a proposal a while ago to give the mall price for a given number of items, but it stalled out. This was proposed something like mall_price(100, $item[typical tavern swill]) to find out how much it would cost (roughly) to get 100 swills, and allow for better simulation without making mall bots much easier than they currently are. Where it stalled was whether to start the 6-count at the 6th lowest price or the 10th, since mall_price(1, item) will be the price for the 5th lowest. When dealing with items that get pricey, the difference between those can be in the millions of meat range...
 
Just updated; "dreaddrunk list" will list all valid drinks in order of efficiency, and give the rough-estimated price of reaching the Castle, without buying or feeding anything.

Amusingly, the dream of a dog can theoretically be fed to him; though at 480,000 meat per sheet, this is only slightly better than autoselling it to buy 3/4ths of a swill.
 
I just used this to open the Castle in one of my private clans. Worked like a charm; the carriageman is now sheet-faced drunk.

Thanks!
 
I'm trying to run this script, but no matter what I enter as my input I keep getting the error message "Division by zero (DreadDrunk.ash, line 108)." Any idea how to fix this?
 
I'm trying to run this script, but no matter what I enter as my input I keep getting the error message "Division by zero (DreadDrunk.ash, line 108)." Any idea how to fix this?

I think this is fixed now (do an "svn update"). Something in the list of historical prices must have been zero.
 
Just a quick heads up -- Last night this script repeatedly bought bottles of vodka, tried to give to carriageman, bought more vodka, etc etc..

I manually stopped the script when I noticed, but I had purchased 1500 bottles of vodka already.
 
Cornering the market on vodka, eh?

To actually help make it stop, you should probably post the current url to feed the Carriageman. Or someone else will, eventually. But TPTB like changing urls.
 
That's not the issue. The problem is that you cannot feed the carriageman booze that you can buy from an NPC - or make from ingredients that you can buy from an NPC.

You can make 3 bottles of vodka by mixing fermenting powder and a bowl of rye sprouts. Ergo, bottle of vodka is not acceptable.
 
I added a special "do not use" thing for vodka, plus whisky and gin because they're probably invalid for the same reason. It should also give a warning and switch to something else if it finds another booze that doesn't work. I don't have a place to test this right now, though; hopefully it actually works.
 
I added a special "do not use" thing for vodka, plus whisky and gin because they're probably invalid for the same reason.

Also probably plum/pear/peach wine, most fruit schnapps (except blackberry and flower), fine wine?
 
Hm...come to think of it, I can just have it check the ingredients for NPC store items. All boozes that were invalid for that reason should be gone now.

Edit: Though it's still unclear what makes it not work -- does whiskey and soda work? That's all NPC store items, but through multi-stage crafting. Does anyone have a Dread open with an un-boozed Carriageman I can test with?
 
Last edited:
if (npc_price(item)) > 0 abort.
foreach it in get_ingredients(item) if (npc_price(it) > 0) abort.

Or something similar?
 
A martini is made from a bottle of gin and an olive.
You can make a bottle of gin by fermenting juniper berries.
You can purchase an olive from the hippy store.
As far as I know, the carriageman will happily drink martinis.

This G-D thread says he will not drink:

- Any booze you can buy directly from an NPC
- The three kinds of base booze you can make by fermenting hippy store things
- dusty bottles of wine

I don't know of a more definitive list of what he rejects.
 
Back
Top