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

True. If, at some point, mafia actually tracks if people have selected to have KoL no longer limit their adventuring, at that point we can make stat requirements no longer matter. Until that point when it's tracked...

Or mafia could simply allow adventuring in those areas by clicking the button to temporarily allow it.

Perhaps someone should open a "New Content" thread to discuss what to do about this issue. Oh never mind, I'll just go copy these posts to a new thread myself.

Gotta go and minion this.

Edit: Please continue this discussion HERE.
 
Last edited:
There is an error now with the new castle location. Since I am still a scripting noob I am not sure how to get the new locations in and working properly.
I am thinking each floor would need its own set of conditions.

Multiple matches against Giant Castle.
Bad location value: "Giant Castle" (canadv.ash, line 236)

and the offending line

case $location[Giant Castle]: return (primecheck(95) && item_amount($item[S.O.C.K]) + item_amount($item[intragalactic rowboat]) > 0)
 
Apparently I didn't see the update on the 21st. :/ I did look at the changelog.

/me slinks back to his corner.

Plus side was that my line of thought was correct on how to fix it.
 
Last edited:
The check is also not perfect. I guess this is due to Mafia not yet tracking if you've opened the different floors yet (discovered when my famring script aborted today with the message "Conditions not satsified after X turns" while in the Sea and the condition was to get the pacifiers for the giants. Said multi had not opened the castle at all so thus only had access to the bottom floor.
Just a little "user beware" story :)
 
