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

I've re-added my can_interact()-check and will see what happenes. The first semirare is in about 75 turns, which could be today or early tomorrow :)

ETA: It gathered a nice knob goblin lunchbox without any problem. I thereby assume that at least some things in the script works :)
 
Last edited:
One note on the adventure check... 8-bit realms is checking for the existance of stat and an available continuum... but doesn't mafia automatically collect it if you try to adventure and don't have it yet? I've never had an issue with that... only with trying to adventure there when I'm using a 2 handed weapon. Maybe a better check would be for the 20 stat and a 1 handed weapon, so it can auto-equip the continuum (from inventory|after getting it from the crazy guy).

Edit: Not sure if the chapel goes the same way, or if it only auto-collects for the 8-bit realm and not for chapel. Anyways, chapel probably needs 1-handed check as well.

Edit2: Both have the 1-handed check when it's actually running the adventure, so you can probably just have it equip the 1 handed weapon and adventure, since mafia automatically handles getting/equipping the continuum... So the can adventure check above can just be for the stat, long as chapel acquires the continuum for you like the 8-bit realm.

Edit3: Not sure about areas that need resistances to visit... Guano Junction needs stench resistance, for example. When doing the CanAdv with prep, it would use the harem gear or something like that for stench resistance. There might be some other zones that have special gear that needs to be added still, but that's the main one I've seen often.
 
Last edited:
Good points all.

Is it really necessary to have a 1-handed weapon? I can just remove your 2-handed weapon after all. Or is there fear of being weaponless when your counter is wrong? (It might be wrong if you only ate 1 cookie.)
 
Last edited:
Released CounterChecker v1.491

I am very pleased with the solutions I found to the problems pointed out by Theraze.
 
Good points all.

Is it really necessary to have a 1-handed weapon? I can just remove your 2-handed weapon after all. Or is there fear of being weaponless when your counter is wrong? (It might be wrong if you only ate 1 cookie.)

Well, you need the 1 handed weapon just because if you have a 2-handed weapon in your main hand, you can't equip the continuum... Unless you have the 2 fisted smashings and all of that, but, yeah. The monsters are weak and would probably die from headbutts without too much work, it's just a matter of not wanting to potentially have it fail to adventure at all because the equipping failed. You do have the "checkpoint"/"outfit checkpoint" in there, so as long as you survive the combat, it shouldn't be too traumatic. :)

Side note... still a bug regarding prime mysticality and elemental resistances, because Mafia gives them a base of 5 elemental resistance. However, this only works for combat, not safe adventuring. Just need to make sure that pasta/saucers are > 5 instead of > 0. Actually went through this while updating the Rinn quest scripts to make Level 4 and 8 not hang.

Also, does Ninja Snowmen require cold? Can't remember.
Edit: Nope, doesn't.
 
Last edited:
Well, you need the 1 handed weapon just because if you have a 2-handed weapon in your main hand, you can't equip the continuum... Unless you have the 2 fisted smashings and all of that, but, yeah.

That's .... not how that skill works at all. ;) 2-fisted skull smashing is what allows you to equip two 1-handed weapons at the same time. You can never equip a two-handed (or three-handed) weapon along with anything in your offhand.
 
Side note... still a bug regarding prime mysticality and elemental resistances, because Mafia gives them a base of 5 elemental resistance. However, this only works for combat, not safe adventuring. Just need to make sure that pasta/saucers are > 5 instead of > 0. Actually went through this while updating the Rinn quest scripts to make Level 4 and 8 not hang.

WTF? Are you sure? That would be a bug since they don't get +5 resistance, they get +5% resistance... Not the same thing. And "modtrace stench resistance" shows no sign of it.
 
Well, this test:
if (elemental_resistance($element[stench]) == 0.0)
returned false for my pasta/saucer... and ash elemental_resistance($element[stench]) returned 5.0 with nothing equipped...
 
Ah. I understand! elemental_resistance returns the percentage of resistance so 5 is correct there. The values returned by maximizer and modtrace have a different meaning. That's awesome.


Released CounterChecker v1.492


This is the "unary is fun" fix.

PHP:
boolean stinkup(boolean sim) {
	if(elemental_resistance($element[stench]) > (my_primestat() == $stat[Mysticality]? 5: 0)) return true;
	return maximize("1 max, 1 min, stench resistance, -tie, switch exotic parrot", sim);
}
 
