CounterChecker: Wormwood, Semi-rares, Dance Cards and more

This is such a trivial request, I feel stupid typing it. There's something like 4 choice adventures that lead up to the fight with Stephen. You can back out from any of them, so CounterChecker could take you up to the last one before aborting and save people a few more clicks (beyond the seemingly hundreds it already saves me).
 
That may sound trivial, but it would be very troublesome for me to implement. I'd need to manually trigger that last choice adventures with a series of four visit_url() commands since Mafia will not do that for us.

I'd recommend that you go to the choice adventure tab for a location at Manor1 and simply choose "take quest option if available" for Lights Out. Then when you get the adventure, you can click the button to let it do that for you. If you do this in the relay browser you can then manually fight Stephen.

Tell you what though, if you scope out the necessary visit_url() commands to prepare for the final battle with Stephen, I will add that for you. Okay? Just make sure you check it personally to make sure that the option numbers are correct. Check the HTML to make sure that no numerical options were skipped. I use this little relay override for choice.ash to simplify that:

Code:
buffer annotate(buffer page) {
	buffer c;
	matcher choices = create_matcher("<input type=hidden name=pwd value='[^']+'><input type=hidden name=whichchoice value=(\\d+)><input type=hidden name=option value=(\\d)>", page);
	while(choices.find())
		choices.append_replacement(c, choices.group(2)+": "+choices.group(0));
	choices.append_tail(c);
	
	// Add choiceAdventure number to title
	matcher title = create_matcher('<input type=hidden name=whichchoice value=(\\d+)>.+(</form></center></td></tr>)</table></center>', c);
	if(title.find())
		return c.replace_string(title.group(2), title.group(2)+"<tr><td><span style='float:right;color:blue;font-weight:bold'>choiceAdventure"+title.group(1)+"</span></td></tr>");
	
	return c;
}

void main() {
	visit_url().annotate().write();
}
 
Last edited:
Sorry, when I said "trivial" I was referring to the inconvenience to the user, not the cost of solving it. That was my second attempt at properly writing it and I still failed to get my point across.
 
Gotcha! Trivial for the user, troublesome for the me. My offer to fix it is still valid, if you want to do the legwork.
 
Once again, I'm sorry my first message was taken the wrong way. Some days I justify my involvement with KoL as practice improving my poor writing skills. They know better at work than to ask me to write anything important, so I don't get much practice.

Gotcha! Trivial for the user, troublesome for the me. My offer to fix it is still valid, if you want to do the legwork.
Ugh. I hadn't looked at how Lights Out was handled in CounterChecker until yesterday. I wanted to make sure I provided the right information. I didn't realize it worked that way. Now I'm not really sure where things should be handled and where certain options should be taking into account (mafia vs CC).

Code:
choiceAdventure903

*1: Search for a light
2: Leave well enough alone
choice.php?pwd&whichchoice=903&option=1&choiceform1=Search+for+a+light

*1: Check it out
2: Back away slowly
choice.php?pwd&whichchoice=903&option=1&choiceform1=%E2%86%92+Check+it+out

1: Examine the chemistry gear
2: Examine the surgical equipment
*3: Examine the weird machines
choice.php?pwd&whichchoice=903&option=3&choiceform3=%E2%86%92+Examine+the+weird+machines

*1: Enter 23-47-99 and turn on the machine.
2: Leave the machine alone.
choice.php?pwd&whichchoice=903&option=1&choiceform1=%E2%86%92+Enter+23-47-99+and+turn+on+the+machine.

*1: Oh god
Those URLs are cut and paste from the mini-browser. I believe the "%E2%86%92" is added by KoLmafia, since it is a RIGHTWARDS ARROW. Funny how that may be submitted to KoL.
 
Thank you! That's all I need to know. Though, just to clarify, you don't want me to enter the last choice "Enter 23-47-99 and turn on the machine" because that would start the fight. Right?

I'll probably do that tomorrow.

PS. Please stop being sorry. I'm just glad I understand you now.
 
Thank you! That's all I need to know. Though, just to clarify, you don't want me to enter the last choice "Enter 23-47-99 and turn on the machine" because that would start the fight. Right?
Personally, I'd be happy with it going all the way into the fight, finishing the fight and returning to whatever was going on before. I don't think that's the right choice for everyone, so I agree with stopping before entering the numbers as you said.
 
I have recently gotten around to finally doing some Zombie Master runs, long after the fact. I'm consistently running into an error whereby CounterChecker notes that I should eat a fortune cookie, but correctly recognises that "(usable quantity of fortune cookie is limited to 0 by it not being a brain)". That message, however, is then repeated ad infinitum... or at least until the out of memory error hits; Script execution aborted (java.lang.OutOfMemoryError: Java heap space): (CounterChecker.ash, line 338).

I've tried to figure out if it is the product of scripts conflicting but to no avail. Debug log attached, for what it's worth.
 

Attachments

Huh. Obviously I never encountered that error before since there weren't any Lucky Lindys to set the counter back when I was a Zombie Slayers. You encountered an infinite loop since it kept trying to eat a cookie and failing. That can run through memory.

I'm going to solve this through the straightforward expediency of checking your path and not trying to eat a cookie if you only eat brains. Simple.

Please update the script and let me know how it works for you.
 
I was thinking. Could line 319-320 be replace with this? I don't think lindy work as an item yet but this seems to work. It could even be a setting "prefer lindy" or something and be use before line 337 for everything (minus the if path).

Code:
if(my_path() == "Zombie Slayer" && item_amount($item[Clan VIP Lounge key]) > 0 && my_inebriety() < inebriety_limit() && get_property("_speakeasyDrinksDrunk") < 3 ){
cli_execute("drink lucky lindy");
 
Last edited:
You missed checks to see if your VIP room actually has Lucky Lindies and if you have 500 meat. Early on in a run that 500 meat can be a big problem. It's more than ten times as expensive as a fortune cookie.

Does anyone know if mafia can inform a script about the presence of Lucky Lindies without needing to make a server hit on visit_url( "clan_viplounge.php?action=speakeasy" ) and look for the text?
 
Not sure if this is something that changed with quest tracking in mafia or because miniature boilers have gone up in price (they have), but you can't get the Twin Peaks semi-rare after the zone has completed. CC has been trying there on two characters who have already lit that fire.
 
Last edited:
I'd like to suggest that line 271 be changed from
Code:
	if(vars["BaleCC_ImprovePoolSkills"].to_boolean() && last_rare != $location[The Haunted Billiards Room])
to
Code:
	if(get_property("poolSharkCount").to_int() < 25 && vars["BaleCC_ImprovePoolSkills"].to_boolean() && last_rare != $location[The Haunted Billiards Room])
so that if a user has BaleCC_ImprovePoolSkills set to true it will only hit the Shark's Chum SR enough times to max out that pool skill bonus.
 
Thank you for both posts. I'll try to do those in the next day or two. If I do not get to it by Monday, please bump this.
 
Implemented!. Thank you both for the excellent advice.

Incidentally, I have not definitively nixed the Lucky Lindy recommendation for Zombie Slayer. It's still in the back of my head.
 
Back
Top