Sharpen Your Saw & Become a New You

Updated to the latest version and it worked without problem (ugh, bunnies). Thanks for the updates, and thanks a lot for the script in the first place.
 
Cast Gelatinous Kick, once per fight, against an Orcish Frat Boy 14 times (look in The Orcish Frat House).

> NewYou

[752] The Upper Chamber
Encounter:

[752] The Upper Chamber
Encounter:

[752] The Upper Chamber
Encounter:
Encounter:

[752] The Orcish Frat House (Bombed Back to the Stone Age)
KoLmafia declares world peace.

I am very confused right now.

The script hung and appeared not to do anything at all, except producing those notifications whenever I did anything in the relay browser, until I clicked the 'abort everything' button. Incidentally, I am level 12 but have not completed (e: or started) the war, and so the orcs are not actually bombed back to the stone age at this time.

This may or may not be related to the fact that there are multiple distinct "Orcish Frat Boy" monsters and only one of them is correct.
 
Last edited:

digitrev

Member
It's very odd that it went to the Upper Chamber at all.

As for it trying to go to the Stone Age version, that's easy enough to explain. KoL sends over "Orcish Frat House", but Mafia has that location as just "Frat House", and so the closest match is the Stone Age. I'll have to write some special parsing to figure out which Frat House the game wants you to adventure in. The same probably goes for the Hippy Camp, but I'm not sure what gets sent over should that happen.
 

digitrev

Member
Zombie waltzers (and other monsters that are referred to as "some" instead of "a/an") should be handled properly now.
 

AlbinoRhino

Active member
My monster today was "the gunk" and the 'm' matcher failed. I placed a "?" after the (a|an|some) group and the matcher worked. Just FYI. Thanks.
 

zarqon

Well-known member
By the way, as of ZLib r32 this can now remove its redundant load_kmail2() and go back to using ZLib's load_kmail().
 
Parsing fails for the following:
You should focus on bucket filling today. Cast Weapon of the Pastalord, once per fight, against an A.M.C. gremlin 8 times (look in The Junkyard).
I suspect the monster name is giving the matcher problems, but I don't see how.
 

digitrev

Member
It's actually the location name. "The Junkyard" is not actually a valid name. I'll try to come up with a good way to handle this problem.
 

dapanda

Member
Thank you for the script!

Where are you getting the variables for the monster and the skill to use? I was looking on how to personally add a "not the target" monster combat action. For instance if you are supposed to go after the "Punk Rock Giant" and you get the "Steam punk giant" it would use an item or skill to banish the monster. When I run the New You challenge manually I use: "Louder than a bomb" and "snokebomb" on the monsters that are not the target and then I use "digitize" and "olfact" on the target monster. This way I use the least amount of turns possible.

My coding skills are limited but I would like to contribute where I can.

Thanks!
 
Last edited:

Vozroz

New member
I get: "You should set your Eudora to the New-You Club before running this."
But it is set there. Maybe because I only have one in there? Not sure.

Eudora Tab
Correspondence Options:
Choose your Active Correspondent
New-You Club
 

dfens

New member
Thanks for sharing the script. It's working for me except that I have Olfaction available but it's not being cast automatically. Is there something that I need to enable?
 

coandco

Member
Hey, I decided that I wanted the script to be able to start mid-sharpen (i.e. when I'd already done one or two saws manually) and still keep track of my actual progress, so I made this patch on my local copy:
Code:
		if (combatText.contains_text("You're really sharpening the old saw.")) {
			matcher m = create_matcher("Looks like you've done ([0-9]+) out of [0-9]+!", combatText);
			if (m.find()) {
				MonstersFought = m.group(1).to_int();
				print("Fought " + MonstersFought + " " + mon + " out of " + amount, "blue");
			} else {
				MonstersFought += 1;
			}
		} else if (combatText.contains_text("Your saw is so sharp!"))

This way, it's grabbing your current progress out of the page message and using that for its counter, so it can accurately tell you how far along you are after each time you see the monster. Dunno if you want to use the code, but there it is.
 

coandco

Member
Another patch: I recently had the cabinet of Dr. Limpieza as my monster and the regex failed, because it was looking for (a|an|some), and "the" tripped it up. As such, here's the new regex that worked:

Code:
matcher m = create_matcher("Cast ([^,]+), once per fight, against (a|an|some|the)? (.+) ([0-9]+) times \\(look in (.+?)\\)", mtext);
 

coandco

Member
Thanks for sharing the script. It's working for me except that I have Olfaction available but it's not being cast automatically. Is there something that I need to enable?

I saw this as well -- what was happening for me was that the script didn't olfact until after it did the saw-sharpening skill. If that skill was Saucegeyser and the enemy was weak, they would die before it got a chance to olfact.
 
Top