DB heals script

smoo

New member
First script.... for some reason it wouldn't debug properly after a while, then i restarted KOLmafia and it worked. Weird.

So basically KOLmafia decided to remove the "rest at campsite" option from the autorecover HP. I sort of wanted to use the DB heals to recover HP anyways, so i made this blazingly simple script to recover HP.

Basically, this gets loaded in, and it autorecovers HP every time the DB gets whapped (I stress DB, as it will do almost nothing for any other class). When the DB runs out of mana and gets whapped yet more, it rests at the campsite.

Ideally, it should rarely come into play, and use minimal turns.

If anyone wants to use any chunks in a REAL script, feel free. Since this one sort of assumes the DB has both heal spells.

#Disco Bandit Script
#
#A between-fight script that uses the DB heals,
#and then rests at campsite when MP runs out.
#
#Written by EvilSmoo, April 2006
#Based on ASH tutorial by Xylpher
#and an ASH reference, and other assorted stuff.

void main()
{

while ( (my_mp() < 20) && (my_hp() < (my_maxhp()-40)) )
{
cli_execute( "rest");
}

while ( my_hp() < (my_maxhp()-40) )
{
if ( have_skill($skill[Disco Power Nap]))
use_skill(1, $skill[Disco Power Nap]);
}


while ( my_hp() < (my_maxhp()-20) )
{
if ( have_skill($skill[Disco Nap]))
use_skill(1, $skill[Disco Nap]);
}



#A more refined version of my earlier script.
#Probably NOT a good idea to use it if your MP is lower than 20
#or HP lower than 40.... hrmmm
}
 

smoo

New member
If there's any interest, I could improve the script more.... make it look at DB level/skill possession, and multi-rest until the HP or MP is regenned to "safe" levels, without wasting too many turns resting. (Having a good campground rest place is good, and it could use a beanbag chair too, I suppose...)
 
Top