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

adeyke

Member
I'm not sure if the new content is sufficiently-supported in Mafia to add this yet, but eventually CounterChecker should be given the possibility of finding the semi-rares on the three peaks.
 

Veracity

Developer
Staff member
Eventually, a Mafia dev will learn that there are semi-rares on the three peaks. What are the items? What are the encounter names that generate them? Are they combats? non-combats?
 

adeyke

Member
I'm sorry. I didn't mean to sound impatient or at all critical of Mafia's progress on the new quest. What I meant was that I was assuming that everything was proceeding properly there, so I instead wanted to call attention to this script, which would also need updating. My information on semi-rares comes from the wiki:
A-Boo Peak has a non-combat semi-rare adventure named Oh, There Have it Gone that gives the item death blossom (item number 5346).
Twin Peak has a non-combat semi-rare adventure named Synecdoche, Twin Peak that gives the item miniature boiler (item number 5370).
Oil Peak has a non-combat semi-rare adventure named It's a Gas Gas Gas that gives the item unnatural gas (item number 2440).

The three items are undiscardable combat items.
 

Veracity

Developer
Staff member
Twin Peak has a non-combat semi-rare adventure named Synecdoche, Twin Peak that gives the item miniature boiler (item number 5370).
Interesting. I actually got that one. Considering that I was in Zombiecore and was not eating fortune cookies, I had no idea it was a semi-rare.

FWIW, I no longer look at the Wiki to see how things work. I either sift through pages of garbage in G-D, or I figure it out on my own.
 

Theraze

Active member
For the most part, you just add in
Code:
	semi_rare[$location[A-Boo Peak]] = $item[death blossom];
	semi_rare[$location[Twin Peak]] = $item[miniature boiler];
	semi_rare[$location[Oil Peak]] = $item[unnatural gas];
to your CounterChecker... I'd suggest below Chapel, because that's the bottom of the single-dropping items. The main long-term issue is that it also has to be added to the canadv function. And I don't think people have shared the information on the various stages of the new Level 9 quest so zone unlock can be properly tracked yet. Once that's happened... official CC support will probably follow shortly.

But first, people have to actually let the devs know the HTML code for each individual step of the quest, including both the page-text and quest log.
 

Bale

Minion
Released CounterChecker v1.49997

Added new Semi-rares:
  • death blossom
  • miniature boiler
  • unnatural gas

Even though mafia doesn't do quest tracking for this quest, it does track building the bridge, so I know those can be accessed when the bridge is complete.
 

Theraze

Active member
Two things. One, first post (which means the auto-checker) still on 1.49996, but that might be fixed by the time anyone notices this post. Second, personally I like to put in:
Code:
					if(count_counters() > 3) return false;
just before the
Code:
					if(count_counters() < 1) return true;
because if I have more than 3 counters, it means that I'm on the SR adventure and no matter how many cookies I eat, I'm never going to get the right count. So don't eat 15 cookies and burn away all my fullness, because that would be stupid. But it's happened multiple times, hence my personal-copy change...
 

Bale

Minion
Released CounterChecker v1.49998

  • Theraze's concern about too many counters has been noted.
  • Code is no longer unreachable.
 

Theraze

Active member
Sadly, it didn't work as well as hoped today.
[2263] Limerick Dungeon
Encounter: The Oracle Will See You Now
The Oracle Will See You Now
You lose 1,000 Meat

Oops, that wasn't the right number!
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 123, 8, 267
Lucky number 267 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 236, 195, 45
Lucky number 236 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 39, 164, 106
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 41, 237, 127
Lucky number 237 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 292, 293, 121
Lucky number 292 ignored - too large to be a semirare.
Lucky number 293 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 34, 236, 163
Lucky number 236 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 151, 64, 227
Lucky number 227 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
KoLmafia declares world peace.
You acquire an item: fortune cookie
You spent 40 Meat

> counters

Last semirare found 171 turns ago (on turn 2092) in Haunted Pantry

Unexpired counters:
Fortune Cookie (123)
Fortune Cookie (8)
Fortune Cookie (195)
Fortune Cookie (45)
Fortune Cookie (39)
Fortune Cookie (164)
Fortune Cookie (106)
Fortune Cookie (41)
Fortune Cookie (127)
Fortune Cookie (121)
Fortune Cookie (34)
Fortune Cookie (163)
Fortune Cookie (151)
Fortune Cookie (64)
Not sure why.
 

roippi

Developer
The oracle will see you now is a superlikely - so that buggered things. A quick fix would be to not try and get semi-rares while teleportitis is active.
 

slyz

