Fortune Cookie counter running out halts all activity

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Something like this will come up like "Fortune Cookie counter expired. Last semirare found 3771 turns ago (on turn 4584) in Orc Chasm".

Rather than eat a cookie and/or just carry on, whatever Kolmafia is doing will abort.

How can I make it ignore the counter and keep adventuring?

Gausie
 

Bale

Minion
Stop eating fortune cookies and it will not abort.

Seriously. KoLmafia assumes that if you eat the fortune cookie you actually cared about the result.

If that doesn't work for you, then create a counter script that does nothing and it will intercept the abort for you.
 

Theraze

Active member
Oddly, running a counter script is one way to avoid this behaviour. If you're wanting to not re-eat fortune cookies, but use Bale's CounterChecker script, you can set its cookie eating to never...
 

Bale

Minion
And I even threw in a helpful link in case the querant didn't know what is a counter script. I'm the complete ninja.
 

StDoodle

Minion
The only way it would be more complete is if you'd written the aforementioned counter script yourself... wait...
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
I don't eat Fortune Cookies! I never have. It just won't leave me alone... I'll try a counter script.

Thanks all.
 

Bale

Minion
I don't eat Fortune Cookies! I never have.

You are mistaken.

That warning will only appear if you have eaten a fortune cookie unless you purposefully enter a command into the CLI like counters add 88 cookie fortune.gif and since you'd definitely remember that I'm sure you ate a cookie.
 

Raijinili

Member
Eat a cookie, remove the counter (I think you can click on it in the relay browser to "shrug" it), and adventure as needed.

I haven't tried this, and have been frustrated by this before, but it wasn't until I saw this question that I thought, 'Oh, actually, there's a simple solution.'
 

slyz

Developer
When you encounter a semi-rare when adventuring, Mafia sets a "semi-rare window start" and a "semi-rare window end" counter. I'm not sure those will stop your auto-adventuring, but it's possible.

As stated above, the simplest way to make Mafia ignore all your counters is to make a counterScript that does exactly nothing.

Save the following in a text file (using a non-formating text editor, like notepad):
PHP:
boolean main( string name, int remain )
{
   return true;
}
Rename that file "nocounter.ash", place it in Mafia's /scripts directory, and type "set counterScript = nocounter.ash" in the gCLI.
 

Bale

Minion
When you encounter a semi-rare when adventuring, Mafia sets a "semi-rare window start" and a "semi-rare window end" counter. I'm not sure those will stop your auto-adventuring, but it's possible.

That will not stop auto-adventuring. It is just an informational counter. gausie is eating fortune cookies.
 

fronobulax

Developer
Staff member
Irrelevant to autoadventuring but the Relay Browser would, and presumably still does, tell you that the counter was about to trigger and let you decide to do something other than blindly press Again. I have been confused enough that I would incorrectly associate this with autoadventuring even though that is clearly not the case.
 
Seriously. KoLmafia assumes that if you eat the fortune cookie you actually cared about the result.
This assumes that a script that is auto-adventuring doesn't also keep the counter in mind and adventure accordingly. I have seen some -godawful- work-arounds for this, and would have loved a way to tell mafia "no no no, it's okay, I -know- there's a SR coming" since I wasn't aware you could set up a second script to do just that (though honestly I'd prefer it all in one script)

That said:
If that doesn't work for you, then create a counter script that does nothing and it will intercept the abort for you.
Now I know!
But one question... does the triggering of a counter script automatically pause another script (namely the one doing the adventuring)? No biggie if it doesn't, just curious.
 

Winterbay

Active member
It does. It works in a similar way to a between battle script in that it does things between turns, only this time it actually takes (or not as the case may be) a turn to perform this. So if you have a script that does something with your cookie counters (such as Bale's script) and a Between battle script it will be something like:
1) Your script making a turn
2) Between battle script kicking in
3) Counter expiring, counter checking script kicks in, spends a turn
4) Between battle script kicks in
5) Your script is back in charge

(I think that's the way it's working at least)
 

slyz

Developer
The counterScript gets called as part of the adventuring process, so it all happens inside the adventure() call I guess.

EDIT: ninja'd by a rabbit eating a cookie
 
Top