Auto-recovery failure causes untrappable abort rather than trappable error

Status
Not open for further replies.

Metraxis

Member
I can't say precisely when this behavior changed, as there has been 'something' which has prevented me from using every build since 2480.  I'm hoping that this time, I can perhaps modify the script I'm using to properly handle the new behavior.  Here's the code that's causing the problem:

Code:
			print("trying to cast " + skill_to_string(TSkill));
			boolean flag = true;
			boolean trap;
			int current = have_effect(TEffect);
			while(have_effect(TEffect) < turns && flag) {
print("Using..");
				trap = use_skill(1, TSkill);
print("Used...");
				flag = (have_effect(TEffect) > current);
				current = have_effect(TEffect);
			}
			return (have_effect(TEffect) >= turns);

Note that the print()'s on the left edge were added just to identify the line which is causing the problem.  Here's the tail of the output from when I run the script of which this library is a part:
Code:
Maintaining Tenacity of the Snapper
trying to cast Tenacity of the Snapper
Could not recover enough mana to cast Tenactity of the Snapper
Script aborted!

Any thoughts?
 
Re: use_skill(), The Bane of my existance

check your mana auto restore settings. There is a new "buff balancing" setting which may have an effect, also verify the availability of the mp restorers you have chosen to use.
 

holatuwol

Developer
Re: use_skill(), The Bane of my existance

print( "Start at: " + get_property( "mpAutoRecovery" ) );
print( "Recover to: " + get_property( "mpAutoRecoveryTarget" ) );
print( "Using: " + get_property( "mpAutoRecoveryItems" ) );
 

Metraxis

Member
Re: use_skill(), The Bane of my existance

Using 2703:

Code:
> Agent  
Council of Loathing 
You still have unfinished business with the L337 Tr4pz0r, Adventurer. You must face your nemesis in the Dark and Dank and Sinister Cave. Return to us when you have done so. 
Goal: IA in Goatlet at 
goat cheese 
Countdown: 5 seconds... 
Countdown: 4 seconds... 
Countdown: 3 seconds... 
Countdown: 2 seconds... 
Countdown: 1 second... 
Waiting completed. 
Maintaining Butt-Rock Hair 
Maintaining Disco State of Mind 
Maintaining Empathy 
Maintaining Leash of Linguini 
Maintaining Mariachi Mood 
Maintaining Rage of the Reindeer 
trying to cast Rage of the Reindeer 
Autorecovery failed. Could not restore enough mana to cast Rage of the Reindeer. 
Script aborted!

> Scratch  
Start at: -0.1 
Recover to: 0.8 
Using: bottle of monsieur bubble;unrefined mountain stream syrup;phonics down;tonic water;blue pixel potion;knob goblin superseltzer;blatantly canadian;tiny house;green pixel potion;dyspepsi-cola;cloaca-cola;mountain stream soda;magical mystery juice;knob goblin seltzer;soda water 
Script succeeded!

Using 2480:

Code:
> Agent  
Council of Loathing 
You still have unfinished business with the L337 Tr4pz0r, Adventurer. You must face your nemesis in the Dark and Dank and Sinister Cave. Return to us when you have done so. Goal: IA in Goatlet at  
goat cheese 
Countdown: 5 seconds... 
Countdown: 4 seconds... 
Countdown: 3 seconds... 
Countdown: 2 seconds... 
Countdown: 1 second... 
Waiting completed. 
Maintaining Butt-Rock Hair 
Maintaining Disco State of Mind 
Maintaining Empathy 
Maintaining Leash of Linguini 
Maintaining Mariachi Mood 
Maintaining Rage of the Reindeer 
trying to cast Rage of the Reindeer 
Desired purchase quantity not reached (wanted 7, got 0) 
You need 7 more magical mystery juice to continue.
[At this point, the inbuilt version of the autorecovery function puts on the Guard uniform, discovers it can't afford 11 Knob Seltzers, switches back to by combat outfit, discovers it can't buy 28 soda water either, and then fails over to my own recovery function, which then happily goes about burning an adventure to pick up the needed MP/meat, cast the missing buffs and get cheesy.
 
Re: use_skill(), The Bane of my existance

[quote author=Metraxis link=topic=693.msg3233#msg3233 date=1168329252]
snip

Using 2480:

snip snip
[At this point, the inbuilt version of the autorecovery function puts on the Guard uniform, discovers it can't afford 11 Knob Seltzers, switches back to by combat outfit, discovers it can't buy 28 soda water either, and then fails over to my own recovery function, which then happily goes about burning an adventure to pick up the needed MP/meat, cast the missing buffs and get cheesy.
[/quote]

I don't think kolmafia has the option to script auto recovery anymore.
 

holatuwol

Developer
I have changed the thread title to reflect what I discovered was the actual complaint after approximately half an hour of misinterpreting the post. I have locked this thread because I didn't like its previous thread title and to serve as a reminder that I don't appreciate thread titles and/or problem descriptions which distract me from the actual issue.
 
Status
Not open for further replies.
Top