Scripting the birth of a new life.

If you import "newLife.ash" it will not do anything, except to warn you if you are in an unrecognized ascension path. However, you can then tell it to do everything by calling the function new_ascension();

To be honest though... I'm not sure that is what you want to do. I could be missing something important, but setting _fireStartingKitUsed=true seems like the wrong thing to do. Because you didn't use it yet! Maybe you should have a logoutScript or postAdventureScript that checks _fireStartingKitUsed if you have a Fire starting kit, and if false, then uses it for you.
 
What I want is to not use it the first day of my run, so I just tell mafia that its already been used. (I know not quite accurate, but effective).
 
What I want is to not use it the first day of my run, so I just tell mafia that its already been used. (I know not quite accurate, but effective).

If you don't have one, then breakfast won't use it, right? If you disagree with me, then it isn't hard to do what you desire...

Code:
import "newLife.ash";
void main() {
	set_choice("_fireStartingKitUsed", "true", "Don't use CSA fire-starting kit today.");
	new_ascension();
}
 
Last edited:
Is it possible to include a function to grab a clover in a zombie run?

It invokes breakfast. If your breakfast or breakfast script does that, then you've got your clover. If your breakfast or breakfast script does not do that, then you've got a problem which cannot be solved by newLife. Here's a tiny excerpt from my amazingly awesome login script of Doom:

Code:
		if(my_path() == "Zombie Slayer")
			visit_url("hermit.php");
		else (my_path() != "Way of the Surprising Fist" && my_meat() > 2000 && !in_bad_moon() && hermit(5, $item[ten-leaf clover]));
 
Sure. But it won't help you on day 2 or any successive day. A fix for day 1 only doesn't do much. You should get a breakfast script to take care of it every day.
 
I just threw "hermit;" onto my login line. It's an extra server hit every login, but it gets my clovers when they're free and doesn't when they aren't. Since the request to get them when free automatically got rejected. :)
 
I just threw "hermit;" onto my login line. It's an extra server hit every login, but it gets my clovers when they're free and doesn't when they aren't. Since the request to get them when free automatically got rejected. :)

No wonder I never had as many clovers in ZS as it seemed like I should. I thought BCAscend had been consuming them. :/

I guess it's too late now to go vote for that feature request...
 
Well, if you are running BCAscend it will automatically get the clovers if it thinks it needs clovers so you wouldn't have missed out on that many :)
 
Oh dear. Class Act has required so little of this script that I've just forgotten to release a new version to commemorate the new challenge path. I think that the only new thing is how I control the special() section, but that might be from a previous release, dunno?

Updated newLife to v1.11

  • Class Act version. Just small stuff really.
 
Updated newLife to v1.12

  • First version that works with Jarlsberg.
    Mostly it just knows to use mysticality as your mainstat and that you have no familiars.
 
updated thanks. was wondering if you could add something to newLife to harvest the garden? I forget so often after ascending that I had added it myself, but thought others might benefit from it as well.
 
I assume you don't have Mafia do it automatically as part of the breakfast? Because mine picks pumpkins as indicated by Mafia's breakfast setting just fine when I ascend.
 
newLife runs breakfast and loginScript. If someone doesn't have harvesting as part of breakfast or loginScript I'd think it was wrong to do it. I do it with my loginScript, like this:

PHP:
boolean pick() {
	foreach c,q in get_campground()
		switch(c) {
		case $item[pumpkin]:
		case $item[huge pumpkin]:
		case $item[ginormous pumpkin]:
		case $item[peppermint sprout]:
		case $item[giant candy cane]:
			return q > 0;
		case $item[skeleton]:
			if(q < 0) print("OMG! There is a Humongous Skull in the garden?! It looks DANGEROUS!", "red");
			return q > 0;
		}
	return false;
}

if(pick()) cli_execute("garden pick");
 
hmm i could have sworn i have it set in breakfast because mafia harvests for me every other day, just not the first after i ascend. now that i'm looking though i think it might just be doing that because of what i have set in automation preferences (in-ronin, out-of-ronin). could you hook NewLife into there or do you want to keep it only calling the defined breakfast script? (my breakfast script right now is simply a shell, not doing really anything)
 
I have no idea what feature you are requesting. Please separate your request from your observation and your question. Honestly I didn't understand anything in that post, except that the problem is that you are set to harvest only when you aren't in ronin.
 
I apologize if what I wrote is confusing.

In the preferences for mafia you have the ability to automatically harvest. The choices can be made separately for Ronin and Out-of-ronin under the Automation section of Preferences. (Preferences -> Automation -> In-Ronin, last dropdown)

Correct me if I am wrong, but it seems that NewLife runs whatever is defined in OnLogin which is how you and others get it to harvest upon ascending. For those of us without an OnLogin script a nice alternative would be for newLife to reference the settings in the -In Ronin selection which controls (at least for me) what gets harvested. I have mine set to "Harvest Anything" so I guess what I am asking is if NewLife could reference that section of preferences and execute similar to how mafia already does upon login.


Not being an expert in mafia I may not know all the right terminology, but it seems to me like mafia basically executes the Automation stuff on login in addition to any defined OnLogin scripts. Happy to be corrected if I'm wrong about any of this.
 
Back
Top