jasonharper
Developer
This little script will generate a list of all of the creatable items that aren't already listed on your Discoveries pages. It's trophyriffic!
Unfortunately, ASH has no way of determining what technique is used to create any given item - that's something you don't normally have to worry about with KoLmafia! Therefore, the script may list some items that are created from two others, but by some means other than the basic crafting skills - Crimbo toymaking, for example. Such items won't count as discoveries, even if you're still able to make the item at all.
Unfortunately, ASH has no way of determining what technique is used to create any given item - that's something you don't normally have to worry about with KoLmafia! Therefore, the script may list some items that are created from two others, but by some means other than the basic crafting skills - Crimbo toymaking, for example. Such items won't count as discoveries, even if you're still able to make the item at all.
Code:
print("The Undiscovered Craftery v1.0, by [email]JasonHarper@pobox.com[/email] (in game: Seventh)");
string disc(string type) {
return visit_url("craft.php?mode=discoveries&what=" + type);
}
void main() {
string known = disc("combine") + disc("cook") + disc("smith") +
disc("cocktail") + disc("jewelry");
int[string] unmake, closet, display, other;
print("You have the ingredients needed to make these undiscovered items.",
"blue");
for i from 1 upto 4000 {
item it = to_item(i);
int[item] parts = get_ingredients(it);
int nparts = count(parts);
if(nparts < 1 || nparts > 2) continue;
boolean valid = true;
if(nparts == 1)
foreach p1 in parts
if(parts[p1] != 2) valid = false;
else
foreach p2 in parts
if(parts[p2] != 1) valid = false;
if(!valid) continue;
string name = to_string(it);
if(contains_text(known, "<b>" + name + "</b>")) continue;
if(creatable_amount(it) > 0) print(name);
else if(item_amount(it) > 0) unmake[name] = 1;
else if(closet_amount(it) > 0) closet[name] = 1;
else if(display_amount(it) > 0) display[name] = 1;
else other[name] = 1;
}
if(count(unmake) > 0) {
print("You have these undiscovered items, but not their ingredients.",
"blue");
print("Any that are meatpasted, you can untinker & rebuild.",
"blue");
foreach un in unmake print(un);
}
if(count(closet) > 0) {
print("You have these undiscovered items in your closet.",
"blue");
print("Any that are meatpasted, you can untinker & rebuild.",
"blue");
foreach cl in closet print(cl);
}
if(count(display) > 0) {
print("You have these undiscovered items in your display case.",
"blue");
print("Any that are meatpasted, you can untinker & rebuild.",
"blue");
foreach di in display print(di);
}
if(count(other) > 0) {
print("You neither have these undiscovered items, nor their ingredients.",
"blue");
foreach ot in other print(ot);
}
print("Done. Note that these lists may include items made by means other " +
"than crafting (such as multi-use), that wont't count as discoveries.",
"blue");
}