TavernLayout: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
No edit summary
imported>Bale
explained
 
Line 12: Line 12:
{{
{{
CodeSample|
CodeSample|
description=If you want to find visit the square with the Faucet, you simply need to do:|
description=If you want to find and visit the square with the Faucet, you simply need to do:|
code=
code=
<syntaxhighlight>
<syntaxhighlight>

Latest revision as of 04:20, 10 September 2011


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();
}