Developer
I guess the Oracle is also non-adventure.php, so KoL hadn't set the turn number of your next SR yet. That's why your fortune cookies weren't agreeing on a number.
 

Theraze

Active member
Yes, but the bug I was trying to report was that the change made between 1.49997 and 1.49998 to abort eating more cookies if you already have 4 or more counters, which I did, wasn't working. I understand why the adventure was overwritten. I understand why CC ate 2 cookies. I don't understand why it kept eating more after that.
 

Winterbay

Active member
On a more general, counter-script, note: Is there any way, from within a script, to call a counterscript with the correct parameters?
I'm thinking that since adventuring via visit_url doesn't trigger the counter script even though the counters get updated it'd be nice of script that uses visit_url to adventure to check for relevant counters and invoke the counterscript as necessary.
 
I know this is probably an obvious question, but I haven't been able to find how to use ash to check on semi rares within my daily adventuring script. I'm looking for something like this:

Code:
if ( SR window is active  && last SR was itemA )
{
stuff
}
if ( SR window is active  && last SR was itemB )
{
stuff
}
 

Theraze

Active member
Visit to Island: Hippy Camp in progress...

[2022] Wartime Hippy Camp
Encounter: This Adventure Blows
You gain 88 Strengthliness
You gain a Muscle point!

Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 276, 53, 165
Lucky number 276 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 150, 193, 214
Lucky number 214 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 142, 17, 17
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 292, 146, 204
Lucky number 292 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 12, 123, 219
Lucky number 219 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 128, 7, 107
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
You acquire an item: fortune cookie
You spent 40 Meat
Purchases complete.
Eating 1 fortune cookie...
You gain 1 Adventure
You gain 1 Fullness
Lucky numbers: 198, 207, 144
Lucky number 207 ignored - too large to be a semirare.
Finished eating 1 fortune cookie.
Purchasing fortune cookie (1 @ 40)...
KoLmafia declares world peace.
You acquire an item: fortune cookie
You spent 40 Meat
KoLmafia declares world peace.
The current check for war started is apparently off... maybe it should check for Level 12 and war not completed and just consider that as verboten?
questL12War (user, now 'unstarted', default unstarted)
warProgress (user, now 'unstarted', default unstarted)
Since mafia doesn't even track me as having hit up the council yet...

The other issue displayed here is that the counter checker is not properly aborting when there's 3+ counters, since I now have:
> counters

Last semirare found 167 turns ago (on turn 1855) in Frat House

Unexpired counters:
Fortune Cookie (53)
Fortune Cookie (165)
Fortune Cookie (150)
Fortune Cookie (193)
Fortune Cookie (142)
Fortune Cookie (17)
Fortune Cookie (146)
Fortune Cookie (204)
Fortune Cookie (12)
Fortune Cookie (123)
Fortune Cookie (128)
Fortune Cookie (7)
Fortune Cookie (107)
Fortune Cookie (198)
Fortune Cookie (144)
quite a few. Not sure why count_counters() is failing to work, but... moved it down to the while check and that appeared to work better.
Code:
	else while(toEat() && count_counters() < 4) // Too many means there's a problem. Don't burn off fullness
 

Theraze

Active member
Bah, that didn't fix it. But apparently the issue is count_counters failing miserably.
> counters

Last semirare found 368 turns ago (on turn 2063) in Cobb's Knob Harem

Unexpired counters:
Fortune Cookie (25)
Fortune Cookie (29)
Fortune Cookie (160)
Fortune Cookie (17)
Fortune Cookie (48)
Fortune Cookie (132)
Fortune Cookie (190)
Fortune Cookie (193)
Fortune Cookie (70)
Fortune Cookie (75)
Fortune Cookie (109)

> ash import <counterchecker.ash> count_counters()

Returned: 1
I did move count_counters and toEat out of the eat_cookie function so I could actually check them outside.

Edit: Okay... not sure why mafia can't count tabs anymore, but this:
Code:
	return count(split_string(url_encode(counters), "%09"));
works as a replacement line in count_counters, as per the following:
> ash import <counterchecker.ash> count_counters()

Returned: 11
Possibly an underlying bug in mafia, but I don't know for sure. That does make it clear though that it IS showing as a tab, and that /t doesn't split it properly.
 
Last edited:

Bale

Minion
Cannot confirm. I make this little program:

PHP:
void main() {
	foreach i,s in split_string(get_counters("Semirare window", 0, 200), "\t")
		print(i + ": "+ s);
	print("Total = "+count(split_string(get_counters("Semirare window", 0, 200), "\t")));
}

When I run it I get this output:

Code:
> call testing.ash

0: Semirare window begin
1: Semirare window end
Total = 2
 
Top