Discoveries.ash

Rinn

Developer
This script will list (almost) every recipe that is missing from your discovery pages. Additionally there are boolean toggles that will create the missing items.

Items that don't show up on the discovery pages are unlisted, as well as items that require using an item to learn the recipe. I also ignore depleted items by default. Also the Frost™ brand sword because the ™ makes contain_text() return false.

This script will also check for gender and not create a skirt/kilt if it's not possible. I remembered I can check the effect of mysteriously handsome instead of your character image (which won't work for anyone with a custom avatar).

matt.chugg initially had this idea and I took his initial script and added a lot of functionality.

I believe these are all the items with multiple recipes, mafia only knows about one way so unless you make the other by hand this scrip will keep trying to create them the way mafia knows how.:
staff of ed
makeshift SCUBA gear
plain pizza
pr0n cocktail
rum and cola
whiskey and cola
meatloaf helmet
sticky meat kilt
dripping meat crossbow
dripping meat staff
dripping meat sword
green beer
bloody beer

Wads also can't be created by cooking through mafia.
 

Attachments

  • Discoveries.ash
    15.5 KB · Views: 581
Last edited:

Rinn

Developer
I made a typo which I fixed. It was putting items in the incorrect index of the basic smithing group (always index 0).
 

sulfur

New member
Try setting the Frost Brand sword to this text:

concoctions[$item[Frost™ brand sword]] = "UNLISTED";

I made that change, and it appears to work on my Mac.
 

Rinn

Developer
You'd actually have to unlist the original one first. I can't test if it actually worked though, I already made it.

concoctions[$item[Frost™ brand sword]] = "UNLISTED";
concoctions[$item[Frost™ brand sword]] = "SMITH";
 
I like this script a lot, since discoveries were implemented during my long break of KoL.

Just for informational purposes, it incorrectly counts the number of existing discoveries if your account is set to not display images. (0 for all current discoveries.)

The listing functions just fine, although again, the count is off. (You have X/X discoveries. Where X is always the same.)
 

matt.chugg

Moderator
ahh, I didn't think of that! it uses visit_url to get the pages, then determines the number of instances of /itemimages/ to detect how many you have. obviously without images displayed this will fail!

replacing lines 88 - 111 with the following should fix this, i'm sure rinn will update as soon as he has chance!

Code:
	print("Getting list of discovered meat-pastables...");
	string pastepage = visit_url("craft.php?mode=discoveries&what=combine");
	int currentpastecount = count(split_string(pastepage,"descitem")) - 1;
	print(currentpastecount + " current meat-pasteable discoveries.");

	print("Getting list of discovered food...");
	string foodpage = visit_url("craft.php?mode=discoveries&what=cook");
	int currentfoodcount = count(split_string(foodpage,"descitem")) - 1;
	print(currentfoodcount + " current food discoveries.");

	print("Getting list of discovered arms & armor...");
	string smithpage = visit_url("craft.php?mode=discoveries&what=smith");
	int currentsmithcount = count(split_string(smithpage,"descitem")) - 1;
	print(currentsmithcount + " current arms & armor discoveries.");

	print("Getting list of discovered booze...");
	string boozepage = visit_url("craft.php?mode=discoveries&what=cocktail");
	int currentboozecount = count(split_string(boozepage,"descitem")) - 1;
	print(currentboozecount + " current booze discoveries.");

	print("Getting list of discovered jewelry...");
	string jewelrypage = visit_url("craft.php?mode=discoveries&what=jewelry");
	int currentjewelrycount = count(split_string(jewelrypage,"descitem")) - 1;
	print(currentjewelrycount + " current jewelry discoveries.");
 

matt.chugg

Moderator
Version 3.2

ok, heres a version with the fix for inventories with images turned off (as posted above)

This version also only displays "of which x require someskill" if x > 0

rinn.. I incremented to 3.2, hope you don't mind, also if a mod wants to lock my thread and post a url to this one, its all good
 

Attachments

  • Discoveries.ash
    16.9 KB · Views: 83
Last edited:

NastyPeasant

New member
Using the Discovers.ash in the first post of this thread (says ver 3.1 in the script), I'm getting the following error:

> call scripts/Discoveries.ash
Bad item value: "Frostô brand sword" (Discoveries.ash, line 36)

I don't even have a Frostô brand sword in my inventory.
Is it something I did?

(does the same thing with Matt's ver 3.2, except it says "line 37" at the end)
 

Spiny

Member
Using the Discovers.ash in the first post of this thread (says ver 3.1 in the script), I'm getting the following error:



I don't even have a Frostô brand sword in my inventory.
Is it something I did?

(does the same thing with Matt's ver 3.2, except it says "line 37" at the end)

Whichever line is the offending one, try changing it to:
Code:
concoctions[$item[Frost™ brand sword]] = "SMITH";

See if that works.

Be advised, mafia recently changed how evil potions are categorized from SAUCE to COOK. It still requires Advanced Saucecrafting, but this script will have them listed under no-special skills required due to the COOK category.
 

matt.chugg

Moderator
ignore it using the item number in 3.3

Code:
concoctions[to_item(1712)] = "UNLISTED";
just have to make it manually if you don't have it.

Will look at the evil potions later
 

Attachments

  • Discoveries.ash
    16.9 KB · Views: 95

matt.chugg

Moderator
Update to 3.4

support added for the new miscellaneous/multi-use section
 

Attachments

  • Discoveries.ash
    17.7 KB · Views: 88
I posted in an earlier message before I saw the title of this one (before anyone stomps on me for double posting...). Thanks for all the hard work. Is there a way in Mafia to export results to a file, since I cannot copy text out of the result window? TIA
 

slyz

Developer
I can copy text from the gCLI tab, but you can also find that text in the session log in /sessions.
 
Top