Nuclear autumn buff keeper upper

dr3wrocks

New member
So I made a thing and it seems to work pretty well, it'll first check if you have internal soda machine installed, if so it'll run through all the buff skills for nuclear autumn, and it does check if you have it first, if not will skip that skill and will abort if you're too poor to do internal soda machine.

Uh, well, I made this for myself and it appears to work, I figured there might be others out there who'd want it. I can't figure out this SVN thing but I put it on sourceforge as one seems to do so here's this

https://sourceforge.net/projects/useallnaskills/files

This is my first time attempting a script on KOL and hey at least it's functional, i reckon it might could maybe help with some tedium-reduction for other people too.
 

Bale

Minion
Interesting. Though you'd probably want to check to see if the skill's effect runs out or else you'd just cast the skill every time the script is called until you run out of meat. Fortunately there's an easy way to check that.

In addition to checking for the effect being active I made a lot of changes to your script in hopes you see something you'd like to learn.

PHP:
void ICS(int cost) {
	if (! have_skill($skill[internal soda machine]) )
		abort("You don't have Internal Soda Machine... kinda important for this.");

	if (my_meat() >= 60) {
		use_skill( 3, $skill[internal soda machine] );
	} else {
		abort("You're too poor to proceed");
	}
}

void cast(skill sk) {
	if(my_mp() < mp_cost(sk) && my_maxmp() >= mp_cost(sk))
		ICS(mp_cost(sk));
	print("MP over 30, proceeding...", "#0000ff");
	if(my_mp() >= mp_cost(sk))
		use_skill(1, sk);
}

foreach sk in $skills[flappy ears, magic sweat, steroid bladder, intracranial eye, self-combing hair]
	if(have_skill(sk) && !have_effect(to_effect(sk)))
		cast(sk);

You should also refine ICS to check for my_mp() - mp_cost(sk) and only restore the mp needed, but I've done enough.
 
Last edited:

dr3wrocks

New member
Interesting! This code goes way deeper than I expected. Thanks for the input, I'll give this a shot and fuss around with it.
 

Bale

Minion
Oh heck. I just noticed a dumb bug in that code. have_effect() is not a boolean. I meant to check for have_efffect() > 0
 
Top