<?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=Lostcalpolydude</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=Lostcalpolydude"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Lostcalpolydude"/>
	<updated>2026-04-24T19:12:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8842</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8842"/>
		<updated>2020-12-21T15:43:51Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519. &#039;&#039;&#039;This support is still experimental - you have been warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
* All the methods in the ASH runtime library are available, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* In scripts called from a file, you can access the runtime library by calling &amp;lt;code&amp;gt;require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;, so &amp;lt;code&amp;gt;const { printHtml } = require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;. If running from the command line via &amp;lt;code&amp;gt;js&amp;lt;/code&amp;gt;, the runtime library functions are all available in the global scope (so you can do &amp;lt;code&amp;gt;js print(&amp;quot;Hello world!&amp;quot;);&amp;lt;/code&amp;gt;).&lt;br /&gt;
** If you want all runtime functions available, you can use &amp;lt;code&amp;gt;const k = require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;, and then call functions using &amp;lt;code&amp;gt;k.printHtml(&amp;quot;Hello world!&amp;quot;);&amp;lt;/code&amp;gt; (as an example)&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS version of the ASH runtime library with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module. For the uninitiated, this just means adding &amp;lt;code&amp;gt;module.exports.main = main&amp;lt;/code&amp;gt; to the end of your script. You will want to do the same with any function or value you want to be available to other scripts via require.&lt;br /&gt;
&lt;br /&gt;
== JavaScript Version and Features ==&lt;br /&gt;
KoLmafia uses the [[wikipedia:Rhino (JavaScript engine)|Rhino]] engine to execute JavaScript code. Rhino supports an older version of JavaScript called &amp;quot;ES5&amp;quot;, plus some features from newer versions. This means that many JavaScript features that work in web browsers might not work in KoLmafia.&lt;br /&gt;
&lt;br /&gt;
Here is an incomplete list of post-ES5 features supported by Rhino ([https://kolmafia.us/threads/javascript-bugs.25638/post-160384 source]):&lt;br /&gt;
&lt;br /&gt;
=== Supported ===&lt;br /&gt;
* Syntax&lt;br /&gt;
** &amp;lt;code&amp;gt;let&amp;lt;/code&amp;gt; and (partially) &amp;lt;code&amp;gt;const&amp;lt;/code&amp;gt;&lt;br /&gt;
*** Does not support block-level scoping or temporal dead zones, meaning that you cannot use &amp;lt;code&amp;gt;const&amp;lt;/code&amp;gt; for loop variables. &amp;lt;code&amp;gt;for (const a in obj) { ... }&amp;lt;/code&amp;gt; is a syntax error.&lt;br /&gt;
** Array/object destructuring (but spread/rest syntax (&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;) is &#039;&#039;not&#039;&#039; supported)&lt;br /&gt;
** &amp;lt;code&amp;gt;for...of&amp;lt;/code&amp;gt; loop&lt;br /&gt;
** Arrow functions: &amp;lt;code&amp;gt;() =&amp;gt; {}&amp;lt;/code&amp;gt;&lt;br /&gt;
** Octal and binary literals&lt;br /&gt;
* Features&lt;br /&gt;
** Symbol&lt;br /&gt;
** Set, Map, WeakSet, WeakMap&lt;br /&gt;
** ES2015 methods in Array, Math, Number, Object, String&lt;br /&gt;
** &amp;lt;code&amp;gt;Array.prototype.includes()&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;String.prototype.padStart()/padEnd()/trimStart()/trimEnd()&amp;lt;/code&amp;gt;&lt;br /&gt;
** TypedArray: Can be constructed, but most TypedArray-specific methods are unavailable.&lt;br /&gt;
&lt;br /&gt;
=== Unsupported ===&lt;br /&gt;
* Syntax&lt;br /&gt;
** Spread/rest syntax (&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Template string literals: Backtick string literals (&amp;lt;code&amp;gt;``&amp;lt;/code&amp;gt;) are not a syntax error, but are treated as plain string literals.&lt;br /&gt;
** Classes&lt;br /&gt;
** ECMAScript modules (&amp;lt;code&amp;gt;import&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Default function parameters&lt;br /&gt;
** Computed property names&lt;br /&gt;
** Async/Await&lt;br /&gt;
** Trailing commas in function definitions (oddly, trailing commas are supported in function &#039;&#039;calls&#039;&#039;)&lt;br /&gt;
* Features&lt;br /&gt;
** Promise&lt;br /&gt;
** Proxy&lt;br /&gt;
** Reflect&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
Most JavaScript globals available in browsers and/or server-side environments like Node.js are &#039;&#039;not&#039;&#039; available. This includes &amp;lt;code&amp;gt;alert()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;console.log()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;setTimeout()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Transpiling ==&lt;br /&gt;
&lt;br /&gt;
Folks with experience doing JavaScript web development are likely well-acquainted with tools such as Babel, Webpack, and TypeScript. These tools allow you to write modern JavaScript code. and can transpile the code down to an older version of JS supported by a particular engine. That approach works well with Rhino.&lt;br /&gt;
&lt;br /&gt;
* Babel: As of r20558, you will still need to apply several patches to Babel in order to get babel-preset-env to work. See [https://github.com/phulin/bean-casual/tree/ts] for an example of a working Babel/Webpack/Typescript configuration; you&#039;ll need the configuration files and also the patches, which can be applied with patch-package.&lt;br /&gt;
* TypeScript: If you use Babel without TypeScript, setting the [https://www.typescriptlang.org/tsconfig#target target] to &amp;lt;samp&amp;gt;&amp;quot;ES5&amp;quot;&amp;lt;/samp&amp;gt; will usually work.&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7178</id>
		<title>Counters</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7178"/>
		<updated>2019-03-21T16:52:59Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Update documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:counters (CLI)}}&lt;br /&gt;
&lt;br /&gt;
This is a CLI command for displaying or modifying KoLmafia&#039;s counters. Without any parameters it will display all current counters.&lt;br /&gt;
&lt;br /&gt;
The possible parameters are:&lt;br /&gt;
* &#039;&#039;&#039;clear&#039;&#039;&#039;: This will remove all current counters.&lt;br /&gt;
* &#039;&#039;&#039;add&#039;&#039;&#039; condition: This will add a counter. If the condition is an item, it will set the necessary quantity to this many more than you currently have. This also has the additional parameters: number [title img]&lt;br /&gt;
** &#039;&#039;&#039;number&#039;&#039;&#039; the is the number of turns until the counter expires&lt;br /&gt;
** &#039;&#039;&#039;title&#039;&#039;&#039; is an optional parameter to name the counter. If no name is given, then the counter will be named &amp;quot;manual&amp;quot;.  &lt;br /&gt;
*** The title can include one or more instances of &#039;&#039;&#039;loc=X&#039;&#039;&#039;, where X is an adventure id that you can go without having the counter abort adventuring.  Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.&lt;br /&gt;
*** The title can include &#039;&#039;&#039;type=wander&#039;&#039;&#039; which will cause it to remain at 0 turns until it is explicitly cleared. Wandering monsters work this way and KoLmafia explicitly clears the counters it creates after the wandering monster is encountered.&lt;br /&gt;
** &#039;&#039;&#039;img&#039;&#039;&#039; is an optional image for the counter. You can use any of the images in KoL&#039;s \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter.&lt;br /&gt;
* &#039;&#039;&#039;warn&#039;&#039;&#039; title: This will change an existing counter so that it does not have a loc=* paremeter, ensuring that it will stop you when it expires.&lt;br /&gt;
* &#039;&#039;&#039;nowarn&#039;&#039;&#039; title: This will change an existing counter so that it has loc=* as a parameter, ensuring that it will not stop you when it expires.&lt;br /&gt;
&lt;br /&gt;
Example: to add a fortune cookie counter to expire in 88 turns, use this command:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 88 cookie fortune.gif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a counter that will not abort in The Haunted Gallery or The Haunted Bathroom, use this:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 10 example loc=392 loc=394&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make KoLmafia&#039;s Digitize Monster counter stop your adventuring, use this:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters warn Digitize Monster&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Reverse_numberology&amp;diff=8494</id>
		<title>Reverse numberology</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Reverse_numberology&amp;diff=8494"/>
		<updated>2017-01-24T14:04:08Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Created page with &amp;quot;{{ #vardefine:name|reverse_numberology}}{{ #vardefine:return_type|int [int]}}{{ #vardefine:aggregate|yes}}{{  FunctionPage|  name={{#var:name}}|  function1={{Function| name={{...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|reverse_numberology}}{{&lt;br /&gt;
#vardefine:return_type|int [int]}}{{&lt;br /&gt;
#vardefine:aggregate|yes}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
&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|int|delta_turns}}|&lt;br /&gt;
p1desc={{pspan|delta_turns}} is a forecast of the number of turns you plan to spend before using numberology|&lt;br /&gt;
&lt;br /&gt;
parameter2={{Param|int|delta_spleen}}|&lt;br /&gt;
p2desc={{pspan|delta_spleen}} is a forecast of the amount of spleen you plan to fill before using numberology|&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;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns a map of the inputs needed for various outputs from numberology.  With no inputs, both are assumed to be 0.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=The following tells you if you will be eligible to fight a War Frat 151st Infantryman (numberology 51) after using spooky jelly.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
// This is a small example that won&#039;t be very useful unless incorporated into a larger script.&lt;br /&gt;
if ( reverse_numberology( 0, 1 ) contains 51 )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;Consider using a spooky jelly&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;numberology&amp;quot; lets you list all possible outputs with their corresponding inputs, or actually cast Calculate the Universe with a specified output.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Chat_clan&amp;diff=5866</id>
		<title>Chat clan</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Chat_clan&amp;diff=5866"/>
		<updated>2016-10-23T21:48:24Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: &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;, &amp;quot;slimetube&amp;quot;, &amp;quot;dread&amp;quot;, or &amp;quot;hauntedhouse&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|chat_macro}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Miscellaneous Functions]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7177</id>
		<title>Counters</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7177"/>
		<updated>2016-10-07T18:52:11Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:counters (CLI)}}&lt;br /&gt;
&lt;br /&gt;
This is a CLI command for displaying or modifying KoLmafia&#039;s counters. Without any parameters it will display all current counters.&lt;br /&gt;
&lt;br /&gt;
The possible parameters are:&lt;br /&gt;
* &#039;&#039;&#039;clear&#039;&#039;&#039;: This will remove all current counters.&lt;br /&gt;
* &#039;&#039;&#039;add&#039;&#039;&#039; condition: This will add a counter. If the condition is an item, it will set the necessary quantity to this many more than you currently have. This also has the additional parameters: number [title img]&lt;br /&gt;
** &#039;&#039;&#039;number&#039;&#039;&#039; the is the number of turns until the counter expires&lt;br /&gt;
** &#039;&#039;&#039;title&#039;&#039;&#039; is an optional parameter to name the counter. If no name is given, then the counter will be named &amp;quot;manual&amp;quot;.  &lt;br /&gt;
*** The title can include one or more instances of &#039;&#039;&#039;loc=X&#039;&#039;&#039;, where X is an adventure id that you can go without having the counter abort adventuring.  Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.&lt;br /&gt;
*** The title can include &#039;&#039;&#039;type=wander&#039;&#039;&#039; which will cause it to remain at 0 turns until it is explicitly cleared. Wandering monsters work this way and KoLmafia explicitly clears the counter after the wandering monster is encountered.&lt;br /&gt;
** &#039;&#039;&#039;img&#039;&#039;&#039; is an optional image for the counter. You can use any of the images in KoL&#039;s \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter.&lt;br /&gt;
* &#039;&#039;&#039;warn&#039;&#039;&#039; title: This will change an existing counter so that it does not have a loc=* paremeter, ensuring that it will stop you when it expires.&lt;br /&gt;
* &#039;&#039;&#039;nowarn&#039;&#039;&#039; title: This will change an existing counter so that it has loc=* as a parameter, ensuring that it will not stop you when it expires.&lt;br /&gt;
&lt;br /&gt;
Example: to add a fortune cookie counter to expire in 88 turns, use this command:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 88 cookie fortune.gif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a counter that will not abort in The Haunted Gallery or The Haunted Bathroom, use this:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 10 example loc=392 loc=394&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make KoLmafia&#039;s Digitize Monster counter stop your adventuring, use this:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters warn Digitize Monster&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7175</id>
		<title>Counters</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Counters&amp;diff=7175"/>
		<updated>2016-07-30T17:38:09Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:counters (CLI)}}&lt;br /&gt;
