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

That line's always been a bit screwy, since $location[Boss Bat's Lair].to_url() returns adventure.php?snarfblat=34. Possibly a Mafia change along the way?

Not a mafia change, a KoL change. Back in March, KoL changed that to be more sane. They didn't bother to post it as a trivial update, but the problem was discussed in this thread at the time.
 
Since the sewer change, the lucky/unlucky sewer lines should probably be removed. Or just always return false, but that'll probably break scripts using this even harder. :)
 
Yes, must be removed, actually.

To go into a little more detail;
If you get this error:
Bad location value: "Sewer With Clovers" (canadv.ash, line 156)

then delete lines 156 and 157 from canadv.ash 0.62

case $location[Sewer With Clovers]: if (!itemcheck($item[ten-leaf clover])) return false;
case $location[Unlucky Sewer]: return (itemcheck($item[chewing gum on a string]));

and everything will work again.
 
Last edited:
0.7 Updates!

Added all missing zones, improved a few others, and rolled in all previously mentioned fixes in this thread. First post version is good again, for now.
 
Question/possibility. Was looking at CounterChecker and wondered whether this bit might be used as a check for hobopolis zone unlock:
Code:
  if(!visit_url("town_clan.php").contains_text("clanbasement.gif") 
    || visit_url("clan_basement.php?fromabove=1").contains_text("not allowed"))
    return false;

Or in more proper canadv style:
Code:
  if(!contains_text(visit_url("town_clan.php"), "clanbasement.gif")
    || contains_text(visit_url("clan_basement.php?fromabove=1"), "not allowed"))
    return false;

CounterChecker also looks for individual "zone cleared" gifs, but only includes that the PLD is purplelightdistrict11.gif, no others (as that's the only semi-rare in hobopolis currently included).
 
Running farm.ash (dj_d's script) it returns:
Bad location value: "Typical Tavern" (canadv.ash, line 135)

Line 135 of canadv.ash reads:
case $location[Typical Tavern]: return (levelcheck(3));

I am using r8733. This error has been happening on multiple builds.

edit: I guess I was using a wrong version of canadv.ash. I updated to the one in the first post and now I get an error in farm.ash. (line 23).

another edit: I fixed the farm.ash error. So it is safe to ignore this entire post.
 
Last edited:
Finally there's a simple fix to knowing if the beach is unlocked!!

November 02
There is now a bus pass for sale at the Market that allows travel to Desert Beach. It won't show up if you've already got a car.
November 02, 2010 - The bitchin' meatcar can no longer be Untinkered. Commence to grumbling.

Either you have a meat car or a bus pass. Meat cars can no longer be untinkered so you've gotta have it! (Well, people can have untinkered their meat cars in the past and still have access to the beach, but except for those people this will work.)
 
One more zone that needs fixings...
Code:
   case $location[Knob Goblin Kitchens]:
   case $location[Knob Goblin Treasury]:
   case $location[Knob Goblin Harem]: return(levelcheck(5));

Problem is that they don't actually unlock when you hit level 5... they unlock when you find/use the encryption key. I've had a few turns of confusion where I expected them to work properly and it instead returned that I couldn't do that adventure... Better check would probably be something more like the Bathole, maybe:
Code:
case $location[Knob Goblin Kitchens]:
case $location[Knob Goblin Treasury]:
case $location[Knob Goblin Harem]: if (!levelcheck(5)) return false; return (perm_urlcheck("knob.php",to_url(where)));
 
I think with the new Friar's Change, canadv needs to be updated.

Bad location value: "Friar's Gate" (canadv.ash, line 222)

To use Pandamonium, instead.

As well as:

Belilafs Comedy Club
Hey Deze Arena
 
Last edited:
Here are my tweaks... Pandamonium, Belilafs, Hey Deze, Hobopolis, Knob Goblin insides, etc. Maybe a few other zones.
 

Attachments

Eh, just trying to ease things while zarqon keeps us all in a combat haze. :) He'll update once that gets less pressing, but at least it'll run people onwards for a bit. :)
 
Back
Top