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

I'm sorry if this is a repeat,it's been a while since I had to touch my scripts since everything was working great.

I don't know if it's CC's problem, or something else entirely, but whenever a wormwood counter triggers my autoadventuring just halts. After inspecting it, it looks like the first step for !pipe, which adventures for AbsintheMinded turns 9-7 in the Stately Pleasure Dome aborts prematurely. It does turns 9 and 8, but then it gets the halt even though one more adventure for the stately adventure.

PS. Thanks for all your contributions, Bale
 
Is there any output in the CLI when it stops? Please copy-paste it here. At least copy-paste the last half-dozen lines from your gCLI even if it looks irrelevant to you.

Also, please type this in the CLI and copy-paste the output here:

Code:
get counterScript
get wormwood
 
Maybe I'll have to rethink this idea.
A simple user-defined list of SRs it should get in the specified order should be enough. A list like this, for example:
Code:
lunchbox
cyclops eyedrops
ASCII
inhaler
lunchbox
If the user isn't level 9 when it's the ASCII's turn, try the next SR on the list and so on until there is one you can get, else abort.

This would mean you would need to store more data than the actual list (like the index of the next semi-rare to get). I'll have a go at it later today, if you want.
 
Question:

1. Can the script automate the use of Tiny Bottle of Absinthe, like it automates the use of Dance Card? I tried, but it doesn't seem to auto-use TBAs.
2. Once I load the script with the 'set counterScript = CounterChecker.ash', can I use the original mafia's counterScript? For instance, I want my automation to stop when I reach a semirare.
3. Is there a command to stop using the Dance Cards?

Awesome script though, it helped me leveling as moxie class.
 
Question:

1. Can the script automate the use of Tiny Bottle of Absinthe, like it automates the use of Dance Card? I tried, but it doesn't seem to auto-use TBAs.
2. Once I load the script with the 'set counterScript = CounterChecker.ash', can I use the original mafia's counterScript? For instance, I want my automation to stop when I reach a semirare.
3. Is there a command to stop using the Dance Cards?

Awesome script though, it helped me leveling as moxie class.

1-2) Not sure.
3) If you want it to not use dance cards you use
Code:
zlib BaleCC_useDanceCards  = false
which will stop it from using a new one when you have encountered your waltzing matilda.
 
Oh noez.

Code:
Request 2 of 150 (Island: Hippy Camp (Stone Age)) in progress...
Begin index 0 greater than end index -1 (CounterChecker.ash, line 52)
Fortune Cookie counter expired. Last semirare found 547 turns ago (on turn 5071) in Limerick Dungeon

In case you care:
Code:
> get counterScript

CounterChecker.ash

> get wormwood

!pipe

I'm running latest build as of this morning.
 
Last edited:
I think it would be more interesting if you did
Code:
ash get_property("unlockedLocations")
and post that since that is what is on that line :)
 
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.

Bale,

What were you thinking about doing for your approach? Maybe we can come to a consensus approach that might not be optimal, but workable.
 
Last edited:
@Winterbay, I'm not to whom you were referring, but for my Oh Noez bug report:
Code:
> ash get_property("unlockedLocations")

Returned: Post-War Sonofa Beach,Post-War Junkyard,The Middle Chamber,Hippy Camp (Stone Age),Haunted Wine Cellar (Southeast),Haunted Wine Cellar (Southwest),Haunted Wine Cellar (Northeast),Haunted Wine Cellar (Northwest),Haunted Wine Cellar (automatic),The Mer-Kin Outpost,The Wreck of the Edgar Fitzsimmons,The Dive Bar,The Marinara Trench,Anemone Mine,Madness Reef,An Octopus's Garden,The Briniest Deepests,The Brinier Deepers,The Upper Chamber,The Briny Deeps,Hole in the Sky

version

KoLmafia v14.4 r9000

(and yes, CC 1.492; and no, I didn't look into the CC code before reporting)
 
Last edited:
@Winterbay, I'm not to whom you were referring, but for my Oh Noez bug report:
Code:
> ash get_property("unlockedLocations")

Returned: Post-War Sonofa Beach,Post-War Junkyard,The Middle Chamber,Hippy Camp (Stone Age),Haunted Wine Cellar (Southeast),Haunted Wine Cellar (Southwest),Haunted Wine Cellar (Northeast),Haunted Wine Cellar (Northwest),Haunted Wine Cellar (automatic),The Mer-Kin Outpost,The Wreck of the Edgar Fitzsimmons,The Dive Bar,The Marinara Trench,Anemone Mine,Madness Reef,An Octopus's Garden,The Briniest Deepests,The Brinier Deepers,The Upper Chamber,The Briny Deeps,Hole in the Sky

version

KoLmafia v14.4 r9000

(and yes, CC 1.492)

Actually, it was to you since your error contained line 52 which checks unlockedLocations and it seemed to me from the error that the string was empty, but it appears to not be so I'm out of ideas. I'll thus leave that error to more competent persons :)
 
Hmm... try deleting that value and see if it fixes it. A "proper" unlockedLocations value should include which ascension you're on...

It's also possible that the issue has to do with that the CounterChecker script has the same name for its internal string as the preference. zarqon used theprop as the string name on CanAdv. This is less likely, but I mention it because it's one of the few differences I see between the two implementations on line 52 (CC) and 48 (CA).

