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

So, the only part of that which we need is that if the oldlandfill.gif is showing, the landfill should be adventurable.
 
So, the only part of that which we need is that if the oldlandfill.gif is showing, the landfill should be adventurable.

Pretty much, yep. If you were feeling generous or whatever you could also add the ability to unlock the landfill if smoke signals are present and the user calls can_adv with the prep boolean set as true. But honestly, that's not a high priority or even a really common need.
 
We don't visit places except for the guild, and even then Zarqon didn't like it after the event. It only stays in to not break legacy scripts that depend on this to be their guild unlocker. Well, that and I hate to remove features that are working. But yeah... we don't unlock the sea, the tavern cellar, or any of the other areas that can be easily unlocked by multiple server hits. Prep is for equipping, not for adding the server hits.
 
We don't visit places except for the guild, and even then Zarqon didn't like it after the event. It only stays in to not break legacy scripts that depend on this to be their guild unlocker. Well, that and I hate to remove features that are working. But yeah... we don't unlock the sea, the tavern cellar, or any of the other areas that can be easily unlocked by multiple server hits. Prep is for equipping, not for adding the server hits.

That makes since. So yeah, don't automatically unlock the landfill. Honestly, if the user (me in this case) can't be bothered to unlock it himself/herself then maybe they shouldn't be playing at all.
 
Is it by design that the boss bat's lair is classified as available even after you have killed it?
I added a check for the quest bein "finished" to my local copy for now. (farm decided to go there and since there was nothing left aborted)
 
Not by my design. It's a 'feature' of the #325 canadv which replaced the original canadv in SVN. I've put a check for the quest being finished back into current SVN.
 
Is this maintained? I get Bad location value: "Inside The Palindome" (canadv.ash, line 437) when I run autoclub which uses this.
 
I'm trying to troublehoot an issue:

> ashq import canadv.ash; print_html(can_adv($location[The Haunted Conservatory],false));

false

I can access the Conservatory and unlocked all parts of the manor. Tracing the script it is calling zone check on Manor1 and that is failing.

> ash print_html(get_property("lastManorUnlock"));

-1
Returned: void

> ash print_html(my_ascensions());

0

If I unlocked the manor parts while not running mafia, does the internal state get messed up?
 
Possibly. Have you visited the Manor in the relay browser in mafia manually? There's nothing really that we can or should do as the script to disbelieve mafia's properties, but mafia should update that the Manor has been unlocked if you visit it in the relay browser and the server hit has already been made.
 
I have visited it and everything is unlocked. I'm also running Bale's relay enhancements and it reports everything unlocked. I guess I don't understand what this is checking, why would the lastManorUnlock get set to the number of ascensions. Adventure Advisor also reports the zones open.
 
What we use starts with this:
Code:
      case "Manor1": if (where == $location[the haunted pantry]) return true; return get_property("lastManorUnlock").to_int() == my_ascensions();
Since your lastManorUnlock is -1 (never) and your ascensions is 0 (which is not -1), your Manor is officially, according to mafia, locked.

Adventure Advisor will set the unlock with associated server hit to check if the manor is available automatically if you have ascensions - but since you don't, it doesn't set mafia's value for you. Bale's mafia enhancements are loading on that specific page and looking at what's there. It's using the page that's loaded to tell you which zones are clickable. That's unrelated to mafia actually knowing what's available, though.

You posted that mafia doesn't know that your Manor is unlocked. If mafia doesn't have an auto-unlock for when you go into the manor (or see it unlocked), that leaves two possibilities for how to solve this.
1) Make a Feature Request that mafia adds an auto-unlock when you visit the Right Side of the Tracks and see that the Manor is already unlocked.
2) You manually unlock the Manor by typing "set lastManorUnlock=0" and then the problem goes away for you.

Since I don't know whether your relay scripts might be causing the lack of manor-unlocking, I can't easily say that the manor unlocking-realization isn't already in mafia.
 
New content has added several areas that can_adv does not know about yet. Run farm in sim mode with a recent version of mafia and a list can be derived. Or I can do that when I get a chance in several hours.
 
