Familiar equipment: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
mNo edit summary
imported>Relyk
No edit summary
 
Line 17: Line 17:
function_description=Reports the most commonly associated familiar equipment for the specified familiar {{pspan|check_me}}.|
function_description=Reports the most commonly associated familiar equipment for the specified familiar {{pspan|check_me}}.|


needscode=yes|
code1={{CodeSample|
title=Code Sample|
description=The following checks if your familiar has its associated equipment and equips the equipment if it does not.|
code=
<syntaxhighlight>
if( familiar_equipped_equipment(my_familiar()) != familiar_equipment(my_familiar()) ){
    equip( $slot[familiar], familiar_equipment(my_familiar()) );
}
</syntaxhighlight>
}}|


see_also={{SeeAlso|familiar_equipped_equipment}}|
see_also={{SeeAlso|familiar_equipped_equipment}}|

Latest revision as of 01:28, 13 April 2014

Function Syntax

item familiar_equipment(familiar check_me )

  • check_me is the familiar to check the equipment association of

Reports the most commonly associated familiar equipment for the specified familiar check_me.

Code Sample

The following checks if your familiar has its associated equipment and equips the equipment if it does not.

if( familiar_equipped_equipment(my_familiar()) != familiar_equipment(my_familiar()) ){
    equip( $slot[familiar], familiar_equipment(my_familiar()) );
}

See Also

familiar_equipped_equipment()