Just a note... using the current version of this, I'm still having issues between BBB and CC and their cookie eating behaviour (BBB eating a cookie before the CC adventure). Guess I'll be patching that back in. :D

Edit: So, what I did was this... between location locale and string billiard, added middle 2 lines to make it this:
PHP:
 location locale = expensive_semi(last_rare);
 vars["BaleCC_nextSemirareLocation"] = locale;
 updatevars();
 string billiard;
and just before eat_cookie at the end, remove it like this:
PHP:
 remove vars["BaleCC_nextSemirareLocation"];
 updatevars();
 eat_cookie();

Edit2: Also, the remove/update needs to happen to the billiard adventure as well, since this version has the adventure there instead of integrated. :)
 
Last edited:
Didn't you also have to patch BBB to work with that?

I'm not going to make an official change to CC for BBB until zarqon makes an official change to BBB. This was his idea after all. Though I'd be glad to make any change that fits his idea of how it should be fixed.
 
Yeah, I patched both. We'll see if zarqon decides to include something to make it official, if I just need to keep patching CC and BBB as they get updated, or if some other solution happens eventually... :)

Edit: Though he did say that it would be added to the next version of BBB here...
 
Last edited:
I'm not sure why but the script got me a pirate juice today. In the log it said pirate juice was going for 45k and that's why it got one; however, in the mall there is 8 pirate juices for less than 45k. It looks like it took the price of the store above the limit 1 and got it based on that. The other pirate juices weren't added after I got mine as a sr because I checked right after it said they were selling for 45k and there was 8 below it then too. I'm not sure what happened or if it's anything fixable.
 
Not fixable. It's a basic limit of KoLmafia's restriction in price information. It will only check price once per day. If the price drops after that, there is no way for this script to adapt even if time has passed.
 
The check for a CLI command breaks things with counter names that are less than three characters long. I fixed this by changing line 686 to:
Code:
	if((name.length() >= 3) && (name.substring(0, 3) == "cli")) {
(I use counters for YRs, so I came up against this pretty often, and finally checked the code today.)
 
Bale, thanks for the script.

A feature request - while in HC, the selling price of an SR is a moot point (unless you are using them to build up your meat reserves after freeing the king). More important, in my mind, is what the SR can do for you at your level or in the next couple of days whilst in HC. Can we have a section that says - if in HC and level X or lower that these are the SR's we will go for, when between level X and Y (maybe if these quests are not completed) we go for these, between level Y and Z go for these, and above level Z go for them all?

It just seems to me that the lunchbox is useful early on in HC for the adv. The scented oil is useful as a combat restore. The Dogsgotnonoz pills are useful for the stench resistance (only get one?) (or the other sublime elemental resistances).

Another option is to limit SR collection in HC to one of some SR's and X of others. Maybe prioritize them based on level? I know that not everyone's game play style is the same. Even the class might effect the choice. But choosing purely on selling price whilst in HC is not the optimum, but then, what script is optimal!
 
This will be taken care of:
Now that I've finished this essential update, my next step is to start working on a way for the users to list the semi-rares they want to get in hardcore so that it can try to get any of which the character has less than 1.
 
Thanks, slyz. I would like it to adjust the SR's collected in HC based on what I have and what I have done or what I need.
 
A feature request - while in HC, the selling price of an SR is a moot point (unless you are using them to build up your meat reserves after freeing the king). More important, in my mind, is what the SR can do for you at your level or in the next couple of days whilst in HC. Can we have a section that says - if in HC and level X or lower that these are the SR's we will go for, when between level X and Y (maybe if these quests are not completed) we go for these, between level Y and Z go for these, and above level Z go for them all?

It just seems to me that the lunchbox is useful early on in HC for the adv. The scented oil is useful as a combat restore. The Dogsgotnonoz pills are useful for the stench resistance (only get one?) (or the other sublime elemental resistances).

Another option is to limit SR collection in HC to one of some SR's and X of others. Maybe prioritize them based on level? I know that not everyone's game play style is the same. Even the class might effect the choice. But choosing purely on selling price whilst in HC is not the optimum, but then, what script is optimal!

Gah! Thanks for pointing out exactly why I didn't want to implement the feature. I'd temporarily forgotten that people other than myself will have different ideas of how it should work. You've got about three different ideas for how it should work without even knowing how YOU want it done and none of them are exactly what I was thinking of doing. Maybe I'll have to rethink this idea.
 
Back
Top