efilnikufecin
Member
I was just nosing around the new version looking for new ideas for my own scripts when I noticed the ode to booze part. When self casting ode the script tests for 50MP, then fails gracefully if you don't have enough MP. I think that was what my outdated icy peak farming script did too, but now I have learned that most of the time if you have access to the mysticality guild, then using boolean restore_mp( 50 ) is worth the meat it costs to cast ode. restore_mp uses kolmafia's internal logic to restore mp regardless of the user defined settings. Casting of ode was one of the reasons I requested the function be added, and work regardless (I don't like turning MP auto-restore).
Alternately the buffbot requesting code could execute if the self cast fails if the function were re-written in this way:
	
	
	
		
Just an idea for improvement which I thought you might like. I have 5 more level 30 runs to complete before returning to the castle, and by then I might be so addicted to the gallery that I may not return to the castle.
				
			Alternately the buffbot requesting code could execute if the self cast fails if the function were re-written in this way:
		Code:
	
	boolean get_ode(int count) {
	int iterations;
	# if you got the skill, cast it, damnit!
	if(have_skill($skill[The Ode To Booze])) {
		if(have_effect($effect[Ode To Booze]) < 1) {
			# must add MP testing here
			if(my_mp() < 50) {
				print("not enough MP to cast Ode!");
				//return false; don't return false, let the buffbot code pick it up.
			}
			use_skill(1, $skill[The Ode To Booze]);
			return true;
		}
	}
        //else  //remove else and let the buffbot code run if we get to it
        //{
	# lets try get it from a buffbot
	if (get_ode_from_buffbot("Testudinata", count) ) return true; 
	if (get_ode_from_buffbot("The Professor", count) ) return true; 
	if (get_ode_from_buffbot("Iocainebot", count) ) return true;
        //} 
	# if we get here, something has gone wrong
	return false;
}
	Just an idea for improvement which I thought you might like. I have 5 more level 30 runs to complete before returning to the castle, and by then I might be so addicted to the gallery that I may not return to the castle.