Eh, when I want my full list, I run cangoget, which checks through all zones known by mafia to see where an item drops from a monster. But since nobody has reported the ~20 zones that weren't supported, and I still haven't visited them with as much as a single adventure... well, except Thinknerd. But...

What we need for adding new zones is information about when they're unlocked. If mafia tracks them with preferences so we don't need to do server hits, that's optimal. If not, then what is the added link/text in which specific server hit?

Since adding in new locations that people don't actually care about and mafia doesn't track requires additional server hits, I've been a bit leery of throwing them all into the mix. At some point I should just shamble on and put them in though...
 
This season in PvP has the Least Boring Slideshow mini again, so I think some people care about every location. At least, that's what I remember from when I cared about PvP.
 
> Unknown location: The Copperhead Club
> Unknown location: The Haunted Laboratory
> Unknown location: The Haunted Nursery
> Unknown location: The Haunted Storage Room
> Unknown location: The Thinknerd Warehouse
> Unknown location: A Mob of Zeppelin Protesters
> Unknown location: The Inner Wolf Gym
> Unknown location: Unleash Your Inner Wolf
> Unknown location: Sweet-Ade Lake
> Unknown location: Eager Rice Burrows
> Unknown location: Gumdrop Forest
> Unknown location: A Deserted Stretch of I-911
> Unknown location: The Prince's Restroom
> Unknown location: The Prince's Dance Floor
> Unknown location: The Prince's Kitchen
> Unknown location: The Prince's Balcony
> Unknown location: The Prince's Lounge
> Unknown location: The Prince's Canapes Table
> Unknown location: Ye Olde Medievale Villagee
> Unknown location: Portal to Terrible Parents
> Unknown location: Rumpelstiltskin's Workshop
> Unknown location: The Fun-Guy Mansion
> Unknown location: Sloppy Seconds Diner
> Unknown location: The Sunken Party Yacht

CanAdv always returns "true" for all of the following, even though they are sign-specific:

Only if in a "canadia" sign

> Trying to adventure in The Edge of the Swamp
> Trying to adventure in The Dark and Spooky Swamp
> Trying to adventure in The Corpse Bog
> Trying to adventure in The Ruined Wizard Tower
> Trying to adventure in The Wildlife Sanctuarrrrrgh
> Trying to adventure in The Weird Swamp Village
> Trying to adventure in Swamp Beaver Territory

Only if in a "gnome" sign

> Trying to adventure in Thugnderdome
 
Regarding the Gnomes:
Code:
   case $location[Thugnderdome]:
   case $location[Pump Up Moxie]: return gnomads_available() && zone_check("Beach");
It already is running a check for gnomads_available as well as the beach being unlocked. If mafia is returning that the gnomads are available when they aren't, that would be a mafia bug... to clarify, all locations begin with this check:
Code:
    if (!zone_check(where.zone)) return false;
The Canadia zones use this in the zone_check function:
Code:
      case "Le Marais Dègueulasse": return canadia_available();
If that is no longer the zone, then we need to fix that... but it's trying to validate the zone already.

The other bits listed above? Yeah, they need their proper zone checks and specifics for what means which zones are open. With the exception of the top 6, I don't think I have direct access to any of the other locations for testing... but I'll try to get those top 6 accurate ASAP.
 
> ash import <canadv.ash> can_adv($location[thugn], false)

Changing "thugn" to "Thugnderdome" would get rid of this message ()
Returned: false

> ash import <canadv.ash> can_adv($location[corpse bog], false)

Changing "corpse bog" to "The Corpse Bog" would get rid of this message ()
Returned: false
So I definitely don't get the same results as you do on the sign-limited zones. Not sure why. Not sure exactly what check you were doing that said can_adv was passing it as adventure ready.

