Scripting the birth of a new life.

What breakfast request?

Can we get a preference for check_breakfast()? Sometimes that starting MP is too precious to burn on summons.

I edited it into the post, which might conceivably caused the addition to not get cached or something. OTOH you did quote me as saying "Four requests..." which I edited in at the same time. Curious.

Probably. Give it a try and let us know for sure!

Will do!
 
This script checks the two settings, and if they don't match your familiar, pops a dialogue. Since only two buttons are allowed, "yes" = "change the two settings to match the current familiar" and "no" = "fix it yourself, or ignore, but at least you were warned."

Code:
// set loginScript = check100familiar
import <zlib>;

void main()
{
    if(
        (get_property("bcasc_100familiar")!=my_familiar() || vars["is_100_run"] != my_familiar())
        && user_confirm( "is_100_run and/or bcasc_100familiar do not match your current familiar! change settings? (if you want to change familiar click no and fix manually)"))
    {
    	// bcasc setting
	    set_property("bcasc_100familiar", my_familiar());

	    // zlib setting (shared across scripts)
        vars["is_100_run"] = normalized(my_familiar(),"familiar");
        updatevars();
    }
}
 
I edited it into the post, which might conceivably caused the addition to not get cached or something. OTOH you did quote me as saying "Four requests..." which I edited in at the same time. Curious.

I see it now. The probable reason for the disconect is that you edited it into the post after I read it, but before I clicked "reply with quote". Then I simply snipped out the part I wanted without bothering to read the stuff that I thought I had already read. I could simply have a preference to "do not automatically use resources" which will prevent breakfast and selling pork gems both. How does that sound?

This never troubles me since I have my hardcore breakfast set to NOT automatically cast anything that I might be short of MP for. I've got a breakfast script that checks if I have sufficient MP/meat before casting those summonings, like this snippet:

PHP:
if(have_skill($skill[Summon Alice Army Cards]) && get_property("grimoire3Summons") == "0" && my_mp() > 30)
	use_skill(1, $skill[Summon Alice Army Cards]);
	
if(have_skill($skill[Summon Crimbo Candy]) && get_property("_candySummons") == "0" && my_mp() > 25)
	use_skill(1, $skill[Summon Crimbo Candy]);

(my_path() != "Way of the Surprising Fist" && my_meat() > 2000 && !in_bad_moon() && hermit(5, $item[ten-leaf clover]));

if(visit_url("main.php").contains_text("map7beach.gif"))
	cli_execute("raffle 5 " + (can_interact() && my_meat() > 6000? "inventory": "storage"));

if(have_skill($skill[Lunch Break]) && get_property("_lunchBreak") == "false" && (my_mp() > 50 || can_interact())) {
	matcher lunch = create_matcher("That jerk (.+?) stole your lunch again!", 
		visit_url("skills.php?pwd&action=Skillz&whichskill=60&skillform=Use+Skill&quantity=1"));
	if(lunch.find())
		print_html("<font color='olive'><b>"+lunch.group(1)+"</b> stole your lunch, but you got a sack lunch from the next guy!</font>");



Would a loginScript be a superior solution for you?
 
Last edited:
I could simply have a preference to "do not automatically use resources" which will prevent breakfast and selling pork gems both. How does that sound?

Not very good since I want to sell my pork gems, buy a detuned radio, get a seal tooth, etc. :D
 
Call me fussy, but I do want to keep extra options to a minimum. How does the loginScript solution sound? After all, if you have that stuff in your breakfast and you log out it will be executed the next time you log in even if you cannot afford it.
 
erm.......running v1.8.6.1 for an HCO ascension throws a warning box saying "Your current challenge path is unknown to this script!"
 
Ha! Figures! It's been a long time since I used the dietary paths so I wasn't even thinking of them. Not hard to fix if I know the answer to one question: What does KoLmafia say when you copy/paste ash my_path() to the command line?
 
Hmm... According to AccountRequest.parseAccountOptions() the path string should be one of the following:

"Oxygenarian" :
"Boozetafarian"
"Teetotaler"
"Bees Hate You"
"Way of the Surprising Fist"
"Trendy"
"None"

But in AccountRequest.parseStatus(), the path is set to whatever is in the "path" field of api.php, with the exception of "4", "6" and "7", which are transformed into "Bees Hate You", "Way of the Surprising Fist" and "Trendy" respectively. It looks like api.php has "path=3" for Oxygenarian, but Mafia doesn't turn the "3" into "Oxygenarian". It looks like it should be done.

Jwylot: could you visit KoL's options -> account menu via the Relay Browser, then check if my_path() still returns "3"?
 
Updated newLife to v1.8.6.2

  • Recognize Dietary Paths: Teetotaler, Boozetafarian, Oxygenarian


In case anyone is curious, the reason that it needs to recognize those paths is so that when KoL adds a new seasonal path my script will realize that it has become outdated. It can only know if it is facing something unforeseen if it recognizes all the currently existing paths.
 
Thanks slyz, though you're gonna make me regret listing 1,2 and 3 as paths. Fortunately I also listed the normalized names as valid paths so I got it both coming and going. :)
 
Could you try doing "ashq my_path()" with r10127 (without visiting the Account options)? It should now return Oxygenarian instead of 3.

Yup that seems to work fine now Slyz, thanks.
Code:
> ash my_path()

Returned: Oxygenarian
 
Just wondering... is there any reason not to have accepting the artist's quest in newLife? Whether you care about outfit tattoos or not, the extra meat from whiskers should be worth the 1-3 adventures it adds (depending on if you go to the alley).

Guild quest too, for that matter. It's always the same url to start the quest regardless of class, right?
 
Some people might not want to add the 1-3 adventures.

I presume these are 1-3 adventures because if the quest is active and you adventure in the area then the adventures giving the items might occur? If so, then I would want auto acceptance of the quest to be optional even if I personally would always enable the option.
 
I presume these are 1-3 adventures because if the quest is active and you adventure in the area then the adventures giving the items might occur?

Correct. In reality you are losing less than a full turn since there is delay() to burn off in those zones, but it's still something that someone concerned about speed would not want to do.
 
Back
Top