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

Just thought I'd throw this out there. Use it if you like, or find your own path.

PHP:
case $location[Bat Hole Entryway]:
case $location[Guano Junction]:
case $location[Batrat and Ratbat Burrow]:
case $location[Beanbat Chamber]:
case $location[Boss Bat Lair]:
	switch(get_property("questL04Bat")) {
	case "step3":
		if(where == $location[Boss Bat Lair])
			return true;
	case "finished":
	case "step4":
	case "step2":
		if(where == $location[Beanbat Chamber])
			return primecheck(13);
	case "step1":
		if($location[Batrat and Ratbat Burrow])
			return primecheck(13);
	case "started":
		if(where == $location[Guano Junction])
			return (primecheck(13) && resist($element[stench],prep));
		if(where = $location[Bat Hole Entryway])
			return primecheck(13);
	}
	return false;
 
Using r11015 and CanAdv 0.79 results in: Expected }, found ! (canadv.ash, line 80)

The problematic code is:

PHP:
78   boolean equipcheck(item req, slot bodzone) {
79      if (!can_equip(req)) return vprint("You need to equip a "+req+", which you currently can't.",-6);
80      !(prep && retrieve_item(1,req) && equip(bodzone,req))
81      return (item_amount(req) > 0 || have_equipped(req));
82   }

hmm?
 
Did I not upload the fixed version? I thought I got the working version re-uploaded within 5 minutes after the first bad version went up...

Edit: Okay, put 0.80 into the second post. This basically fixes the aforementioned error (if you'd grabbed it immediately after it went up) and adds the other bugbear zones. Some minor reprocessing of zones in preparation for the refactoring planned above...
 
Last edited:
Something for 0.81:
> ash import <canadv.ash> can_adv($location[pirate cove], false)

Returned: false

> mymax

Maximizing...
174 combinations checked, best score 1270.1
Putting on Disco 'Fro Pick...
Equipment changed.
Putting on Boss Bat britches...
Equipment changed.
Putting on tap shoes...
Equipment changed.

> ash import <canadv.ash> can_adv($location[pirate cove], false)

Returned: true
Added a new function, outfitequipped. Currently just looks at the pirate cove... anything else where we know that a specific outfit makes a zone/semirare unavailable? Possibly the war outfits, but not sure...
 
[size=+1]The CanAdv Project 0.80[/size]

Please download the latest CanAdv from this post.

Changelog
02.13.12 - 0.74: Added version checking. Also added checking for familiars and underwater adventuring.
02.19.12 - 0.75: Added class checking for guild unlocking.
02.27.12 - 0.76: Added quest tracking awareness for locked-guild characters. Added variable to keep the guild locked.
02.29.12 - 0.77: Cleaned up locked-guild to never adventure if you've told it to stop. Moved two holiday zones to former event section.
03.01.12 - 0.78: Changed default to not unlocking guild. Added location-only no-prep overloaded can_adv function.
05.16.12 - 0.79: Added initial Bugbear Invasion zones, marked as not available if you aren't in a bugrun. Pete's Stupor takes 26 drunk.
05.24.12 - 0.80: Added additional Bugbear Invasion zones, still marked as not available if you aren't in a bugrun.

I run into an issue when it comes to semi-rare farming with CounterChecker.ash, and I'm guessing its canadv. Sometimes I'll try adventuring in the frat vs hippy battlefield, but its nuked and so the semi-rare adv will fail. how do i fix this? if its a problem unrelated to this script, i'll post somewhere else. thanks!
 
You need to make sure your battlefield settings are correct.
Check the preferences "sideDefeated" and "warProgress" to make sure that they are correct.
 
Ah, alrighty. Was just assuming counterchecker used canadv, even though there's no "import <canadv.ash>" derp.

Well, thanks for giving me a solution anyways!
 
Yep. If it says that the war zones are still unlocked and you've finished... aftercore is my favourite time to find that... pop the relay browser and look at the island. That should make it get fixed. Until the next time you run Wossname...
 
I don't understand the use of canadv.ash.

I was using farm.ash, which calls canadv.ash and it said:

Request 1 of 261 (Spaaace: The Domed City of Grimacia) in progress...
You can't get to that area.

If I can't get to that area, why would farm.ash try?

Or is confusion induced because I *could* get to that area based on stats and having transponders, etc.?

Thanks.
 
Last edited:
Yeah... if you just run a no-prep check, it will return the area as available if you have the capacity to get Transpondent. If you run with prep, it will use them...

Can't tell you what farm.ash uses since I never actually got into automating enough before dj_d disappeared. :)
 
And there ya go... if you want it to actually make adventuring in locations that need prep work, throw can_adv(location, true) on the line before adventure(my_adventures(), location). :)
 
Well, it loops over all locations so setting prep to true would be a bad idea I'd say because it will be a lot of different prepping.
 
Like I said... put the prep true on the line just BEFORE actually adventuring. :D I did NOT just say to change prep from false to true.
 
Yeah, but before that is doesn't in fact use canadv at all since it is already confident it can go whereever it needs to go :)
It could probably stand being corrected, but since there is no official version of it out in the open there's no really good place to upload a fixed version.
 
Back
Top