The two locations remaining that I don't know if mafia tracks internally currently are the Thinknerd Warehouse and the Red Zeppelin. I know that we have questL11Ron for detecting status on the Zeppelin quest, but don't know if mafia tracks if 80 protesters have been cleared yet, unlocking the Zeppelin. If mafia doesn't have tracking for those zones, I'll do it with a server hit-unlock per ascension per user, which is what we used to do for everything, but what I try to avoid as much as possible now. :)

I don't have anything to check the other zones. If people tell me what unlocks what, I can add them in. Otherwise it will just be random guessing and/or marking as always unavailable. Which isn't the BEST strategy.
 
Not sure exactly what check you were doing that said can_adv was passing it as adventure ready.
As you could see from the output I quoted:

> Trying to adventure in The Edge of the Swamp
> Trying to adventure in The Dark and Spooky Swamp
> Trying to adventure in The Corpse Bog
> Trying to adventure in The Ruined Wizard Tower
> Trying to adventure in The Wildlife Sanctuarrrrrgh
> Trying to adventure in The Weird Swamp Village
> Trying to adventure in Swamp Beaver Territory
I was running Kingdom Explorer, which does this:

Code:
		if ( visited contains loc ) vprint( "You have already adventured in " + loc ,"green",5);
		else if (is_forbidden(loc)) vprint( "Not adventuring in: " + loc ,"red",3);
		else if (!can_adv(loc, false)) vprint( "You don't have access to adventure in " + loc ,"red",5);
		else if (have_effect($effect[Fishy]) > 0 && loc.zone != "The Sea") vprint( "Not wasting fishy outside the sea.", "red", 3);
		else {
			vprint( "Trying to adventure in " + loc ,"Blue",3);
			if (adv1(loc,-1,"")) {}
		}
So, obviously canadv( loc, false ) returned true for those locations, even though I was in a gnome sign at the time. It correctly returned true for the Thugnderdome, so ignore that report.

Let's see. I am now in a Canadia sign. I have started the swamp quest by talking to Marty, so I can see The Edge of the Swamp, but have not yet ventured in to it.

> ash gnomads_available()

Returned: false

> ash canadia_available()

Returned: true

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

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Changing "thugn" to "Thugnderdome" would get rid of this message ()
Returned: false

> ash import <canadv.ash> can_adv($location[Camp Logging Camp], false)

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Returned: false

> ash import <canadv.ash> can_adv($location[The Edge of the Swamp], false)

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Returned: false
It correctly tells me that I cannot go to the Thugnderdome.
It incorrectly tells me that I cannot go to Camp Logging Camp.
It incorrectly tells me that I cannot go to The Edge of the Swamp.

Let's try with a character who is in a gnome sign.

> ash gnomads_available()

Returned: true

> ash canadia_available()

Returned: false

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

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Changing "thugn" to "Thugnderdome" would get rid of this message ()
You have the latest canadv.txt. Will not check again today.
Returned: true

> ash import <canadv.ash> can_adv($location[Camp Logging Camp], false)

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Returned: false

> ash import <canadv.ash> can_adv($location[The Edge of the Swamp], false)

Changing "The Frat House (Bombed Back to the Stone Age)" to "The Orcish Frat House (Bombed Back to the Stone Age)" would get rid of this message (canadv.ash, line 379)
Returned: true

It correctly says I can go to the Thugnderdome.
It correctly says I cannot go to Camp Logging Camp.
It incorrectly says I can go to The Edge of the Swamp.
 
OK, my character in the Canadia sign is overdrunk, so canadv was saying false to everything. I commented that line out and now it says that I can get to the Canadia zones and cannot get to the Gnome zone. So, that is OK.

With a bit more instrumentation, here is my gnome sign character:

> ash import <canadv.ash> can_adv($location[Camp Logging Camp], false)

calling zone_check
checking zone Little Canadia
zone_check returned true
Returned: false

> ash import <canadv.ash> can_adv($location[The Edge of the Swamp], false)

calling zone_check
checking zone Le Marais Dègueulasse
zone_check returned true
Returned: true

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

calling zone_check
checking zone MoxSign
zone_check returned true
checking zone Beach
Returned: true
 
Back
Top