Difference between pages "Get florist plants" and "Can faxbot"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Bale
(r12244)
 
 
Line 1: Line 1:
 
{{
 
{{
#vardefine:name|my_effects}}{{
+
#vardefine:name|can_faxbot}}{{
#vardefine:return_type|string [location] [int]}}{{
+
#vardefine:return_type|boolean}}{{
#vardefine:aggregate|yes}}{{
+
 
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
Line 8: Line 8:
 
function1={{Function|
 
function1={{Function|
 
name={{#var:name}}|
 
name={{#var:name}}|
aggregate={{#var:aggregate}}|
 
 
return_type={{#var:return_type}}|
 
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
+
parameter1={{Param|monster|mob}}||
 +
p1desc={{Pspan|mob}} is the monster for which to check.|
 
}}|
 
}}|
  
function_description=Returns the a map of all {{kolwiki|The Florist Friar's Cottage|plants}} currently planted at each location.|
+
function_description=Checks to see if {{Pspan|mob}} can be faxed by any of the faxbots known to KoLmafia. This does not check if the faxbot(s) are online.<ref>https://sourceforge.net/p/kolmafia/code/20614/tree/src/net/sourceforge/kolmafia/textui/RuntimeLibrary.java#l4753</ref>|
  
 
code1={{CodeSample|
 
code1={{CodeSample|
title=Code Sample|
+
title=Code Samples|
description=Print all current plants.|
+
description=This will acquire a copy of a scary pirate if you can get one.|
 
code=
 
code=
 
<syntaxhighlight>
 
<syntaxhighlight>
foreach loc, counter, plant in get_florist_plants() {
+
if( get_property("_photocopyUsed")=="false" && can_faxbot($monster[scary pirate]) )
  if( plant != "" ) {
+
faxbot($monster[scary pirate]);
      print( "Location '" + loc + "'" );
 
      print( "Plant " + counter + ": '" + plant + "'" );
 
  }
 
}
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
}}|
 
}}|
 
+
see_also={{SeeAlso|faxbot|is_online}}|
see_also={{SeeAlso|florist_available}}|
 
 
}}
 
}}
 +
==References==
 +
<references/>
  
[[Category:Your Character]]
+
[[Category:Miscellaneous Functions]]

Latest revision as of 23:53, 24 January 2021

Function Syntax

boolean can_faxbot(monster mob )

  • mob is the monster for which to check.

Checks to see if mob can be faxed by any of the faxbots known to KoLmafia. This does not check if the faxbot(s) are online.[1]

Code Samples

This will acquire a copy of a scary pirate if you can get one.

if( get_property("_photocopyUsed")=="false" && can_faxbot($monster[scary pirate]) )
 faxbot($monster[scary pirate]);

See Also

faxbot() | is_online()


References