to_thrall()

From KoLMafia
Jump to: navigation, 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 ].