Edit: Yeah, think it's the "no ascensions listed" issue on the first there. If "--" is not found, the indexof will return -1, and -1 is less than 0, making it hard to pull the text between 0 and -1 moving forwards... Potential bug that exists in both CA and CC, but requires either a third script to do it wrong, or maybe CC isn't properly initializing the property... Anyways, both probably need an indexof check first to verify that -- exists before it tries to match it.

Edit2: This replacement line for 52 should fix it:
PHP:
if(unlockedLocations == "" || index_of(unlockedLocations,"--") < 0 || substring(unlockedLocations,0,index_of(unlockedLocations,"--")) != to_string(my_ascensions()))
 
Last edited:
Last few lines, from when counter checker triggered and starting adventuring at Stately Pleasure Dome (from giant's castle)

Code:
Request 2 of 97 (Beanstalk: Giant's Castle) in progress...
Checking counters now.
Goal: not-a-pipe.
To change this goal, use set wormwood = xxx, where xxx is a stat or item. (Optionally add 951, 51 or 1 for stats.)
Worm Wood first step...

[12137] Stately Pleasure Dome
Encounter: angry poet
Round 0: oh shazbot wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: oh shazbot tries to steal an item!
Round 2: oh shazbot uses the facsimile dictionary!
Round 3: oh shazbot uses the facsimile dictionary!
Round 4: oh shazbot uses the facsimile dictionary!
Round 5: oh shazbot uses the facsimile dictionary!
You gain 256 Meat.
Round 6: oh shazbot uses the facsimile dictionary!
Round 7: oh shazbot uses the facsimile dictionary!
Round 8: oh shazbot uses the facsimile dictionary!
Round 9: oh shazbot wins the fight!
You gain 7 Beefiness
You gain 10 Enchantedness
You gain 16 Sarcasm
Mood swing complete.
(Wormwood counter expired)
Checking counters now.
Time has expired for you to adventure at Wormwood for not-a-pipe.
Mood swing complete.

[12138] Stately Pleasure Dome
Encounter: roller-skating Muse
Round 0: oh shazbot wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: oh shazbot tries to steal an item!
You acquire an item: bottled inspiration
You gain 89 hit points
You gain 89 Mojo Points
Round 2: oh shazbot uses the facsimile dictionary!
You lose 18 hit points
Round 3: oh shazbot uses the facsimile dictionary!
Round 4: oh shazbot uses the facsimile dictionary!
Round 5: oh shazbot uses the facsimile dictionary!
You lose 17 hit points
Round 6: oh shazbot uses the facsimile dictionary!
Round 7: oh shazbot uses the facsimile dictionary!
You gain 301 Meat.
Round 8: oh shazbot uses the facsimile dictionary!
Round 9: oh shazbot uses the facsimile dictionary!
Round 10: oh shazbot uses the facsimile dictionary!
Round 11: oh shazbot uses the facsimile dictionary!
Round 12: oh shazbot uses the facsimile dictionary!
Round 13: oh shazbot wins the fight!
You gain 4 Beefiness
You gain 9 Magicalness
You gain 20 Chutzpah
Mood swing complete.
Wormwood counter expired.

And your other info-
Code:
> get counterScript

CounterChecker.ash

> get wormwood

not-a-pipe

I have just had the exact same thing happen for Mouldering Mansion, where it only adventured once and then the counter expired and script was broken.
 
Last edited:
1-2) Not sure.
3) If you want it to not use dance cards you use
Code:
zlib BaleCC_useDanceCards  = false
which will stop it from using a new one when you have encountered your waltzing matilda.

Oh right, I totally forgot that the Dance Card option is in the vars text document. Thanks.

Still, how can I stop the script from running? I like to choose my own semirare :x
 
Take this part:
PHP:
  if(!can_interact() && !srInHC) {
   print("Semi-rares choices are not automated in hardcore or ronin.", "red");
   print_html("<font color=\"FF9900\">Your last semi-rare adventure was at <u>"+get_property("semirareLocation")+"</u>, so plan accordingly.</font>");
   return false;
  } else {
   get_semirare();
   return true;
  }
And put abort(""); below the print_html line. That'll make it stop any automation you have running...
 
A quick post-script (or pre-script? I never did get the hang of reverse Polish.): Thanks Theraze, that "unlockedLocations" fix seemed to do the trick for the last 50 adventures with which I was able to test. I'll try again tomorrow with a bunch more (since I did not characterize how often the index bug went all fail or the timing of the failures with respect to actual fortune numbers).
 
This is new:

Eating 1 fortune cookie...
Pathed ascension.
Eating 1 fortune cookie...
Pathed ascension.
Calling Universal Recovery for type=HP, amount=0
Calling Universal Recovery for type=MP, amount=0

I am in a Oxycore ascension, but counter checker is trying to eat cookies. It never did that before.
 
update mafia, it was fixed in version 9023.
Mafia behaved correctly (it didn't eat the cookie). However, the script shouldn't have tried.

EDIT: CounterChecker checks if my_fullness() == fullness_limit() before trying to eat. What does "ash my_fullness()" and "ash fullness_limit()" return for you?
 
Last edited:
I can say for sure that mafia was failing to recognize if you were in a pathed run, so it thought there was fullness available and would have tried eating the cookie (KoL behaved correctly and didn't let you eat the cookie). Apparently mafia also recognizes the "you can't do that" message and prints a reasonable message. Recognizing pathed runs has been fixed in recent mafia builds though, as noted above.
 
Oh, my bad. I thought the "Pathed run." message was printed prior to trying to eat (since the log didn't show the cookie being bought).
 
Last edited:
Back
Top