Ascend.ash: hands-off ascension script

@darius: It's not a scripting problem like "I'm not sure what function to use", it's a scripting problem like "computers aren't very good at this sort of thing so I have to laborously map out every possibility, and when that's done, lots of people will disagree with the decisions I made". Makes eatdrink look like a calkewalk by comparison.

Re: the error, try putting everything (including macguffin.ash) in the same directory as kolmafia itself.
 
I had a similar problem with 'trash in the sky' quest. Before I reached any loops similar to that (there was some strange behavior) I hit the 'wheel in the sky' non-combat but it didn't head to the council to complete the quest. When I later checked what happened (was not watching completely initially) and used the relay to visit the council - I finished the quest. It'll be another ascension before I can test that again.

As per restoring HP/MP while adventuring using visit_url, it would be easy to adapt Universal_recovery.ash (changed the main to a unique name to be called and just called it with amount = 0 for both "HP" and "MP" - this way it only recovers up to your set target in mafia).
 
@darius: Yes, I've thought about adding outfit management, but it gets complicated fast. If you maximize your moxie, do you have enough strength to kill the monster in 30 turns? If you maximize item drops, maybe your stats drop so low you get beaten up. Etc.
Im currently rewriting equipt (used to be maximize) for better script support and new options, instead of just specifying a modifier to get, you can limit the number of items of that modifier it will add, or limit based on value so you could search for 50 moxie and the script would try and add the best items until it reaches (or exceeds) that value
you can also specify if the script is allowed to pull items (and if so how many pulls)

if there is any sort of export function (or new feature) that will be usefull drop me a PM and ill see what i can do
 
'nother little strange bugette - trying to do something after it should have finished -

Code:
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

Leveling up to 6 - trying .
Could not find function named "" to call (Ascend.ash, line 1292)

Thinking about the " mafia thinks combat has finished" problem, I've noticed it always seems to the be the first combat after a non-combat - Anyone else noticed this?
 
Incidentally, what problems are people having with MP/HP restoring with this script? It always seems to do this for me, though, having a quick look at the code, it seems to be commented out.

The Autobhh script uses this code (my fix , not my code, see original post here:- http://www.kolmafia.us/showpost.php?p=6549&postcount=17 )

Code:
		# here, either combat is over, or you hit a noncombat
		# now, lets restore HP and MP, as well as maintaining our mood
		if(check_restore("hpAutoRecovery", my_maxhp(), my_hp())) cli_execute("restore hp");
		if(check_restore("mpAutoRecovery", my_maxmp(), my_mp())) cli_execute("restore mp");
		cli_execute("mood execute");
	}



Code:
boolean check_restore(string property,int max, int current) {
	float threshold = to_float(get_property(property));
#	threshold = threshold * to_float("-1");
	threshold = max * threshold;
	if(current < to_int(threshold)) return true;
	return false;
}
 
@teebee: the first bug, of trying to run a function with no name, I've seen once or twice but couldn't track down and couldn't repro. Since it's easily circumvented by re-running the script I've let it lie, but your theory is a good one... I'll need to check that out.

re: restoring, it doesn't fire restores before adventuring with visit_url. When I tried to do it manually (the part that was commented out), it would force a restore even if you had no autorestore set. Perhaps separately, I've noticed Mafia try to restore mp even when instructed not to do so automatically, usually as a result of restoring hp automatically (trying to get enough mp to cast healing spells). So there may be an underlying bug. Or I may be confused about how autorestore works. :)
 
@teebee: you're right! It was entirely due to noncombats. I fixed the problem. Download the latest .zip from the first post and that should no longer be an issue.

I forgot to update the version number, though. :)
 
My multi that I'm ascending on is really poor, so he has no bartender. Thus, the script (presumably eatdrink.ash?) infinite-looped at:

Code:
FAIL: shot of blackberry schnapps lev:3 gain:1.0 adv:3.0 musc:6.0 myst:6.0 moxie:6.0 price:265 own:1 pull:false make:true value:1577
Calculating drink values.
Choosing drink to consume.
Attempting to consume...
acquiring a bartender-in-the-box from the closet in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Verifying ingredients for bartender-in-the-box (1)...
Verifying ingredients for bartender-skull-in-the-box (1)...
Verifying ingredients for nothing-in-the-box (1)...
Searching for "box"...
Desired purchase quantity not reached (wanted 1, got 0)
Using cached search results for box...
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more box to continue.
Searching for "bartender skull"...
Stopped purchasing bartender skull @ 20,490.

Not sure if this is an issue with the script or mafia (although it probably is mafia).

Anything I can do to fix that?

