To stat

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

stat to_stat(string convert )

When supplied a string, returns the stat that corresponds to the specified parameter convert.

Code Samples

Following example shows basic to_stat operations.

string first, second, third;

first = "mox";
second = "moxie";
third = "MuSclE";

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

It gives the following output.

mox gives none.
moxie gives Moxie.
MuSclE gives Muscle.

See Also

to_item() | to_skill() | to_monster()

Special

If no match is found for convert, this function returns $stat[ none ].