<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=134.148.5.118</id>
	<title>Kolmafia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=134.148.5.118"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/134.148.5.118"/>
	<updated>2026-04-24T23:07:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=946</id>
		<title>Miscellaneous Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=946"/>
		<updated>2007-09-05T04:48:40Z</updated>

		<summary type="html">&lt;p&gt;134.148.5.118: Revert spammer.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Part 6 - Miscellaneous ==&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Mostly internal stuff. Some good for everyone, some only for ASH wizards.&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;void print( string helloworld )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Prints the given string to the graphical CLI window and to the status line of the main Adventuring window&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;boolean cli_execute( string command )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you&amp;amp;#8217;re careful and not an asshat, for raw URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
See the [http://kolmafia.sourceforge.net/scripting.html CLI manual] for more details.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;em&amp;gt;Sample&amp;lt;/em&amp;gt;:[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;void wait( int delay )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Does nothing for the desired number of seconds.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;string get_property( string key )&amp;lt;br /&amp;gt;&lt;br /&gt;
boolean set_property( string key, string value )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Gets or sets a stored property from your character&amp;amp;#8217;s .kcs file.&amp;lt;br /&amp;gt;&lt;br /&gt;
The KoLmafia [[%28ASHRM%29_KoLMafia_Properties|properties]] page contains details on many of the keys that are available for access.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;em&amp;gt;Sample&amp;lt;/em&amp;gt;:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;boolean file_to_map( string file_to_load, map map_to_fill )&amp;lt;br /&amp;gt;&lt;br /&gt;
boolean map_to_file( map map_to_save, string file_to_write )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Loads and saves maps as tab-delimited text files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;int random( int range )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Generates a random integer between 0 and (range-1) inclusive.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;int round( float ratio )&amp;lt;br /&amp;gt;&lt;br /&gt;
int floor( float ratio )&amp;lt;br /&amp;gt;&lt;br /&gt;
int ceil( float ratio )&amp;lt;br /&amp;gt;&lt;br /&gt;
int truncate( float ratio )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns an integer near the given real number.  Respectively, it returns the nearest, next lowest, next highest, and decimal-stripped integer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;int count( map )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns the number of defined keys for the aggregate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;void clear( map )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Remove all keys from a map. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;void disable( string function_name )&amp;lt;br /&amp;gt;&lt;br /&gt;
void enable( string function_name )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For debugging purposes disables or enables the indicated function&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;float square_root( float value )&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
returns the square root of the passed value&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;string today_to_string()&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns today&amp;amp;#8217;s (real-world) date in the form yyyymmdd.  It is based on your computer&amp;amp;#8217;s system date&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>134.148.5.118</name></author>
	</entry>
</feed>