Simplified basement mimic farming script

I'm done ascending for a while, so now I'm actually going to start mimic farming, after examining various setups over the past couple months. I've decided to simplify the monstrosity I was working on before to not consume anything, I'll probably just load up on consumables manually via chat macros, owing to how few consumables there are (turngen, pet spray, and punctual potions, now that chorale isn't cost effective). Combat will simply be done via autoattack, now that the game lets you enable it for special monsters. Most of this code is harvested from the last thread, so a belated thanks to everyone that contributed to it, especially Bale.

A summary of what I want the script to do:
Summon 3 potions of punctual companionship (I'll be using them with a mimic, so I'll skip malling things that might temporarily have a higher price)
Burn all MP
Maximize MP, summon more MP, burn MP down to not less than 250
Get a black heart and other daily stuff that should probably be a separate script
Switch to outfit mimic1, switch to mimic, give it LL helicopter, grab once a day buffs (forgot to do the arena quest unfortunately)
While stinky cheese isn't fully charged, spend turns in basement, having pyromania execute between adventures
Switch outfit to mimic2
Burn remaining turns in basement, also with pyromania
Flip to

Code:
print ("Warming up")
equip($slot[acc2], $item[plexiglass pocketwatch]);
cli_execute("create 3 potion of punctual companionship");
cli_execute("burn *");
cli_execute("ballpit");
cli_execute("telescope high");
cli_execute("maximize mp");
cli_execute("use express card");
cli_execute("use neverending soda");
cli_execute("burn -250");  //[COLOR="#FF0000"]Burn all but 250 MP, right?[/COLOR]
cli_execute("maximize mp_regen"); //[COLOR="#FF0000"]CLI maximize commands like this will never buy anything or use potions, right?[/COLOR]
cli_execute("vampout.ash heart"); //[COLOR="#FF0000"]Do I need to import the script to do this?  It's calling [URL="http://kolmafia.us/showthread.php?10670-Daily-Deed-to-Vamp-Out-with-your-Vampire-Fangs&p=83862&viewfull=1#post83862"]this mod[/URL] of Bale's script.[/COLOR]
cli_execute("chips ennui");
cli_execute("chips wintergreen");
cli_execute("chips radium");
cli_execute("shower ice");
cli_execute("hatter reinforced beaded headband");
outfit (mimic1);
if(item_amount($item[loathing legion helicopter]) < 1)
   cli_execute("fold loathing legion helicopter");
use_familiar (stocking mimic);
equip( [familiar], loathing legion helicopter );
cli_execute("pool 1");
cli_execute("pool 1");
cli_execute("pool 1");
cli_execute("shrug ode");
cli_execute("use Bag o' Tricks");
cli_execute("use moveable feast");

print ("Charging cheese")
while( to_int(get_property( "_stinkyCheeseCount")) < 100 )//[COLOR="#FF0000"]While these commands are burning turns, will MP burning take place?[/COLOR]
	adventure(1, $location[Fernswarthy's Basement]);

print ("Cheese charged")
outfit (mimic2);
adventure( my_turncount(), $location[Fernswarthy's Basement]);

use_familiar (disembodied hand);
if(item_amount($item[loathing legion moondial]) < 1)
   cli_execute("fold loathing legion moondial");
cli_execute("cast ode");
cli_execute("drink wrecked generator");
cli_execute("maximize adv");
print ("Ready for bed")

I am farming in the basement due to the 50 round limit, which means more chances for candyblast to drop candy, and more rounds for the mimic to generate MP to be burned. with a bindlestocking, and running from every combat with GAP, to effectively increase the turn output by 20%. Combat macro, for the curious:

Code:
if monstername The Ghost of Fernswarthy
while !match "Something gets knocked loose from your bindlestocking" && !pastround 49
skill 1003
endwhile
while !pastround 49
skill candyblast
endwhile
runaway
endif

scrollwhendone
icon susstocking
 
Last edited:
So I've now begun twiddling with this script, Crimbo having passed and all, and it seems mafia might have an abort baked in if you fail a basement test. Is there a way around, or is there another problem with my script? To test that portion of my script I just boiled it down to:

Code:
print ("Charging cheese")
while( to_int(get_property( "_stinkyCheeseCount")) < 100 )//While these commands are burning turns, will MP burning take place?
	adventure(1, $location[Fernswarthy's Basement]);

print ("Cheese charged")
outfit (mimic2);
adventure( my_turncount(), $location[Fernswarthy's Basement]);

The script successfully spends a turn in the basement, then aborts with the following message: "Failed to pass basement test."
 

slyz

Developer
If you fail a basement test, the odds are pretty high that you will fail again if Mafia continues to auto-adventure. That why I find it very reasonable that Mafia aborts when you fail a test.

If you want to avoid this, you can try using visit_url() instead of adventure() (see Rinn's autobasement.ash to grab the actual URL).

Or you can try capturing the result value of adventure() so that the Mafia abort doesn't abort the script:
PHP:
while( my_turncount() > 0 )
      if ( adventure( 1, $location[Fernswarthy's Basement]) ) {}
 
Just to be sure I'm grabbing the right thing, are you referring to:
visit_url("basement.php?action=1&pwd");

Would that work as is if I just dropped it in where I have:
adventure(1, $location[Fernswarthy's Basement]);
 

slyz

Developer
Actually, you would need to use visit_url() to start the encounter, and then run_combat().

Assuming the URL is correct, you can try the following:
PHP:
while( my_turncount() > 0 )
{
      visit_url("basement.php?action=1&pwd");
      run_combat();
}
 
Tested it, and works better than I'd hoped, because that causes mafia to not burn MP. That's good because I can it provides an easy way to burn down to 250 MP. Thanks!

Scipt now looks like this, will have other stuff added back in piece by piece:

Code:
print ("Charging cheese");
while( to_int(get_property( "_stinkyCheeseCount")) < 100 )
	{
    visit_url("basement.php?action=1&pwd");
    run_combat();
    cli_execute("burn -250");
    }


print ("Cheese charged");
cli_execute("outfit mimicB");
while( my_turncount() > 19 )
{
      visit_url("basement.php?action=1&pwd");
      run_combat();
      cli_execute("burn -250");
}  

cli_execute("ballpit");

while( my_turncount() > 9 )
{
      visit_url("basement.php?action=1&pwd");
      run_combat();
      cli_execute("burn -250");
}  

cli_execute("telescope high");

while( my_turncount() > 0 )
{
      visit_url("basement.php?action=1&pwd");
      run_combat();
      cli_execute("burn -250");
}

Edit: now that's odd, it successfully changed to outfit MimicB, but it failed to grab the appropriate 1/day buffs with 19 and 9 turns remaining. It got trapped in a seemingly endless loop somehow, continually trying to keep going into the basement even at 0 adventures. I aborted after 50 or so attempts to adventure with 0 turns. But I'm not seeing what might have caused that. Would it matter that I was using GAP to run from every combat, would a refresh help in case the free runs were muddling with how many turns mafia thought I had remaining? I'd strongly prefer not to refresh after each adventure, that would add a lot of unnecessary server hits.
 
Last edited:

Alhifar

Member
Slyz seems to have used the wrong function in his example. "my_turncount()" should actually be "my_adventures()" in all of the while clauses. my_turncount() refers to the total turncount of your current run, where my_adventures is the current number of turns you have left.
 
Top