Dwarven Factory - Factory puzzle solver

DwaFa 1.3 - Dwarven Factory puzzle solver
Dwarvish War Uniform here I come!

Previously dwarven_factory.ash. Thanks Veracity!!

This script automates the dwarven factory complex puzzle and retrieves the Dwarvish War Uniform item for you.

Requires Zlib & Miner.ash

User Preferences

boolean delivery_quest
If true will complete the Dwarven Factory Guild Quest (delivery service) before solving the factory puzzle.

boolean puzzle
Set this to false if you just want to use the script to complete the guild quest.

boolean buyore
If true the script will buy ore instead of mine for it.
WARNING: buyore is false by default. This script will spend adventures mining for ore if you do not change this to true before executing.

This is the order of the buying logic:
First dwafa.ash checks the script's buyore preference and if that is true it will try to buy all the required ore and abort if unsuccessful.
If buyore is false dwafa.ash passes control to miner.ash. Miner.ash tries to retrieve the ore, which means it might still buy it if autoSatisfyWithMall is true.
If miner.ash is unable to retrieve the ore it will then proceed to mine for the rest.

item transform
Specify the piece of mining gear to transform. By default the script will get a piece of the Dwarvish War Uniform that you do not already have. If you already have all the components of the Dwarvish War Uniform this script will just abort. If you are a collector change transform to bypass this abort. (i.e. If you collect Dwarvish War Helmets set transform to miner's helmet)

Here is an alias to complete the delivery service quest:
alias ds => ash import <dwarven_factory.ash> prep(); delivery();

Thanks to Veracity for adding Dwarven Factory support to KoLmafia.

If you find this script useful donations in the form of in-game ninja paraphernalia are always appreciated! Thanks and enjoy the script!

Change log:
11.08.09 - Added buyore boolean.
12.05.09 - Fixed a bug that was preventing the digit runes from getting parsed correctly.
09.24.10 - Re-named. Re-factored code. Converted aborts to exits and prints to vprints. Fixed a bug in the outfit item selection logic.
 

Attachments

Last edited:
Thanks! Althouh can I advise in future creations, that you have an option to simply BUY the ore? I have lots of meat and few adventures after I ascend :P
 
Update v1.1

I added a buy ore option. It is untested, but should be fine.

Edit: The buyore feature has since been tested and works as intended.
 
Last edited:
when I ran this script, it gave an error:

End index 1 out of bounds (dwarven_factory.ash, line 236)

I'm sorry I can't give many details, but here goes: I hadn't started the quest, but the script got and identified the cards. I think it said, "ores identified" just before the error.

Subsequent attempts to run the script just seem to do a lot of adventuring in the Foreman's office.
 
Oh yes, and before I started, I changed the delivery_quest to true.

When I switch delivery_quest back to false, I get the above error immediately.
 
Last edited:
Oh yes, and before I started, I changed the delivery_quest to true.

When I switch delivery_quest back to false, I get the above error immediately.

This is what I got...

You acquire an item: chrome ore
Miner, miner, you're quite the miner!
You acquire an item: lump of coal
Hooper ores identified!
End index 1 out of bounds (dwarven_factory.ash, line 236)
 
@Shire Beyay or siameseretriever:
Please type set lastDwarfDigitRunes into the gcli and post the result here.

Sorry for the delay! I did this, and there was no response in the gcli. I reran the factory script, and got the same error again: End index 1 out of bounds (dwarven_factory.ash, line 236)

However, I did get this to run on another character, which is confusing.

P.S. I love you, too! This script is awesome!!
 
@siameseretriever
Please try the attached version add tell me how it goes.

Edit: Fix implemented in v1.2
 
Last edited:
I love this script. I used it successfully last ascension, but when I try to run the new version it gives me this:

Script parsing error (dwarven_factory.ash, line 25)

If this is something stupid I'm doing, please tell me.
 
Honestly, I don't know what to tell you. I cannot reproduce this. If you've altered the script try redownloading. Line 25 is where it imports zlib. You could try to upgrade to the latest version of zlib, but I don't know why or if that would make a difference.
 
So, since it was giving me the parsing error when it was trying to import zlib, I tried importing zlib from the CLI, and it gave me a parsing error on zlib line 1. Any thoughts?
 
Ok, I know I've done something stupid here. I am not getting a script parsing error (Line 1) on every script I run. I have re-downloaded Mafia and every script twice, and I get the same result.

Anybody have any clue what I've done?
 
Back
Top