To familiar

From Kolmafia
Jump to navigation Jump to search

Function Syntax

familiar to_familiar(int convert )

familiar to_familiar(string convert )

  • convert is an ID # or familiar name to convert

Returns the familiar associated with either the KoL in-game ID # or name matching convert.

Code Samples

Following example shows basic to_familiar operations.

int hobomonkey = 89;
foreach it in $strings[baby gravy fairy, LaMa lAmA, spirit]
   print("String -"+it+"- gives familiar "+to_familiar(it), "blue"); 
print("Int "+hobomonkey+" gives familiar "+to_familiar(hobomonkey), "green");

For more information of familiar numbers see Familiars by number.

It gives the following output.

String -baby gravy fairy- gives familiar Baby Gravy Fairy
String -LaMa lAmA- gives familiar Llama Lama
String -spirit- gives familiar Spirit Hobo
Int 89 gives familiar Hobo Monkey


If no match is found, this function returns $familiar[ none ].