To path

From Kolmafia
Jump to navigation Jump to search

Function Syntax

path to_path(int id )

  • id is the path ID to convert

path to_path(string name )

  • name is the path name to convert

Returns the specified path name or id as a path.

Code Samples

Following example shows basic to_path operations.

print(to_path("StAnDaRd"), "green");
print(to_path("stand"), "red");
print("");
if (to_path("StAnDaRd") == my_path())
   print("I'm in a Standard run!", "green");
else print("I am not in Standard...", "blue");

It gives the following output (for characters in a Standard ascension).

Standard
none

I'm in a Standard run!