Scripting the birth of a new life.

OH Hell! I actually sent you to the wrong directory! I'm so terribly sorry. I'm really glad you were able to find the correct directory for newLife!

Apology!!!
 
Was a little bit confused by whether this was from newLife or BBB, but figured out it was newLife due to the message eventually.
Fantasy Airship: Get the model airship
choiceAdventure182 => 4
Fantasy Airship, Lack of an Encounter: Fight MechaMech for metallic A if you turn up the ML
choiceAdventure182 => 1
In set_choice_adventures() choice 182 is always set to get the airship, which is good because it makes the castle faster. Down below in the if/else path specific zone, we have this:
Code:
	if(have_skill($skill[Torso Awaregness]) && have_skill($skill[Armorcraftiness]) || have_skill($skill[Ur-Kel's Aria of Annoyance]))
		set_choice(182, 1, "Fantasy Airship, Lack of an Encounter: Fight MechaMech for metallic A if you turn up the ML");
	else
		set_choice(182, 3, "Fantasy Airship, Lack of an Encounter: Get Stats");
just before the BIG! line. I don't REALLY care whether it's the airship or the metallic A/stats that win... but the script probably shouldn't be fighting itself about the decision.
 
The second one is a holdover from before the airship/castle revamp. Thanks for pointing it out. I'll rectify it once I have an opportunity.
 
I have altered my own script, but can this be updated to set the choice adventures in the four shrines of the Hidden City to "Place your head in the impression." Or is that too presumptuous of the user?
 
Presumptuous to tell me what you think would make the script better? Nope! Thanks for pointing that out. The feature request will be granted as soon as I have a chance.
 
Presumptuous to tell me what you think would make the script better? Nope! Thanks for pointing that out. The feature request will be granted as soon as I have a chance.


Hah, I meant presumptuous to assume anyone using your script would want those same choices as I do at the start of their ascension. But thank you much for getting around to this eventually.
 
Wouldn't everyone need to use their head before the other choices become meaningful? Is there a different path?
 
Wouldn't everyone need to use their head before the other choices become meaningful? Is there a different path?


I would think so, yes, but I figured I would put the qualifier in there if there was something I didn't know about the new zones. But I believe at the very least, unlocking those zones are a necessary step that any ascender would need to do.
 
[size=+1]newLife 1.14.4[/size]

  • Normally, this script will not call for the Guy Made of Bees in the Haunted Bathroom. If you like to set up the guy made of bees use the CLI command (capitalization counts, so use copy/paste):
    zlib newLife_SetupGuyMadeOfBees = true
  • newLife will chose to get meat in the Bedroom instead of fighting bedstands. If you think you can defeat the bedstands use the CLI command (use copy/paste):
    zlib newLife_FightBedstands = true
  • If you want the script to smash your hippy stone (it is best to break it before your first rollover) use the CLI command (use copy/paste):
    zlib newLife_SmashHippyStone = true
  • There is an option to have the script sell off pork gets to ensure you acquire a detuned radio, seal tooth and stolen accordion. If you do want this, then use the CLI command (use copy/paste):
    zlib newLife_SellPorkForStuff = true


Enjoy the script.

Okay, I installed the script earlier today, and am currently trying to set it up to sell gems and smash the hippy stone. Each time I try that though, I get an error "No setting named 'newLife.SmashHippyStone' exists." I have the latest Mafia build, and ran the set postAscensionScript = newLife.ash line in the CLI too.

Did I miss a step somewhere?

Edit: I found the section in the script that read "setvar("newLife_SmashHippyStone", FALSE);" and changed it to "TRUE". I think that may do it. We shall see.
 
Last edited:
Nope, won't change it if you've ever run the script before. If you've never run the script, that will indeed do it for you. One obvious thing is that you're doing newLife. instead of newLife_, but... there may be more bits as well. :) In general, you'll get better luck posting the output rather than your interpretation of the error message.
 
Nope, won't change it if you've ever run the script before. If you've never run the script, that will indeed do it for you. One obvious thing is that you're doing newLife. instead of newLife_, but... there may be more bits as well. :) In general, you'll get better luck posting the output rather than your interpretation of the error message.

Oh, my mistake. After I pasted the original, I tried various permutations to get it to stick (and evidently posted one of my reinterpretations!) None of them worked.
 
You have to run the script once so the settings are created. Then you will be able to change them.

The setvar() function is actually setvar( settingname, default ). Once the setting exists, the default value is never used, so changing it won't impact existing settings.

Zarqon's recommendation is for scripters to add the following comment in their code wherever setvar() is used:
PHP:
// NOTE: after running this script, changing these variables here in the script will have no
// effect. You can view ("zlib vars") or edit ("zlib <settingname> = <value>") values in the CLI.
This should avoid false hopes :)
 
Two parameter version of buy used. (newLife.ash, line 360)

It is the detuned radio so there is no danger that I can see, but...
 
Any chance of a preference for switching the calling of the login script off? I tend to use my login script for stuff relating to logging in (such as changing clans back to my main clan from the one with best +adv or +pvp, putting back on my outfit I took off in my logout sript - which puts my +adv/pvp one one), and it generates errors here as a result (usually not being able to wear outfit pieces due to having just ascended).

At the moment I've just commented it out in SVN.

I guess it depends what you want from a login script. Mine also sets global preferences that should probably be user (tome preferences etc), which also aren't needed during ascension, though also don't matter.
 
The sneaky way around this for you would be to have your preAscension script set a login script that just sets your normal login script as the login script again. If that makes sense.

preAscension: set loginScript=fixLoginScript.ash

fixLoginScript.ash: set loginScript=normalLoginScript.ash

normalLoginScript: does lots of stuff.
 
May I suggest that the Sneaky Pete-skillgetting is changed to:
Code:
            visit_url("choice.php?option=4&whichchoice=867&pwd");
            visit_url("choice.php?option=5&whichchoice=867&pwd");
            visit_url("choice.php?option=6&whichchoice=867&pwd");
So, three visits instead of 30...
 
Back
Top