<?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=Grotfang</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=Grotfang"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Grotfang"/>
	<updated>2026-04-24T21:17:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_to_map&amp;diff=3074</id>
		<title>File to map</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=File_to_map&amp;diff=3074"/>
		<updated>2017-08-16T20:17:33Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Whoops. Misread.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|file_to_map}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|file_to_load}}|&lt;br /&gt;
parameter2={{Param|aggregate|map_to_fill}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|file_to_load}}|&lt;br /&gt;
parameter2={{Param|aggregate|map_to_fill}}|&lt;br /&gt;
parameter3={{Param|boolean|compact}}|&lt;br /&gt;
p1desc={{Pspan|file_to_load}} is the filename to load from|&lt;br /&gt;
p2desc={{Pspan|map_to_fill}} is the map to populate with data|&lt;br /&gt;
p3desc={{Pspan|compact}} is an (optional) flag; if omitted or true, records that do not contain any aggregate values are expected to be written on a single line, rather that one line per field.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Loads data to the {{pspan|map_to_fill}} from a saved {{pspan|file_to_load}} in your KoLmafia &amp;quot;data&amp;quot; or &amp;quot;scripts&amp;quot; directory. Any data originally stored in the {{pspan|map_to_fill}} are wiped before loading the file. The {{pspan|compact}} parameter is not needed unless you specified it in the [[map_to_file|map_to_file()]] call that originally generated the file, in which case the values must match. This function returns the operation&#039;s success. If {{pspan|map_to_fill}} has not been delcared, this function will abort (as oppossed to returning false).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also directly load internal data files used by KoLmafia, such as concoctions.txt and fullness.txt, by specifying their name&amp;amp;#151;KoLmafia will automatically load the file for you. For a full list of internal data files used by KoLmafia, see the [http://sourceforge.net/p/kolmafia/code/HEAD/tree/src/data/ KoLmafia source repository].|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This sample loads a simple map that includes item names keyed by a number.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [int] my_list;&lt;br /&gt;
file_to_map( &amp;quot;SavedList.txt&amp;quot; , my_list);&lt;br /&gt;
for i from 0 to (count(my_list) - 1) {&lt;br /&gt;
   print( &amp;quot;At index: &amp;quot; + i + &amp;quot; We find: &amp;quot; + my_list[i] );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
If the file &amp;quot;SavedList.txt&amp;quot; had the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0	StDoodle&lt;br /&gt;
1	Grotfang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the results would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
At index: 0 We find: StDoodle&lt;br /&gt;
At index: 1 We find: Grotfang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=The following sample loads the full list of {{kolwiki|Category:Spleentacular Items|spleen-damaging items}} from [http://kolmafia.svn.sourceforge.net/viewvc/kolmafia/src/data/spleenhit.txt spleenhit.txt].|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] spleen_hits;&lt;br /&gt;
file_to_map( &amp;quot;spleenhit.txt&amp;quot; , spleen_hits );&lt;br /&gt;
&lt;br /&gt;
foreach itm, spleen_hit in spleen_hits&lt;br /&gt;
   print( itm + &amp;quot; will damage &amp;quot; + spleen_hit + &amp;quot; of your spleen.&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|map_to_file|}}|&lt;br /&gt;
more_info=You can load any information stored in a data file, as long as your map contains the appropriate [[Data Types]] separated by tabs. Spaces are just considered to be part of a string.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any line that begins with a number sign (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;) is considered a comment, and is ignored by KoLmafia.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Miscellaneous Functions]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_to_map&amp;diff=3073</id>
		<title>File to map</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=File_to_map&amp;diff=3073"/>
		<updated>2017-08-16T20:16:54Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|file_to_map}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|file_to_load}}|&lt;br /&gt;
parameter2={{Param|aggregate|map_to_fill}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|file_to_load}}|&lt;br /&gt;
parameter2={{Param|aggregate|map_to_fill}}|&lt;br /&gt;
parameter3={{Param|boolean|compact}}|&lt;br /&gt;
p1desc={{Pspan|file_to_load}} is the filename to load from|&lt;br /&gt;
p2desc={{Pspan|map_to_fill}} is the map to populate with data|&lt;br /&gt;
p3desc={{Pspan|compact}} is an (optional) flag; if omitted or true, records that do not contain any aggregate values are expected to be written on a single line, rather that one line per field.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Loads data to the {{pspan|map_to_fill}} from a saved {{pspan|file_to_load}} in your KoLmafia &amp;quot;data&amp;quot; or &amp;quot;scripts&amp;quot; directory. Any data originally stored in the {{pspan|map_to_file}} are wiped before loading the file. The {{pspan|compact}} parameter is not needed unless you specified it in the [[map_to_file|map_to_file()]] call that originally generated the file, in which case the values must match. This function returns the operation&#039;s success. If {{pspan|map_to_fill}} has not been delcared, this function will abort (as oppossed to returning false).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can also directly load internal data files used by KoLmafia, such as concoctions.txt and fullness.txt, by specifying their name&amp;amp;#151;KoLmafia will automatically load the file for you. For a full list of internal data files used by KoLmafia, see the [http://sourceforge.net/p/kolmafia/code/HEAD/tree/src/data/ KoLmafia source repository].|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This sample loads a simple map that includes item names keyed by a number.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [int] my_list;&lt;br /&gt;
file_to_map( &amp;quot;SavedList.txt&amp;quot; , my_list);&lt;br /&gt;
for i from 0 to (count(my_list) - 1) {&lt;br /&gt;
   print( &amp;quot;At index: &amp;quot; + i + &amp;quot; We find: &amp;quot; + my_list[i] );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
If the file &amp;quot;SavedList.txt&amp;quot; had the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0	StDoodle&lt;br /&gt;
1	Grotfang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the results would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
At index: 0 We find: StDoodle&lt;br /&gt;
At index: 1 We find: Grotfang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=The following sample loads the full list of {{kolwiki|Category:Spleentacular Items|spleen-damaging items}} from [http://kolmafia.svn.sourceforge.net/viewvc/kolmafia/src/data/spleenhit.txt spleenhit.txt].|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] spleen_hits;&lt;br /&gt;
file_to_map( &amp;quot;spleenhit.txt&amp;quot; , spleen_hits );&lt;br /&gt;
&lt;br /&gt;
foreach itm, spleen_hit in spleen_hits&lt;br /&gt;
   print( itm + &amp;quot; will damage &amp;quot; + spleen_hit + &amp;quot; of your spleen.&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|map_to_file|}}|&lt;br /&gt;
more_info=You can load any information stored in a data file, as long as your map contains the appropriate [[Data Types]] separated by tabs. Spaces are just considered to be part of a string.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any line that begins with a number sign (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;) is considered a comment, and is ignored by KoLmafia.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Miscellaneous Functions]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5226</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5226"/>
		<updated>2013-03-03T12:50:00Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
(by [[User:Grotfang|Grotfang]])&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&lt;br /&gt;
b      c      bc&lt;br /&gt;
b      d      bd&lt;br /&gt;
c      d      cd&lt;br /&gt;
e      f      ef&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map2 (containing only entries that have &amp;quot;b&amp;quot; as key1) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
c      bc&lt;br /&gt;
d      bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5225</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5225"/>
		<updated>2013-03-03T12:49:44Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps== (by [[User:Grotfang|Grotfang]])&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&lt;br /&gt;
b      c      bc&lt;br /&gt;
b      d      bd&lt;br /&gt;
c      d      cd&lt;br /&gt;
e      f      ef&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map2 (containing only entries that have &amp;quot;b&amp;quot; as key1) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
c      bc&lt;br /&gt;
d      bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=2898</id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=2898"/>
		<updated>2011-02-04T19:16:09Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To contribute to the Mafia project, you&#039;ll need to be able to install the Java Development Kit, connect to the SVN and be comfortable writing Java Code. Instructions for the first two are included below:&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
# Download and install the Java Development Kit, available here: http://java.sun.com/javase/downloads/index.jsp&lt;br /&gt;
# Download and install Subversion, available here: http://www.collab.net/downloads/subversion/&lt;br /&gt;
# Download and install Tortoise SVN (or of course, another SVN program), available here: http://tortoisesvn.tigris.org/&lt;br /&gt;
# Download and install WinAnt, available here: http://code.google.com/p/winant/&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. Using Tortoise SVN, you have to right-click on your desktop, select &amp;quot;SVN Checkout&amp;quot;, and put the URL of the repository as &amp;quot;https://kolmafia.svn.sourceforge.net/svnroot/kolmafia&amp;quot;. Leave all other settings as they are, and click OK.&lt;br /&gt;
# Copy C:/Program Files/WinAnt/bin/ant.bat to your Desktop/kolmafia/ folder. If you have set up WinAnt correctly (and it&#039;s hard not to - there aren&#039;t many options) then double clicking on this file should compile the program.&lt;br /&gt;
# Compiling creates a &amp;quot;build&amp;quot; and &amp;quot;dist&amp;quot; folder. The end program is in dist/Kolmafia.jar.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
# Install Sun Java Development Kit ( debian: apt-get install sun-java6-jdk )&lt;br /&gt;
# Install Subversion ( debian: apt-get install svn )&lt;br /&gt;
# Install Ant ( debian: apt-get install ant )&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. ( svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia )&lt;br /&gt;
# Verify tou are using sun-java with ( debian: update-alternatives --all )&lt;br /&gt;
# I had to change $JAVA_HOME to compile ( export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 )&lt;br /&gt;
# Compile kolmafia with Ant ( debian: cd kolmafia &amp;amp;&amp;amp; ant debian )&lt;br /&gt;
# Install kolmafia ( debian: cd dist &amp;amp;&amp;amp; dpkg -i kolmafia*.deb )&lt;br /&gt;
&lt;br /&gt;
==MacOSX==&lt;br /&gt;
&lt;br /&gt;
# Install the appropriate developer tools for your version of MacOSX from the Mac Dev Center (http://developer.apple.com/devcenter/mac/index.action) or from your original OS install disks.&lt;br /&gt;
# Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. cd ~/Projects, or some similar directory)&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. (svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia )&lt;br /&gt;
# Compile kolmafia with Ant (cd kolmafia &amp;amp;&amp;amp; ant jarbundler) (use ant daily jarbundler after the initial install to update kol and build in one step)&lt;br /&gt;
# copy the application to your preferred location: (cp ./dist/KoLMafia.app /Applications)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tech Support]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=2897</id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=2897"/>
		<updated>2011-02-04T19:15:51Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Windows */ Also need to install SVN along with TortoiseSVN&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To contribute to the Mafia project, you&#039;ll need to be able to install the Java Development Kit, connect to the SVN and be comfortable writing Java Code. Instructions for the first two are included below:&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
# Download and install the Java Development Kit, available here: http://java.sun.com/javase/downloads/index.jsp&lt;br /&gt;
# Download and install SVN, available here: http://www.collab.net/downloads/subversion/&lt;br /&gt;
# Download and install Tortoise SVN (or of course, another SVN program), available here: http://tortoisesvn.tigris.org/&lt;br /&gt;
# Download and install WinAnt, available here: http://code.google.com/p/winant/&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. Using Tortoise SVN, you have to right-click on your desktop, select &amp;quot;SVN Checkout&amp;quot;, and put the URL of the repository as &amp;quot;https://kolmafia.svn.sourceforge.net/svnroot/kolmafia&amp;quot;. Leave all other settings as they are, and click OK.&lt;br /&gt;
# Copy C:/Program Files/WinAnt/bin/ant.bat to your Desktop/kolmafia/ folder. If you have set up WinAnt correctly (and it&#039;s hard not to - there aren&#039;t many options) then double clicking on this file should compile the program.&lt;br /&gt;
# Compiling creates a &amp;quot;build&amp;quot; and &amp;quot;dist&amp;quot; folder. The end program is in dist/Kolmafia.jar.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
# Install Sun Java Development Kit ( debian: apt-get install sun-java6-jdk )&lt;br /&gt;
# Install Subversion ( debian: apt-get install svn )&lt;br /&gt;
# Install Ant ( debian: apt-get install ant )&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. ( svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia )&lt;br /&gt;
# Verify tou are using sun-java with ( debian: update-alternatives --all )&lt;br /&gt;
# I had to change $JAVA_HOME to compile ( export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 )&lt;br /&gt;
# Compile kolmafia with Ant ( debian: cd kolmafia &amp;amp;&amp;amp; ant debian )&lt;br /&gt;
# Install kolmafia ( debian: cd dist &amp;amp;&amp;amp; dpkg -i kolmafia*.deb )&lt;br /&gt;
&lt;br /&gt;
==MacOSX==&lt;br /&gt;
&lt;br /&gt;
# Install the appropriate developer tools for your version of MacOSX from the Mac Dev Center (http://developer.apple.com/devcenter/mac/index.action) or from your original OS install disks.&lt;br /&gt;
# Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. cd ~/Projects, or some similar directory)&lt;br /&gt;
# Connect to the SVN server and download the source code for the Mafia Project. (svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia )&lt;br /&gt;
# Compile kolmafia with Ant (cd kolmafia &amp;amp;&amp;amp; ant jarbundler) (use ant daily jarbundler after the initial install to update kol and build in one step)&lt;br /&gt;
# copy the application to your preferred location: (cp ./dist/KoLMafia.app /Applications)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tech Support]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Chat_clan&amp;diff=5863</id>
		<title>Chat clan</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Chat_clan&amp;diff=5863"/>
		<updated>2010-12-18T08:13:55Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Add two argument version of the function.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|chat_clan}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Uncategorized|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|message}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also{{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|message}}|&lt;br /&gt;
parameter2={{Param|string|channel}}|&lt;br /&gt;
p1desc={{pspan|message}} is the message you want posted in clan chat.|&lt;br /&gt;
p2desc={{pspan|channel}} is the channel you want to post in. This should be one of &amp;quot;clan&amp;quot;, &amp;quot;hobopolis&amp;quot; or &amp;quot;slimetube&amp;quot;.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to post messages in your clan chat channel.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This message will be posted in your clan chat.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
chat_clan(&amp;quot;I just sent zarqon all my bat items. I recommend you do the same!&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|chat_private}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2553</id>
		<title>Ash Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2553"/>
		<updated>2010-12-18T08:07:48Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* c */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
