Scripting the birth of a new life.

StDoodle

Minion
Local; my desires for AZ / netural time were for something else (clan management-related; stash-sharing & such).
 

Bale

Minion
It's worth noting that if you were in any other clan, I'd consider this a feature that I should take care of on my own; but you're one of us. ;)

I think I already volunteered, but there's no way I could turn down a brick guardian asking me for a favor. If I did, there's no telling what you'd do with those bricks. O.O

PHP:
void campground() {
	// If the player is in Hardcore Nation it is time to send a "Please brick me" announcement!
	int my_clan;
	matcher clan = create_matcher("whichclan\=(\\d+)", visit_url("showplayer.php?who="+ to_string(my_id())));
	if(clan.find())
		my_clan =  clan.group(1).to_int();
	if(my_clan == 41543)
		chat_clan(now_to_string("MM/dd/yyyy hh:mm aaa") + " - Welcome Back to the Kingdom of Loathing. Noob.");
	// Put up the tent... after a suitable bricking window.
	if(vars["newLife_UseNewbieTent"] == "true" && item_amount($item[Newbiesport™ tent]) > 0) {
		if(my_clan == 41543) {
			vprint("We need to give all rivals... Um, I mean clannies a chance for bricking!", "olive", 2);
			wait(60);
		}
		use(1, $item[Newbiesport™ tent]);
	}
}

I think I'll make that non-optional for HCN clannies. If you ascend, it WILL inform everyone. If you it set to auto-tent it will then pause 60 seconds before tenting so that there is an adequate brick window.

I may put in a preference for non-clannies to enable it, but they won't have the 60 second wait time.

Expect the update sometime later tonight.
 

StDoodle

Minion
Hmm... what happens if mafia & relay browser chat are closed and you use chat_clan()? I assume that as a void type it does nothing, but...
 

Bale

Minion
Interesting question. I tested it in a private clan. Apparently this is what happens:

[18:01]
Players in channel clan:*Bale (1*total)

[18:01] Multi: Testing...
[18:01]
Players in channel clan:*Bale, Multi (2*total)

[18:02]
Players in channel clan:*Bale, Multi (2*total)

[18:03]
Players in channel clan:*Bale (1*total)

Multi did not open a chat window and was not using the relay browser at all, but it sent the chat_clan() message and appeared in chat for a few minutes and then disappeared. I'd say it worked.
 

Bale

Minion
Updated newLife to v1.62

StDoodle will hate me for reorganizing many of the functions, forcing him to adapt his script that calls mine. :) I had reasons for all of that, but I hope it doesn't cause too much trouble.

The biggest difference is that HCN members will now find that they are shouting out their ascensions in clan chat and being forced to wait a mandatory 60 seconds to put up their tents. HCN members now have exactly 60 seconds to brick if the tent was automatic. Enjoy the clan awesomeness, like it or not!
 

StDoodle

Minion
Ooh, one thing (that I keep forgetting, it's from a while ago):

Choice adventure #182, airship lack of an encounter: shouldn't this be set to combat for HC folks or lucrecore folks? I find it helpful for getting the metallic A (and obviously it'd be nice if on a hunt). This one's really marginal either way, but if you're going to make one decision vs. the other, I think the option that helps with an NS-required option seems safer. But to each their own. ;)

Also, I love the additions! My script is down to 20 lines (or less, since some are blank / comments) now. ;) If you're curious:
PHP:
import "newLife.ash";

boolean sugar = true; //for below

void main() {
    if (in_bad_moon()) abort("No automatic setup for Bad Moon; you're on your own!");
    //do stuff from Bale's script
    new_ascension();
    //fix Bale's choice adv. 'mistakes'
    set_choice(182, 1, "Fantasy Airship, Lack of an Encounter: Combat");
    if (in_muscle_sign()) { change_mcd(10); }
    else if (in_mysticality_sign()) { change_mcd(11); }
    if (sugar) {
        //use tomes
        use_skill(2, $skill[Summon Sugar Sheets]);
        use_skill(1, $skill[Summon Stickers]);
        use_familiar($familiar[He-Boulder]);
        cli_execute("make 1 sugar shirt; make 1 sugar shield; equip sugar shirt; equip sugar shield");
    }
}
 

Bale

Minion
Choice adventure #182, airship lack of an encounter: shouldn't this be set to combat for HC folks or lucrecore folks? I find it helpful for getting the metallic A (and obviously it'd be nice if on a hunt). This one's really marginal either way, but if you're going to make one decision vs. the other, I think the option that helps with an NS-required option seems safer. But to each their own. ;)

I use a script in my mood to fix that one, changing the adventure based on circumstances. You'd be right that the metallic A is a better default, but that is dependent on having +20ML which not everyone will have all the time. (It's really only easy to attain if the character has torso+armorcrafting or ur-kel's.) Without the ML, the adventure is a waste. :( That's why I made the decision that to set it this way. Obviously your millage varies.
 

Bale

Minion
Updated newLife to v1.63

This is the Fantasy Airship change that StDoodle just suggested where your preference is based on your permanent skills. Looks like StDoodle gets to remove another line from his script.



PHP:
    if (in_bad_moon()) abort("No automatic setup for Bad Moon; you're on your own!");

Really? I think that most, if not all, of my choice adventure settings are still relevant in Bad Moon. A lot of the rest also, though they are less troublesome to do manually.
 
Last edited:

StDoodle

Minion
There are certain things, like meat management, that I'm much more careful of in bad moon (or would be, if I went back). Yeah, ideally, I'd just call a certain sub-set of the functions from your script. But since I haven't been BM in forever and don't plan to return soon... meh. ;)
 

Theraze

Active member
Having been in Bad Moon for the last several months, have to say that I do still use most of the parts of the script in BM, though certain actions that wouldn't normally be so become more appealing... the 'trivial' meat gain in the bedrom of ~500 meat becomes relatively valuable, when it comes up. And I'll set all primestats to collect the ballroom curtain moxie, so I can outmoxie the various bosses that would otherwise be expensive/thoughtful to beat. But yeah, newLife is still useful for BM, in my case at least. :)
 

Bale

Minion
How about a buggedbear? That can be +20 ML in HC too, right?

Yeah, it certainly can be. I like it so that I can easily run at +40ML. I huggle my buggedbear. However I'll leave it like this. If someone doesn't have those skills they might not be ready for surviving at that ML. That preference is one that needs to be adjusted in-run anyway, so it is really not a high priority to pre-set on ascension.
 
You know what I keep forgetting, since the 3 turns really don't mean that much to me... to visit the artist. Especially on my hc characters, whisker meat is pretty nifty.
 

Bale

Minion
You could always edit that in, but I don't intend to add anything to this script that could cost a turn.
 
OK, this is going to sound like a stupid question. I got town_wrong.php?place=artist but how do I push the button on that page?
 

Winterbay

Active member
Use the Mini-Browser and navigate to the artist and click the button. This will tell you the URL submitted to KoL.
 
Top