Sots Parcel.ash script request

snooty

Member
Or omgursodumbyoucantdoash.ash, whatever you want to call it ;) If someone would be willing to whip up a .ash script that will do everything so I never ever have to click in the browser (talk to the Sot, adventure at location X, return and collect milk cap) that would be awesome and I'd be your best friend. And give you a shiny Mr. Accessory (per hour). Doesn't have to be fancy, I don't care about optimization, just getting it done (no need to worry about fams or outfits).

Thank you!
 
Most of the pieces are already in KoLmafia. I was going to script it but then several things stopped me.
  • There were one or two parcel locations that I had difficulty mapping to a location that KoLmafia knew.
  • Some locations had prerequisites and I was too lazy to detect and meet, such as Cold resistance and the Icy Peak.
  • Some locations were impossible - such as the Hidden Shrine.
I think some of the above have been addressed on the KoL side and others are easier than they once were because of the canAdventure work so maybe I should stop being lazy and put something together.
 
Most of the pieces are already in KoLmafia. I was going to script it but then several things stopped me.
  • There were one or two parcel locations that I had difficulty mapping to a location that KoLmafia knew.
  • Some locations had prerequisites and I was too lazy to detect and meet, such as Cold resistance and the Icy Peak.
  • Some locations were impossible - such as the Hidden Shrine.
I think some of the above have been addressed on the KoL side and others are easier than they once were because of the canAdventure work so maybe I should stop being lazy and put something together.
If I can help in any way, please let me know. I have a small army of abandoned accounts that I collected over the years (and run every day). I'm almost done for the day, but I'll try to remember to check back before I start up tomorrow. Thanks for replying!
 
What does this mean?

The text as I extracted it was not an exact match for a location. I have not seen that in a while so KoL or KoLmafia may have changed things. It was one of the reasons I did not write the script several weeks ago but it is probably not a good excuse now :-)
 
Well I am committing myself since I want it anyway. Not sure how quickly it will happen since I am nominally on vacation but I have convinced myself the problems are opportunities and that I don't have to get it 100% on the first release. Stay tuned.
 
Version 0.4

It worked once, for me.

Your CCS needs to handle fights.

If everything else is OK it will adventure 15 times looking for the parcel. Manual experience suggests that a failure could be a sign of something the script is not handling properly.

It should be safe to restart if you accept the possibility of wasting turns in the wrong place because of a scripting error.

The next big thing is I want to try and handle prerequisites for an area before going there. Cold resistance for the Peak is one.

After that I think I want to repackage it so that it is easily used elsewhere. For example I think the pieces are there to already handle everything (else) typically done at the Speakeasy so there could be a daily Speakeasy script. I also might use this as an opportunity to host a script on GitHub.

No gifts are appropriate. I used at lot of what @ckb had done at https://kolmafia.us/threads/deed-to-olivers-place.28276/#post-171053 and just tweaked things to use KoLmafia support that was added since the post.

Save the file and put it in scripts/
 

Attachments

Thank you! I'll give it a whirl tomorrow, and also see if I can't at least add some collectibles to your DC 🥰
 
Latest version.

I added can_adventure as a sanity check and prepare_for_adventure as a precaution.

I am thinking about what happens if there are choice adventures in an area but am not sure the code is especially robust if there is an unhandled choice.

I should parameterize a couple of things and do some restructuring so that it can be easily called from other scripts and play nicely. Using abort to exit makes a point but not necessarily the right one.
 

Attachments

I've run the new version 4 times so far with 0 issues. Largest turn count was 17 at the Pirate's Cove (60% combat rate there though). One of them even went to the gingerbread thingitz where I had precisely 0 choices set (and no aborts). I guess it's possible those advs just weren't encountered.
 
Okay, one issue, mafia's insisting (or the script is) I can't adv at the hippy camp for some reason. I beat up frat boys in the war, so, this really makes no sense.

Code:
> call sot.ash

Talking to the Milky-Eyed Sot
Cannot adventure at The Hippy Camp
 
Okay, one issue, mafia's insisting (or the script is) I can't adv at the hippy camp for some reason. I beat up frat boys in the war, so, this really makes no sense.

Code:
> call sot.ash

Talking to the Milky-Eyed Sot
Cannot adventure at The Hippy Camp


I will look at that. It could be a KoL thing or a Mafia thing or a script thing.

For example there is no area in adventure.txt called "The Hippy Camp". It may be the parsing is dropping "(Bombed Back to the Stone Age)" or something added a "The".

Thanks.
 
Ran into one more at "the heart of the hidden temple", it went into a kind of loop (even though choices were selected for the area) until I made a choice in the browser, then it carried on with no prompting from me. For that one, it could be the choices I had set were strictly quest related and not applicable in aftercore. If I run into it again I'll pay a bit more attention, I was short on time today, sorry :(
 
"heart of the hidden temple" is interesting to automate. I was debugging a script of @zarqon 's and it turned out that when I did it manually it took one more step to open the temple than his script expected to need. That also might be a script problem because I know there is a right way to script following choices but I'm not certain I did it.
 
That is an interesting sequence because it has a chain of numbered choices, followed by a “what now” page where the single link is simply choice.php, then a sequence of tiles.php, and finally another choice with three options.
 
Latest version. Mostly cosmetic changes except it won't start if there are not "enough" adventures.

I think The Hippy Camp may be a KoL or KoLmafia thing. Mafia gets the location and then the script says it can't adventure there. The string the script printed comes from mafia so either KoL made a mistake or mafia didn't parse. I'm inclined to tweak mafia so mafia can detect that, as the first step towards a fix.
 

Attachments

adventures.txt has "Hippy Camp", not "The Hippy Camp".
Right. But what I can reconstruct after the fact was that KoLmafia's parsing found "The Hippy Camp". Playing with the regex makes me think KoL included the "The". I will eventually get a PR that provides more information when the parsing does not yield an exact location.

Playing with the regex also suggests that when Hippy Camp has a qualifier, such as an outfit or stone age status the complete location is extracted.
 
I just told you what the issue is.

Yes, KoL said “The Hippy Camp”, the regexp extracted that, PlaceRequest put it into the property.

Ergo, if you expect a script to be able to do get_property().to_location(), you will have to fix PlaceRequest to to do some post processing before storing the property.

I would be surprised if you can do that by modifying the regexp, since there are real locations that have a The in them.

The Sot quest is in the quest log/charpane, right? Do we parse it from there, too? What does that say?

I see HTML test fixtures under test/root/request.
You’ll want to get some for the Hippy Camp and update the tests…
 
Back
Top