To familiar

From Kolmafia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Special

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