Guardians: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
No edit summary
imported>Bale
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Adventuring|


function1={{Function|
function1={{Function|
Line 14: Line 13:
}}|
}}|


function_description=Attempts to pass the six levels of the NS Tower. If successful, or if you don't currently have access to the tower, this function returns $item[none]. Otherwise, if you are prevented from going further because you lack the required item, it returns that item.|
function_description=Attempts to pass the six levels of the NS Tower, the door puzzle, the NS's familiars and your shadow. If you are prevented from going further because you lack the required item, it returns that item. If you fail for any other reason or if you succeed, it returns $item[none].|


code1={{CodeSample|
code1={{CodeSample|
Line 22: Line 21:
<syntaxhighlight>
<syntaxhighlight>
item missing = guardians();
item missing = guardians();
if(missing == $item[none])
if(missing == $item[none]) {
   print("You defeated the six tower monsters.");
   if(my_adventures() == 0)
else print("You need a "+ missing +" to continue.");
      print("No time to defeat the sorceress now.");
  else print("You either can't reach the tower, stuck at the top or ready to fight the sorceress.");
} else print("You need a "+ missing +" to continue.");
</syntaxhighlight>
</syntaxhighlight>
}}|
}}|
see_also={{SeeAlso|chamber|entryway|hedgemaze|tavern}}|


cli_equiv=The CLI command "guardians" works similarly.|
cli_equiv=The CLI command "guardians" works similarly.|
}}
}}


see_also={{SeeAlso|chamber|entryway|hedgemaze|tavern}}|
[[Category:Adventuring]]
 
{{RFI|What happens if you don't have enough adventures to complete the tower?}}

Latest revision as of 22:18, 21 May 2010

Function Syntax

item guardians()

Attempts to pass the six levels of the NS Tower, the door puzzle, the NS's familiars and your shadow. If you are prevented from going further because you lack the required item, it returns that item. If you fail for any other reason or if you succeed, it returns $item[none].

Code Sample

Defeat the six tower monsters at the NS lair.

item missing = guardians();
if(missing == $item[none]) {
   if(my_adventures() == 0)
      print("No time to defeat the sorceress now.");
   else print("You either can't reach the tower, stuck at the top or ready to fight the sorceress.");
} else print("You need a "+ missing +" to continue.");

CLI Equivalent

The CLI command "guardians" works similarly.

See Also

chamber() | entryway() | hedgemaze() | tavern()