Difference between pages "Talk:Use familiar" and "Is goal"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Slyz
 
imported>Bale
(see also get_goals|goal_exists)
 
Line 1: Line 1:
This always seems to return false for me, can anyone confirm?
+
{{
--[[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)
+
#vardefine:name|is_goal}}{{
 +
#vardefine:return_type|boolean}}{{
  
 +
FunctionPage|
 +
name={{#var:name}}|
  
> ash use_familiar($familiar[sandworm])
+
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|item|want}}|
 +
p1desc={{pspan|want}} is checked to see if it is a goal|
 +
}}|
  
Putting Mexicana the Hovering Sombrero back into terrarium...<br />
+
function_description=Checks to see if any adventuring goals would be satisfied by a {{pspan|want}}. Unfortunately there is currently no way to check for a non-item goal.|
Taking Hecho en Mexico the Baby Sandworm out of terrarium...<br />
 
Returned: true<br />
 
I assume that the ash command should be enough to check return value; correct me if I'm wrong. --[[User:Heeheehee|Heeheehee]] 21:03, 9 April 2010 (UTC)
 
  
I'll have to recheck after RO, but here is what I was getting (doing things slightly differently):
+
needscode=yes|
  
> ash print( use_familiar($familiar[slimeling]) )
+
see_also={{SeeAlso|adventure|add_item_condition|get_goals|goal_exists}}|
 +
}}
  
Putting Dusty the Baby Sandworm back into terrarium...
+
[[Category:Adventuring]]
Taking Yuk the Slimeling out of terrarium...
 
false
 
Returned: void
 
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)
 

Revision as of 00:28, 5 November 2014

needs(code_samples);

Function Syntax

boolean is_goal(item want )

  • want is checked to see if it is a goal

Checks to see if any adventuring goals would be satisfied by a want. Unfortunately there is currently no way to check for a non-item goal.

See Also

adventure() | add_item_condition() | get_goals() | goal_exists()