CanAdv -- check whether you can adventure at a given location

Maybe once I have adventures again, if I can keep that in mind tonight [sarcasm]with the 3.5 hours of wonderful sleep that's so helping me avoid typos[/sarcasm] I'll try to check on the proper zone url, add Bale's tweaks, and modify the spooky gravy barrow to actually check if you have the right familiars around (as well as being able to equip them if needed).
 
I planned to run dj_d's farm script (or rather, a modified version of it) to burn my remaining adv before going Ascending again. I knew it would probably spend time in the Thugnderdome because that is where my multi have been going pretty much every time the last week.
I ran a simulation, wanting the name of the monster with best results so I could olfaction it in my CCS. It did not, however, want to go to the Thugnderdome!

Code:
> ash import <canadv.ash>; can_adv($location[thugnderdome],false)
Returned: false

I can adventure there manually though, and no problems with chance to hit and things like that.
 
Not sure it is CanAdv that needs to be tweaked but when running Ascend which relies on CanAdv, it thinks the Spooky Forest is available before the Level 2 quest is given and it thinks DeGrassi Knoll is an adventure location even when the chosen sign makes it otherwise. Based upon the report above CanAdv probably needs to know about the Vahalla revamp.
 
Okay, attached version of canadv should be able to both work properly detect new moonsigns for availability, as well as equip the familiar for the barrow if you aren't in a 100% run and have one of the three familiars...
> ash import <canadv.ash> can_adv($location[spooky gravy barrow],false)

You need to equip a Frozen Gravy Fairy, which you currently can't due to being on a 100% run with a Star Starfish.
You need to equip a Flaming Gravy Fairy, which you currently can't due to being on a 100% run with a Star Starfish.
You need to equip a Stinky Gravy Fairy, which you currently can't due to being on a 100% run with a Star Starfish.
Returned: false
 
one of the three familiars...
I always do that quest in aftercore with a Spooky Gravy Fairy so that I can pick up another familiar item for her (since that's the only way it drops). I believe that the Sleazy Gravy Fairy also opens the barrow.
 
Sounds good... I'll add them. I think I got that list from the wiki at some point, and [sarcasm]we know how accurate the wiki is[/sarcasm]. Also possible that's from the felonia completion script, but... bottom line, above (removed) script bad, attached script not-quite-so-bad. Preferred spooky if possible since, as you point out, it's the most difficult. Sleazy next, since it was the skipped ones, and then left in the order above.

Note: If people want to use famcheck in other scripts, it doesn't need the have_familiar check additionally... I'm just doing that because... well, no good reason, really. Oh wait, right. It means you won't get the famcheck vprint because it will skip the visible error message if you don't have the familiar. Which is, I suppose, not optimal behaviour, making the actual useful error hidden...

Removed the have_familiar checks before the famchecks in attached script.

Anyways, where I was going with that note is, this can be used to check/equip familiars in a way that respects is_100_run. Feel free to borrow whatever bits of it seems useful.
 

Attachments

Last edited:
Another change I've made to my local CanAdv... the Knob Shaft and Lab are unlocked by the Lab Key, the Menagerie is unlocked by the Menagerie Key. Current official CanAdv believes the Lab Key unlocks both.
 
Anyways, been a while since I gave an update here. New version of CanAdv with additional primecheck bits. Some additional tweaks as well... better accuracy on the frat/hippy bits. Or should be. Still has the familiar checks in, as above... it does better guessing if the areas are available, but need to remember to add in the other removed/holiday areas soon. I'll reattach here if there's no posts following, so if you see an edit, it's probably due to including the extra locations.
 

Attachments

Me again. Added in the bits from the last skeleton invasion into closed zones, lollipop forest is currently in the holiday zone so it's open, and added the space zones dependent on having the effect or the item available, as a Mr. A zone.
 

Attachments

Thanks for reminding me...
I've made changes to the Sea-part since it considered all areas available as soon as you could dive, which is not true. The following will hit the server a few times but I'm not sure how to mitigate that so... :)
Code:
 // sea
   case $location[The Briny Deeps]:
   case $location[The Brinier Deepers]:
   case $location[The Briniest Deepests]:
   case $location[An Octopus Garden]: return candive();
   case $location[The Wreck of the Edgar Fitzsimmons]: return (visit_url("seafloor.php").contains_text("shipwreckb.gif"));
   case $location[Madness Reef]: return (visit_url("seafloor.php").contains_text("reefb.gif"));
   case $location[The Marinara Trench]: return (visit_url("seafloor.php").contains_text("trenchb.gif"));
   case $location[Anemone Mine]: return (visit_url("seafloor.php").contains_text("mineb.gif"));
   case $location[The Dive Bar]: return (visit_url("seafloor.php").contains_text("divebarb.gif"));
   case $location[The Skate Park]: return (visit_url("seafloor.php").contains_text("skatepark.gif"));
   case $location[The Mer-Kin Outpost]: return (visit_url("seafloor.php").contains_text("outpostb.gif"));
 
