My familiar: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>ZammyWarrior
No edit summary
imported>Bale
see also
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''familiar my_familiar()'''<br />
{{
Returns your current familiar.
#vardefine:name|my_familiar}}{{
#vardefine:return_type|familiar}}{{


[[Category:Your Character | My familiar()]]
FunctionPage|
[[Category:Ash Functions |My familiar()]]
name={{#var:name}}|
<pre>#Script check if your current familiar is leprechaun. If true it will retrieve 1 meat detector
 
if(my_familiar() == $familiar[leprechaun]){
function1={{Function|
retrieve_item(1, $item[meat detector]);
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}
}}|
 
function_description=Returns your current familiar.|
 
code1={{CodeSample|
title=Code Samples|
description=If your familiar is a leprechaun, retrieve a meat detector.|
code=
<syntaxhighlight>
if(my_familiar() == $familiar[leprechaun]) {
retrieve_item(1 , $item[meat detector]);
}
}
</pre>
</syntaxhighlight>
}}|
see_also={{SeeAlso|my_companion|my_thrall}}|
special=When not logged in, returns $familiar[none] (needs spading).|
}}
 
[[Category:Your Character]]

Latest revision as of 08:51, 8 November 2014

Function Syntax

familiar my_familiar()

Returns your current familiar.

Code Samples

If your familiar is a leprechaun, retrieve a meat detector.

if(my_familiar() == $familiar[leprechaun]) {
retrieve_item(1 , $item[meat detector]);
}

See Also

my_companion() | my_thrall()

Special

When not logged in, returns $familiar[none] (needs spading).