Yeah... waiting for Bale's unlock request or something similar to get implemented. If nothing happens there for over a month, I'll probably just try to scrape something together... but it's going to be a multiple server-hit solution, since they have all the areas visible and there's no obvious change. It's all on you to know what you've done right now. :( Ah well.
 
CanAdv is acting a bit weirdly for me, it's telling me I can't adventure in places I can obviously adventure, as such:

PHP:
> 
ash import canadv.ash; can_adv(to_location("Spooky Forest"), false);

Returned: false

> ash import canadv.ash; can_adv($location[Spooky Forest], false);

Returned: false

I'm level 30 in aftercore so I obviously can adventure in the spooky forest. I'm using r11942 if it makes any difference. What can I do to debug this?
 
Are you overdrunk? 0 health? No adventures left? Any of those will cause it to (correctly) tell you that you can't currently adventure there.
 
Ahh, yeah I had overdrunk already. I thought that with the false to adventure it would just tell me if it's just accessible or not, guess I misread that XP
 
Yeah... with verbosity set to 6 or above, you should see this:
Code:
   if (my_inebriety() > inebriety_limit()) return vprint("You sheriushly shouldn't be advenshuring like thish.",-6);
but most people don't run that high for normal executions. Because that makes canadv rather chatty. :)
 
Unknown location: Video Game Level 1
Unknown location: Video Game Level 2
Unknown location: Video Game Level 3
Unknown location: The Coral Corral
Unknown location: Mer-kin Elementary School
Unknown location: Mer-kin Library
Unknown location: Mer-kin Gymnasium
Unknown location: Mer-kin Colosseum
Unknown location: The Caliginous Abyss
Unknown location: Edge of the Swamp
Unknown location: Dark and Spooky Swamp
Unknown location: Corpse Bog
Unknown location: Ruined Wizard Tower
Unknown location: Wildlife Sanctuarrrrrgh
Unknown location: Swamp Beaver Territory
Unknown location: Weird Swamp Village

The video game levels should just require a check for either a "GameInformPowerDailyPro Walkthru" or "GameInformPowerDailyPro magazine". Not sure about the other locations it reported as unknown.

Edit: Actually, it probably is more complicated than that. Only one level is available at a time. if visit_url("da.php") does not contain "faqdungeon.gif" but you do have a "GameInformPowerDailyPro magazine" in inventory then Level 1 will be reachable (by using said magazine). When I'm not drunk and have more adventures, I'll have to see if I can figure out how to tell which level is open.
 
Last edited:
Some things we can try to guess. If the sea is available and you have crappy+, elementary and gym are available. Library is only available when you have the scholar outfit, same for gladiator and colosseum. Mafia doesn't track which members of the family are rescued, so we can't be accurate on the abyss, but we can make wild guesses. Same on the Canadia quest... we can check moon sign, but that's basically it. Ah well. Will try to do that after I nap. If I remember. Been sick since before the weekend, and this doesn't lend itself well to accuracy.
 
Switched from my local CanAdv to the SVN one, edited out the ZLib var (I just completely removed guild unlocking since it takes turns, which I am fairly sure is/was outside the scope of this script), then ran a script similar to my old Checklist. I suddenly had fewer options than before the update, and the reason was mainly due to defiled zones. Posting the fix here:

PHP:
   case $location[Defiled Nook]: return (levelcheck(7) && itemcheck($item[evilometer]) && get_property("cyrptNookEvilness").to_int() > 0);
   case $location[Defiled Cranny]: return (levelcheck(7) && itemcheck($item[evilometer]) && get_property("cyrptCrannyEvilness").to_int() > 0);
   case $location[Defiled Alcove]: return (levelcheck(7) && itemcheck($item[evilometer]) && get_property("cyrptAlcoveEvilness").to_int() > 0);
   case $location[Defiled Niche]: return (levelcheck(7) && itemcheck($item[evilometer]) && get_property("cyrptNicheEvilness").to_int() > 0);

Also, might I get commit access to therazekolmafia-canadv? I promise to uncomment the ZLib var back in when I commit changes.
 
Also, might I get commit access to therazekolmafia-canadv? I promise to uncomment the ZLib var back in when I commit changes.

Theraze, for a subproject I believe that the best way to do this would be to create a new permission group at therazekolmafia called canadv and add zarqon to that group. Then on the subproject page for CanAdv, grant that group update permission. I'm not sure if they need to be given update permission on the therazekolmafia page.

Remembering the original intent for CanAdv to be a community project, it occurs to me that svn would make that a lot easier. Could you give me update permission also (Balefull), there has been a couple of times I would have been moved to make a contribution if I could have simply done it.
 
Hopefully that will work. canadv group has balefull (must be lowercase) and zarqon added to it. Project permissions are Admin/Admin, *anonymous/Read, canadv/Update.
 
r12264
Just started receiving the following:
the knob shaft
the knob shaft (mining)
Multiple matches against Knob Shaft.
Bad location value: "Knob Shaft" (canadv.ash, line 226)
and
mcmillicancuddy's back 40
mcmillicancuddy's other back 40
Multiple matches against Back 40.
Bad location value: "Back 40" (canadv.ash, line 389)
and
mcmillicancuddy's bog
the corpse bog
Multiple matches against Bog.
Bad location value: "Bog" (canadv.ash, line 392)

And I think the following is also from canadv
The string "Outskirts of The Knob" no longer matches a location name; use "The Outskirts of Cobb's Knob" instead
The string "Bat Hole Entryway" no longer matches a location name; use "The Bat Hole Entrance" instead
The string "Giant Castle (Basement)" no longer matches a location name; use "Castle in the Clouds in the Sky (Basement)" instead
The string "Giant Castle (Ground Floor)" no longer matches a location name; use "Castle in the Clouds in the Sky (Ground Floor)" instead
The string "Giant Castle (Top Floor)" no longer matches a location name; use "Castle in the Clouds in the Sky (Top Floor)" instead
The string "The Domed City of Grimacia" no longer matches a location name; use "Domed City of Grimacia" instead
The string "The Domed City of Ronaldus" no longer matches a location name; use "Domed City of Ronaldus" instead

I take it r12264 made quite a few changes to place names that breaks canadv.ash?
 
Last edited:
I just tried to update the project, but I could not. I guess Theraze failed to add me and zarqon properly? :(

Anyway, I'll attach a fixed version here until Theraze gets around to updating the svn.
 

Attachments

Here's a CanAdv that doesn't give any helpful warning messages for imprecise typed constants. I also tried to commit this to SVN but was unable to, alack!

EDIT: Changed file to retain ZLib var for allowing auto-guild-unlocking.
 

Attachments

Last edited:
Back
Top