It seems like you could load seafloor.php once, save it in a variable, then check for various strings for each of those zones.

Edit: Never mind, I wasn't thinking about how this script is actually used.
 
Okay... tweaked my canadv to use most of the Winterbay diving bits... but I put candive on each of the non-checked ones as well, so it will only do the seafloor hit if it can actually dive. Note that it will only do one hit at most per location, since the only ones that have multiple hitting the same return value are only using candive, and therefore don't actually hit the server. :)
 

Attachments

Latest change... as of 10288, the hidden city is split into two areas. Neither has the old name, so any script that uses it is now broken. Put in both a check for hidden city (automatic) and hidden city (encounter) into canadv, so in either case of requested adventuring it should work. Think I added the December holiday locations as well, haven't added (as far as I remember) the new January ones.
 

Attachments

Is there any way to give Theraze access to update the versions on the scripts that he is now supporting (mostly EatDrink, but I see he has done several versions of canadv too)

Thanks for the update!
 
Last edited:
Not without being a minion, which is way more responsibility than anyone besides the minions should be trusted with. ;)

But in seriousness, the people who care about support scripts are probably the people who hit the "What's New" button on the forum and see that there's new stuff. The people who only get major updates would get annoyed at how much I update, in general. :)
 
Is there any way to give Theraze access to update the versions on the scripts that he is now supporting (mostly EatDrink, but I see he has done several versions of canadv too)

Well, if zarqon wanted, I could fiangle something to allow Theraze control of updating this. there are three different ways this could be done.

1. I'd create a new second post under Theraze's name. Then I would delete canadv.ash from zarqon's post and put a line indicating that canadv was to be downloaded in the following post.

2. I could transfer authorship of the first post to Theraze.

3. Create a new post for Theraze before zarqon's currently first post.

That's up to zarqon though. Since he started canadv (although he envisioned it as a community project) I wouldn't change things like that without his approval.
 
Last edited:
Is there any way to give Theraze access to update the versions on the scripts that he is now supporting (mostly EatDrink, but I see he has done several versions of canadv too)

Thanks for the update!

Anything is possible with canadv so long as it is fine with zarqon. I have effectively taken ownership of ED (developers have awesome minion like powers) and do update periodically. Indeed, I will release Theraze's latest ED as The Release just as soon as I have managed one day's runs with the latest version.
 
Had a look at some of the basement-checking logic, and saw that the script visited 3 different urls to check if the slime tube is open, when you actually just have to do:
Code:
case $location[The Slime Tube]: return (visit_url("clan_slimetube.php").contains_text("thebucket.gif"))
If you don't have access to the basement, slime tube isn't open, etc., it won't find the bucket either. I suppose this won't check for if the tube is at the mother slime already/she is dead, but I don't know if that counts as having access to the tube or not?

This is the html you get when not having access, btw, just in case any of you are interested :P
Code:
<html><head><link rel="stylesheet" type="text/css" href="[URL="http://kolmafia.us/view-source:http://127.0.0.1:60080/images/styles.css"]/images/styles.css[/URL]"><script language="Javascript" src="[URL="http://kolmafia.us/view-source:http://127.0.0.1:60080/basics.js"]/basics.js[/URL]"></script><link rel="stylesheet" href="[URL="http://kolmafia.us/view-source:http://127.0.0.1:60080/basics.css"]/basics.css[/URL]" /></head><body><center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Uh Oh!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You don't have access to the slimetube.</td></tr></table></center></td></tr><tr><td height=4></td></tr></table></body><script src="[URL="http://kolmafia.us/view-source:http://127.0.0.1:60080/onfocus.js"]/onfocus.js[/URL]"></script></html>
 
This is due to mafia formerly having an abort if you ran a visit_url to a blank page, so...

So Slime Tube (next update) will have the single check, but for now, the hobos still take the two checks.
 
Last edited:
Back
Top