Difference between revisions of "Adventure"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
Line 31: Line 31:
 
<p>If {{Pspan|filter}} is omitted or assigned an empty string, this function will use your current CCS / battle action.</p>
 
<p>If {{Pspan|filter}} is omitted or assigned an empty string, this function will use your current CCS / battle action.</p>
 
<p>This function does not have to make use of its return value, but if you wish to do so, it will return true if all adventures were used, and false if it is unable to do so for any reason (not enough adventures, location unavailable, etc.).</p>
 
<p>This function does not have to make use of its return value, but if you wish to do so, it will return true if all adventures were used, and false if it is unable to do so for any reason (not enough adventures, location unavailable, etc.).</p>
<p>Note that {{Pspan|adventures}} is the number of adventures to spend, and any "free" turns will not count towards this total.|
+
<p>Note that {{Pspan|adventures}} is the number of adventures to spend, and any "free" turns will not count towards this total.</p>
 +
<p>Note also that adventure() checks against goals set via [[add_item_condition|add_item_condition()]] or via other methods of specifying goals in KoLmafia.|
  
 
code1={{CodeSample|
 
code1={{CodeSample|

Revision as of 02:00, 1 March 2010



Function Syntax

boolean adventure(int adventures ,location place )

boolean adventure(int adventures ,location place ,string filter )

  • int is the number of adventures to spend.
  • place is the adventuring location.
  • filter is a combat action filter (more info needed).

This function runs the specified number of adventures at the given place, keeping up your current mood & obeying restore settings.

If filter is omitted or assigned an empty string, this function will use your current CCS / battle action.

This function does not have to make use of its return value, but if you wish to do so, it will return true if all adventures were used, and false if it is unable to do so for any reason (not enough adventures, location unavailable, etc.).

Note that adventures is the number of adventures to spend, and any "free" turns will not count towards this total.

Note also that adventure() checks against goals set via add_item_condition() or via other methods of specifying goals in KoLmafia.

Code Sample

Adventure 5 times at the Giant's Castle:

adventure(5 , $location[giant's castle]);

CLI Equivalent

The CLI command "adv" works similarly.

See Also

adv1()