Difference between revisions of "TavernLayout"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(I or someone else should flesh this out)
 
imported>Bale
(A little example. More info still needed)
Line 7: Line 7:
 
4 = A Tiny Mansion
 
4 = A Tiny Mansion
 
5 = Various Barrels</pre>
 
5 = Various Barrels</pre>
 +
 +
{{
 +
CodeSample|
 +
description=If you want to find visit the square with the Faucet, you simply need to do:|
 +
code=
 +
<syntaxhighlight>
 +
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();
 +
}
 +
</syntaxhighlight>}}

Revision as of 21:17, 7 September 2011


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