To thrall

From Kolmafia
Revision as of 15:43, 26 January 2015 by imported>Eliteofdelete
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

thrall to_thrall(int convert )

thrall to_thrall(string convert )

When supplied an int or string, returns the thrall that corresponds to the specified parameter convert. Matching for the string is fuzzy.

Code Samples

Following example shows basic to_thrall operations.

int first;
string second, third;

first = 3;
second = "dread";
third = "ver";

print(first+" gives "+to_thrall(first)+".", "blue");
print(second+" gives "+to_thrall(second)+".", "blue");
print(third+" gives "+to_thrall(third)+".", "blue");

It gives the following output.

3 gives Angel Hair Wisp.
dread gives Penne Dreadful.
ver gives Vermincelli.

Special

If no match is found for a supplied string or int type, this function returns $thrall[ none ].