Tavern: Difference between revisions
Jump to navigation
Jump to search
imported>Bale thanks heeeheeeheee. I cannot believe that works! WHY does that work?!? |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 49: | Line 48: | ||
special=The function will not turn off the faucet, and will not attempt to find and / or fight the baron.| | special=The function will not turn off the faucet, and will not attempt to find and / or fight the baron.| | ||
}} | }} | ||
[[Category:Adventuring]] |
Revision as of 22:18, 21 May 2010
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
Special
The function will not turn off the faucet, and will not attempt to find and / or fight the baron.