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

Well, the good news is that I'm finally adding in the rest of the semi-rares and so forth. Yay, me.

I may even allow the user to define a list of semi-rares that he wants to get in hardcore so that the script can just get the next one on the list.
 
Thanks very much Winterbay and Bale for the warning re: Hidden city...i have seen that behavior before, but hadn't considered it would impact the script!

And thank you Bale, for continuing the great work!
 
Hmm... Okay, adding in the HiddenCity script to my version so it can do its get_first("e") check if it's going for a shrinking powder.

Also, if all the other locations are being added, does that mean CanAdv is being added, or just left to user's discression? The one issue I've found with CanAdv is regarding (generally the first semirare) pre-unlocking guild... it tries to unlock the guild, which uses adventures, and then the semirare adventure is lost, but the script isn't aware of it having happened. I may throw in an adventure check to see if the count is the same before and after the CanAdv($location, true) call.
 
I may even allow the user to define a list of semi-rares that he wants to get in hardcore so that the script can just get the next one on the list.
I was going to post that getting user-defined ascension-relevant semi-rares was outside the scope of CounterChecker.ash. Making a counterScript that grabs a few user-defined SRs would be a lot simpler.

But if Bale decides to include this (along with a nifty user interface for the configuration, of course, since we now expect no less), people wouldn't need to give up the other awesome features, such as automatic absinth-levelling!
 
Also, if all the other locations are being added, does that mean CanAdv is being added, or just left to user's discression? The one issue I've found with CanAdv is regarding (generally the first semirare) pre-unlocking guild... it tries to unlock the guild, which uses adventures, and then the semirare adventure is lost, but the script isn't aware of it having happened. I may throw in an adventure check to see if the count is the same before and after the CanAdv($location, true) call.

Yes and No. CanAdv does this and some other things that I don't like (such as vprinting about locations that may or may not be available and I don't want that output), so I am writing my own mini CanAdv based on that script and adding that function into CounterChecker. In other words you won't have to worry about CounterChecker unlocking your guild. If you don't unlock it yourself, the script won't try to get that semi-rare.

The next version of CounterChecker will work and play well with CanAdv's unlockedLocations preference.


I was going to post that getting user-defined ascension-relevant semi-rares was outside the scope of CounterChecker.ash. Making a counterScript that grabs a few user-defined SRs would be a lot simpler.

Yeah, but I'd actually use this feature. Go figure. That bumps it up from "outside the scope" to making it part of the scope.

But if Bale decides to include this (along with a nifty user interface for the configuration, of course, since we now expect no less), people wouldn't need to give up the other awesome features, such as automatic absinth-levelling!

I appreciate the compliment, but I'm not sure that I really want the trouble of making a UI for it. If people want the feature they can just set it as a zlib variable containing a list of locations.

Do people really think that there should be a relay script to configure CounterChecker? So you can have a checklist of semi-rares?


Hmm... Okay, adding in the HiddenCity script to my version so it can do its get_first("e") check if it's going for a shrinking powder.

It's a pretty short function, so I'm gonna simply copy it (thanks zarqon). After all, it's annoying to the user to make them download a variety of unassociated scripts.

PHP:
int get_first_e() {
   string prop = get_property("hiddenCityLayout");
   for i from 1 to length(prop)
      if (substring(prop,i-1,i) == "E") return i;
   return 0;
}
 
Last edited:
It's a pretty short function, so I'm gonna simply copy it (thanks zarqon). After all, it's annoying to the user to make them download a variety of unassociated scripts.

PHP:
int get_first_e() {
   string prop = get_property("hiddenCityLayout");
   for i from 1 to length(prop)
      if (substring(prop,i-1,i) == "E") return i;
   return 0;
}

Hrm? Isn't there an index_of() function? (am slightly confused, please clarify.)
 
Used the adventure one instead of copying it mostly so that if the HiddenCity is completely undiscovered, it would still adventure in a square... not sure if you need to do anything, or if leaving it on exploring whatever number it's on (if it doesn't reset on ascension) works.
 
