tavernLayout (property)

From KoLMafia
Jump to: navigation, search


This property stores the results of your most recent exploration of the Tavern Cellar. It consists of 25 characters each of which represents one of the cellar squares in order from 1 to 25. The meaning of each character is as follows.

0 = Darkness
1 = Explored / Stairs Up
2 = Dead adventurer
3 = A Rat Faucet
4 = A Tiny Mansion
5 = Various Barrels

If you want to find and visit the square with the Faucet, you simply need to do:

void squeeze_rat() {
   faucet = 1 + get_property( "tavernLayout" ).index_of( "3" );
   if ( faucet < 1 ) abort( "Mafia doesn't know where the Faucet is." ); 
   visit_url( "cellar.php?action=explore&whichspot="+faucet );
   visit_url( "choice.php?whichchoice=512&option=1" );
   run_combat();
}