Goofballs

fronobulax

Developer
Staff member
I would like to automagically get free Goofballs whenever they are available or at least be reminded.

  • KoLmafia could be changed to do this unconditionally
  • KoLmafia could be changed to add this to the Pre-Ascencion list of things people forget.
  • I could add it to Pre-Ascension script that I have not yet written.
  • I could petition Bale to add it to his Woods relay override, and hope I remember to run it at least once per run.

I seem to recall that this has been discussed and either it is not as easy as it seems or there are folks with loud objections to having this done for them. I'm inclined to add it to the list of thing folks forget (and am willing to be the dev who does that) but I figured I'd get some opinions before I charge off and do something.

Thanks.
 

lostcalpolydude

Developer
Staff member
I would like to automagically get free Goofballs whenever they are available or at least be reminded.

  • KoLmafia could be changed to add this to the Pre-Ascencion list of things people forget.
  • I could add it to Pre-Ascension script that I have not yet written.
These approaches would require tracking whether you have picked up goofballs this run. If tracking is added, then making it an int rather than a boolean to increase the potential usefulness to other applications makes sense. I'm assuming that ValhallaDecorator won't be hitting tavern.php?place=susguy every time it is loaded.

  • KoLmafia could be changed to do this unconditionally
This only makes sense for people that haven't already picked up goofballs this run, and the tracking for that will be off when this is initially implemented for anyone that manually grabs goofballs before the change, so this approach will end up costing people some meat.

  • I could petition Bale to add it to his Woods relay override, and hope I remember to run it at least once per run.
His script only does something when you don't have a continuum transformer as it goes to pick one up, and you don't have access to goofballs then (under normal usage where you go to the woods before adventuring in the Spooky Forest), so it wouldn't help there.
 

Bale

Minion
  • I could petition Bale to add it to his Woods relay override, and hope I remember to run it at least once per run.

There's no way to figure out if you have gotten goofballs without a server hit. I can't even fake it well because on first visit to the woods you will not have access to the Tavern.

I recommend you do what I did. Simply add this function to your preAscensionScript. (And of course, have it called from main)

Code:
void goofballs() {
	if(visit_url("tavern.php?place=susguy&pwd").contains_text("First bottle's free, man")) {
		print("I know they're bad for me, but... \"Hey! Free Goofballs!\"", "olive");
		visit_url("tavern.php?action=buygoofballs&pwd");
	}
}
 

fronobulax

Developer
Staff member
Thanks. For whatever reason I tend not to look at the Woods in the relay browser until the Tavern is open so I was thinking the script could do more than it does.

I remember why this didn't happen before - if it has to be a preference in mafia then that is more work than it is worth. But why does it have to be a preference? Why not make it a link on the Ascend page that only appears if the goofballs are free. The answer could be cached but in the worst case there is just one (more) server hit every time the page is loaded and I don't think that violates the KoLmafia ethos. Maybe there are other opinions on that point? Maybe it is not as easy as checking a link, even though Bale's ash code suggests otherwise?
 

lostcalpolydude

Developer
Staff member
It is as simple as that. The only pages mafia currently checks when loading that page are trophies and correspondents. Mostly it's deciding if hitting that page is worth the benefit.
 
Top