Master list of all ASH functions. All functions as of r8144 are listed; this list is intended to be kept current, but it is possible that some functions added since the above revision may be missing. (Please feel free to add in any you notice.)&lt;br /&gt;
===a===&lt;br /&gt;
{{Flink|void|abort|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|add_item_condition|int|item}}&lt;br /&gt;
{{Flink|boolean|adv1|location|int|string}}&lt;br /&gt;
{{Flink|boolean|adventure|int|location|{{opt|string}}}}&lt;br /&gt;
{{Flink|float [monster]|appearance_rates|location}}&lt;br /&gt;
{{Flink|buffer|append|buffer|string}}&lt;br /&gt;
{{Flink|buffer|append_replacement|matcher|buffer|string}}&lt;br /&gt;
{{Flink|buffer|append_tail|matcher|buffer}}&lt;br /&gt;
{{Flink|buffer|attack}}&lt;br /&gt;
{{Flink|boolean|autosell|int|item}}&lt;br /&gt;
{{Flink|int|autosell_price|item}}&lt;br /&gt;
{{Flink|int|available_amount|item}}&lt;br /&gt;
===b===&lt;br /&gt;
{{Flink|boolean|batch_close}}&lt;br /&gt;
{{Flink|void|batch_open}}&lt;br /&gt;
{{Flink|boolean|black_market_available}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|string|{{opt|string}}}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|item|string}}&lt;br /&gt;
{{Flink|int|buffed_hit_stat}}&lt;br /&gt;
{{Flink|boolean|buy|int|item}}&lt;br /&gt;
{{Flink|int|buy|int|item|int}}&lt;br /&gt;
===c===&lt;br /&gt;
{{Flink|boolean|can_drink}}&lt;br /&gt;
{{Flink|boolean|can_eat}}&lt;br /&gt;
{{Flink|boolean|can_equip|item}}&lt;br /&gt;
{{Flink|boolean|can_interact}}&lt;br /&gt;
{{Flink|int|ceil|float}}&lt;br /&gt;
{{Flink|boolean|chamber}}&lt;br /&gt;
{{Flink|boolean|change_mcd|int}}&lt;br /&gt;
{{Flink|string|char_at|string|int}}&lt;br /&gt;
{{Flink|void|chat_clan|string}}&lt;br /&gt;
{{Flink|void|chat_clan|string|string}}&lt;br /&gt;
{{Flink|void|chat_private|string|string}}&lt;br /&gt;
{{Flink|class|class_modifier|string|string}}&lt;br /&gt;
{{Flink|class|class_modifier|item|string}}&lt;br /&gt;
{{Flink|void|clear|aggregate}}&lt;br /&gt;
{{Flink|boolean|cli_execute|string}}&lt;br /&gt;
{{Flink|int|closet_amount|item}}&lt;br /&gt;
{{Flink|float|combat_rate_modifier}}&lt;br /&gt;
{{Flink|boolean|contains_text|string|string}}&lt;br /&gt;
{{Flink|void|council}}&lt;br /&gt;
{{Flink|int|count|aggregate}}&lt;br /&gt;
{{Flink|boolean|craft|string|int|item|item}}&lt;br /&gt;
{{Flink|int|creatable_amount|item}}&lt;br /&gt;
{{Flink|boolean|create|int|item}}&lt;br /&gt;
{{Flink|matcher|create_matcher|string|string}}&lt;br /&gt;
{{Flink|stat|current_hit_stat}}&lt;br /&gt;
{{Flink|int|current_mcd}}&lt;br /&gt;
&lt;br /&gt;
===d===&lt;br /&gt;
{{Flink|item|daily_special}}&lt;br /&gt;
{{Flink|float|damage_absorption_percent}}&lt;br /&gt;
{{Flink|int|damage_reduction}}&lt;br /&gt;
{{Flink|buffer|delete|buffer|int|int}}&lt;br /&gt;
{{Flink|void|disable|string}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item}}&lt;br /&gt;
===e===&lt;br /&gt;
{{Flink|boolean|eat|int|item}}&lt;br /&gt;
{{Flink|boolean|eatsilent|int|item}}&lt;br /&gt;
{{Flink|effect|effect_modifier|string|string}}&lt;br /&gt;
{{Flink|effect|effect_modifier|item|string}}&lt;br /&gt;
{{Flink|float|elemental_resistance|element}}&lt;br /&gt;
{{Flink|float|elemental_resistance|{{opt|monster}}}}&lt;br /&gt;
{{Flink|void|enable|string}}&lt;br /&gt;
{{Flink|int|end|matcher|{{opt|int}}}}&lt;br /&gt;
{{Flink|boolean|enthrone_familiar|familiar}}&lt;br /&gt;
{{Flink|string|entity_decode|string}}&lt;br /&gt;
{{Flink|string|entity_encode|string}}&lt;br /&gt;
{{Flink|boolean|entryway}}&lt;br /&gt;
{{Flink|boolean|equip|{{opt|slot}}|item}}&lt;br /&gt;
{{Flink|int|equipped_amount|item}}&lt;br /&gt;
{{Flink|item|equipped_item|slot}}&lt;br /&gt;
{{Flink|int|expected_damage|{{opt|monster}}}}&lt;br /&gt;
{{Flink|float|experience_bonus}}&lt;br /&gt;
{{Flink|float|expression_eval}}&lt;br /&gt;
{{Flink|int [item]|extract_items|string}}&lt;br /&gt;
{{Flink|int|extract_meat|string}}&lt;br /&gt;
&lt;br /&gt;
===f===&lt;br /&gt;
{{Flink|item|familiar_equipment|familiar}}&lt;br /&gt;
{{Flink|item|familiar_equipped_equipment|familiar}}&lt;br /&gt;
{{Flink|int|familiar_weight|familiar}}&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|[boolean]}}&lt;br /&gt;
{{Flink|boolean|find|matcher}}&lt;br /&gt;
{{Flink|int|floor|float}}&lt;br /&gt;
{{Flink|string|form_field|string}}&lt;br /&gt;
{{Flink|int|fullness_limit}}&lt;br /&gt;
===g===&lt;br /&gt;
{{Flink|boolean|galaktik_cures_discounted}}&lt;br /&gt;
{{Flink|int|gameday_to_int}}&lt;br /&gt;
{{Flink|string|gameday_to_string}}&lt;br /&gt;
{{Flink|int [item]|get_campground}}&lt;br /&gt;
{{Flink|string|get_ccs_action|int}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int}}&lt;br /&gt;
{{Flink|item|get_dwelling|}}&lt;br /&gt;
{{Flink|int [item]|get_ingredients|item}}&lt;br /&gt;
{{Flink|int [item]|get_inventory}}&lt;br /&gt;
{{Flink|monster [int]|get_monsters|location}}&lt;br /&gt;
{{Flink|int|get_power|item}}&lt;br /&gt;
{{Flink|string|get_property|string}}&lt;br /&gt;
{{Flink|int [item]|get_related|item, string}}&lt;br /&gt;
{{Flink|int|get_revision}}&lt;br /&gt;
{{Flink|string|get_version}}&lt;br /&gt;
{{Flink|string|group|matcher|{{opt|int}}}}&lt;br /&gt;
{{Flink|int|group_count|matcher}}&lt;br /&gt;
{{Flink|string [int, int]|group_string|string|string}}&lt;br /&gt;
{{Flink|item|guardians}}&lt;br /&gt;
{{Flink|boolean|guild_store_available}}&lt;br /&gt;
&lt;br /&gt;
===h===&lt;br /&gt;
{{Flink|boolean|have_bartender}}&lt;br /&gt;
{{Flink|boolean|have_chef}}&lt;br /&gt;
{{Flink|boolean|have_display}}&lt;br /&gt;
{{Flink|int|have_effect|effect}}&lt;br /&gt;
{{Flink|boolean|have_equipped|item}}&lt;br /&gt;
{{Flink|boolean|have_familiar|familiar}}&lt;br /&gt;
{{Flink|boolean|have_mushroom_plot}}&lt;br /&gt;
{{Flink|boolean|have_outfit|string}}&lt;br /&gt;
{{Flink|boolean|have_shop}}&lt;br /&gt;
{{Flink|boolean|have_skill|skill}}&lt;br /&gt;
{{Flink|boolean|hedgemaze}}&lt;br /&gt;
{{Flink|boolean|hermit|int|item}}&lt;br /&gt;
{{Flink|boolean|hippy_store_available}}&lt;br /&gt;
{{Flink|float|historical_age|item}}&lt;br /&gt;
{{Flink|int|historical_price|item}}&lt;br /&gt;
===i===&lt;br /&gt;
{{Flink|boolean|in_bad_moon}}&lt;br /&gt;
{{Flink|boolean|in_hardcore}}&lt;br /&gt;
{{Flink|boolean|in_moxie_sign}}&lt;br /&gt;
{{Flink|boolean|in_muscle_sign}}&lt;br /&gt;
{{Flink|boolean|in_mysticality_sign}}&lt;br /&gt;
{{Flink|int|index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|int|inebriety_limit}}&lt;br /&gt;
{{Flink|float|initiative_modifier}}&lt;br /&gt;
{{Flink|buffer|insert|buffer|int|string}}&lt;br /&gt;
{{Flink|boolean|is_displayable|item}}&lt;br /&gt;
{{Flink|boolean|is_giftable|item}}&lt;br /&gt;
{{Flink|boolean|is_goal|item}}&lt;br /&gt;
{{Flink|boolean|is_integer|string}}&lt;br /&gt;
{{Flink|boolean|is_npc_item|item}}&lt;br /&gt;
{{Flink|boolean|is_online|string}}&lt;br /&gt;
{{Flink|boolean|is_tradeable|item}}&lt;br /&gt;
{{Flink|int|item_amount|item}}&lt;br /&gt;
{{Flink|float|item_drop_modifier}}&lt;br /&gt;
{{Flink|int [item]|item_drops|{{opt|monster}}}}&lt;br /&gt;
{{Flink|record [int]|item_drops_array|{{opt|monster}}}}&lt;br /&gt;
{{Flink|string|item_type|item}}&lt;br /&gt;
===l===&lt;br /&gt;
{{Flink|int|last_index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|monster|last_monster}}&lt;br /&gt;
{{Flink|int|length|string}}&lt;br /&gt;
{{Flink|buffer|load_html|string}}&lt;br /&gt;
{{Flink|void|logprint|string}}&lt;br /&gt;
===m===&lt;br /&gt;
{{Flink|int|mall_price|item}}&lt;br /&gt;
{{Flink|int|mana_cost_modifier}}&lt;br /&gt;
{{Flink|boolean|map_to_file|aggregate|string|[boolean]}}&lt;br /&gt;
{{Flink|float|max|float|float}}&lt;br /&gt;
{{Flink|int|max|int|int}}&lt;br /&gt;
{{Flink|int|meat_drop|{{opt|monster}}}}&lt;br /&gt;
{{Flink|float|meat_drop_modifier}}&lt;br /&gt;
{{Flink|float|min|float|float}}&lt;br /&gt;
{{Flink|int|min|int|int}}&lt;br /&gt;
{{Flink|int|mmg_bet_amount|int}}&lt;br /&gt;
{{Flink|string|mmg_bet_owner|int}}&lt;br /&gt;
{{Flink|int|mmg_bet_owner_id|int}}&lt;br /&gt;
{{Flink|string|mmg_bet_taker}}&lt;br /&gt;
{{Flink|string|mmg_bet_taker_id}}&lt;br /&gt;
{{Flink|int|mmg_bet_winnings}}&lt;br /&gt;
{{Flink|int|mmg_make_bet|int|boolean}}&lt;br /&gt;
{{Flink|int [int]|mmg_my_bets}}&lt;br /&gt;
{{Flink|int [int]|mmg_offered_bets}}&lt;br /&gt;
{{Flink|boolean|mmg_retract_bet|int}}&lt;br /&gt;
{{Flink|void|mmg_search|int|int}}&lt;br /&gt;
{{Flink|int|mmg_take_bet|int|boolean}}&lt;br /&gt;
{{Flink|void|mmg_visit}}&lt;br /&gt;
{{Flink|int|mmg_wait_event|int}}&lt;br /&gt;
{{Flink|float|modifier_eval|string}}&lt;br /&gt;
{{Flink|int|monster_attack|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_defense|{{opt|monster}}}}&lt;br /&gt;
{{Flink|element|monster_element|{{opt|monster}}}}&lt;br /&gt;
{{Flink|float|monster_eval|{{opt|string}}}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_level_adjustment}}&lt;br /&gt;
{{Flink|int|moon_light}}&lt;br /&gt;
{{Flink|int|moon_phase}}&lt;br /&gt;
{{Flink|int|mp_cost|skill}}&lt;br /&gt;
{{Flink|int|my_adventures}}&lt;br /&gt;
{{Flink|int|my_ascensions}}&lt;br /&gt;
{{Flink|int|my_basestat|stat}}&lt;br /&gt;
{{Flink|int|my_buffedstat|stat}}&lt;br /&gt;
{{Flink|class|my_class}}&lt;br /&gt;
{{Flink|int|my_closet_meat}}&lt;br /&gt;
{{Flink|int|my_daycount|}}&lt;br /&gt;
{{Flink|familiar|my_enthroned_familiar}}&lt;br /&gt;
{{Flink|familiar|my_familiar}}&lt;br /&gt;
{{Flink|int|my_fullness}}&lt;br /&gt;
{{Flink|string|my_hash}}&lt;br /&gt;
{{Flink|int|my_hp}}&lt;br /&gt;
{{Flink|string|my_id}}&lt;br /&gt;
{{Flink|int|my_inebriety}}&lt;br /&gt;
{{Flink|int|my_level}}&lt;br /&gt;
{{Flink|location|my_location}}&lt;br /&gt;
{{Flink|int|my_maxhp}}&lt;br /&gt;
{{Flink|int|my_maxmp}}&lt;br /&gt;
{{Flink|int|my_meat}}&lt;br /&gt;
{{Flink|int|my_mp}}&lt;br /&gt;
{{Flink|string|my_name}}&lt;br /&gt;
{{Flink|stat|my_primestat}}&lt;br /&gt;
{{Flink|int|my_spleen_use}}&lt;br /&gt;
{{Flink|int|my_turncount}}&lt;br /&gt;
===n===&lt;br /&gt;
{{Flink|float|numeric_modifier|string|{{opt|string}}}}&lt;br /&gt;
{{Flink|float|numeric_modifier|item|string}}&lt;br /&gt;
{{Flink|float|numeric_modifier|effect|string}}&lt;br /&gt;
{{Flink|float|numeric_modifier|skill|string}}&lt;br /&gt;
{{Flink|float|numeric_modifier|familiar|string|int|item}}&lt;br /&gt;
===o===&lt;br /&gt;
{{Flink|boolean|outfit|string}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
===p===&lt;br /&gt;
{{Flink|void|print|string|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|print_html|string}}&lt;br /&gt;
{{Flink|int|pulls_remaining}}&lt;br /&gt;
{{Flink|boolean|put_closet|int|{{opt|item}}}}&lt;br /&gt;
{{Flink|boolean|put_display|int|item}}&lt;br /&gt;
{{Flink|boolean|put_shop|int|int|{{opt|int}}|item}}&lt;br /&gt;
{{Flink|boolean|put_stash|int|item}}&lt;br /&gt;
===r===&lt;br /&gt;
{{Flink|int|random|int}}&lt;br /&gt;
{{Flink|int|raw_damage_absorption}}&lt;br /&gt;
{{Flink|boolean|refresh_stash}}&lt;br /&gt;
{{Flink|boolean|refresh_status}}&lt;br /&gt;
{{Flink|boolean|replace|buffer|int|int|string}}&lt;br /&gt;
{{Flink|string|replace_all|matcher|string}}&lt;br /&gt;
{{Flink|string|replace_first|matcher|string}}&lt;br /&gt;
{{Flink|buffer|replace_string|buffer|string|string}}&lt;br /&gt;
{{Flink|buffer|replace_string|string|string|string}}&lt;br /&gt;
{{Flink|matcher|reset|matcher|{{opt|string}}}}&lt;br /&gt;
{{Flink|boolean|restore_hp|int}}&lt;br /&gt;
{{Flink|boolean|restore_mp|int}}&lt;br /&gt;
{{Flink|boolean|retrieve_item|int|item}}&lt;br /&gt;
{{Flink|int|round|float}}&lt;br /&gt;
{{Flink|buffer|run_combat}}&lt;br /&gt;
{{Flink|buffer|runaway}}&lt;br /&gt;
===s===&lt;br /&gt;
{{Flink|string [int]|session_logs|{{opt|string}}|int}}&lt;br /&gt;
{{Flink|void|set_length|buffer|int}}&lt;br /&gt;
{{Flink|void|set_location|location}}&lt;br /&gt;
{{Flink|void|set_property|string|string}}&lt;br /&gt;
{{Flink|int|shop_amount|item}}&lt;br /&gt;
{{Flink|int|spleen_limit}}&lt;br /&gt;
{{Flink|string [int]|split_string|string|{{opt|string}}}}&lt;br /&gt;
{{Flink|float|square_root|float}}&lt;br /&gt;
{{Flink|int|start|matcher|{{opt|int}}}}&lt;br /&gt;
{{Flink|int|stash_amount|item}}&lt;br /&gt;
{{Flink|stat|stat_bonus_today}}&lt;br /&gt;
{{Flink|stat|stat_bonus_tomorrow}}&lt;br /&gt;
{{Flink|stat|stat_modifier|effect|string}}&lt;br /&gt;
{{Flink|buffer|steal}}&lt;br /&gt;
{{Flink|int|stills_available}}&lt;br /&gt;
{{Flink|int|storage_amount|item}}&lt;br /&gt;
{{Flink|string|string_modifier|string}}&lt;br /&gt;
{{Flink|string|string_modifier|string|string}}&lt;br /&gt;
{{Flink|string|substring|string|int|{{opt|int}}}}&lt;br /&gt;
&lt;br /&gt;
===t===&lt;br /&gt;
{{Flink|boolean|take_closet|int|{{opt|item}}}}&lt;br /&gt;
{{Flink|boolean|take_display|int|item}}&lt;br /&gt;
{{Flink|boolean|take_stash|int|item}}&lt;br /&gt;
{{Flink|boolean|take_storage|int|item}}&lt;br /&gt;
{{Flink|int|tavern}}&lt;br /&gt;
{{Flink|buffer|throw_items|item|{{opt|item}}}}&lt;br /&gt;
{{Flink|boolean|to_boolean|any}}&lt;br /&gt;
{{Flink|class|to_class|string}}&lt;br /&gt;
{{Flink|effect|to_effect|int}}&lt;br /&gt;
{{Flink|effect|to_effect|string}}&lt;br /&gt;
{{Flink|effect|to_effect|skill}}&lt;br /&gt;
{{Flink|element|to_element|string}}&lt;br /&gt;
{{Flink|familiar|to_familiar|int}}&lt;br /&gt;
{{Flink|familiar|to_familiar|string}}&lt;br /&gt;
{{Flink|float|to_float|any}}&lt;br /&gt;
{{Flink|int|to_int|any}}&lt;br /&gt;
{{Flink|item|to_item|string}}&lt;br /&gt;
{{Flink|item|to_item|int}}&lt;br /&gt;
{{Flink|item|to_item|string|int}}&lt;br /&gt;
{{Flink|location|to_location|string}}&lt;br /&gt;
{{Flink|location|to_location|int}}&lt;br /&gt;
{{Flink|string|to_lower_case|string}}&lt;br /&gt;
{{Flink|monster|to_monster|string}}&lt;br /&gt;
{{Flink|string|to_plural|item}}&lt;br /&gt;
{{Flink|skill|to_skill|int}}&lt;br /&gt;
{{Flink|skill|to_skill|string}}&lt;br /&gt;
{{Flink|skill|to_skill|effect}}&lt;br /&gt;
{{Flink|slot|to_slot|item}}&lt;br /&gt;
{{Flink|stat|to_stat|string}}&lt;br /&gt;
{{Flink|string|to_string|any}}&lt;br /&gt;
{{Flink|string|to_upper_case|string}}&lt;br /&gt;
{{Flink|string|to_url|location}}&lt;br /&gt;
{{Flink|string|today_to_string}}&lt;br /&gt;
{{Flink|int|truncate|float}}&lt;br /&gt;
{{Flink|int|turns_per_cast|skill}}&lt;br /&gt;
{{Flink|int|turns_played}}&lt;br /&gt;
&lt;br /&gt;
===u===&lt;br /&gt;
{{Flink|string|url_decode|string}}&lt;br /&gt;
{{Flink|string|url_encode|string}}&lt;br /&gt;
{{Flink|boolean|use|int|item}}&lt;br /&gt;
{{Flink|boolean|use_familiar|familiar}}&lt;br /&gt;
{{Flink|boolean|use_skill|int|skill|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|use_skill|skill}}&lt;br /&gt;
{{Flink|boolean|user_confirm|string}}&lt;br /&gt;
===v===&lt;br /&gt;
{{Flink|buffer|visit_url}}&lt;br /&gt;
{{Flink|buffer|visit_url|string}}&lt;br /&gt;
{{Flink|buffer|visit_url|string|boolean}}&lt;br /&gt;
===w===&lt;br /&gt;
{{Flink|void|wait|int}}&lt;br /&gt;
{{Flink|void|waitq|int}}&lt;br /&gt;
{{Flink|int|weapon_hands|item}}&lt;br /&gt;
{{Flink|stat|weapon_type|item}}&lt;br /&gt;
{{Flink|int|weight_adjustment}}&lt;br /&gt;
{{Flink|boolean|white_citadel_available}}&lt;br /&gt;
{{Flink|boolean|will_usually_dodge}}&lt;br /&gt;
{{Flink|boolean|will_usually_miss}}&lt;br /&gt;
{{Flink|void|write|string}}&lt;br /&gt;
{{Flink|void|writeln|string}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2946</id>
		<title>CLI Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2946"/>
		<updated>2010-08-13T19:22:43Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Silly spaces...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The KoLmafia Graphical CLI is one of the most helpful features Mafia has. This page is intended to provide information on the commands available.&lt;br /&gt;
&lt;br /&gt;
=How to use these commands=&lt;br /&gt;
&lt;br /&gt;
Square brackets [ ] enclose optional elements of commands. In command descriptions, they may also enclose the effects of using those optional elements.&lt;br /&gt;
&lt;br /&gt;
Vertical bars | separate alternative elements - choose any one. (But note that || is an actual part of a few commands.)&lt;br /&gt;
&lt;br /&gt;
An ellipsis ... after an element means that it can be repeated as many times as needed.&lt;br /&gt;
&lt;br /&gt;
Elements in italics are placeholders - replace them with an actual name you want the command to operate on.&lt;br /&gt;
&lt;br /&gt;
Commands with an asterisk * after the name are abbreviations - you can type them in a longer form if desired.&lt;br /&gt;
&lt;br /&gt;
Some command names can be followed by a question mark (shown as [?] ), in which case the command will just display what it would do, rather than actually doing it.&lt;br /&gt;
&lt;br /&gt;
When adventuring, or using an item or skill, the name can be preceded by a number specifying how many times to do it. An asterisk in place of this number means &amp;quot;as many as possible&amp;quot; or &amp;quot;the current quantity in inventory&amp;quot;, depending on context. Negative numbers mean to do that many less than the maximum.&lt;br /&gt;
&lt;br /&gt;
Usually, multiple commands can be given on the same line, separated by semicolons. The exceptions (alias, ash, ashq, cheapest, expensive, fecho, fprint, get, set, speculate, whatif, later) treat the entire remainder of the line as a parameter.&lt;br /&gt;
&lt;br /&gt;
A few commands (elseif, else, if, try, while) treat at least one following command as a block that is executed conditionally or repetitively. The block consists of the remainder of the line, or the entire next line if that&#039;s empty. The block is extended by additional lines if it would otherwise end with one of these special commands.&lt;br /&gt;
&lt;br /&gt;
===Quantity Parameter===&lt;br /&gt;
Any place that a number can be used to define a quantity, such as &amp;lt;code&amp;gt;autosell 5 heavy D&amp;lt;/code&amp;gt;, you can use one of the following to indicate a variable quantity:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; is used to indicate all items in inventory.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell * heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
* 0 is also used to indicate all items in inventory.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell 0 heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
* a negative number means sell off all items except for the number listed. For example, -5 means keep 5 and sell the rest.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell -5 heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Item Parameter===&lt;br /&gt;
There are two ways to provide an item. By name or number.&lt;br /&gt;
* An item&#039;s name can be used in the obvious way, however this may sometimes fail because some items have numbers as part of their names. KoL&#039;s fuzzy matching will sometimes make a mistake such as interpreting {{Pspan|1 WA}} as a {{Pspan|100-watt light bulb}}.&lt;br /&gt;
&lt;br /&gt;
* An item&#039;s ID number can be used to avoid any possibility of ambiguity. This also allows names with commas to be passed as parameters to functions that contain comma separated lists. To do this the item needs to be prefaced by a &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Pilcrow pilcrow]&amp;lt;/span&amp;gt;. The character: ¶, is also known as a paragraph mark. It can be typed from your keyboard with a bit of know-how or included in an ash script as &amp;quot;\u00B6&amp;quot;.&lt;br /&gt;
: &amp;lt;code&amp;gt;send 1 ¶4358 to Bale|Thanks for being awesome&amp;lt;/code&amp;gt; &lt;br /&gt;
: is a way to send {{Pspan|A Crimbo Carol, Ch. 5}} to Bale despite the comma in the item&#039;s name.&lt;br /&gt;
&lt;br /&gt;
=Commands=&lt;br /&gt;
==Equipment, Inventory and Consumption Management==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  *brewery*[?]&lt;br /&gt;
|  [ daily special &amp;amp;#124; item ] &lt;br /&gt;
|  show daily special [or consume it or other restaurant item].&lt;br /&gt;
|-&lt;br /&gt;
|  *kitchen*[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  consumes item at Hell&#039;s Kitchen, if available.&lt;br /&gt;
|-&lt;br /&gt;
|  acquire&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  bake&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  chew[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  cleanup&lt;br /&gt;
|  &lt;br /&gt;
|  use, pulverize, or autosell your junk items.&lt;br /&gt;
|-&lt;br /&gt;
|  closet&lt;br /&gt;
|  list filter &amp;amp;#124; put item... | take item... &lt;br /&gt;
|  list or manipulate your closet.&lt;br /&gt;
|-&lt;br /&gt;
|  create&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  display&lt;br /&gt;
|  [filter] &amp;amp;#124; put item... | take item... &lt;br /&gt;
|  list or manipulate your display case.&lt;br /&gt;
|-&lt;br /&gt;
|  eat[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  equip&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  find&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  fold[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  produce item by using another form, repeated as needed.&lt;br /&gt;
|-&lt;br /&gt;
|  ghost[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  hagnk&lt;br /&gt;
|  outfit name &amp;amp;#124; item [, item]... &lt;br /&gt;
|  pull items from Hagnk&#039;s storage.&lt;br /&gt;
|-&lt;br /&gt;
|  hermit[?]&lt;br /&gt;
|  [item] &lt;br /&gt;
|  get clover status, or trade for item.&lt;br /&gt;
|-&lt;br /&gt;
|  hobo[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  inv*&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  junk&lt;br /&gt;
|  &lt;br /&gt;
|  use, pulverize, or autosell your junk items.&lt;br /&gt;
|-&lt;br /&gt;
|  make&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  maximize[?]&lt;br /&gt;
|  [+&amp;amp;#124;-&amp;amp;#124;weight] keyword, ...&lt;br /&gt;
|  run the [[Modifier Maximizer]].&lt;br /&gt;
|-&lt;br /&gt;
|  mix&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  modifies&lt;br /&gt;
|  filter &lt;br /&gt;
|  list all possible sources of modifiers matching filter.&lt;br /&gt;
|-&lt;br /&gt;
|  [[Modifiers|modref]]&lt;br /&gt;
|  [object] &lt;br /&gt;
|  list all modifiers, show values for player [and object].&lt;br /&gt;
|-&lt;br /&gt;
|  modtrace&lt;br /&gt;
|  filter &lt;br /&gt;
|  list everything that adds to modifiers matching filter.&lt;br /&gt;
|-&lt;br /&gt;
|  outfit&lt;br /&gt;
|  [list filter] &amp;amp;#124; save name &amp;amp;#124; checkpoint &amp;amp;#124; name &lt;br /&gt;
|  list, save, restore, or change outfits.&lt;br /&gt;
|-&lt;br /&gt;
|  overdrink[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  ply&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  pull&lt;br /&gt;
|  outfit name &amp;amp;#124; item [, item]... &lt;br /&gt;
|  pull items from Hagnk&#039;s storage.&lt;br /&gt;
|-&lt;br /&gt;
|  pulverize&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  pulverize specified items&lt;br /&gt;
|-&lt;br /&gt;
|  quark[?]&lt;br /&gt;
|  [itemList...] &lt;br /&gt;
|  gain MP by pasting unstable quark with best item from itemList (or your junk list).&lt;br /&gt;
|-&lt;br /&gt;
|  remove&lt;br /&gt;
|  slot &amp;amp;#124; name &lt;br /&gt;
|  remove equipment in slot, or that matches name&lt;br /&gt;
|-&lt;br /&gt;
|  restaurant[?]&lt;br /&gt;
|  [ daily special &amp;amp;#124; item ] &lt;br /&gt;
|  show daily special [or consume it or other restaurant item].&lt;br /&gt;
|-&lt;br /&gt;
|  retrieve&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  slimeling[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  smash&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  pulverize specified items&lt;br /&gt;
|-&lt;br /&gt;
|  smith&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  [[speculate]]&lt;br /&gt;
|  MCD num &amp;amp;#124; equip [slot] item &amp;amp;#124; unequip slot &amp;amp;#124; familiar type &amp;amp;#124; up eff &amp;amp;#124; uneffect eff &amp;amp;#124; quiet ; [another;...] &lt;br /&gt;
|  predict modifiers.&lt;br /&gt;
|-&lt;br /&gt;
|  squeeze[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  produce item by using another form, repeated as needed.&lt;br /&gt;
|-&lt;br /&gt;
|  stash&lt;br /&gt;
|  [put] item... &amp;amp;#124; take item... &lt;br /&gt;
|  exchange items with clan stash&lt;br /&gt;
|-&lt;br /&gt;
|  sticker*&lt;br /&gt;
|  sticker1 [, sticker2 [, sticker3]] &lt;br /&gt;
|  replace worn stickers.&lt;br /&gt;
|-&lt;br /&gt;
|  storage&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  tinker&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  wear&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  [[whatif]]&lt;br /&gt;
|  MCD num &amp;amp;#124; equip [slot] item | unequip slot | familiar type | up eff | uneffect eff | quiet ; [another;...] &lt;br /&gt;
|  predict modifiers.&lt;br /&gt;
|-&lt;br /&gt;
|  wield&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  zap&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  transform items with your wand.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Quests==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  !&lt;br /&gt;
|  &lt;br /&gt;
|  list the Dungeons of Doom potions you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  bang&lt;br /&gt;
|  &lt;br /&gt;
|  list the Dungeons of Doom potions you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  chamber&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  council&lt;br /&gt;
|  &lt;br /&gt;
|  visit the Council to advance quest progress.&lt;br /&gt;
|-&lt;br /&gt;
|  dusty&lt;br /&gt;
|  &lt;br /&gt;
|  list the dusty bottles of wine you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  entryway&lt;br /&gt;
|  [clover] &lt;br /&gt;
|  automatically complete quest [using a clover].&lt;br /&gt;
|-&lt;br /&gt;
|  factory&lt;br /&gt;
|  report digits &lt;br /&gt;
|  Given a string of 7 dwarven digits, report on factory.&lt;br /&gt;
|-&lt;br /&gt;
|  gourd&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  grandpa&lt;br /&gt;
|  query &lt;br /&gt;
|  Ask Grandpa about something.&lt;br /&gt;
|-&lt;br /&gt;
|  guardians&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  guild&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  hedge*&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  insults&lt;br /&gt;
|  &lt;br /&gt;
|  list the pirate insult comebacks you know.&lt;br /&gt;
|-&lt;br /&gt;
|  leaflet&lt;br /&gt;
|  [nomagic] &amp;amp;#124; location | command &lt;br /&gt;
|  complete leaflet quest [without using magic words].&lt;br /&gt;
|-&lt;br /&gt;
|  maze&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  nemesis&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  tavern&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  telescope&lt;br /&gt;
|  [look] high &amp;amp;#124; low &lt;br /&gt;
|  get daily buff, or Lair hints from your telescope.&lt;br /&gt;
|-&lt;br /&gt;
|  tower&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Capitalism==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  automall&lt;br /&gt;
|  &lt;br /&gt;
|  dump all profitable, non-memento items into the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  autosell&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  autosell items.&lt;br /&gt;
|-&lt;br /&gt;
|  buy&lt;br /&gt;
|  item [@ limit] [, another]... &lt;br /&gt;
|  buy from NPC store or the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  cheapest[?]&lt;br /&gt;
|  [+]item [,[-]item]... [; cmds] &lt;br /&gt;
|  compare prices, do cmds with &amp;quot;it&amp;quot; replaced with best.&lt;br /&gt;
|-&lt;br /&gt;
|  expensive[?]&lt;br /&gt;
|  [+]item [,[-]item]... [; cmds]&lt;br /&gt;
|  compare prices, do cmds with &amp;quot;it&amp;quot; replaced with best.&lt;br /&gt;
|-&lt;br /&gt;
|  mallbuy&lt;br /&gt;
|  item [@ limit] [, another]... &lt;br /&gt;
|  buy from NPC store or the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  mallsell&lt;br /&gt;
|  item [[@] price [[limit] num]] [, another]... &lt;br /&gt;
|  sell in Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  reprice&lt;br /&gt;
|  &lt;br /&gt;
|  price all max-priced items at or below current Mall minimum price.&lt;br /&gt;
|-&lt;br /&gt;
|  searchmall&lt;br /&gt;
|  item [ with limit number ] &lt;br /&gt;
|  search the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  sell&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  autosell items.&lt;br /&gt;
|-&lt;br /&gt;
|  undercut&lt;br /&gt;
|  &lt;br /&gt;
|  price all max-priced items at or below current Mall minimum price.&lt;br /&gt;
|-&lt;br /&gt;
|  untinker&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  complete quest, or untinker items.&lt;br /&gt;
|-&lt;br /&gt;
|  use[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mafia==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  adv*[?]&lt;br /&gt;
|  last &amp;amp;#124; [count] location &lt;br /&gt;
|  spend your turns.&lt;br /&gt;
|-&lt;br /&gt;
|  abort&lt;br /&gt;
|  [message] &lt;br /&gt;
|  stop current script or automated task.&lt;br /&gt;
|-&lt;br /&gt;
|  [[alias]]&lt;br /&gt;
|  [ word =&amp;gt; expansion ] &lt;br /&gt;
|  list or create CLI abbreviations.&lt;br /&gt;
|-&lt;br /&gt;
|  [[ash (CLI)|ash]]&lt;br /&gt;
|  statement &lt;br /&gt;
|  test a line of ASH code without having to edit a script.&lt;br /&gt;
|-&lt;br /&gt;
|  [[ash (CLI)|asq]]&lt;br /&gt;
|  statement &lt;br /&gt;
|  Like ash, but does not display the return value.&lt;br /&gt;
|-&lt;br /&gt;
|  ashref&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  summarize ASH built-in functions [matching filter].&lt;br /&gt;
|-&lt;br /&gt;
|  backtrace&lt;br /&gt;
|  text &amp;amp;#124; off &lt;br /&gt;
|  dump stack when a gCLI message or page URL matches text (case-sensitive).&lt;br /&gt;
|-&lt;br /&gt;
|  breakfast&lt;br /&gt;
|  &lt;br /&gt;
|  perform start-of-day activities.&lt;br /&gt;
|-&lt;br /&gt;
|  budget&lt;br /&gt;
|  [number] &lt;br /&gt;
|  show [or set] the number of budgeted Hagnk&#039;s pulls.&lt;br /&gt;
|-&lt;br /&gt;
|  buffbot&lt;br /&gt;
|  number &lt;br /&gt;
|  run buffbot for number iterations.&lt;br /&gt;
|-&lt;br /&gt;
|  call&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  ccs&lt;br /&gt;
|  [script] &lt;br /&gt;
|  show [or select] Custom Combat Script in use.&lt;br /&gt;
|-&lt;br /&gt;
|  cecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  chat&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  check&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  checkpoint&lt;br /&gt;
|  &lt;br /&gt;
|  remembers current equipment, use &amp;quot;outfit checkpoint&amp;quot; to restore.&lt;br /&gt;
|-&lt;br /&gt;
|  clear&lt;br /&gt;
|  &lt;br /&gt;
|  clear CLI window.&lt;br /&gt;
|-&lt;br /&gt;
|  cls&lt;br /&gt;
|  &lt;br /&gt;
|  clear CLI window.&lt;br /&gt;
|-&lt;br /&gt;
|  condition*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  condref&lt;br /&gt;
|  &lt;br /&gt;
|  list conditions usable with if/while commands.&lt;br /&gt;
|-&lt;br /&gt;
|  counters&lt;br /&gt;
|  [ clear &amp;amp;#124; add number [title img] ] &lt;br /&gt;
|  show, clear, or add to current turn counters.&lt;br /&gt;
|-&lt;br /&gt;
|  debug&lt;br /&gt;
|  [on] &amp;amp;#124; off &lt;br /&gt;
|  start or stop logging of debugging data.&lt;br /&gt;
|-&lt;br /&gt;
|  disable&lt;br /&gt;
|  all &amp;amp;#124; command [, command]... &lt;br /&gt;
|  allow/deny CLI commands.&lt;br /&gt;
|-&lt;br /&gt;
|  events&lt;br /&gt;
|  [clear] &lt;br /&gt;
|  clear or show recent events.&lt;br /&gt;
|-&lt;br /&gt;
|  exec*&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  exit&lt;br /&gt;
|  &lt;br /&gt;
|  logout and exit KoLmafia.&lt;br /&gt;
|-&lt;br /&gt;
|  gc&lt;br /&gt;
|  &lt;br /&gt;
|  force Java garbage collection.&lt;br /&gt;
|-&lt;br /&gt;
|  gear&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  get&lt;br /&gt;
|  preference [ = value ] &lt;br /&gt;
|  show/change preference settings&lt;br /&gt;
|-&lt;br /&gt;
|  goal*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  hatter&lt;br /&gt;
|  &lt;br /&gt;
|  List effects you can get by wearing available hats at the hatter&#039;s tea party.&lt;br /&gt;
|-&lt;br /&gt;
|  help&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  list CLI commands [that match filter].&lt;br /&gt;
|-&lt;br /&gt;
|  item&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  later&lt;br /&gt;
|  commands &lt;br /&gt;
|  adds a button to do commands to the Daily Deeds list.&lt;br /&gt;
|-&lt;br /&gt;
|  load&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  log&lt;br /&gt;
|  [status],[equipment],[effects],[etc.] &lt;br /&gt;
|  record data, &amp;quot;log snapshot&amp;quot; for all common data.&lt;br /&gt;
|-&lt;br /&gt;
|  logecho&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log only.&lt;br /&gt;
|-&lt;br /&gt;
|  login&lt;br /&gt;
|  username &lt;br /&gt;
|  logout then log back in as username.&lt;br /&gt;
|-&lt;br /&gt;
|  logout&lt;br /&gt;
|  &lt;br /&gt;
|  logout and return to login window.&lt;br /&gt;
|-&lt;br /&gt;
|  logprint&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log only.&lt;br /&gt;
|-&lt;br /&gt;
|  mail&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  mood*&lt;br /&gt;
|  clear &amp;amp;#124; autofill | execute | repeat [numTimes] | moodName [numTimes] &lt;br /&gt;
|  mood management.&lt;br /&gt;
|-&lt;br /&gt;
|  objective*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  opt*&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  print&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log.&lt;br /&gt;
|-&lt;br /&gt;
|  priphea&lt;br /&gt;
|  &lt;br /&gt;
|  launch KoLmafia GUI.&lt;br /&gt;
|-&lt;br /&gt;
|  quit&lt;br /&gt;
|  &lt;br /&gt;
|  logout and exit KoLmafia.&lt;br /&gt;
|-&lt;br /&gt;
|  radio&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  relay&lt;br /&gt;
|  &lt;br /&gt;
|  open the relay browser.&lt;br /&gt;
|-&lt;br /&gt;
|  refresh&lt;br /&gt;
|  all &amp;amp;#124; status | equip | inv | storage | familiar | stickers &lt;br /&gt;
|  resynchronize with KoL.&lt;br /&gt;
|-&lt;br /&gt;
|  repeat&lt;br /&gt;
|  [number] &lt;br /&gt;
|  repeat previous line [number times].&lt;br /&gt;
|-&lt;br /&gt;
|  run&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  save&lt;br /&gt;
|  as mood &lt;br /&gt;
|  add your current effects to the mood.&lt;br /&gt;
|-&lt;br /&gt;
|  session&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  set&lt;br /&gt;
|  preference [ = value ] &lt;br /&gt;
|  show/change preference settings&lt;br /&gt;
|-&lt;br /&gt;
|  start&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  [[trigger]]*&lt;br /&gt;
|  clear &amp;amp;#124; autofill | [type,] effect [, action] &lt;br /&gt;
|  edit current mood. Options for type are gain_effect, lose_effect, unconditional&lt;br /&gt;
|-&lt;br /&gt;
|  unalias&lt;br /&gt;
|  word &lt;br /&gt;
|  remove a CLI abbreviation.&lt;br /&gt;
|-&lt;br /&gt;
|  update&lt;br /&gt;
|  data &amp;amp;#124; clear | prices URL or filename &lt;br /&gt;
|  download most recent data files, or revert to built-in data.&lt;br /&gt;
|-&lt;br /&gt;
|  validate&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  verify&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  version&lt;br /&gt;
|  &lt;br /&gt;
|  display KoLmafia version.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;inline-ash-script&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
|  embed an ASH script in a CLI script.&lt;br /&gt;
|-&lt;br /&gt;
|  cecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  colorecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  echo&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log.&lt;br /&gt;
|-&lt;br /&gt;
|  else&lt;br /&gt;
|  ; commands &lt;br /&gt;
|  do commands if preceding if/while/try didn&#039;t execute.&lt;br /&gt;
|-&lt;br /&gt;
|  elseif&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do if condition is true but preceding condition was false.&lt;br /&gt;
|-&lt;br /&gt;
|  if&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do commands once if condition is true (see condref).&lt;br /&gt;
|-&lt;br /&gt;
|  [[using|namespace]]&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  list namespace scripts and the functions they define.&lt;br /&gt;
|-&lt;br /&gt;
|  pause&lt;br /&gt;
|  [seconds] &lt;br /&gt;
|  pause script execution (default 1 second).&lt;br /&gt;
|-&lt;br /&gt;
|  try&lt;br /&gt;
|  ; commands &lt;br /&gt;
|  do commands, and continue even if an error occurs.&lt;br /&gt;
|-&lt;br /&gt;
|  [[using]]&lt;br /&gt;
|  filename &lt;br /&gt;
|  add ASH script to namespace.&lt;br /&gt;
|-&lt;br /&gt;
|  wait&lt;br /&gt;
|  [seconds] &lt;br /&gt;
|  pause script execution (default 1 second).&lt;br /&gt;
|-&lt;br /&gt;
|  while&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do commands repeatedly while condition is true.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  *.php*&lt;br /&gt;
|  &lt;br /&gt;
|  visit URL without showing results.&lt;br /&gt;
|-&lt;br /&gt;
|  *mirror*&lt;br /&gt;
|  [filename] &lt;br /&gt;
|  stop [or start] logging to an additional file.&lt;br /&gt;
|-&lt;br /&gt;
|  aa&lt;br /&gt;
|  skill &lt;br /&gt;
|  set default attack method.&lt;br /&gt;
|-&lt;br /&gt;
|  attack&lt;br /&gt;
|  [ target [, target]... ] &lt;br /&gt;
|  PvP for dignity or flowers&lt;br /&gt;
|-&lt;br /&gt;
|  autoattack&lt;br /&gt;
|  skill &lt;br /&gt;
|  set default attack method.&lt;br /&gt;
|-&lt;br /&gt;
|  basement&lt;br /&gt;
|  &lt;br /&gt;
|  check Fernswarthy&#039;s Basement status.&lt;br /&gt;
|-&lt;br /&gt;
|  burn&lt;br /&gt;
|  extra &amp;amp;#124; &amp;amp;#42; &amp;amp;#124; num &amp;amp;#124; -num&lt;br /&gt;
|  use excess/all/specified/all but specified MP for buff extension and summons.&lt;br /&gt;
|-&lt;br /&gt;
|  camp*&lt;br /&gt;
|  rest &amp;amp;#124; etc. [numTimes] &lt;br /&gt;
|  perform campground actions.&lt;br /&gt;
|-&lt;br /&gt;
|  cast[?]&lt;br /&gt;
|  [ [count] skill [on player] ] &lt;br /&gt;
|  list spells, or use one.&lt;br /&gt;
|-&lt;br /&gt;
|  clan&lt;br /&gt;
|  [ snapshot &amp;amp;#124; stashlog ] &lt;br /&gt;
|  clan management.&lt;br /&gt;
|-&lt;br /&gt;
|  csend&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124;&amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  demons&lt;br /&gt;
|  &lt;br /&gt;
|  list the demon names you know.&lt;br /&gt;
|-&lt;br /&gt;
|  donate&lt;br /&gt;
|  boris &amp;amp;#124; mus &amp;amp;#124; jarl &amp;amp;#124; mys &amp;amp;#124; pete &amp;amp;#124; mox amount &lt;br /&gt;
|  donate in Hall of Legends.&lt;br /&gt;
|-&lt;br /&gt;
|  drink[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  effects&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  enable&lt;br /&gt;
|  all &amp;amp;#124; command [, command]... &lt;br /&gt;
|  allow/deny CLI commands.&lt;br /&gt;
|-&lt;br /&gt;
|  encounters&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  entity&lt;br /&gt;
|  &lt;br /&gt;
|  give details of your current pastamancer combat entity.&lt;br /&gt;
|-&lt;br /&gt;
|  [[enthrone_familiar|enthrone]][?] &lt;br /&gt;
|  species&lt;br /&gt;
|  place a familiar in the Crown of Thrones.&lt;br /&gt;
|-&lt;br /&gt;
|  familiar[?]&lt;br /&gt;
|  [list filter] &amp;amp;#124; lock &amp;amp;#124; unlock &amp;amp;#124; species &amp;amp;#124; none &lt;br /&gt;
|  list or change familiar types&lt;br /&gt;
|-&lt;br /&gt;
|  field&lt;br /&gt;
|  [ plant square type &amp;amp;#124; pick square &amp;amp;#124; harvest ] &lt;br /&gt;
|  view or use your mushroom plot&lt;br /&gt;
|-&lt;br /&gt;
|  flowers&lt;br /&gt;
|  &lt;br /&gt;
|  commit random acts of PvP.&lt;br /&gt;
|-&lt;br /&gt;
|  forum*&lt;br /&gt;
|  &lt;br /&gt;
|  visit the official KoL forums.&lt;br /&gt;
|-&lt;br /&gt;
|  friars&lt;br /&gt;
|  [blessing] food &amp;amp;#124; familiar &amp;amp;#124; booze &lt;br /&gt;
|  get daily blessing.&lt;br /&gt;
|-&lt;br /&gt;
|  galaktik(hp &amp;amp;#124; mp)&lt;br /&gt;
|  [amount] &lt;br /&gt;
|  restore some or all hp or mp&lt;br /&gt;
|-&lt;br /&gt;
|  hiddencity&lt;br /&gt;
|  square [temple &amp;amp;#124; altar item] &lt;br /&gt;
|  set Hidden City square [and perform an action there].&lt;br /&gt;
|-&lt;br /&gt;
|  holiday&lt;br /&gt;
|  HolidayName &lt;br /&gt;
|  enable special processing for unpredicted holidays.&lt;br /&gt;
|-&lt;br /&gt;
|  hottub&lt;br /&gt;
|  &lt;br /&gt;
|  soak in your clan&#039;s hot tub&lt;br /&gt;
|-&lt;br /&gt;
|  http:*&lt;br /&gt;
|  &lt;br /&gt;
|  visit URL without showing results.&lt;br /&gt;
|-&lt;br /&gt;
|  kmail&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124;&amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  locations&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  lookup&lt;br /&gt;
|  item &amp;amp;#124; effect &lt;br /&gt;
|  go to appropriate KoL Wiki page.&lt;br /&gt;
|-&lt;br /&gt;
|  mcd&lt;br /&gt;
|  number &lt;br /&gt;
|  set mind control device (or equivalent) to new value.&lt;br /&gt;
|-&lt;br /&gt;
|  mind-control&lt;br /&gt;
|  number &lt;br /&gt;
|  set mind control device (or equivalent) to new value.&lt;br /&gt;
|-&lt;br /&gt;
|  moleref&lt;br /&gt;
|  &lt;br /&gt;
|  Path of the Mole spoilers.&lt;br /&gt;
|-&lt;br /&gt;
|  monsters&lt;br /&gt;
|  location &lt;br /&gt;
|  show combat details for the specified area.&lt;br /&gt;
|-&lt;br /&gt;
|  moon*&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  mpitems&lt;br /&gt;
|  &lt;br /&gt;
|  counts MP restoratives in inventory.&lt;br /&gt;
|-&lt;br /&gt;
|  nuns&lt;br /&gt;
|  [mp] &lt;br /&gt;
|  visit the Nunnery for restoration [but only if MP is restored].&lt;br /&gt;
|-&lt;br /&gt;
|  olfact*&lt;br /&gt;
|  ( none &amp;amp;#124; monster name &amp;amp;#124; [item] list &amp;amp;#124; goals ) [abort] &lt;br /&gt;
|  tag next monster [that drops all items in list, or your goals].&lt;br /&gt;
|-&lt;br /&gt;
|  putty&lt;br /&gt;
|  ( none &amp;amp;#124; monster name &amp;amp;#124; [item] list &amp;amp;#124; goals ) [abort] &lt;br /&gt;
|  tag next monster [that drops all items in list, or your goals].&lt;br /&gt;
|-&lt;br /&gt;
|  pvp&lt;br /&gt;
|  [ target [, target]... ] &lt;br /&gt;
|  PvP for dignity or flowers&lt;br /&gt;
|-&lt;br /&gt;
|  pvplog*&lt;br /&gt;
|  &lt;br /&gt;
|  summarize PvP results.&lt;br /&gt;
|-&lt;br /&gt;
|  raffle&lt;br /&gt;
|  ticketsToBuy [ inventory &amp;amp;#124; storage ] &lt;br /&gt;
|  buy raffle tickets&lt;br /&gt;
|-&lt;br /&gt;
|  recover*&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  remedy[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  restore*&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  safe&lt;br /&gt;
|  location &lt;br /&gt;
|  show summary data for the specified area.&lt;br /&gt;
|-&lt;br /&gt;
|  send&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124;&amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  shrug[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  skill[?]&lt;br /&gt;
|  [ [count] skill [on player] ] &lt;br /&gt;
|  list spells, or use one.&lt;br /&gt;
|-&lt;br /&gt;
|  skills&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  sleep&lt;br /&gt;
|  number &lt;br /&gt;
|  rest on your clan sofa for number turns.&lt;br /&gt;
|-&lt;br /&gt;
|  soak&lt;br /&gt;
|  &lt;br /&gt;
|  soak in your clan&#039;s hot tub&lt;br /&gt;
|-&lt;br /&gt;
|  sofa&lt;br /&gt;
|  number &lt;br /&gt;
|  rest on your clan sofa for number turns.&lt;br /&gt;
|-&lt;br /&gt;
|  spade&lt;br /&gt;
|  [prices URL] &lt;br /&gt;
|  submit automatically gathered data.&lt;br /&gt;
|-&lt;br /&gt;
|  status&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  styx&lt;br /&gt;
|  muscle &amp;amp;#124; mysticality &amp;amp;#124; moxie &lt;br /&gt;
|  get daily Styx Pixie buff.&lt;br /&gt;
|-&lt;br /&gt;
|  summary&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  summon&lt;br /&gt;
|  demonName &amp;amp;#124; effect &amp;amp;#124; location &amp;amp;#124; number &lt;br /&gt;
|  use the Summoning Chamber.&lt;br /&gt;
|-&lt;br /&gt;
|  text&lt;br /&gt;
|  URL &lt;br /&gt;
|  show text results from visiting URL.&lt;br /&gt;
|-&lt;br /&gt;
|  train&lt;br /&gt;
|  base weight &amp;amp;#124; buffed weight &amp;amp;#124; turns number &lt;br /&gt;
|  train familiar.&lt;br /&gt;
|-&lt;br /&gt;
|  uneffect[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  unequip&lt;br /&gt;
|  slot &amp;amp;#124; name &lt;br /&gt;
|  remove equipment in slot, or that matches name&lt;br /&gt;
|-&lt;br /&gt;
|  up?&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  extend duration of effects.&lt;br /&gt;
|-&lt;br /&gt;
|  wiki&lt;br /&gt;
|  searchText &lt;br /&gt;
|  perform search on KoL Wiki.&lt;br /&gt;
|-&lt;br /&gt;
|  win&lt;br /&gt;
|  game &lt;br /&gt;
|  I&#039;m as surprised as you! I didn&#039;t think it was possible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2945</id>
		<title>CLI Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2945"/>
		<updated>2010-08-13T19:22:04Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: send, csend and kmail need || (not |) to append a message.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The KoLmafia Graphical CLI is one of the most helpful features Mafia has. This page is intended to provide information on the commands available.&lt;br /&gt;
&lt;br /&gt;
=How to use these commands=&lt;br /&gt;
&lt;br /&gt;
Square brackets [ ] enclose optional elements of commands. In command descriptions, they may also enclose the effects of using those optional elements.&lt;br /&gt;
&lt;br /&gt;
Vertical bars | separate alternative elements - choose any one. (But note that || is an actual part of a few commands.)&lt;br /&gt;
&lt;br /&gt;
An ellipsis ... after an element means that it can be repeated as many times as needed.&lt;br /&gt;
&lt;br /&gt;
Elements in italics are placeholders - replace them with an actual name you want the command to operate on.&lt;br /&gt;
&lt;br /&gt;
Commands with an asterisk * after the name are abbreviations - you can type them in a longer form if desired.&lt;br /&gt;
&lt;br /&gt;
Some command names can be followed by a question mark (shown as [?] ), in which case the command will just display what it would do, rather than actually doing it.&lt;br /&gt;
&lt;br /&gt;
When adventuring, or using an item or skill, the name can be preceded by a number specifying how many times to do it. An asterisk in place of this number means &amp;quot;as many as possible&amp;quot; or &amp;quot;the current quantity in inventory&amp;quot;, depending on context. Negative numbers mean to do that many less than the maximum.&lt;br /&gt;
&lt;br /&gt;
Usually, multiple commands can be given on the same line, separated by semicolons. The exceptions (alias, ash, ashq, cheapest, expensive, fecho, fprint, get, set, speculate, whatif, later) treat the entire remainder of the line as a parameter.&lt;br /&gt;
&lt;br /&gt;
A few commands (elseif, else, if, try, while) treat at least one following command as a block that is executed conditionally or repetitively. The block consists of the remainder of the line, or the entire next line if that&#039;s empty. The block is extended by additional lines if it would otherwise end with one of these special commands.&lt;br /&gt;
&lt;br /&gt;
===Quantity Parameter===&lt;br /&gt;
Any place that a number can be used to define a quantity, such as &amp;lt;code&amp;gt;autosell 5 heavy D&amp;lt;/code&amp;gt;, you can use one of the following to indicate a variable quantity:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; is used to indicate all items in inventory.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell * heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
* 0 is also used to indicate all items in inventory.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell 0 heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
* a negative number means sell off all items except for the number listed. For example, -5 means keep 5 and sell the rest.&lt;br /&gt;
: &amp;lt;code&amp;gt;autosell -5 heavy D&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Item Parameter===&lt;br /&gt;
There are two ways to provide an item. By name or number.&lt;br /&gt;
* An item&#039;s name can be used in the obvious way, however this may sometimes fail because some items have numbers as part of their names. KoL&#039;s fuzzy matching will sometimes make a mistake such as interpreting {{Pspan|1 WA}} as a {{Pspan|100-watt light bulb}}.&lt;br /&gt;
&lt;br /&gt;
* An item&#039;s ID number can be used to avoid any possibility of ambiguity. This also allows names with commas to be passed as parameters to functions that contain comma separated lists. To do this the item needs to be prefaced by a &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Pilcrow pilcrow]&amp;lt;/span&amp;gt;. The character: ¶, is also known as a paragraph mark. It can be typed from your keyboard with a bit of know-how or included in an ash script as &amp;quot;\u00B6&amp;quot;.&lt;br /&gt;
: &amp;lt;code&amp;gt;send 1 ¶4358 to Bale|Thanks for being awesome&amp;lt;/code&amp;gt; &lt;br /&gt;
: is a way to send {{Pspan|A Crimbo Carol, Ch. 5}} to Bale despite the comma in the item&#039;s name.&lt;br /&gt;
&lt;br /&gt;
=Commands=&lt;br /&gt;
==Equipment, Inventory and Consumption Management==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  *brewery*[?]&lt;br /&gt;
|  [ daily special &amp;amp;#124; item ] &lt;br /&gt;
|  show daily special [or consume it or other restaurant item].&lt;br /&gt;
|-&lt;br /&gt;
|  *kitchen*[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  consumes item at Hell&#039;s Kitchen, if available.&lt;br /&gt;
|-&lt;br /&gt;
|  acquire&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  bake&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  chew[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  cleanup&lt;br /&gt;
|  &lt;br /&gt;
|  use, pulverize, or autosell your junk items.&lt;br /&gt;
|-&lt;br /&gt;
|  closet&lt;br /&gt;
|  list filter &amp;amp;#124; put item... | take item... &lt;br /&gt;
|  list or manipulate your closet.&lt;br /&gt;
|-&lt;br /&gt;
|  create&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  display&lt;br /&gt;
|  [filter] &amp;amp;#124; put item... | take item... &lt;br /&gt;
|  list or manipulate your display case.&lt;br /&gt;
|-&lt;br /&gt;
|  eat[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  equip&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  find&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  fold[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  produce item by using another form, repeated as needed.&lt;br /&gt;
|-&lt;br /&gt;
|  ghost[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  hagnk&lt;br /&gt;
|  outfit name &amp;amp;#124; item [, item]... &lt;br /&gt;
|  pull items from Hagnk&#039;s storage.&lt;br /&gt;
|-&lt;br /&gt;
|  hermit[?]&lt;br /&gt;
|  [item] &lt;br /&gt;
|  get clover status, or trade for item.&lt;br /&gt;
|-&lt;br /&gt;
|  hobo[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  inv*&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  junk&lt;br /&gt;
|  &lt;br /&gt;
|  use, pulverize, or autosell your junk items.&lt;br /&gt;
|-&lt;br /&gt;
|  make&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  maximize[?]&lt;br /&gt;
|  [+&amp;amp;#124;-&amp;amp;#124;weight] keyword, ...&lt;br /&gt;
|  run the [[Modifier Maximizer]].&lt;br /&gt;
|-&lt;br /&gt;
|  mix&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  modifies&lt;br /&gt;
|  filter &lt;br /&gt;
|  list all possible sources of modifiers matching filter.&lt;br /&gt;
|-&lt;br /&gt;
|  [[Modifiers|modref]]&lt;br /&gt;
|  [object] &lt;br /&gt;
|  list all modifiers, show values for player [and object].&lt;br /&gt;
|-&lt;br /&gt;
|  modtrace&lt;br /&gt;
|  filter &lt;br /&gt;
|  list everything that adds to modifiers matching filter.&lt;br /&gt;
|-&lt;br /&gt;
|  outfit&lt;br /&gt;
|  [list filter] &amp;amp;#124; save name &amp;amp;#124; checkpoint &amp;amp;#124; name &lt;br /&gt;
|  list, save, restore, or change outfits.&lt;br /&gt;
|-&lt;br /&gt;
|  overdrink[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  ply&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  pull&lt;br /&gt;
|  outfit name &amp;amp;#124; item [, item]... &lt;br /&gt;
|  pull items from Hagnk&#039;s storage.&lt;br /&gt;
|-&lt;br /&gt;
|  pulverize&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  pulverize specified items&lt;br /&gt;
|-&lt;br /&gt;
|  quark[?]&lt;br /&gt;
|  [itemList...] &lt;br /&gt;
|  gain MP by pasting unstable quark with best item from itemList (or your junk list).&lt;br /&gt;
|-&lt;br /&gt;
|  remove&lt;br /&gt;
|  slot &amp;amp;#124; name &lt;br /&gt;
|  remove equipment in slot, or that matches name&lt;br /&gt;
|-&lt;br /&gt;
|  restaurant[?]&lt;br /&gt;
|  [ daily special &amp;amp;#124; item ] &lt;br /&gt;
|  show daily special [or consume it or other restaurant item].&lt;br /&gt;
|-&lt;br /&gt;
|  retrieve&lt;br /&gt;
|  item &lt;br /&gt;
|  ensure that you have item, creating or buying it if needed.&lt;br /&gt;
|-&lt;br /&gt;
|  slimeling[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  smash&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  pulverize specified items&lt;br /&gt;
|-&lt;br /&gt;
|  smith&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  [[speculate]]&lt;br /&gt;
|  MCD num &amp;amp;#124; equip [slot] item &amp;amp;#124; unequip slot &amp;amp;#124; familiar type &amp;amp;#124; up eff &amp;amp;#124; uneffect eff &amp;amp;#124; quiet ; [another;...] &lt;br /&gt;
|  predict modifiers.&lt;br /&gt;
|-&lt;br /&gt;
|  squeeze[?]&lt;br /&gt;
|  item &lt;br /&gt;
|  produce item by using another form, repeated as needed.&lt;br /&gt;
|-&lt;br /&gt;
|  stash&lt;br /&gt;
|  [put] item... &amp;amp;#124; take item... &lt;br /&gt;
|  exchange items with clan stash&lt;br /&gt;
|-&lt;br /&gt;
|  sticker*&lt;br /&gt;
|  sticker1 [, sticker2 [, sticker3]] &lt;br /&gt;
|  replace worn stickers.&lt;br /&gt;
|-&lt;br /&gt;
|  storage&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  tinker&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  list creatables, or create specified items.&lt;br /&gt;
|-&lt;br /&gt;
|  wear&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  [[whatif]]&lt;br /&gt;
|  MCD num &amp;amp;#124; equip [slot] item | unequip slot | familiar type | up eff | uneffect eff | quiet ; [another;...] &lt;br /&gt;
|  predict modifiers.&lt;br /&gt;
|-&lt;br /&gt;
|  wield&lt;br /&gt;
|  [list filter] &amp;amp;#124; [slot] item &lt;br /&gt;
|  show equipment, or equip item [in slot].&lt;br /&gt;
|-&lt;br /&gt;
|  zap&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  transform items with your wand.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Quests==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  !&lt;br /&gt;
|  &lt;br /&gt;
|  list the Dungeons of Doom potions you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  bang&lt;br /&gt;
|  &lt;br /&gt;
|  list the Dungeons of Doom potions you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  chamber&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  council&lt;br /&gt;
|  &lt;br /&gt;
|  visit the Council to advance quest progress.&lt;br /&gt;
|-&lt;br /&gt;
|  dusty&lt;br /&gt;
|  &lt;br /&gt;
|  list the dusty bottles of wine you&#039;ve identified.&lt;br /&gt;
|-&lt;br /&gt;
|  entryway&lt;br /&gt;
|  [clover] &lt;br /&gt;
|  automatically complete quest [using a clover].&lt;br /&gt;
|-&lt;br /&gt;
|  factory&lt;br /&gt;
|  report digits &lt;br /&gt;
|  Given a string of 7 dwarven digits, report on factory.&lt;br /&gt;
|-&lt;br /&gt;
|  gourd&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  grandpa&lt;br /&gt;
|  query &lt;br /&gt;
|  Ask Grandpa about something.&lt;br /&gt;
|-&lt;br /&gt;
|  guardians&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  guild&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  hedge*&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  insults&lt;br /&gt;
|  &lt;br /&gt;
|  list the pirate insult comebacks you know.&lt;br /&gt;
|-&lt;br /&gt;
|  leaflet&lt;br /&gt;
|  [nomagic] &amp;amp;#124; location | command &lt;br /&gt;
|  complete leaflet quest [without using magic words].&lt;br /&gt;
|-&lt;br /&gt;
|  maze&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  nemesis&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  tavern&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|-&lt;br /&gt;
|  telescope&lt;br /&gt;
|  [look] high &amp;amp;#124; low &lt;br /&gt;
|  get daily buff, or Lair hints from your telescope.&lt;br /&gt;
|-&lt;br /&gt;
|  tower&lt;br /&gt;
|  &lt;br /&gt;
|  automatically complete quest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Capitalism==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  automall&lt;br /&gt;
|  &lt;br /&gt;
|  dump all profitable, non-memento items into the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  autosell&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  autosell items.&lt;br /&gt;
|-&lt;br /&gt;
|  buy&lt;br /&gt;
|  item [@ limit] [, another]... &lt;br /&gt;
|  buy from NPC store or the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  cheapest[?]&lt;br /&gt;
|  [+]item [,[-]item]... [; cmds] &lt;br /&gt;
|  compare prices, do cmds with &amp;quot;it&amp;quot; replaced with best.&lt;br /&gt;
|-&lt;br /&gt;
|  expensive[?]&lt;br /&gt;
|  [+]item [,[-]item]... [; cmds]&lt;br /&gt;
|  compare prices, do cmds with &amp;quot;it&amp;quot; replaced with best.&lt;br /&gt;
|-&lt;br /&gt;
|  mallbuy&lt;br /&gt;
|  item [@ limit] [, another]... &lt;br /&gt;
|  buy from NPC store or the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  mallsell&lt;br /&gt;
|  item [[@] price [[limit] num]] [, another]... &lt;br /&gt;
|  sell in Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  reprice&lt;br /&gt;
|  &lt;br /&gt;
|  price all max-priced items at or below current Mall minimum price.&lt;br /&gt;
|-&lt;br /&gt;
|  searchmall&lt;br /&gt;
|  item [ with limit number ] &lt;br /&gt;
|  search the Mall.&lt;br /&gt;
|-&lt;br /&gt;
|  sell&lt;br /&gt;
|  item [, item]... &lt;br /&gt;
|  autosell items.&lt;br /&gt;
|-&lt;br /&gt;
|  undercut&lt;br /&gt;
|  &lt;br /&gt;
|  price all max-priced items at or below current Mall minimum price.&lt;br /&gt;
|-&lt;br /&gt;
|  untinker&lt;br /&gt;
|  [ item... ] &lt;br /&gt;
|  complete quest, or untinker items.&lt;br /&gt;
|-&lt;br /&gt;
|  use[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mafia==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  adv*[?]&lt;br /&gt;
|  last &amp;amp;#124; [count] location &lt;br /&gt;
|  spend your turns.&lt;br /&gt;
|-&lt;br /&gt;
|  abort&lt;br /&gt;
|  [message] &lt;br /&gt;
|  stop current script or automated task.&lt;br /&gt;
|-&lt;br /&gt;
|  [[alias]]&lt;br /&gt;
|  [ word =&amp;gt; expansion ] &lt;br /&gt;
|  list or create CLI abbreviations.&lt;br /&gt;
|-&lt;br /&gt;
|  [[ash (CLI)|ash]]&lt;br /&gt;
|  statement &lt;br /&gt;
|  test a line of ASH code without having to edit a script.&lt;br /&gt;
|-&lt;br /&gt;
|  [[ash (CLI)|asq]]&lt;br /&gt;
|  statement &lt;br /&gt;
|  Like ash, but does not display the return value.&lt;br /&gt;
|-&lt;br /&gt;
|  ashref&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  summarize ASH built-in functions [matching filter].&lt;br /&gt;
|-&lt;br /&gt;
|  backtrace&lt;br /&gt;
|  text &amp;amp;#124; off &lt;br /&gt;
|  dump stack when a gCLI message or page URL matches text (case-sensitive).&lt;br /&gt;
|-&lt;br /&gt;
|  breakfast&lt;br /&gt;
|  &lt;br /&gt;
|  perform start-of-day activities.&lt;br /&gt;
|-&lt;br /&gt;
|  budget&lt;br /&gt;
|  [number] &lt;br /&gt;
|  show [or set] the number of budgeted Hagnk&#039;s pulls.&lt;br /&gt;
|-&lt;br /&gt;
|  buffbot&lt;br /&gt;
|  number &lt;br /&gt;
|  run buffbot for number iterations.&lt;br /&gt;
|-&lt;br /&gt;
|  call&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  ccs&lt;br /&gt;
|  [script] &lt;br /&gt;
|  show [or select] Custom Combat Script in use.&lt;br /&gt;
|-&lt;br /&gt;
|  cecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  chat&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  check&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  checkpoint&lt;br /&gt;
|  &lt;br /&gt;
|  remembers current equipment, use &amp;quot;outfit checkpoint&amp;quot; to restore.&lt;br /&gt;
|-&lt;br /&gt;
|  clear&lt;br /&gt;
|  &lt;br /&gt;
|  clear CLI window.&lt;br /&gt;
|-&lt;br /&gt;
|  cls&lt;br /&gt;
|  &lt;br /&gt;
|  clear CLI window.&lt;br /&gt;
|-&lt;br /&gt;
|  condition*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  condref&lt;br /&gt;
|  &lt;br /&gt;
|  list conditions usable with if/while commands.&lt;br /&gt;
|-&lt;br /&gt;
|  counters&lt;br /&gt;
|  [ clear &amp;amp;#124; add number [title img] ] &lt;br /&gt;
|  show, clear, or add to current turn counters.&lt;br /&gt;
|-&lt;br /&gt;
|  debug&lt;br /&gt;
|  [on] &amp;amp;#124; off &lt;br /&gt;
|  start or stop logging of debugging data.&lt;br /&gt;
|-&lt;br /&gt;
|  disable&lt;br /&gt;
|  all &amp;amp;#124; command [, command]... &lt;br /&gt;
|  allow/deny CLI commands.&lt;br /&gt;
|-&lt;br /&gt;
|  events&lt;br /&gt;
|  [clear] &lt;br /&gt;
|  clear or show recent events.&lt;br /&gt;
|-&lt;br /&gt;
|  exec*&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  exit&lt;br /&gt;
|  &lt;br /&gt;
|  logout and exit KoLmafia.&lt;br /&gt;
|-&lt;br /&gt;
|  gc&lt;br /&gt;
|  &lt;br /&gt;
|  force Java garbage collection.&lt;br /&gt;
|-&lt;br /&gt;
|  gear&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  get&lt;br /&gt;
|  preference [ = value ] &lt;br /&gt;
|  show/change preference settings&lt;br /&gt;
|-&lt;br /&gt;
|  goal*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  hatter&lt;br /&gt;
|  &lt;br /&gt;
|  List effects you can get by wearing available hats at the hatter&#039;s tea party.&lt;br /&gt;
|-&lt;br /&gt;
|  help&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  list CLI commands [that match filter].&lt;br /&gt;
|-&lt;br /&gt;
|  item&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  later&lt;br /&gt;
|  commands &lt;br /&gt;
|  adds a button to do commands to the Daily Deeds list.&lt;br /&gt;
|-&lt;br /&gt;
|  load&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  log&lt;br /&gt;
|  [status],[equipment],[effects],[etc.] &lt;br /&gt;
|  record data, &amp;quot;log snapshot&amp;quot; for all common data.&lt;br /&gt;
|-&lt;br /&gt;
|  logecho&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log only.&lt;br /&gt;
|-&lt;br /&gt;
|  login&lt;br /&gt;
|  username &lt;br /&gt;
|  logout then log back in as username.&lt;br /&gt;
|-&lt;br /&gt;
|  logout&lt;br /&gt;
|  &lt;br /&gt;
|  logout and return to login window.&lt;br /&gt;
|-&lt;br /&gt;
|  logprint&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log only.&lt;br /&gt;
|-&lt;br /&gt;
|  mail&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  mood*&lt;br /&gt;
|  clear &amp;amp;#124; autofill | execute | repeat [numTimes] | moodName [numTimes] &lt;br /&gt;
|  mood management.&lt;br /&gt;
|-&lt;br /&gt;
|  objective*&lt;br /&gt;
|  clear &amp;amp;#124; check | add condition | set condition &lt;br /&gt;
|  modify your adventuring goals.&lt;br /&gt;
|-&lt;br /&gt;
|  opt*&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  print&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log.&lt;br /&gt;
|-&lt;br /&gt;
|  priphea&lt;br /&gt;
|  &lt;br /&gt;
|  launch KoLmafia GUI.&lt;br /&gt;
|-&lt;br /&gt;
|  quit&lt;br /&gt;
|  &lt;br /&gt;
|  logout and exit KoLmafia.&lt;br /&gt;
|-&lt;br /&gt;
|  radio&lt;br /&gt;
|  &lt;br /&gt;
|  switch to tab or open window&lt;br /&gt;
|-&lt;br /&gt;
|  relay&lt;br /&gt;
|  &lt;br /&gt;
|  open the relay browser.&lt;br /&gt;
|-&lt;br /&gt;
|  refresh&lt;br /&gt;
|  all &amp;amp;#124; status | equip | inv | storage | familiar | stickers &lt;br /&gt;
|  resynchronize with KoL.&lt;br /&gt;
|-&lt;br /&gt;
|  repeat&lt;br /&gt;
|  [number] &lt;br /&gt;
|  repeat previous line [number times].&lt;br /&gt;
|-&lt;br /&gt;
|  run&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  save&lt;br /&gt;
|  as mood &lt;br /&gt;
|  add your current effects to the mood.&lt;br /&gt;
|-&lt;br /&gt;
|  session&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  set&lt;br /&gt;
|  preference [ = value ] &lt;br /&gt;
|  show/change preference settings&lt;br /&gt;
|-&lt;br /&gt;
|  start&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  [[trigger]]*&lt;br /&gt;
|  clear &amp;amp;#124; autofill | [type,] effect [, action] &lt;br /&gt;
|  edit current mood. Options for type are gain_effect, lose_effect, unconditional&lt;br /&gt;
|-&lt;br /&gt;
|  unalias&lt;br /&gt;
|  word &lt;br /&gt;
|  remove a CLI abbreviation.&lt;br /&gt;
|-&lt;br /&gt;
|  update&lt;br /&gt;
|  data &amp;amp;#124; clear | prices URL or filename &lt;br /&gt;
|  download most recent data files, or revert to built-in data.&lt;br /&gt;
|-&lt;br /&gt;
|  validate&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  verify&lt;br /&gt;
|  [numberx] filename &amp;amp;#124; function [parameters] &lt;br /&gt;
|  check/run script.&lt;br /&gt;
|-&lt;br /&gt;
|  version&lt;br /&gt;
|  &lt;br /&gt;
|  display KoLmafia version.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;inline-ash-script&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
|  embed an ASH script in a CLI script.&lt;br /&gt;
|-&lt;br /&gt;
|  cecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  colorecho&lt;br /&gt;
|  color text &lt;br /&gt;
|  show text using color (specified by name or #RRGGBB).&lt;br /&gt;
|-&lt;br /&gt;
|  echo&lt;br /&gt;
|  timestamp &amp;amp;#124; text &lt;br /&gt;
|  include timestamp or text in the session log.&lt;br /&gt;
|-&lt;br /&gt;
|  else&lt;br /&gt;
|  ; commands &lt;br /&gt;
|  do commands if preceding if/while/try didn&#039;t execute.&lt;br /&gt;
|-&lt;br /&gt;
|  elseif&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do if condition is true but preceding condition was false.&lt;br /&gt;
|-&lt;br /&gt;
|  if&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do commands once if condition is true (see condref).&lt;br /&gt;
|-&lt;br /&gt;
|  [[using|namespace]]&lt;br /&gt;
|  [filter] &lt;br /&gt;
|  list namespace scripts and the functions they define.&lt;br /&gt;
|-&lt;br /&gt;
|  pause&lt;br /&gt;
|  [seconds] &lt;br /&gt;
|  pause script execution (default 1 second).&lt;br /&gt;
|-&lt;br /&gt;
|  try&lt;br /&gt;
|  ; commands &lt;br /&gt;
|  do commands, and continue even if an error occurs.&lt;br /&gt;
|-&lt;br /&gt;
|  [[using]]&lt;br /&gt;
|  filename &lt;br /&gt;
|  add ASH script to namespace.&lt;br /&gt;
|-&lt;br /&gt;
|  wait&lt;br /&gt;
|  [seconds] &lt;br /&gt;
|  pause script execution (default 1 second).&lt;br /&gt;
|-&lt;br /&gt;
|  while&lt;br /&gt;
|  condition; commands &lt;br /&gt;
|  do commands repeatedly while condition is true.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Name&lt;br /&gt;
!  Arguments&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  *.php*&lt;br /&gt;
|  &lt;br /&gt;
|  visit URL without showing results.&lt;br /&gt;
|-&lt;br /&gt;
|  *mirror*&lt;br /&gt;
|  [filename] &lt;br /&gt;
|  stop [or start] logging to an additional file.&lt;br /&gt;
|-&lt;br /&gt;
|  aa&lt;br /&gt;
|  skill &lt;br /&gt;
|  set default attack method.&lt;br /&gt;
|-&lt;br /&gt;
|  attack&lt;br /&gt;
|  [ target [, target]... ] &lt;br /&gt;
|  PvP for dignity or flowers&lt;br /&gt;
|-&lt;br /&gt;
|  autoattack&lt;br /&gt;
|  skill &lt;br /&gt;
|  set default attack method.&lt;br /&gt;
|-&lt;br /&gt;
|  basement&lt;br /&gt;
|  &lt;br /&gt;
|  check Fernswarthy&#039;s Basement status.&lt;br /&gt;
|-&lt;br /&gt;
|  burn&lt;br /&gt;
|  extra &amp;amp;#124; &amp;amp;#42; &amp;amp;#124; num &amp;amp;#124; -num&lt;br /&gt;
|  use excess/all/specified/all but specified MP for buff extension and summons.&lt;br /&gt;
|-&lt;br /&gt;
|  camp*&lt;br /&gt;
|  rest &amp;amp;#124; etc. [numTimes] &lt;br /&gt;
|  perform campground actions.&lt;br /&gt;
|-&lt;br /&gt;
|  cast[?]&lt;br /&gt;
|  [ [count] skill [on player] ] &lt;br /&gt;
|  list spells, or use one.&lt;br /&gt;
|-&lt;br /&gt;
|  clan&lt;br /&gt;
|  [ snapshot &amp;amp;#124; stashlog ] &lt;br /&gt;
|  clan management.&lt;br /&gt;
|-&lt;br /&gt;
|  csend&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124; &amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  demons&lt;br /&gt;
|  &lt;br /&gt;
|  list the demon names you know.&lt;br /&gt;
|-&lt;br /&gt;
|  donate&lt;br /&gt;
|  boris &amp;amp;#124; mus &amp;amp;#124; jarl &amp;amp;#124; mys &amp;amp;#124; pete &amp;amp;#124; mox amount &lt;br /&gt;
|  donate in Hall of Legends.&lt;br /&gt;
|-&lt;br /&gt;
|  drink[?]&lt;br /&gt;
|  [either] item [, item]... &lt;br /&gt;
|  use/consume items&lt;br /&gt;
|-&lt;br /&gt;
|  effects&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  enable&lt;br /&gt;
|  all &amp;amp;#124; command [, command]... &lt;br /&gt;
|  allow/deny CLI commands.&lt;br /&gt;
|-&lt;br /&gt;
|  encounters&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  entity&lt;br /&gt;
|  &lt;br /&gt;
|  give details of your current pastamancer combat entity.&lt;br /&gt;
|-&lt;br /&gt;
|  [[enthrone_familiar|enthrone]][?] &lt;br /&gt;
|  species&lt;br /&gt;
|  place a familiar in the Crown of Thrones.&lt;br /&gt;
|-&lt;br /&gt;
|  familiar[?]&lt;br /&gt;
|  [list filter] &amp;amp;#124; lock &amp;amp;#124; unlock &amp;amp;#124; species &amp;amp;#124; none &lt;br /&gt;
|  list or change familiar types&lt;br /&gt;
|-&lt;br /&gt;
|  field&lt;br /&gt;
|  [ plant square type &amp;amp;#124; pick square &amp;amp;#124; harvest ] &lt;br /&gt;
|  view or use your mushroom plot&lt;br /&gt;
|-&lt;br /&gt;
|  flowers&lt;br /&gt;
|  &lt;br /&gt;
|  commit random acts of PvP.&lt;br /&gt;
|-&lt;br /&gt;
|  forum*&lt;br /&gt;
|  &lt;br /&gt;
|  visit the official KoL forums.&lt;br /&gt;
|-&lt;br /&gt;
|  friars&lt;br /&gt;
|  [blessing] food &amp;amp;#124; familiar &amp;amp;#124; booze &lt;br /&gt;
|  get daily blessing.&lt;br /&gt;
|-&lt;br /&gt;
|  galaktik(hp &amp;amp;#124; mp)&lt;br /&gt;
|  [amount] &lt;br /&gt;
|  restore some or all hp or mp&lt;br /&gt;
|-&lt;br /&gt;
|  hiddencity&lt;br /&gt;
|  square [temple &amp;amp;#124; altar item] &lt;br /&gt;
|  set Hidden City square [and perform an action there].&lt;br /&gt;
|-&lt;br /&gt;
|  holiday&lt;br /&gt;
|  HolidayName &lt;br /&gt;
|  enable special processing for unpredicted holidays.&lt;br /&gt;
|-&lt;br /&gt;
|  hottub&lt;br /&gt;
|  &lt;br /&gt;
|  soak in your clan&#039;s hot tub&lt;br /&gt;
|-&lt;br /&gt;
|  http:*&lt;br /&gt;
|  &lt;br /&gt;
|  visit URL without showing results.&lt;br /&gt;
|-&lt;br /&gt;
|  kmail&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124; &amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  locations&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  lookup&lt;br /&gt;
|  item &amp;amp;#124; effect &lt;br /&gt;
|  go to appropriate KoL Wiki page.&lt;br /&gt;
|-&lt;br /&gt;
|  mcd&lt;br /&gt;
|  number &lt;br /&gt;
|  set mind control device (or equivalent) to new value.&lt;br /&gt;
|-&lt;br /&gt;
|  mind-control&lt;br /&gt;
|  number &lt;br /&gt;
|  set mind control device (or equivalent) to new value.&lt;br /&gt;
|-&lt;br /&gt;
|  moleref&lt;br /&gt;
|  &lt;br /&gt;
|  Path of the Mole spoilers.&lt;br /&gt;
|-&lt;br /&gt;
|  monsters&lt;br /&gt;
|  location &lt;br /&gt;
|  show combat details for the specified area.&lt;br /&gt;
|-&lt;br /&gt;
|  moon*&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  mpitems&lt;br /&gt;
|  &lt;br /&gt;
|  counts MP restoratives in inventory.&lt;br /&gt;
|-&lt;br /&gt;
|  nuns&lt;br /&gt;
|  [mp] &lt;br /&gt;
|  visit the Nunnery for restoration [but only if MP is restored].&lt;br /&gt;
|-&lt;br /&gt;
|  olfact*&lt;br /&gt;
|  ( none &amp;amp;#124; monster name &amp;amp;#124; [item] list &amp;amp;#124; goals ) [abort] &lt;br /&gt;
|  tag next monster [that drops all items in list, or your goals].&lt;br /&gt;
|-&lt;br /&gt;
|  putty&lt;br /&gt;
|  ( none &amp;amp;#124; monster name &amp;amp;#124; [item] list &amp;amp;#124; goals ) [abort] &lt;br /&gt;
|  tag next monster [that drops all items in list, or your goals].&lt;br /&gt;
|-&lt;br /&gt;
|  pvp&lt;br /&gt;
|  [ target [, target]... ] &lt;br /&gt;
|  PvP for dignity or flowers&lt;br /&gt;
|-&lt;br /&gt;
|  pvplog*&lt;br /&gt;
|  &lt;br /&gt;
|  summarize PvP results.&lt;br /&gt;
|-&lt;br /&gt;
|  raffle&lt;br /&gt;
|  ticketsToBuy [ inventory &amp;amp;#124; storage ] &lt;br /&gt;
|  buy raffle tickets&lt;br /&gt;
|-&lt;br /&gt;
|  recover*&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  remedy[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  restore*&lt;br /&gt;
|  hp &amp;amp;#124; health &amp;amp;#124; mp &amp;amp;#124; mana &amp;amp;#124; both &lt;br /&gt;
|  attempt to regain some HP or MP.&lt;br /&gt;
|-&lt;br /&gt;
|  safe&lt;br /&gt;
|  location &lt;br /&gt;
|  show summary data for the specified area.&lt;br /&gt;
|-&lt;br /&gt;
|  send&lt;br /&gt;
|  item [, item]... to recipient [ &amp;amp;#124; &amp;amp;#124; message ] &lt;br /&gt;
|  send kmail&lt;br /&gt;
|-&lt;br /&gt;
|  shrug[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  skill[?]&lt;br /&gt;
|  [ [count] skill [on player] ] &lt;br /&gt;
|  list spells, or use one.&lt;br /&gt;
|-&lt;br /&gt;
|  skills&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  sleep&lt;br /&gt;
|  number &lt;br /&gt;
|  rest on your clan sofa for number turns.&lt;br /&gt;
|-&lt;br /&gt;
|  soak&lt;br /&gt;
|  &lt;br /&gt;
|  soak in your clan&#039;s hot tub&lt;br /&gt;
|-&lt;br /&gt;
|  sofa&lt;br /&gt;
|  number &lt;br /&gt;
|  rest on your clan sofa for number turns.&lt;br /&gt;
|-&lt;br /&gt;
|  spade&lt;br /&gt;
|  [prices URL] &lt;br /&gt;
|  submit automatically gathered data.&lt;br /&gt;
|-&lt;br /&gt;
|  status&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  styx&lt;br /&gt;
|  muscle &amp;amp;#124; mysticality &amp;amp;#124; moxie &lt;br /&gt;
|  get daily Styx Pixie buff.&lt;br /&gt;
|-&lt;br /&gt;
|  summary&lt;br /&gt;
|  [param] &lt;br /&gt;
|  list indicated type of data, possibly filtered by param.&lt;br /&gt;
|-&lt;br /&gt;
|  summon&lt;br /&gt;
|  demonName &amp;amp;#124; effect &amp;amp;#124; location &amp;amp;#124; number &lt;br /&gt;
|  use the Summoning Chamber.&lt;br /&gt;
|-&lt;br /&gt;
|  text&lt;br /&gt;
|  URL &lt;br /&gt;
|  show text results from visiting URL.&lt;br /&gt;
|-&lt;br /&gt;
|  train&lt;br /&gt;
|  base weight &amp;amp;#124; buffed weight &amp;amp;#124; turns number &lt;br /&gt;
|  train familiar.&lt;br /&gt;
|-&lt;br /&gt;
|  uneffect[?]&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  remove effects using appropriate means.&lt;br /&gt;
|-&lt;br /&gt;
|  unequip&lt;br /&gt;
|  slot &amp;amp;#124; name &lt;br /&gt;
|  remove equipment in slot, or that matches name&lt;br /&gt;
|-&lt;br /&gt;
|  up?&lt;br /&gt;
|  effect [, effect]... &lt;br /&gt;
|  extend duration of effects.&lt;br /&gt;
|-&lt;br /&gt;
|  wiki&lt;br /&gt;
|  searchText &lt;br /&gt;
|  perform search on KoL Wiki.&lt;br /&gt;
|-&lt;br /&gt;
|  win&lt;br /&gt;
|  game &lt;br /&gt;
|  I&#039;m as surprised as you! I didn&#039;t think it was possible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Auto-stops&amp;diff=6622</id>
		<title>Auto-stops</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Auto-stops&amp;diff=6622"/>
		<updated>2010-06-30T15:14:50Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Auto-stops are places where mafia&#039;s automation will automatically stop, just as the name suggests. These are all KoL non-combats. If mafia detects one of these auto-stop non-combats then automation will cease immediately after the encounter.&lt;br /&gt;
&lt;br /&gt;
There is just one trick to using auto-stops: mafia will only stop for auto-stops when there are no conditions set. If conditions are set then mafia will continue automation until it reaches those conditions and stop normally. This is to prevent auto-stops from interfering with regular automation.&lt;br /&gt;
&lt;br /&gt;
* Sleazy Back Alley: {{kolwiki|Under the Knife}}&lt;br /&gt;
* Misspelled Cemetary: {{kolwiki|A Grave Situation}}&lt;br /&gt;
* Haunted Library: {{kolwiki|Take a Look, it&#039;s in a Book! (Rise)|Rise}} and {{kolwiki|Take a Look, it&#039;s in a Book! (Fall)|Fall}} of Take a Look, it&#039;s in a Book!&lt;br /&gt;
* Whitey&#039;s Grove: {{kolwiki|It&#039;s A Sign!}}&lt;br /&gt;
* Teleportitis: {{kolwiki|The Oracle Will See You Now}}&lt;br /&gt;
* Barrrney&#039;s Barrr: {{kolwiki|Step Up to the Table, Put the Ball in Play}}&lt;br /&gt;
* Arid, Extra-Dry Desert: Auto-stops every time you want to start adventuring at the Oasis or if you need to get an item:&lt;br /&gt;
*# {{kolwiki|A Sietch in Time}}&lt;br /&gt;
*# {{kolwiki|No Colors Anymore}} (without can of black paint). With paint, adventuring continues to Walk Without Rhythm.&lt;br /&gt;
*# {{kolwiki|Walk Without Rhythm}}&lt;br /&gt;
*# {{kolwiki|Walk Without Rhythm 2}} (Only occurs if you didn&#039;t have a drum machine at previous auto-stop.)&lt;br /&gt;
*# {{kolwiki|The Sleeper Has Awakened}}&lt;br /&gt;
* Agua de vida: Auto-stop when a bottle is consumed.&lt;br /&gt;
* Auto-stop when a demon name is learned and opens mini-browser to display it.&lt;br /&gt;
* Auto-stop when a hobo code is learned and opens mini-browser to display it.&lt;br /&gt;
* Auto-stop when an Ultra Rare adventure is encountered and opens mini-browser to display it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|description=Unlocking the White Citadel can make use of the auto-stop to be this simple.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
adventure( my_adventures(), $location[whitey&#039;s grove] );&lt;br /&gt;
adventure( my_adventures(), $location[white citadel );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|description=Unlocking the Pyramid, using the magic of auto-stops. Note that this assumes you have enough adventures to complete it. A better script would check the questlog to verify current quest progress before beginning adventuring.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
cli_execute(&amp;quot;condition clear&amp;quot;);   # conditions must be clear or stops won&#039;t be automatic.&lt;br /&gt;
# Adventure until: A Sietch in Time&lt;br /&gt;
adventure( my_adventures(), $location[Desert (Ultrahydrated)] );&lt;br /&gt;
cli_execute(&amp;quot;condition set 1 stone rose, 1 drum machine&amp;quot;);&lt;br /&gt;
adventure( my_adventures(), $location[Oasis] );&lt;br /&gt;
# Adventure until: Walk Without Rhythm&lt;br /&gt;
retrieve_item(1, $item[can of black paint]);&lt;br /&gt;
adventure( my_adventures(), $location[Desert (Ultrahydrated)] );&lt;br /&gt;
cli_execute(&amp;quot;condition set worm-riding manual pages 3-15&amp;quot;);&lt;br /&gt;
adventure( my_adventures(), $location[Oasis] );&lt;br /&gt;
# Adventure until: The Sleeper Has Awakened&lt;br /&gt;
adventure( my_adventures(), $location[Desert (Ultrahydrated)] );&lt;br /&gt;
# Equip wormhooks, use drum machine and then re-equip original weapon.&lt;br /&gt;
cli_execute(&amp;quot;checkpoint; equip worm hooks; use drum machine; outfit checkpoint&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Automation]]&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5329</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5329"/>
		<updated>2010-03-24T13:07:51Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. It also disables all CLI functions with the exception of enable and disable. Therefore, to re-enable all functions, you must type &amp;quot;enable all&amp;quot; into the CLI - don&#039;t depend on ASH to sort it out.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet generates a map that is outputted to a data file. In testing you might not want to do this every time, so you can disable map_to_file().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5224</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5224"/>
		<updated>2010-03-12T23:18:31Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Multiple Keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&lt;br /&gt;
b      c      bc&lt;br /&gt;
b      d      bd&lt;br /&gt;
c      d      cd&lt;br /&gt;
e      f      ef&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map2 (containing only entries that have &amp;quot;b&amp;quot; as key1) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
c      bc&lt;br /&gt;
d      bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_slot&amp;diff=5560</id>
		<title>To slot</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_slot&amp;diff=5560"/>
		<updated>2010-03-12T14:49:32Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_slot}}{{&lt;br /&gt;
#vardefine:return_type|slot}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|item|equip}}|&lt;br /&gt;
p1desc={{pspan|equip}} is any item where you want to know which slot it is equipped to.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function will return the slot that any item is equipped to.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note:&lt;br /&gt;
* Non-equipment items return $slot[none].&lt;br /&gt;
* Ranged and melee weapons return $slot[weapon], even if you have double fisted skull-smashing.&lt;br /&gt;
* All accessories return $slot[acc1].|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This code will equip a star sword if the slot it goes in is empty.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if(have_equipped(to_slot($item[star sword]) == $item[none]) {&lt;br /&gt;
   equip($item[star sword]);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Datatype_Conversions&amp;diff=1830</id>
		<title>Datatype Conversions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Datatype_Conversions&amp;diff=1830"/>
		<updated>2010-03-12T14:34:51Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;These functions will convert one type of data to another.&amp;lt;/p&amp;gt;&lt;br /&gt;
{{flink|boolean|to_boolean|any|desc=Converts any datatype to a boolean.}}&lt;br /&gt;
{{flink|class|to_class|string|desc=Converts a string to a class.}}&lt;br /&gt;
{{flink|effect|to_effect|any|desc=Converts an int, string or skill to an effect.}}&lt;br /&gt;
{{flink|familiar|to_familiar|any|desc=Converts an int or a string to a familiar.}}&lt;br /&gt;
{{flink|float|to_float|any|desc=Converts from any datatype to a float.}}&lt;br /&gt;
{{flink|int|to_int|any|desc=Converts from any datatype to an int.}}&lt;br /&gt;
{{flink|item|to_item|any|desc=Converts an int or a string (or both?) to an item.}}&lt;br /&gt;
{{flink|location|to_location|any|desc=Converts an int or a string to a location.}}&lt;br /&gt;
{{flink|monster|to_monster|string|desc=Converts a string to a monster.}}&lt;br /&gt;
{{flink|skill|to_skill|any|desc=Converts an int, string or effect to a skill.}}&lt;br /&gt;
{{flink|slot|to_slot|item|desc=Converts an item to a slot.}}&lt;br /&gt;
{{flink|string|to_string|any|desc=Converts any datatype to a string.}}&lt;br /&gt;
{{flink|string|to_plural|item|desc=Converts an item into the string value of its plural.}}&lt;br /&gt;
== Historical note ==&lt;br /&gt;
ASH did not originally support polymorphic functions, so it was not possible to have (for example) a single &#039;&#039;&#039;to_string(any)&#039;&#039;&#039; function that worked on any datatype.  Instead, there were separate &#039;&#039;&#039;int_to_string(int)&#039;&#039;&#039;, &#039;&#039;&#039;item_to_string(item)&#039;&#039;&#039;, etc. functions.  You may see these used in older scripts, and in fact they still work.  The rule is that if a function name is not otherwise defined anywhere, and it ends with one of the modern type conversion function names shown above, it is treated as a call to the modern function.  No check is made to verify that the chopped-off portion of the old function name actually matches the type of its parameter.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5223</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5223"/>
		<updated>2010-03-11T16:46:43Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Multiple Keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a      b      ab&lt;br /&gt;
b      c      bc&lt;br /&gt;
b      d      bd&lt;br /&gt;
c      d      cd&lt;br /&gt;
e      f      ef&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map2 (containing only entries that have &amp;quot;b&amp;quot; as key1) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
c      bc&lt;br /&gt;
d      bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. This is where the concept of dimensions comes from. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5222</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5222"/>
		<updated>2010-03-11T16:45:55Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Multiple Keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a    b    ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&lt;br /&gt;
a    b    ab&lt;br /&gt;
b    c    bc&lt;br /&gt;
b    d    bd&lt;br /&gt;
c    d    cd&lt;br /&gt;
e    f    ef&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The setup for my_map2 (containing only entries that have &amp;quot;b&amp;quot; as key1) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
c    bc&lt;br /&gt;
d    bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. This is where the concept of dimensions comes from. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5221</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5221"/>
		<updated>2010-03-11T16:42:00Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: /* Multiple Keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiple Keys===&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. This is where the concept of dimensions comes from. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5220</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5220"/>
		<updated>2010-03-11T16:41:44Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Multiple Keys=&lt;br /&gt;
&lt;br /&gt;
This is more complex. Maps with single keys are easy to understand how they will return - specify the map and key and you return the value (you need to specify which value you want if you use a record, but the principle is the same).&lt;br /&gt;
&lt;br /&gt;
More than one key is where maps get truly interesting. To all extents and purposes, multiple keys tend to be a way to categorise data into groups and subgroups. The return values get more complicated, though.&lt;br /&gt;
&lt;br /&gt;
Whenever you add a value to a map, all keys MUST be specified. However, when you are retrieving data this is not the case. This works best with an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
print(my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you might expect. Here we specified a map with two keys and one value. We assigned a value &amp;quot;ab&amp;quot; to the combination of key1 (&amp;quot;a&amp;quot;) and key2 (&amp;quot;b&amp;quot;). When we retrieved the value for that combination, we got &amp;quot;ab&amp;quot;. So far, so unsurprising.&lt;br /&gt;
&lt;br /&gt;
However, the natural question arises, what if we try to retrieve a value while only specifying one of the keys? The answer is that we need to change our perspective of the map to what I suggested earlier - that of groups and sub-groups.&lt;br /&gt;
&lt;br /&gt;
The way I visualise this is to imaging key1 represents a group and key2 is a subgroup. If two map entries have the same key1, then you should perceive them as having some commonality. What happens when you retrieve using key1 only is that you return a map of all the map entries that have the specified value of key1. This means (as you are returning an aggregate) you need to specify a new map for the values to be placed in. The following example illustrates this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [string , string] my_map;&lt;br /&gt;
my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;] = &amp;quot;ab&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] = &amp;quot;bc&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;b&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;bd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;] = &amp;quot;cd&amp;quot;;&lt;br /&gt;
my_map[&amp;quot;e&amp;quot;,&amp;quot;f&amp;quot;] = &amp;quot;ef&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
string [string] my_map2 = my_map[&amp;quot;b&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
foreach x in my_map2 {&lt;br /&gt;
   print( my_map2[x] );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;bc&lt;br /&gt;
bd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, my_map[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;], which has &amp;quot;b&amp;quot; as key2 is NOT included in the aggregate return. This is where the concept of dimensions comes from. The more keys, the more level of control you have, but you cannot return (I don&#039;t think) a map of key1 that shares key2. It&#039;s a one-way structure. Of course, you could work around this with a new map that had the keys in reverse.&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5219</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5219"/>
		<updated>2010-03-11T16:12:40Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Grotfang|Grotfang]] 16:12, 11 March 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5218</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5218"/>
		<updated>2010-03-11T16:09:51Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far, so simple. The next bit is where it gets interesting. We can no longer assign a value to the map as a whole. Without a record, we can do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&lt;br /&gt;
message[1] = &amp;quot;Hi there!&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the string &amp;quot;Hi there!&amp;quot; our value for key = 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&lt;br /&gt;
1   Hi there!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With a record, we can no longer assign a value to a key alone; we have more than one value and we need to specify which one it is we want to assign something to. So using the record above, to assign a message we would have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
my_messages[1].message = &amp;quot;Hi there!&amp;quot;;&lt;br /&gt;
my_messages[1].recipient = &amp;quot;Grotfang&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both values are assigned to our &amp;quot;1&amp;quot; key, but we must specify the value we are assigning. The following details what is going on in the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&lt;br /&gt;
int   message   recipient&lt;br /&gt;
1   Hi there!   Grotfang&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5217</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5217"/>
		<updated>2010-03-11T15:55:52Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5216</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5216"/>
		<updated>2010-03-11T15:54:04Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The slice/value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;value [key1 , key2] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5215</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5215"/>
		<updated>2010-03-11T15:53:08Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The slice/value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;datatype [key] name;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;string [int] message;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key1   key2   value&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1   value2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;key   value1    value2&lt;br /&gt;
int   message   recipient&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5214</id>
		<title>Talk:Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Structures&amp;diff=5214"/>
		<updated>2010-03-11T15:51:27Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Description of map&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I thought that the Records section would&#039;ve been helpful in figuring out multidimensional maps -- maybe not; Veracity might&#039;ve gone a bit too far with that example (which I understand, as she was trying to cover all her bases with one single unifying example). --[[User:Heeheehee|Heeheehee]] 06:42, 10 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==An attempt at explaining maps==&lt;br /&gt;
&lt;br /&gt;
A map consists of two types of component.&lt;br /&gt;
* The key&lt;br /&gt;
* The slice/value&lt;br /&gt;
A normal map (without using a record) can have multiple keys, but only one value. A map is formed by specifying a normal datatype for the value and including a key, then giving the map a name:&lt;br /&gt;
&lt;br /&gt;
datatype [key] name;&lt;br /&gt;
&lt;br /&gt;
Eg. string [int] message;&lt;br /&gt;
&lt;br /&gt;
This in itself is a useful feature, but there are many situations where you may wish to associate two values. For example, in the message map above, I may wish to specify both a message and a name to send it to. There are two ways I could deal with this problem. The first would be to create a second map with a corresponding key. I could then assume that message[key] should be send to recipient[key]. While this works, it is inefficient and untidy, as well as inflexible.&lt;br /&gt;
&lt;br /&gt;
Mafia supports the ability to customise maps using record. Record tells mafia what each entry in a map means, thereby enabling us to have more than one value to the map. The best way to visualise maps is to see a row on a page:&lt;br /&gt;
&lt;br /&gt;
key   value&lt;br /&gt;
&lt;br /&gt;
We can extend our keys already by specifying multiples:&lt;br /&gt;
&lt;br /&gt;
key1   key2   value&lt;br /&gt;
&lt;br /&gt;
What record lets us do is add more values:&lt;br /&gt;
&lt;br /&gt;
key   value1   value2&lt;br /&gt;
&lt;br /&gt;
Each line in a record is the next value and has to include the datatype of that value. Before we specified the value&#039;s datatype when we named the map (since there was only one value to assign a datatype to). Now we have to make a record of ALL the datatypes that will come up, and then when we make our map we will use the record name in place of a single datatype:&lt;br /&gt;
&lt;br /&gt;
record kmailer{&lt;br /&gt;
   string message;&lt;br /&gt;
   string recipient;&lt;br /&gt;
}&lt;br /&gt;
kmailer [int] my_messages;&lt;br /&gt;
&lt;br /&gt;
The example above creates the following map:&lt;br /&gt;
&lt;br /&gt;
key   value1    value2&lt;br /&gt;
int   message   recipient&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Chat_private&amp;diff=5207</id>
		<title>Chat private</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Chat_private&amp;diff=5207"/>
		<updated>2010-03-11T01:06:13Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|chat_private}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Uncategorized|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|player}}|&lt;br /&gt;
parameter2={{Param|string|message}}|&lt;br /&gt;
p1desc={{pspan|player}} is the name of the player you wish to contact.|&lt;br /&gt;
p2desc={{pspan|message}} is the message you wish to send them.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to send ingame private messages through chat to players who are either in your clan or (if you have access to it) on your clan&#039;s whitelist.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=If you save this as example.ash, then type &amp;quot;set chatbotScript=example.ash&amp;quot; into the CLI, this script will log messages sent to you and reply to the sender with an away message.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
void main(string sender , string message){&lt;br /&gt;
   print(sender + &amp;quot;: &amp;quot; + message , &amp;quot;green&amp;quot;);&lt;br /&gt;
   chat_private(sender , &amp;quot;I am not here right now, but will see your message when I return. Thanks for calling!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|chat_clan}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5461</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5461"/>
		<updated>2010-03-11T00:53:23Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integers return true for anything except 0.&lt;br /&gt;
* floats return true for anything except -1.0 to 1.0 (not inclusive).&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.&lt;br /&gt;
* slots return false for [hat] but true for everything else.&lt;br /&gt;
* stats return true.&lt;br /&gt;
* familiars return true.&lt;br /&gt;
* classes return false for [seal clubber] but true for everything else.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5460</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5460"/>
		<updated>2010-03-11T00:49:21Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integers return true for anything except 0.&lt;br /&gt;
* floats return true for anything except -1.0 to 1.0.&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.&lt;br /&gt;
* slots return false for [hat] but true for everything else.&lt;br /&gt;
* stats return true.&lt;br /&gt;
* familiars return true.&lt;br /&gt;
* classes return false for [seal clubber] but true for everything else.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|}}|&lt;br /&gt;
cli_equiv=The CLI command |&lt;br /&gt;
more_info= |&lt;br /&gt;
special= |&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5459</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5459"/>
		<updated>2010-03-11T00:48:25Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integers return true for anything except 0.&lt;br /&gt;
* floats return true for anything except 0.0 to (not quite) 1.0.&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.&lt;br /&gt;
* slots return false for [hat] but true for everything else.&lt;br /&gt;
* stats return true.&lt;br /&gt;
* familiars return true.&lt;br /&gt;
* classes return false for [seal clubber] but true for everything else.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|}}|&lt;br /&gt;
cli_equiv=The CLI command |&lt;br /&gt;
more_info= |&lt;br /&gt;
special= |&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5458</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5458"/>
		<updated>2010-03-11T00:45:52Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integers return true for anything except 0.&lt;br /&gt;
* floats return true for anything except 0.0 to (not quite) 1.0.&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.&lt;br /&gt;
* slots return true.&lt;br /&gt;
* stats return true.&lt;br /&gt;
* familiars return true.&lt;br /&gt;
* classes return true.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|}}|&lt;br /&gt;
cli_equiv=The CLI command |&lt;br /&gt;
more_info= |&lt;br /&gt;
special= |&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5457</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5457"/>
		<updated>2010-03-11T00:37:49Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integerss return true for anything except 0.&lt;br /&gt;
* floats return true for anything except 0.0 to (not quite) 1.0.&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.&lt;br /&gt;
* slots return true.&lt;br /&gt;
* stats return true.&lt;br /&gt;
* familiars return true.&lt;br /&gt;
* classes return true.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|}}|&lt;br /&gt;
cli_equiv=The CLI command |&lt;br /&gt;
more_info= |&lt;br /&gt;
special= |&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5456</id>
		<title>To boolean</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_boolean&amp;diff=5456"/>
		<updated>2010-03-11T00:34:35Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Specify datatype behaviour. Weird...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_boolean}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Datatype Conversions|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Datatype behaviour:&lt;br /&gt;
* strings return false for anything except &amp;quot;true&amp;quot;.&lt;br /&gt;
* integerss return true for anything except 0.&lt;br /&gt;
* floats return true for anything except 0.0 to (not quite) 1.0.&lt;br /&gt;
* locations return false.&lt;br /&gt;
* items return true.&lt;br /&gt;
* monsters return false.&lt;br /&gt;
* skills return true.&lt;br /&gt;
* effects return true.&lt;br /&gt;
* elements return false for [none] but true for everything else.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|}}|&lt;br /&gt;
cli_equiv=The CLI command |&lt;br /&gt;
more_info= |&lt;br /&gt;
special= |&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1158</id>
		<title>Miscellaneous Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1158"/>
		<updated>2010-03-10T23:58:05Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}}&lt;br /&gt;
{{Flink|void|print|string|{{opt|string}}|desc=Prints to CLI and status line of Adventuring window, optionally in a specified color.}}&lt;br /&gt;
{{Flink|void|print_html|string|desc=Prints to CLI, parsing any included html.}}&lt;br /&gt;
{{Flink|void|logprint|string|desc=Prints to the session log.}}&lt;br /&gt;
{{Flink|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}}&lt;br /&gt;
{{Flink|void|wait|int|desc=Sleeps for the specified number of seconds.}}&lt;br /&gt;
{{Flink|string|get_property|string|desc=Gets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|set_property|string|string|desc=Sets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for [[batch_close|batch_close()]] for details).}}&lt;br /&gt;
{{Flink|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}&lt;br /&gt;
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}&lt;br /&gt;
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}&lt;br /&gt;
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}&lt;br /&gt;
{{Flink|void|disable|string|desc=Disables the specified function (for debugging purposes).}}&lt;br /&gt;
{{Flink|void|enable|string|desc=Enables the specified function (for debugging purposes).}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Print_html&amp;diff=5449</id>
		<title>Print html</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Print_html&amp;diff=5449"/>
		<updated>2010-03-10T23:55:05Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|print_html}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|html}}|&lt;br /&gt;
p1desc={{pspan|html}} is the HTML string you want printed.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This is a modified version of print() that allows you to format strings as if they were HTML. Font size, tables, font colours, etc can all be specified. This can produce some interesting effects in scripts. For example, producing pleasing layouts, such as tables for informational scripts and introducing multiple colours.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This is code taken from That FN Ninja&#039;s dwarven factory script that displays a line using subtly different colours for each letter.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
print_html(&amp;quot;&amp;lt;font size=5&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font color=000000&amp;gt;P&amp;lt;/font&amp;gt;&amp;lt;font color=00002D&amp;gt;u&amp;lt;/font&amp;gt;&amp;lt;font color=00005A&amp;gt;z&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font color=000087&amp;gt;z&amp;lt;/font&amp;gt;&amp;lt;font color=0000B4&amp;gt;l&amp;lt;/font&amp;gt;&amp;lt;font color=0000E1&amp;gt;e&amp;lt;/font&amp;gt; &amp;lt;font color=0000E1&amp;gt;S&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font color=0000C0&amp;gt;o&amp;lt;/font&amp;gt;&amp;lt;font color=0000A0&amp;gt;l&amp;lt;/font&amp;gt;&amp;lt;font color=000080&amp;gt;v&amp;lt;/font&amp;gt;&amp;lt;font color=000060&amp;gt;e&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font color=000040&amp;gt;d&amp;lt;/font&amp;gt;&amp;lt;font color=000020&amp;gt;!&amp;lt;/font&amp;gt;&amp;lt;font color=000000&amp;gt;!&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|print}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Print_html&amp;diff=5448</id>
		<title>Print html</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Print_html&amp;diff=5448"/>
		<updated>2010-03-10T23:54:41Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|print_html}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|html}}|&lt;br /&gt;
p1desc={{pspan|html}} is the HTML string you want printed.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This is a modified version of print() that allows you to format strings as if they were HTML. Font size, tables, font colours, etc can all be specified. This can produce some interesting effects in scripts. For example, producing pleasing layouts, such as tables for informational scripts and introducing multiple colours.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This is code taken from That FN Ninja&#039;s dwarven factory script that displays a line using subtly different colours for each letter.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
print_html(&amp;quot;&amp;lt;font size=5&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font color=000000&amp;gt;P&amp;lt;/font&amp;gt;&amp;lt;font color=00002D&amp;gt;u&amp;lt;/font&amp;gt;&amp;lt;font color=00005A&amp;gt;z&amp;lt;/font&amp;gt;&amp;lt;font color=000087&amp;gt;z&amp;lt;/font&amp;gt;&amp;lt;font color=0000B4&amp;gt;l&amp;lt;/font&amp;gt;&amp;lt;font color=0000E1&amp;gt;e&amp;lt;/font&amp;gt; &amp;lt;font color=0000E1&amp;gt;S&amp;lt;/font&amp;gt;&amp;lt;font color=0000C0&amp;gt;o&amp;lt;/font&amp;gt;&amp;lt;font color=0000A0&amp;gt;l&amp;lt;/font&amp;gt;&amp;lt;font color=000080&amp;gt;v&amp;lt;/font&amp;gt;&amp;lt;font color=000060&amp;gt;e&amp;lt;/font&amp;gt;&amp;lt;font color=000040&amp;gt;d&amp;lt;/font&amp;gt;&amp;lt;font color=000020&amp;gt;!&amp;lt;/font&amp;gt;&amp;lt;font color=000000&amp;gt;!&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|print}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Enable&amp;diff=5446</id>
		<title>Enable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Enable&amp;diff=5446"/>
		<updated>2010-03-10T23:47:42Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|enable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to enable.&lt;br /&gt;
}}||&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to specify a disabled function that you wish to re-enable. Note, enable(&amp;quot;all&amp;quot;), as you may expect, enables all disabled functions.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=Disabling map_to_file() to prevent writing into your data files can be useful when testing. This snippet re-enables the function.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
enable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|disable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5328</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5328"/>
		<updated>2010-03-10T23:47:30Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet generates a map that is outputted to a data file. In testing you might not want to do this every time, so you can disable map_to_file().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Enable&amp;diff=5445</id>
		<title>Enable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Enable&amp;diff=5445"/>
		<updated>2010-03-10T23:44:02Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|enable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to enable.&lt;br /&gt;
}}||&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to specify a disabled function that you wish to re-enable. Note, enable(&amp;quot;all&amp;quot;), as you may expect, enables all disabled functions.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=Disabling map_to_file() to prevent writing into your data files can be useful when testing. This snippet re-enables the function.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
enable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|disable|map_to_file}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5327</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5327"/>
		<updated>2010-03-10T23:39:41Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet generates a map that is outputted to a data file. In testing you might not want to do this every time, so you can disable map_to_file().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable|map_to_file}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5326</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5326"/>
		<updated>2010-03-10T23:39:17Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet generates a map that is outputted to a data file. In testing you might not want to do this every time, so you can disable map_to_file().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5325</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5325"/>
		<updated>2010-03-10T23:36:27Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet generates a map that is outputted to a data file. In testing I don&#039;t want to do this every time, so I disable map_to_file().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;map_to_file&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5324</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5324"/>
		<updated>2010-03-10T23:34:50Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=This mini scriptlet has a bug in it that makes it loop. I want to test what is making the script run oddly, but can&#039;t see immediately where the looping conditional is. I can use disable to knock out functions sequentially to test where the fault arises.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
disable(&amp;quot;adventure_me&amp;quot;);&lt;br /&gt;
void adventure_me(){&lt;br /&gt;
   int my_adv = my_adventures();&lt;br /&gt;
   while(my_adv &amp;gt; 0){&lt;br /&gt;
      adventure(1 , $location[giant&#039;s castle]);&lt;br /&gt;
   }&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(){&lt;br /&gt;
   adventure_me();&lt;br /&gt;
   print(&amp;quot;Finish&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5323</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5323"/>
		<updated>2010-03-10T23:25:02Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself), but not aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5322</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5322"/>
		<updated>2010-03-10T23:21:28Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function allows you to disable commands and/or functions by name. String {{pspan|func}} specifies the name of a CLI command or ASH function that you do not wish to be carried out. Note these include custom ASH functions (that you name yourself) as well as aliases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remember that CLI commands will be disabled if they have the same name (or can be disabled deliberately with this function).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5321</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5321"/>
		<updated>2010-03-10T15:17:59Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care. It also disables the usual logout function, so will require exiting mafia by clicking &amp;quot;X&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5320</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5320"/>
		<updated>2010-03-10T15:14:41Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
special=Misuse of this function will cause mafia to eat your firstborn and nudge the planets out of alignment. Caution is advised.|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5319</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5319"/>
		<updated>2010-03-10T15:12:44Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using &amp;quot;all&amp;quot; as the string parameter will disable all ASH functions including enable. This will require a restart of KoLmafia to resolve, so use with care.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Despite &amp;quot;all&amp;quot; working in the manner specified above, disable() and enable() cannot be disabled using disable() when specified individually. The only way to disable enable() is to use &amp;quot;disable(&amp;quot;all&amp;quot;)&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Samples|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|enable}}|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5318</id>
		<title>Disable</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Disable&amp;diff=5318"/>
		<updated>2010-03-10T15:07:00Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|disable}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|func}}|&lt;br /&gt;
p1desc={{pspan|func}} is the name of the function you wish to disable.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Mafia has an internal array of function names which are disabled. At the start of each session, this array starts empty. Disable adds names to this array and mafia will not allow functions to be called that are named after any on the disabled list (with the exception of disable and enable). This is useful for debugging scripts, as you can quickly disable functions from the top of a script without digging through the code. In addition, when a disabled function is called, mafia will print a line informing you of this fact, while not acting on it.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Important considerations:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mafia cannot differentiate between scripts that call functions of the same name. If function &amp;quot;foo&amp;quot; is disabled from script one, it will still be disabled when you run script two, unless you enable &amp;quot;foo&amp;quot; or restart mafia.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a disabled function is incorporated into a condition (eg. &amp;quot;if(disabled_function())&amp;quot; ), then mafia will not just skip the entire conditional. If an else statement is present, the condition is treated as false and the else code will be performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=CODE EXAMPLE TITLE|&lt;br /&gt;
description=DESCRIPTION OF CODE|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
CODE GOES HERE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|FIRST|SECOND|ETC}}|&lt;br /&gt;
cli_equiv=LIST_CLI_EQUIVALENT_INFO|&lt;br /&gt;
more_info=A_LINE_TO_NOTIFY_OF_EXTERNAL_INFO|&lt;br /&gt;
special=SPECIAL_NOTES_SUCH_AS_NOT-LOGGED-IN_VALUE&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Wait&amp;diff=5312</id>
		<title>Wait</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Wait&amp;diff=5312"/>
		<updated>2010-03-10T14:56:56Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|wait}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|int|secs}}|&lt;br /&gt;
p1desc={{pspan|secs}} is the number of seconds you want to count down from.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function will initiate a countdown from {{pspan|secs}} seconds to 0, during which time nothing else will be acted on. It essentially pauses a script. In addition, a countdown prints to the CLI at varying intervals (every 15 secs for large numbers, 5 seconds for smaller numbers and every second from 5 seconds down).|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
cli_equiv=&amp;quot;wait&amp;quot; can also be used from the CLI. It has the same meaning and can be used to pause basic .txt scripts.|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Wait&amp;diff=5311</id>
		<title>Wait</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Wait&amp;diff=5311"/>
		<updated>2010-03-10T14:53:09Z</updated>

		<summary type="html">&lt;p&gt;Grotfang: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|wait}}{{&lt;br /&gt;
#vardefine:return_type|void}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Miscellaneous|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|int|secs}}|&lt;br /&gt;
p1desc={{pspan|secs}} is the number of seconds you want to count down from.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function will initiate a countdown from {{pspan|secs}} seconds to 0, during which time nothing else will be acted on. It essentially pauses a script. In addition, a countdown prints to the CLI at varying intervals (every 15 secs for large numbers, 5 seconds for smaller numbers and every second from 5 seconds down).|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
cli_equiv=wait can also be used from the CLI. It has the same meaning and can be used to pause basic .txt scripts.|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Grotfang</name></author>
	</entry>
</feed>