Difference between revisions of "TavernLayout"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(A little example. More info still needed)
imported>Bale
(explained)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:tavernLayout (property)}}
 
{{DISPLAYTITLE:tavernLayout (property)}}
  
<pre>0 = Darkness
+
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.
1 = Explored / Stairs Up
+
 
2 = Dead adventurer
+
0 = Darkness
3 = A Rat Faucet
+
1 = Explored / Stairs Up
4 = A Tiny Mansion
+
2 = Dead adventurer
5 = Various Barrels</pre>
+
3 = A Rat Faucet
 +
4 = A Tiny Mansion
 +
5 = Various Barrels
  
 
{{
 
{{
 
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>
Line 16: Line 18:
 
   faucet = 1 + get_property( "tavernLayout" ).index_of( "3" );
 
   faucet = 1 + get_property( "tavernLayout" ).index_of( "3" );
 
   if ( faucet < 1 ) abort( "Mafia doesn't know where the Faucet is." );  
 
   if ( faucet < 1 ) abort( "Mafia doesn't know where the Faucet is." );  
   visit_url( "cellar.php?action=explore&whichspot=faucet" );
+
   visit_url( "cellar.php?action=explore&whichspot="+faucet );
 
   visit_url( "choice.php?whichchoice=512&option=1" );
 
   visit_url( "choice.php?whichchoice=512&option=1" );
 
   run_combat();
 
   run_combat();
 
}  
 
}  
 
</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();
}