Tavern: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
mNo edit summary
imported>StDoodle
No edit summary
Line 50: Line 50:


[[Category:Adventuring]]
[[Category:Adventuring]]
{{RFI|Has this been updated to account for the new behavior?}}

Revision as of 20:25, 9 February 2011

Function Syntax

int tavern()

Attempts to complete the level 3 tavern quest, stopping when it finds the rat faucet. Returns the number of squares visited.

  • It will stop before actually turning off the faucet.
  • If the quest was already completed, it will return the number of explored squares.
  • If you run out of turns, it will return the number of explored squares.

 

Code Sample

Solve the Typical Tavern.

if(get_property("lastTavernAscension").to_int() == my_ascensions()) {
   print("You've already turned off the Rat Faucet!");
} else {
   int turns = tavern();
   if(get_property("tavernLayout").contains_text("3")) {
      print("Found the Rat Faucet in "+ turns+ " adventures.");
      if(available_amount($item[Baron von Ratsworth's monocle]) == 0
       && available_amount($item[Baron von Ratsworth's money clip]) == 0
       && available_amount($item[Baron von Ratsworth's tophat]) == 0
       && user_confirm("Do you want to fight Baron Von Ratsworth?")) {
        print("You'll have to do the next bit yourself. Sorry.", "red");
      } else {
        visit_url("rats.php?action=faucetoff");
      }
   } else print("Spent "+ turns+ " adventures searching, but did not find the rat faucet.", "red");
}

CLI Equivalent

The CLI command "tavern" functions similarly.

See Also

chamber() | entryway() | guardians() | hedgemaze()

Special

The function will not turn off the faucet, and will not attempt to find and / or fight the baron.

Attention KoLmafia Experts!

We need your help; some details of this function's operation are unknown or unclear.

The following specific question has been raised:

  • Has this been updated to account for the new behavior?