I appreciate the compliment, but I'm not sure that I really want the trouble of making a UI for it. If people want the feature they can just set it as a zlib variable containing a list of locations.

Do people really think that there should be a relay script to configure CounterChecker? So you can have a checklist of semi-rares?

I think the relay script would be noob-friendly, but not necessary with instructions on how to modify zlib. Being a noob myself, i know i am always a bit nervous about monkeying around in scripts since i have no idea what i am doing.

However, it is a damn good exercise to make me do things like change zlib or add in bits of code (a la Winterbay's suggestion....although i screwed that up and missed the semi-rare again :( ), because that is forcing me to learn, which is the best way to get over this fear of breaking a script!
 
Last edited:
Not editing zlib... using zlib to set variables. Editing the variables in the script only helps if it's the first time you're running the script, else it's too late...
 
I think it should get a relay script, but not just "for teh noobs." I also think the few of us who've written relay scripts should get together and agree on a few things that would be nice to add to / supplement htmlform.ash with, such that writing a configuration script or other "simple" things like this would become trivial. :)
 
I'd appreciate if you submit any improvements you make to CanAdv in that thread. I hate CanAdv's placeholder guild handling but thus far no one (including myself) has had the time to write it properly.

As for interface, as soon as we can get items/monster dropdowns working, the WOSSMAN will even be able to normalize comma-delimited lists of any mafia type, such as items. I don't think a separate interface is necessary -- if you feel up to it, I'd love help tracking down that friggin' bug because it has completely halted my development of that otherwise very useful interface (which I would like to be the primary way ZLib settings are modified since it is utterly user-friendly).

Also, you'll need to add a "+1" to that index_of(), or you'll be adventuring in the wrong square (or possibly no square). Hidden City squares start at 1, not 0. Also also, then scripts would want to check for 0, not -1.
 
If you've downloaded the prototype WOSSMAN already, try editing a setting that is an item or monster. You can't -- it doesn't create the dropdown box. The WOSSMAN uses AJAX to ping itself to create the dropdown boxes for mafia's special types. They work for stats and familiars, and probably others (untested), but they are definitely broken for items and monsters, possibly locations.

And now, back to CC... (sorry Bale).
 
Released CounterChecker v1.49

This is the "It's about bloody time" version. I've finally added all of the game's semi-rares and checks to see if those locations are adventure-able.

Rather than simply include zarqon's canadv, I use it as an outline with some improvements to cut down on server hits. One weakeness of canadv is that it hits a location (plains.php, woods.php, questlog.php?which=2, etc) every time it does a perm_urlcheck() for that location. Since I know I'll check a bunch, my revision only checks any given url once.

Somehow I suspect that I have messed something up so I'll be very eager to see Winterbay and Theraze's commentary.

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.
 
Last edited:
Thanks Bale -- I guess I will steal most of what you added. That or just delete CanAdv; thinking about that script just makes me upset. It was never finished but people generally complain about it like it is. Most of the time I wish I would never have asked everyone to work on it with me -- it's been far more trouble to me than helpful to other scripters, with too few people submitting actual fixes to help it reach completion. As evidenced by you today, preferring to write your own.

Also, what you describe as a weakness is intentional for a universally importable script. If you know you are going to check repeatedly without changing game state in between, you can store the results of can_adv() in a map outside the function -- rather than storing those results within can_adv(), rendering the function unfit for importing into a script which may take actions that unlock the zone between checks.

*goes home to eat gallons of ice cream*
 
Also, what you describe as a weakness is intentional for a universally importable script.

I know, I know. That's why I didn't pop over to the CanAdv thread and post a big "Do this and make it better" post. There are all kinds of limitations with a universal script which I didn't have to cope with. I could just do whatever I liked. Mostly I enjoyed CanAdv as a big catalog of logic for checking each zone without needing to figure it out for myself. It was very helpful to me. If there's anything in my mini-CanAdv that actually helps the big project, please feel free to use it.
 
Back
Top