&lt;br /&gt;
This is a CLI command for displaying or modifying KoLmafia&#039;s counters. Without any parameters it will display all current counters.&lt;br /&gt;
&lt;br /&gt;
The possible parameters are:&lt;br /&gt;
* &#039;&#039;&#039;clear&#039;&#039;&#039;: This will remove all current counters.&lt;br /&gt;
* &#039;&#039;&#039;add&#039;&#039;&#039; condition: This will add a counter. If the condition is an item, it will set the necessary quantity to this many more than you currently have. This also has the additional parameters: number [title img]&lt;br /&gt;
** &#039;&#039;&#039;number&#039;&#039;&#039; the is the number of turns until the counter expires&lt;br /&gt;
** &#039;&#039;&#039;title&#039;&#039;&#039; is an optional parameter to name the counter. If no name is given, then the counter will be named &amp;quot;manual&amp;quot;.  &lt;br /&gt;
*** The title can include one or more instances of loc=X, where X is an adventure id that you can go without having the counter abort adventuring.  Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.&lt;br /&gt;
** &#039;&#039;&#039;img&#039;&#039;&#039; is an optional image for the counter. You can use any of the images in KoL&#039;s \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter. &lt;br /&gt;
&lt;br /&gt;
Example: to add a fortune cookie counter to expire in 88 turns, use this command:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 88 cookie fortune.gif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a counter that will not abort in The Haunted Gallery or The Haunted Bathroom, use this:&lt;br /&gt;
:&amp;lt;code&amp;gt; counters add 10 example loc=392 loc=394&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Equip_all_familiars&amp;diff=8473</id>
		<title>Equip all familiars</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Equip_all_familiars&amp;diff=8473"/>
		<updated>2015-06-07T20:28:08Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Created page with &amp;quot;{{ #vardefine:name|equip_all_familiars}}{{ #vardefine:return_type|boolean}}{{  FunctionPage| name={{#var:name}}|  function1={{Function| name={{#var:name}}| aggregate={{#var:ag...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|equip_all_familiars}}{{&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;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Equips all of your familiars with their specific equipment, if possible.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Equipment]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6103</id>
		<title>Miscellaneous ASH Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6103"/>
		<updated>2014-05-09T04:32:11Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: /* Chatbot (chatBotScript) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Special Features of ASH Scripting==&lt;br /&gt;
These features are not exactly ASH commands, but they are used to improve script usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Syntax Functions===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[notify]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to send a simple kmail to the script&#039;s author, letting them know you use their script.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[import]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to load an external script into your current one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[call]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enables the script writer to invoke a function whose name is known at runtime.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[new]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Constructor function used to populate a record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Comments===&lt;br /&gt;
&lt;br /&gt;
Adding &#039;&#039;&#039;[[Comments]]&#039;&#039;&#039; to your code can make it much easier to maintain, and helps other users understand what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
There are a wide variety of error messages. For help when things go wrong, please see the page on [[ASH Errors]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Relay Override Scripts==&lt;br /&gt;
A relay override script is a script that modifies a web page in the relay browser. It is only in the relay browser that the effects of this scripts can be seen. The purpose of this is to alter a KoL page to improve functionality or appearance.&lt;br /&gt;
&lt;br /&gt;
Detailed information is at [[Relay_Override_Scripting#Relay_Script|Relay Override Script]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==User Interface Script==&lt;br /&gt;
A User Interface script is a script that creates a web page viewable in the relay browser. It is only in the relay browser that this special page can be seen. The purpose of this is to extend KoLmafia abilities or present information to the user.&lt;br /&gt;
&lt;br /&gt;
Detailed information is at [[Relay_Override_Scripting#User_Interface_Script|User Interface Script]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Consult Scripts==&lt;br /&gt;
Consult scripts are used to script combat. They can be used in automated adventuring or in the relay browser.&lt;br /&gt;
&lt;br /&gt;
Detailed information is at [[Custom_Combat_Script#Consult_Scripts|Consult Scripts]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Additional Script Uses==&lt;br /&gt;
&lt;br /&gt;
In addition to regular scripts, override scripts, UI scripts, and consult scripts, mafia has a few other hooks for adding event-driven scripts.  These situations are listed below, along with the preference that you can set a script name to (in parentheses).&lt;br /&gt;
&lt;br /&gt;
==== After Adventure (afterAdventureScript) ====&lt;br /&gt;
&lt;br /&gt;
*Executed just after mafia has finished an adventure. &lt;br /&gt;
*The afterAdventureScript setting is executed like a CLI command. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
*By default this only works for automated adventuring. If you wish it to fire when you&#039;re using the relay browser then turn it on in General -&amp;gt; Preferences -&amp;gt; - Relay Browser or set the property relayRunsAfterAdventureScript to true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Before Adventure (betweenBattleScript) ====&lt;br /&gt;
&lt;br /&gt;
*Executed whenever mafia is about to enter a combat. That means before every adventure if auto-adventuring, or before using an item that could lead to combat such as black pudding or drum machine.&lt;br /&gt;
*The betweenBattleScript setting is executed like a CLI command. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
*By default this only works for automated adventuring. If you wish it to fire when you&#039;re using the relay browser then turn it on in General -&amp;gt; Preferences -&amp;gt; - Relay Browser or set the property relayRunsBeforeBattleScript to true.&lt;br /&gt;
*Example: Zarqon&#039;s [http://kolmafia.us/showthread.php?t=1240 Best Between Battle]&lt;br /&gt;
&lt;br /&gt;
=== Breaking the Prism (kingLiberatedScript) ===&lt;br /&gt;
&lt;br /&gt;
: This will be executed after you break the Prism at the top of the Naughty Sorceress&#039; Lair. This trigger is designed so that a character can be automatically prepared for aftercore. The kingLiberatedScript setting is executed like a CLI command. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buy (buyScript) ===&lt;br /&gt;
&lt;br /&gt;
*Will execute whenever mafia needs to determine if it is to purchase or create an item.&lt;br /&gt;
*Requires a special main declaration boolean main(item itm, int qty, int ingredientLevel, boolean defaultBuy). These values will be supplied by mafia when the script is automatically called. A return value of true will instruct mafia to purchase the item and false will cause it to create the item possibly leading to other buy/create decisions.&lt;br /&gt;
**&#039;&#039;itm&#039;&#039; and &#039;&#039;qty&#039;&#039; specify the item under consideration.&lt;br /&gt;
**&#039;&#039;ingredientLevel&#039;&#039; indicates what&#039;s already available: &lt;br /&gt;
***0 = none of the ingredients&lt;br /&gt;
***1 = some of them&lt;br /&gt;
***2 = enough to create at least one of the requested item&lt;br /&gt;
**defaultBuy indicates what KoLmafia would have done otherwise; returning this value is the safest thing your script could do. It will normally be true if ingredientLevel is 0, false if 2. The default at level 1 depends on the item, and is subject to change - normally, anything made with star charts, pixels, the Malus, or multi-use are bought, anything else is created.&lt;br /&gt;
*Example: Bale&#039;s [http://kolmafia.us/showthread.php?p=18313#post18313 potionBuy].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chatbot (chatbotScript) ===&lt;br /&gt;
&lt;br /&gt;
*Will execute whenever a private message is received&lt;br /&gt;
*Requires a special main declaration which can have an optional third parameter: &lt;br /&gt;
*:void main(string sender, string message)&lt;br /&gt;
*:void main(string sender, string message, string channel)&lt;br /&gt;
**&#039;sender&#039; is the name of the player who sent the message&lt;br /&gt;
**&#039;message&#039; is the message that was sent&lt;br /&gt;
**&#039;channel&#039; is &amp;quot;/clan&amp;quot; for clan messages, &amp;quot;Events&amp;quot; for chat notifications (e.g. &amp;quot;New message received from Bale.&amp;quot;), and the empty string for private messages&lt;br /&gt;
&lt;br /&gt;
=== Counters (counterScript) ===&lt;br /&gt;
&lt;br /&gt;
*Will execute whenever a counter will expire as a result of an intended use of adventures.&lt;br /&gt;
*Requires a special main declaration: boolean main(string name, int remain).  These values will be supplied by mafia when the script is automatically called and the return value will determine whether mafia continues operation (true) or aborts (false).  &lt;br /&gt;
**&#039;&#039;name&#039;&#039; will be the name of the counter that is about to expire.&lt;br /&gt;
**&#039;&#039;remain&#039;&#039; is the number of turns remaining before the counter expires.  Remain will usually be 0, but may be higher if you are about to multi-create items, adventure underwater, or take a vacation.   It may be negative if the counter was informational (one that doesn&#039;t abort adventuring), and it actually expired in the middle of an action that used multiple turns at once.&lt;br /&gt;
*Example: Bale&#039;s [http://kolmafia.us/showthread.php?t=2519 CounterChecker].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Login (loginScript) ===&lt;br /&gt;
&lt;br /&gt;
:This script is immediately executed once your character is logged in. The loginScript setting is executed like a CLI command. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Logout (logoutScript) ===&lt;br /&gt;
&lt;br /&gt;
:Same as the loginScript, but runs on logout.  Note that an {{f|abort}} in the script won&#039;t stop a logout unless the logout was called in (specific ways, please list).&lt;br /&gt;
&lt;br /&gt;
=== Planting (plantingScript) ===&lt;br /&gt;
&lt;br /&gt;
*This script can be used to manage the mushroom fields, which are available when under a muscle zodiac sign. It runs after logging in, if you have a mushroom field. Main function takes no arguments. Generally should take into account current [[moon phase]] so that it can be started in the middle of a cycle.&lt;br /&gt;
*The plantingScript has to be the name of an ASH file without the extension (if the plantingScript setting is &amp;quot;plant&amp;quot;, KoLMafia will call &amp;quot;plant.ash&amp;quot;).&lt;br /&gt;
*Example: [http://kolmafia.us/showthread.php?563-Modified-mushroom-script-to-produce-3rd-4th-gen-crop&amp;amp;p=7507&amp;amp;viewfull=1#post7507 Sandiman&#039;s mushroom planting script].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post-Ascension (postAscensionScript) ===&lt;br /&gt;
&lt;br /&gt;
:Executed at once when your character starts a new ascension. (Example: Bales&#039;s [http://kolmafia.us/showthread.php?t=2769 newLife]). The postAscensionScript setting is executed like a CLI command. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pre-Ascension (preAscensionScript) ===&lt;br /&gt;
&lt;br /&gt;
:Same as the Post-Ascension, but executed right before entering Valhalla.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Recovery (recoveryScript) ===&lt;br /&gt;
&lt;br /&gt;
*Executed whenever mafia would recover your HP / MP.  &lt;br /&gt;
*Requires a special main() declaration: boolean main(string type, int amount).  These values will be supplied when mafia automatically calls the script, and the return value will instruct mafia if it should attempt to use mafia&#039;s default healing after the script concludes. &lt;br /&gt;
**&#039;&#039;type&#039;&#039; is either &amp;quot;HP&amp;quot; or &amp;quot;MP&amp;quot;.&lt;br /&gt;
**&#039;&#039;amount&#039;&#039; is the desired amount of restoration needed or 0 to use mafia&#039;s default recovery level and target.&lt;br /&gt;
*Example: Bale&#039;s [http://kolmafia.us/showthread.php?t=1780 Universal Recovery]&lt;br /&gt;
&lt;br /&gt;
==A little CLI help==&lt;br /&gt;
&lt;br /&gt;
Three CLI commands are of great use to ASH scripters:&lt;br /&gt;
* [[ashref]] allows one to get a list of ASH functions&lt;br /&gt;
* [[ash (CLI)|ash]] or [[ash (CLI)|ashq]] allows one to run ASH directly on the CLI.&lt;br /&gt;
* [[ashwiki]] allows you to search this wiki by launching a web browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Useful forum threads==&lt;br /&gt;
[http://kolmafia.us/showthread.php?523-Did-you-know...-It-s-a-secret-feature.&amp;amp;p=2968&amp;amp;viewfull=1#post2968 This thread], started by holatuwol, is a tidy compilation of various undocumented features in KoLmafia.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_to_map&amp;diff=3072</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=3072"/>
		<updated>2013-03-29T08:24:25Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Update the URL for internal data files&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>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=2899</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=2899"/>
		<updated>2013-03-01T20:19:47Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Update SVN URL&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;svn://svn.code.sf.net/p/kolmafia/code/&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 checkout svn://svn.code.sf.net/p/kolmafia/code/ 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 checkout svn://svn.code.sf.net/p/kolmafia/code/ 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>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:To_coinmaster&amp;diff=7877</id>
		<title>Talk:To coinmaster</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:To_coinmaster&amp;diff=7877"/>
		<updated>2012-03-18T04:53:50Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Created page with &amp;quot;It&amp;#039;s true that the code sample wasn&amp;#039;t hard to fix, but now it doesn&amp;#039;t have an example of the function, making it a bit pointless. --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It&#039;s true that the code sample wasn&#039;t hard to fix, but now it doesn&#039;t have an example of the function, making it a bit pointless. --[[User:Lostcalpolydude|Lostcalpolydude]] 00:53, 18 March 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_coinmaster&amp;diff=7511</id>
		<title>To coinmaster</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_coinmaster&amp;diff=7511"/>
		<updated>2012-03-18T04:08:14Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: The code sample didn&amp;#039;t work.  A new one is needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_coinmaster}}{{&lt;br /&gt;
#vardefine:return_type|coinmaster}}{{&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=boolean|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|store}}|&lt;br /&gt;
p1desc={{pspan|store}} is hopefully the name of a coinmaster|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|visit|is_accessible|buys_item|sells_item}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Item Management]]&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=User:Lostcalpolydude/prefref&amp;diff=7872</id>
		<title>User:Lostcalpolydude/prefref</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=User:Lostcalpolydude/prefref&amp;diff=7872"/>
		<updated>2012-02-07T12:54:35Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Created page with &amp;quot;Want an easy way to find mafia properties?  Make this alias:  &amp;lt;code&amp;gt;alias prefref =&amp;gt; ashq record r{string d ; }; r[string,string]m; file_to_map(&amp;quot;defaults.txt&amp;quot;,m); foreach t,p,d i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Want an easy way to find mafia properties?  Make this alias:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;alias prefref =&amp;gt; ashq record r{string d ; }; r[string,string]m; file_to_map(&amp;quot;defaults.txt&amp;quot;,m); foreach t,p,d in m if(to_lower_case(p).contains_text(to_lower_case($string[%%]))) print(p+&amp;quot; (&amp;quot;+t+&amp;quot;, now &#039;&amp;quot;+get_property(p)+&amp;quot;&#039;, default &amp;quot;+d.d+&amp;quot;)&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can type something like &amp;lt;code&amp;gt;prefref rave&amp;lt;/code&amp;gt; and get&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;raveCombo1 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;br&amp;gt;&lt;br /&gt;
raveCombo2 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;br&amp;gt;&lt;br /&gt;
raveCombo3 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;br&amp;gt;&lt;br /&gt;
raveCombo4 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;br&amp;gt;&lt;br /&gt;
raveCombo5 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;br&amp;gt;&lt;br /&gt;
raveCombo6 (user, now &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, default )&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=User:Lostcalpolydude&amp;diff=7447</id>
		<title>User:Lostcalpolydude</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=User:Lostcalpolydude&amp;diff=7447"/>
		<updated>2011-06-20T16:02:41Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Created page with &amp;quot;Does this require a captcha?&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Does this require a captcha?&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6722</id>
		<title>Help talk:Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6722"/>
		<updated>2010-06-18T07:03:34Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: /* Setting up symlinks for Dropbox on non-Windows systems */ command needs to be different for macs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Setting up symlinks for Dropbox on non-Windows systems==&lt;br /&gt;
Open the command-line interface for your OS.  For linux, type in:&amp;lt;br&amp;gt;&lt;br /&gt;
ln -s ~/.kolmafia /path/to/dropbox/folder/KoLmafia&lt;br /&gt;
&lt;br /&gt;
For a Mac, type in:&amp;lt;br&amp;gt;&lt;br /&gt;
ln -s /Library/Application\ Support/KoLmafia /path/to/dropbox/folder/KoLmafia&lt;br /&gt;
&lt;br /&gt;
==Setting up symlinks for Dropbox on a Mac==&lt;br /&gt;
If you&#039;re using a Mac, and the section above made no sense, here are step-by-step instructions that will get you there.&lt;br /&gt;
*Open Terminal.app.  This is in /Applications/Utilities, or you can just use Spotlight to find it.&lt;br /&gt;
*Open Finder, and navigate to the folder containing your Dropbox folder.&lt;br /&gt;
*In Terminal, type &amp;quot;cd &amp;quot;, then drag the Dropbox folder onto the Terminal window, then press Enter.&lt;br /&gt;
**Leave the quotes out for all of these commands and make sure to include the trailing space.  Copy-pasting the commands is advised.&lt;br /&gt;
*In Terminal, type &amp;quot;ln -s /Library/Application\ Support/KoLmafia KoLmafia&amp;quot;, then press enter.&lt;br /&gt;
*You now have a symbolic link, and Dropbox will back up your mafia settings files.&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6721</id>
		<title>Help talk:Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6721"/>
		<updated>2010-06-18T06:59:47Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: /* Setting up symlinks for Dropbox on a Mac */ linux section looks simpler, but only if you know what you&amp;#039;re doing to begin with&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Setting up symlinks for Dropbox on non-Windows systems==&lt;br /&gt;
Open the command-line interface for your OS, and type in:&amp;lt;br&amp;gt;&lt;br /&gt;
ln -s ~/.kolmafia /path/to/dropbox/folder/KoLmafia&lt;br /&gt;
&lt;br /&gt;
==Setting up symlinks for Dropbox on a Mac==&lt;br /&gt;
If you&#039;re using a Mac, and the section above made no sense, here are step-by-step instructions that will get you there.&lt;br /&gt;
*Open Terminal.app.  This is in /Applications/Utilities, or you can just use Spotlight to find it.&lt;br /&gt;
*Open Finder, and navigate to the folder containing your Dropbox folder.&lt;br /&gt;
*In Terminal, type &amp;quot;cd &amp;quot;, then drag the Dropbox folder onto the Terminal window, then press Enter.&lt;br /&gt;
**Leave the quotes out for all of these commands and make sure to include the trailing space.  Copy-pasting the commands is advised.&lt;br /&gt;
*In Terminal, type &amp;quot;ln -s /Library/Application\ Support/KoLmafia KoLmafia&amp;quot;, then press enter.&lt;br /&gt;
*You now have a symbolic link, and Dropbox will back up your mafia settings files.&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6720</id>
		<title>Help talk:Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6720"/>
		<updated>2010-06-18T06:31:09Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: /* Setting up symlinks for Dropbox on a Mac */ reformatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Setting up symlinks for Dropbox on a Mac==&lt;br /&gt;
*Open Terminal.app.  This is in /Applications/Utilities, or you can just use Spotlight to find it.&lt;br /&gt;
*Open Finder, and navigate to the folder containing your Dropbox folder.&lt;br /&gt;
*In Terminal, type &amp;quot;cd &amp;quot;, then drag the Dropbox folder onto the Terminal window, then press Enter.&lt;br /&gt;
**Leave the quotes out for all of these commands and make sure to include the trailing space.  Copy-pasting the commands is advised.&lt;br /&gt;
*In Terminal, type &amp;quot;ln -s /Library/Application\ Support/KoLmafia KoLmafia&amp;quot;, then press enter.&lt;br /&gt;
*You now have a symbolic link, and Dropbox will back up your mafia settings files.&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6719</id>
		<title>Help talk:Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Help_talk:Frequently_Asked_Questions&amp;diff=6719"/>
		<updated>2010-06-18T06:29:33Z</updated>

		<summary type="html">&lt;p&gt;Lostcalpolydude: Dropbox for mac instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Setting up symlinks for Dropbox on a Mac==&lt;br /&gt;
*Open Terminal.app.  This is in /Applications/Utilities, or you can just use Spotlight to find it.&lt;br /&gt;
*Open Finder, and navigate to the folder containing your Dropbox folder.&lt;br /&gt;
*In Terminal, type &amp;quot;cd &amp;quot; (without the quotes for all of these commands, make sure to include the trailing space), then drag the Dropbox folder onto the Terminal window, then press Enter.&lt;br /&gt;
*In Terminal, type &amp;quot;ln -s /Library/Application\ Support/KoLmafia KoLmafia&amp;quot;, then press enter.&lt;br /&gt;
*You now have a symbolic link, and Dropbox will back up your mafia settings files.&lt;/div&gt;</summary>
		<author><name>Lostcalpolydude</name></author>
	</entry>
</feed>