From KoLMafia
Jump to: navigation, search

Function Syntax

int get_revision()

Returns the revision number of KoLmafia being used. For daily builds, the revision number is used as the build number, and the two will be identical.

Code Sample

Will tell you when there is a new daily build available

int Build = get_revision();
string page = visit_url("");
string current = substring ( page, index_of ( page , "(Built Once An Hour)" ) , index_of ( page , ".jar</a>" ) );
if (contains_text( current , (Build+1) ))
   print ("There is a new build. Go get it here", "red");
   print ("You are already using the most current version of KoLmafia.", "blue");

See Also