EDIT: Nevermind. I just had to uncheck "Repair on Explosion" under the Creatable/Cookable/Mixable section on the item manager interface.

EDIT2: On my other multi, Ascend.ash got stuck in an infinite loop trying to adventure in Degrassi Knoll when I couldn't because I hadn't gotten the quest yet. Might be something you'd want to look into.
 
Last edited:
MM, can you give me any more detail? Logfile or something? What sign were you, what class, what level, etc.
 
Hey, I think some coding on how you run eatdrink.ash might be broken - it only eats to 15 fullness but never utilizes drinks or spleen...
 
Works fine for me (or at least it did yesterday, I haven't had occasion to run it yet today) It eats to 15, then runs down adventures, THEN it uses drinks and spleen.
 
There's two different eat modes.

Before level 6, you eat "just in time". It uses up your adventures, then eats; uses those up, then spleens; uses those up, then drinks. That's because you're eligible for better food as you get closer to level 6. It also uses separate "quality" settings so, if you want, you can set it to consume better food and spleen items (which will, for example, cause not-a-pipes and corpse drinks to be used etc).

After level 6, you eat in the morning, and spleen & drink at night. The idea being that you start the day with more adventures so that if it's a special day (stats, holiday, whatever) you have more turns to burn.

If ascend.ash aborts, just re-run it and it should pick up right where it left off.
 
So I'm on my third run with this script. I've made a couple of modifications (and am now starting to work on some optimization) that I'd like to share.

The first run through, I failed to successfully open the guild. The function to open the guild is only checking for mainstat 17. I believe to open the last guild test with no fail requires a mainstat of 22.

This is what my OpenGuild() function looks like (line 487)
Code:
void OpenGuild(int level)
{
  MainStat(level, 17);
	boolean werked;
	if (my_buffedstat(my_primestat()) < 22)
	{
		if (have_skill($skill[The Magical Mojomuscular Melody]) == true && my_primestat() == $stat[mysticality])
		{ werked = use_skill(1, $skill[The Magical Mojomuscular Melody]); }

		if (have_skill($skill[The Power Ballad of the Arrowsmith]) == true && my_primestat() == $stat[muscle])
		{ werked = use_skill(1, $skill[The Power Ballad of the Arrowsmith]); }

		if (have_skill($skill[The Moxious Madrigal]) == true && my_primestat() == $stat[moxie])
		{ werked = use_skill(1, $skill[The Moxious Madrigal]); }  
		
		if (have_skill($skill[summon candy heart]) == true) cli_execute("cast 4 candy heart");

		if (item_amount($item[pink candy heart]) > 0)
		{ use(1, $item[pink candy heart]); }
		
		else if (item_amount($item[white candy heart]) > 0)
		{ use(1, $item[white candy heart]); }

		else if (item_amount($item[orange candy heart]) > 0)
		{ use(1, $item[orange candy heart]); }

		else if (item_amount($item[yellow candy heart]) > 0)
		{ use(1, $item[yellow candy heart]); }

		else if (item_amount($item[lavender candy heart]) > 0)
		{ use(1, $item[lavender candy heart]); }

		else if (item_amount($item[green candy heart]) > 0)
		{ use(1, $item[green candy heart]);	}
	}  
  cli_execute("guild");
}

I've also changed all the "outfit pajamas" calls to use equipt.ash as well.
Code:
From: boolean temp = cli_execute("outfit pajamas");
To:    boolean temp = cli_execute("call equipt.ash Adventures");
 
I had a similar problem with 'trash in the sky' quest. Before I reached any loops similar to that (there was some strange behavior) I hit the 'wheel in the sky' non-combat but it didn't head to the council to complete the quest. When I later checked what happened (was not watching completely initially) and used the relay to visit the council - I finished the quest. It'll be another ascension before I can test that again.

As per restoring HP/MP while adventuring using visit_url, it would be easy to adapt Universal_recovery.ash (changed the main to a unique name to be called and just called it with amount = 0 for both "HP" and "MP" - this way it only recovers up to your set target in mafia).

double post? sorry ...

I'm getting this behaviour this time around too. I've hit the castle wheel adventure 3x so far, and my wheel choiceadv is set to "turn to quest position (via moxie)"

I have not yet hit the relay browser to finish the quest, in case there's something I can do to troubleshoot.

Code:
[605] Giant's Castle
Encounter: Possibility Giant
Round 0: solomonster wins initiative!
running combat
Round 1: solomonster casts ENTANGLING NOODLES!
Round 2: solomonster casts SPRING RAINDROP ATTACK!
You gain 15 hit points
You gain 15 Mojo Points
Round 3: solomonster casts SHIELDBUTT!
Round 3: possibility giant takes 172 damage.
Round 4: solomonster casts SHIELDBUTT!
Round 4: Gronald smiles approvingly.
Round 4: possibility giant takes 165 damage.
You gain 201 Meat
You acquire an item: plot hole
You gain 6 Muscleboundness
You gain 14 Magicalness
You gain 26 Smarm

[606] Giant's Castle
Encounter: Wheel in the Clouds in the Sky, Keep On Turning
Found choiceadv
Found adventure wheel in the clouds, proceeding.

Checking step #34, 'Beanstalk'.
Working on quest step Beanstalk.
Got 1 S.O.C.K. already.
Adventuring for string:
Wheel in the Clouds
Giant's Castle is OK, as it will do < 40 of your HP in damage if you get hit.
Giant's Castle is OK, as it will do < 40 of your HP in damage if you get hit.

[606] Giant's Castle
Encounter: Furry Giant
Round 0: solomonster wins initiative!
running combat
Round 1: solomonster casts ENTANGLING NOODLES!
Round 2: solomonster casts SPRING RAINDROP ATTACK!
You gain 20 hit points
You gain 14 Mojo Points
Round 3: solomonster casts SHIELDBUTT!
Round 3: furry giant takes 122 damage.
Round 4: solomonster casts SHIELDBUTT!
Round 4: Gronald smiles approvingly.
Round 4: furry giant takes 194 damage.
You gain 205 Meat
You acquire an item: furry fur
You acquire an item: disturbing fanfic
You gain 11 Strengthliness
You gain 10 Enchantedness
You gain 26 Chutzpah

I'm not sure why the adventure numbers for the wheel adventure AND the next combat are the same. I'm going to change my choiceadv away, and then turn it back to "spin the wheel" and see what happens I guess.

edit part duex!

I added a bunch of print statements to find out what was happening during the choiceadv section.
Code:
[663] Giant's Castle
Encounter: Wheel in the Clouds in the Sky, Keep On Turning
Found choiceadv
begin_choice_adv_num = 2763
end_choice_adv_num = 2765
choice_adv_prop = choiceAdventure11
choice_num = 3
Found adventure wheel in the clouds, proceeding.

Checking step #34, 'Beanstalk'.
Working on quest step Beanstalk.
Got 1 S.O.C.K. already.
Adventuring for string:
Wheel in the Clouds
Giant's Castle is OK, as it will do < 40 of your HP in damage if you get hit.
Giant's Castle is OK, as it will do < 40 of your HP in damage if you get hit.

[663] Giant's Castle
KoLmafia declares world peace.
As you can see, we're already *AT* the correct choiceadv and it's aborting properly. So I guess the question is now: Why isn't it going back to visit the council?
 
Last edited:
Thanks for the report, kain! Do you have a line in beanstalk() as follows:

advString($location["Giant's Castle"],"Wheel in the Clouds");
>> council();

If not, insert it, and all should be well. I'll include that with the next update (it might actually be there already).

The guild quest prerequisites are a bit fuzzy - do you want 100% guarantee of passing, or just 'probable'? I spent some time coming up with the current approach but I don't recall the reasoning I wound up with. :)

Good idea re:equipt.
 
I do have that line already. It was one of the first things I looked for.

Code:
  advItem($location[Fantasy Airship],1,$item["S.O.C.K."]);
  advString($location["Giant's Castle"],"Wheel in the Clouds");
  council();
}

All three ascensions I've had to go visit the council manually at that point. The first two times I assumed I didn't have something set properly. I don't know why it's not recognizing that I've completed the choiceadv.

Regarding the guild, the first time through it tried with a 17 mainstat and burned 15-20 turns. Personally, I'd rather be _positive_ of success, as wasting turns on day 1 can put a serious cramp in a non-slow ascension.
 
Not sure if this has been reported before, but macguffin.ash never works for me on any of my accounts. It always says:

Black market found.
Diary obtained.
Hidden city revealed.
Oasis revealed.
Cellar revealed.
Palindome revealed.
Macguffin quest started.
Hidden city complete.
Pyramid revealed.
Dr. Awkward defeated.
Got 1 already.
You can't wear that outfit.
Unable to complete Spookyraven section of the MacGuffin quest.

I'll report this on the macguffin.ash thread as well.

This has happened on probably every class by now, all at level 11 or 12.

EDIT: Solved. I had to create an outfit called "current."
 
Last edited:
@kain: Never seen it be that bad, but easy enough to change the threshold.
@MM: glad you got the problem solved.
 
Back
Top