<?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=Heeheehee</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=Heeheehee"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Heeheehee"/>
	<updated>2026-04-30T14:43:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Making_a_Patch&amp;diff=9158</id>
		<title>Making a Patch</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Making_a_Patch&amp;diff=9158"/>
		<updated>2022-09-25T09:14:26Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Add link to contributions guide.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Attention|This page is outdated as of the move to Github in Sep 2021. Check out [https://github.com/kolmafia/kolmafia/blob/main/CONTRIBUTING.md our contributions guide] for the latest details.}}&lt;br /&gt;
&lt;br /&gt;
Once you have the source code for Mafia successfully downloaded as in the [[Compiling from Source]] page, you will then need to make a patch, as the dev&#039;s don&#039;t let just anyone update the program. Fortunately, this is very simple, and once you have the patch, post it on the KoLmafia Forums for acceptance. &lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
# Right-click on the KoLmafia folder on your desktop (this assumes you are using Tortoise SVN), click on &amp;quot;TortoiseSVN&amp;quot; and then &amp;quot;Create Patch...&amp;quot;.&lt;br /&gt;
# A new window then appears. Tick all the files you want to include in the patch (this is probably all of them), and click OK. &lt;br /&gt;
# Tortoise SVN then merges all your changes into a single .patch file, which you can then post on the forums.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
# cd into the folder where you did your svn checkout&lt;br /&gt;
# run svn diff &amp;gt; /tmp/patchname.patch (a list of filenames can optionally be included after diff)&lt;br /&gt;
# post the file on the forums for review&lt;br /&gt;
&lt;br /&gt;
==MacOS Terminal==&lt;br /&gt;
Use the Linux instructions&lt;br /&gt;
==IntelliJ==&lt;br /&gt;
There are a number of different ways to get to the Create Patch dialog.  Use any method, including the steps below.&lt;br /&gt;
# From the VCS Menu select &amp;quot;Create Patch from Local Changes&amp;quot;.&lt;br /&gt;
# In the Create Patch dialog, enter a short description in the &amp;quot;Commit Message&amp;quot; Text field.&lt;br /&gt;
# Review your changes and make sure they include what you want to have in the patch file and nothing unexpected.&lt;br /&gt;
# Select the &amp;quot;Apply Patch...&amp;quot; button.&lt;br /&gt;
# Review the suggested patch name.&lt;br /&gt;
# Select the &amp;quot;OK&amp;quot; button.&lt;br /&gt;
The patch file in the location listed in the Save dialog can be uploaded to the forum.&lt;br /&gt;
&lt;br /&gt;
==Eclipse==&lt;br /&gt;
[[Category:Tech Support]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Installation&amp;diff=9157</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Installation&amp;diff=9157"/>
		<updated>2022-09-12T21:45:25Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Java 11 or better (Java 17 recommended) */ Reflect that Java 17 is required, not merely recommended.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
== How to Download the latest version. ==&lt;br /&gt;
The latest source build can be downloaded from the following locations:&lt;br /&gt;
&lt;br /&gt;
# [http://builds.kolmafia.us/ builds.kolmafia.us] &lt;br /&gt;
# the [https://github.com/kolmafia/kolmafia/releases GitHub releases page].  &lt;br /&gt;
&lt;br /&gt;
Both of these sources have tested versions that are posted shortly after developers change code.&lt;br /&gt;
&lt;br /&gt;
The GitHub releases page contains both the KoLmafia-xxxxx.jar java binaries and installers for an experimental version that includes a bundled version of Java.  If you use the installers, they manage the Java dependency listed below, but it can be more difficult to troubleshoot issues.  &lt;br /&gt;
&lt;br /&gt;
== Dependencies==&lt;br /&gt;
&lt;br /&gt;
===Java 17 or higher===&lt;br /&gt;
KoLmafia depends on Java 17 or higher  The recommended version is linked at the top of every page of kolmafia.us.  If you are executing KoLmafia from a jarfile, you will need to install Java first.  &lt;br /&gt;
&lt;br /&gt;
If you do not have a recent version of Java, the recommended version (as of this writing) is [https://adoptium.net/index.html Java 17].  &lt;br /&gt;
&lt;br /&gt;
====Testing your Java installation====&lt;br /&gt;
From a Command Prompt (or Terminal) window, enter &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that returns something like this, you should be good to go.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Michaels-MBP:~ mcroft$ java -version&amp;lt;br /&amp;gt;openjdk version &amp;quot;16.0.1&amp;quot; 2021-04-20&amp;lt;br /&amp;gt;OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)&amp;lt;br /&amp;gt;OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Runtime Issues==&lt;br /&gt;
=== Java Errors===&lt;br /&gt;
Please be aware that some older versions of Java do not get completely replaced when installing a newer version.  Usually this happens with Java 8 JRE and Java 11+ JDKs.  If that makes no sense, just delete Java 8.&lt;br /&gt;
&lt;br /&gt;
If you get a message like this:&amp;lt;code&amp;gt;Error: A JNI error has occurred, please check your installation and try again.&amp;lt;/code&amp;gt; Please [https://kolmafia.us/threads/java-11-now-required-for-kolmafia-java-17-recommended.26579/ read this announcement].&lt;br /&gt;
&lt;br /&gt;
===Scaling support on HiDPI Monitors===&lt;br /&gt;
&lt;br /&gt;
If the KoLmafia application is unexpectedly small on a [https://techterms.com/definition/hidpi HiDPI]/Retina Display monitor, then support for HiDPI should enabled.  This should only be required on Linux, since HiDPI support is enabled automatically on Windows and MacOS.&lt;br /&gt;
&lt;br /&gt;
On Linux, using HiDPI with a Java Swing application (such as KoLmafia) requires that you execute the &#039;.jar&#039; file with an option set as follows: &amp;lt;code&amp;gt;java -Dsun.java2d.uiScale=&amp;lt;multiplier&amp;gt; -jar &amp;lt;jarfile&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on the screen size, a multiplier of 1.6 or 2.0 may be appropriate.  You may need to experiment to find the ideal scaling multiplier for your screens.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tech Support]]&lt;br /&gt;
[[Category:New User Help]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Compiling_from_Source&amp;diff=9129</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=9129"/>
		<updated>2021-12-06T13:28:43Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Update Linux / Mac instructions to be more consistent about fetching updates from the remote repository.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== GREAT BIG NEWS ===&lt;br /&gt;
&lt;br /&gt;
==KoLmafia has migrated to the GitHub repository and we are retooling for GIT and gradle builds.==&lt;br /&gt;
The Windows, Linux and macOS instructions have been updated, and might have been lightly tested&lt;br /&gt;
&lt;br /&gt;
The good news is that the IDE setup is a lot easier.  The bad news is you&#039;ll need to take some steps to build anything.  In addition, we are discussing changing to a newer required JDK, so even these instructions will not be permanent.&lt;br /&gt;
&lt;br /&gt;
To contribute to the Mafia project, you&#039;ll need to be able to install the Java Development Kit, connect to the git repository, 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 Tools&lt;br /&gt;
## Download and install Java Development Kit 11 or newer, available from [https://adoptium.net/installation.html Adoption].  The current recommended version is Java 17.&lt;br /&gt;
## Download and install GIT following the instructions from [https://www.atlassian.com/git/tutorials/install-git#windows Atlassian&#039;s GIT install page.]&lt;br /&gt;
## Download and install Tortoise GIT (if needed) from https://tortoisegit.org&lt;br /&gt;
# Configure Windows Environment Variables[[File:Environment vars.jpg|thumb|Win 10 Environment Variable Editor]]&lt;br /&gt;
## Windows 10&lt;br /&gt;
### Go to settings&lt;br /&gt;
### type &#039;enviro&#039; in the search&lt;br /&gt;
### click on the &#039;edit environment variables&#039; suggestion&lt;br /&gt;
### add or edit JAVA_HOME, and PATH variables&amp;lt;br&amp;gt;&#039;&#039;PATH should include JAVA_HOME&#039;&#039;&amp;lt;/br&amp;gt;If the JAVA installer has already set these variables, they can be updated or left alone.&lt;br /&gt;
# Open a new Command Prompt (or Powershell) window and navigate to the directory to which you wish to create kolmafia (e.g. &amp;lt;code&amp;gt;cd %USERPROFILE%\projects&amp;lt;/code&amp;gt;, or some similar directory)&lt;br /&gt;
# Clone the source code for the KoLmafia Project.&amp;lt;br&amp;gt;&lt;br /&gt;
##&#039;&#039;If you have a github account:&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git@github.com:kolmafia/kolmafia.git&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
##&#039;&#039;If not:&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/kolmafia/kolmafia.git&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Compile KoLmafia with the Gradle wrapper &#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd kolmafia &amp;amp;&amp;amp; gradlew.bat runShadow&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
If you intend to commit code to GitHub, you will need to follow GitHub&#039;s instructions for [https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token adding a Personal Access Token (PAT)]&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
Do once:&lt;br /&gt;
# Install git - you probably already have this. If not, follow [https://www.atlassian.com/git/tutorials/install-git#linux this guide.]&lt;br /&gt;
# Get an appropriate JDK. If your package manager does not contain a sufficiently up-to-date version of Java, the safest and easiest way to do this is with [https://adoptium.net/installation.html#x64_linux-jdk Adoptium].&lt;br /&gt;
# Clone the repo:&lt;br /&gt;
## If you have a github account:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git@github.com:kolmafia/kolmafia.git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If not:&amp;lt;pre&amp;gt;git clone https://github.com/kolmafia/kolmafia.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do every session:&lt;br /&gt;
# Set up your environment to use that JDK you just downloaded&amp;lt;pre&amp;gt; export PATH=&amp;quot;/where/you/put/that/jdk/bin:${PATH}&amp;quot;&amp;lt;/pre&amp;gt; (Optionally, put this in your &#039;&#039;.profile&#039;&#039; or &#039;&#039;.bashrc&#039;&#039; if you want to set and forget.)&lt;br /&gt;
# Navigate to your cloned repository: &amp;lt;pre&amp;gt;cd /where/you/cloned/kolmafia&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Get new updates with &amp;lt;pre&amp;gt;git pull&amp;lt;/pre&amp;gt;  If you have local uncommitted changes, you may want to instead use &#039;&#039;git stash &amp;amp;&amp;amp; git pull &amp;amp;&amp;amp; git stash pop&#039;&#039;.&lt;br /&gt;
# Build the new jar: &amp;lt;pre&amp;gt;./gradlew clean shadowJar&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have a KoLmafia jar file that can be invoked with &amp;lt;pre&amp;gt;java -jar dist/KoLmafia-*.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do other installation steps as you wish.&lt;br /&gt;
&lt;br /&gt;
==macOS==&lt;br /&gt;
# Verify required packages&lt;br /&gt;
## &amp;lt;code&amp;gt;&#039;&#039;java --version&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
##* if not found or less than Java 11...  Install Java Development Kit version 17 from [https://adoptium.net Adoptium Temurin]&lt;br /&gt;
## &amp;lt;code&amp;gt;&#039;&#039;git --version&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
##* If not found ...  Install git:  Atlassian has a great document on [https://www.atlassian.com/git/tutorials/install-git the various ways to install Git]&lt;br /&gt;
# Configure development environment&amp;lt;br&amp;gt;Most of these steps can be included in &#039;&#039;&amp;lt;code&amp;gt;.profile&amp;lt;/code&amp;gt;&#039;&#039; or the equivalent for your terminal of choice.&lt;br /&gt;
## In the terminal set JAVA_HOME to the java home directory. &amp;lt;br&amp;gt;&#039;&#039;&amp;lt;code&amp;gt;/usr/libexec/java_home -V&amp;lt;/code&amp;gt;&#039;&#039; will list all known values for java_home.&amp;lt;br&amp;gt;If you have multiple copies of java, choose the version you want to use&#039;&#039;.&#039;&#039; &amp;lt;code&amp;gt;&#039;&#039;export JAVA_HOME=`/usr/libexec/java_home -v17&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. &amp;lt;code&amp;gt;cd ~/projects&amp;lt;/code&amp;gt;, or some similar directory)&lt;br /&gt;
# Clone the source code for the KoLmafia Project.&amp;lt;br&amp;gt;&lt;br /&gt;
##&#039;&#039;If you have a github account:&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git@github.com:kolmafia/kolmafia.git&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
##&#039;&#039;If not:&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/kolmafia/kolmafia.git&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do every session:&lt;br /&gt;
&lt;br /&gt;
# Navigate to your cloned repository: &amp;lt;pre&amp;gt;cd ~/projects/kolmafia&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Get new updates with &amp;lt;pre&amp;gt;git pull&amp;lt;/pre&amp;gt; If you have local uncommitted changes, you may want to instead use &#039;&#039;git stash &amp;amp;&amp;amp; git pull &amp;amp;&amp;amp; git stash pop&#039;&#039;.&lt;br /&gt;
# Compile KoLmafia with the Gradle wrapper: &#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;./gradlew runShadow&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
If you intend to commit code to GitHub, you will need to follow GitHub&#039;s instructions for [https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token adding a Personal Access Token (PAT)]&lt;br /&gt;
&#039;&#039;[[Category:Tech Support]]&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=User:Heeheehee&amp;diff=9011</id>
		<title>User:Heeheehee</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=User:Heeheehee&amp;diff=9011"/>
		<updated>2021-04-25T09:01:18Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Projects */ scrub broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About Me==&lt;br /&gt;
Started playing KoL at the end of &#039;04 (Wow, I feel old). Started scripting in ASH in the middle of &#039;09. And started contributing to the Mafia wiki in the start of &#039;10!&lt;br /&gt;
==Projects==&lt;br /&gt;
&amp;lt;br /&amp;gt;Scripts I&#039;ve published: &lt;br /&gt;
* [http://kolmafia.us/showthread.php?t=3248 Profit from Effects], a derivative of a derivative of Zarqon&#039;s profit.ash, although it now does so much more.&lt;br /&gt;
* [http://kolmafia.us/showthread.php?3549-manageprices.ash-Quick-mall-management! Various] [http://kolmafia.us/showthread.php?3922-pyramid.ash-Disable-links-in-the-pyramid-that-might-be-bad relay] [http://kolmafia.us/showthread.php?4081-ZLib-variable-editor-(relay_zlib.ash) override] [http://kolmafia.us/showthread.php?4137-clan_basement.ash-separate-hobopolis-and-slime-tube-loot scripts], that I find useful. Generally. (These get published if I think they&#039;re somewhat useful.)&lt;br /&gt;
I&#039;m also the individual behind making the SyntaxHighlight extension ASH-compliant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;Known issues present in the latest version:&lt;br /&gt;
* User-defined variables with the same name as ASH internal functions will be highlighted.&lt;br /&gt;
* Functions/Control structures are highlighted within datatype constants (e.g. $skill[The Ode to Booze]).&lt;br /&gt;
Since it works just fine otherwise, I&#039;m not going to bother fixing these.&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2618</id>
		<title>Ash Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2618"/>
		<updated>2015-03-26T13:14:28Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Fix return type of get_chateau().&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|int|adv_cost|skill}}&lt;br /&gt;
{{Flink|boolean|adventure|int|location|{{opt|string}}}}&lt;br /&gt;
{{Flink|string [int]|all_normal_outfits}}&lt;br /&gt;
{{Flink|float [monster]|appearance_rates|location|{{opt|boolean}}}}&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;
&lt;br /&gt;
===b===&lt;br /&gt;
{{Flink|boolean|batch_close}}&lt;br /&gt;
{{Flink|void|batch_open}}&lt;br /&gt;
{{Flink|boolean|bjornify_familiar|familiar}}&lt;br /&gt;
{{Flink|boolean|black_market_available}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|{{opt|string}}|string}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|item|string}}&lt;br /&gt;
{{Flink|int|buffed_hit_stat}}&lt;br /&gt;
{{Flink|boolean|buy|{{opt|coinmaster}}|int|item}}&lt;br /&gt;
{{Flink|int|buy|int|item|int}}&lt;br /&gt;
{{Flink|int|buy_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|buy_using_storage|int|item}}&lt;br /&gt;
{{Flink|int|buy_using_storage|int|item|int}}&lt;br /&gt;
{{Flink|boolean|buys_item|coinmaster|item}}&lt;br /&gt;
&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_faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|can_interact}}&lt;br /&gt;
{{flink|boolean|canadia_available}}&lt;br /&gt;
{{Flink|int|ceil|float}}&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|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|chat_macro|string}}&lt;br /&gt;
{{Flink|void|chat_notify|string|string}}&lt;br /&gt;
{{Flink|void|chat_private|string|string}}&lt;br /&gt;
{{Flink|boolean|chew|int|item}}&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|int|combat_mana_cost_modifier}}&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|string|craft_type|item}}&lt;br /&gt;
{{Flink|int|creatable_amount|item}}&lt;br /&gt;
{{Flink|int|creatable_turns|{{opt|item}}|{{opt|int}}|{{opt|boolean}}}}&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|element|dad_sea_monkee_weakness|int}}&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|boolean|dispensary_available}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item}}&lt;br /&gt;
&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|boolean|empty_closet}}&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|equip|{{opt|slot}}|item}}&lt;br /&gt;
{{Flink|boolean|equip_all_familiars}}&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|faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|boolean|find|matcher}}&lt;br /&gt;
{{Flink|int|floor|float}}&lt;br /&gt;
{{Flink|boolean|florist_available}}&lt;br /&gt;
{{Flink|string|form_field|string}}&lt;br /&gt;
{{Flink|string [string]|form_fields}}&lt;br /&gt;
{{Flink|string|format_date_time|string|string|string}}&lt;br /&gt;
{{Flink|boolean|friars_available}}&lt;br /&gt;
{{Flink|int|fullness_limit}}&lt;br /&gt;
&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|gametime_to_int}}&lt;br /&gt;
{{Flink|int|get_auto_attack}}&lt;br /&gt;
{{Flink|int [item]|get_campground}}&lt;br /&gt;
{{Flink|string|get_ccs_action|int}}&lt;br /&gt;
{{Flink|int [item]|get_chateau}}&lt;br /&gt;
{{Flink|int|get_clan_id}}&lt;br /&gt;
{{Flink|string|get_clan_name}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int}}&lt;br /&gt;
{{Flink|string [int]|get_custom_outfits}}&lt;br /&gt;
{{Flink|item|get_dwelling}}&lt;br /&gt;
{{Flink|string [location, 3]|get_florist_plants}}&lt;br /&gt;
{{Flink|string [int]|get_goals}}&lt;br /&gt;
{{Flink|boolean|get_ignore_zone_warnings}}&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|string [int]|get_moods}}&lt;br /&gt;
{{Flink|string [int]|get_outfits}}&lt;br /&gt;
{{Flink|string|get_path}}&lt;br /&gt;
{{Flink|string|get_path_full}}&lt;br /&gt;
{{Flink|string|get_path_variables}}&lt;br /&gt;
{{Flink|string|get_player_id|string}}&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|int [item]|get_shop}}&lt;br /&gt;
{{Flink|string|get_version}}&lt;br /&gt;
{{flink|boolean|gnomads_available}}&lt;br /&gt;
{{flink|boolean|goal_exists|string}}&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|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_servant|servant}}&lt;br /&gt;
{{Flink|boolean|have_shop}}&lt;br /&gt;
{{Flink|boolean|have_skill|skill}}&lt;br /&gt;
{{Flink|boolean|hermit|int|item}}&lt;br /&gt;
{{flink|boolean|hidden_temple_unlocked}}&lt;br /&gt;
{{Flink|boolean|hippy_stone_broken}}&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;
{{Flink|string|holiday}}&lt;br /&gt;
&lt;br /&gt;
===i===&lt;br /&gt;
{{Flink|monster|image_to_monster|strict_string}}&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|string|inaccessible_reason|coinmaster}}&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_accessible|coinmaster}}&lt;br /&gt;
{{Flink|boolean|is_banished|monster}}&lt;br /&gt;
{{Flink|boolean|is_coinmaster_item|item}}&lt;br /&gt;
{{Flink|boolean|is_discardable|item}}&lt;br /&gt;
{{Flink|boolean|is_displayable|item}}&lt;br /&gt;
{{Flink|boolean|is_familiar_equipment_locked}}&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|boolean|is_trendy|item/familiar/skill/string}}&lt;br /&gt;
{{Flink|boolean|is_unrestricted|item/familiar/skill/string}}&lt;br /&gt;
{{Flink|boolean|is_wearing_outfit|string}}&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;
&lt;br /&gt;
===j===&lt;br /&gt;
{{flink|int|jump_chance|{{opt|monster}}|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
{{flink|int|jump_chance|location|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
&lt;br /&gt;
===k===&lt;br /&gt;
{{flink|boolean|knoll_available}}&lt;br /&gt;
&lt;br /&gt;
===l===&lt;br /&gt;
{{Flink|int|last_index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|string|last_item_message}}&lt;br /&gt;
{{Flink|monster|last_monster}}&lt;br /&gt;
{{Flink|string|last_skill_message}}&lt;br /&gt;
{{Flink|int|length|string}}&lt;br /&gt;
{{Flink|int|lightning_cost}}&lt;br /&gt;
{{Flink|string|limit_mode}}&lt;br /&gt;
{{Flink|buffer|load_html|string}}&lt;br /&gt;
{{Flink|void|lock_familiar_equipment|boolean}}&lt;br /&gt;
{{Flink|void|logprint|string}}&lt;br /&gt;
&lt;br /&gt;
===m===&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean}}&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|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|float|max|float|float}}&lt;br /&gt;
{{Flink|int|max|int|int}}&lt;br /&gt;
{{Flink|boolean|maximize|string|boolean}}&lt;br /&gt;
{{Flink|boolean|maximize|string|int|int|boolean}}&lt;br /&gt;
{{Flink|record [int]|maximize|string|int|int|boolean|boolean}}&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|item|minstrel_instrument}}&lt;br /&gt;
{{Flink|int|minstrel_level}}&lt;br /&gt;
{{Flink|boolean|minstrel_quest}}&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|string}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_initiative|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_level_adjustment}}&lt;br /&gt;
{{Flink|phylum|monster_phylum|{{opt|monster}}}}&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_audience}}&lt;br /&gt;
{{Flink|int|my_basestat|stat}}&lt;br /&gt;
{{Flink|familiar|my_bjorned_familiar}}&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|string|my_companion}}&lt;br /&gt;
{{Flink|int|my_daycount}}&lt;br /&gt;
{{Flink|int|my_discomomentum}}&lt;br /&gt;
{{Flink|familiar|my_effective_familiar}}&lt;br /&gt;
{{Flink|int [effect]|my_effects}}&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|int|my_fury}}&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|int|my_lightning}}&lt;br /&gt;
{{Flink|location|my_location}}&lt;br /&gt;
{{Flink|int|my_maxfury}}&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|string|my_path}}&lt;br /&gt;
{{Flink|stat|my_primestat}}&lt;br /&gt;
{{flink|int|my_rain}}&lt;br /&gt;
{{Flink|servant|my_servant|servant}}&lt;br /&gt;
{{flink|string|my_sign}}&lt;br /&gt;
{{flink|int|my_soulsauce}}&lt;br /&gt;
{{Flink|int|my_spleen_use}}&lt;br /&gt;
{{Flink|int|my_storage_meat}}&lt;br /&gt;
{{flink|thrall|my_thrall}}&lt;br /&gt;
{{flink|int|my_thunder}}&lt;br /&gt;
{{Flink|int|my_turncount}}&lt;br /&gt;
&lt;br /&gt;
===n===&lt;br /&gt;
{{Flink|float|now_to_string|string}}&lt;br /&gt;
{{Flink|int|npc_price|item}}&lt;br /&gt;
{{Flink|float|numeric_modifier|{{opt|string}}|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;
&lt;br /&gt;
===o===&lt;br /&gt;
{{Flink|boolean|outfit|string}}&lt;br /&gt;
{{Flink|item [int]|outfit_pieces|string}}&lt;br /&gt;
{{Flink|string|outfit_tattoo|{{opt|string}}}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
&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;
{{Flink|int|pvp_attacks_left}}&lt;br /&gt;
&lt;br /&gt;
===r===&lt;br /&gt;
{{Flink|int|rain_cost|skill}}&lt;br /&gt;
{{Flink|int|random|int}}&lt;br /&gt;
{{Flink|int|raw_damage_absorption}}&lt;br /&gt;
{{Flink|void|refresh_shop}}&lt;br /&gt;
{{Flink|void|refresh_stash}}&lt;br /&gt;
{{Flink|void|refresh_status}}&lt;br /&gt;
{{Flink|void|remove_item_condition|int|item}}&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_choice}}&lt;br /&gt;
{{Flink|buffer|run_combat|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|run_turn}}&lt;br /&gt;
{{Flink|buffer|runaway}}&lt;br /&gt;
&lt;br /&gt;
===s===&lt;br /&gt;
{{Flink|boolean|sell|coinmaster|int|item}}&lt;br /&gt;
{{Flink|int|sell_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|sells_item|coinmaster|item}}&lt;br /&gt;
{{Flink|string [int]|session_logs|{{opt|string}}|int}}&lt;br /&gt;
{{Flink|void|set_auto_attack|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|shop_price|item}}&lt;br /&gt;
{{Flink|int|soulsauce_cost|skill}}&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|{{opt|string}}|string}}&lt;br /&gt;
{{Flink|skill|stun_skill}}&lt;br /&gt;
{{Flink|string|substring|string|int|{{opt|int}}}}&lt;br /&gt;
{{Flink|boolean|svn_at_head|string}}&lt;br /&gt;
{{Flink|boolean|svn_exists|string}}&lt;br /&gt;
{{Flink|record|svn_info|string}}&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_shop|{{opt|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|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|throw_item|item}}&lt;br /&gt;
{{Flink|buffer|throw_items|item|item}}&lt;br /&gt;
{{Flink|int|thunder_cost|skill}}&lt;br /&gt;
{{Flink|buffer|time_to_string}}&lt;br /&gt;
{{Flink|boolean|to_boolean|any}}&lt;br /&gt;
{{Flink|bounty|to_bounty|strict_string}}&lt;br /&gt;
{{Flink|class|to_class|strict_string/int}}&lt;br /&gt;
{{Flink|coinmaster|to_coinmaster|strict_string}}&lt;br /&gt;
{{Flink|effect|to_effect|int}}&lt;br /&gt;
{{Flink|effect|to_effect|strict_string}}&lt;br /&gt;
{{Flink|effect|to_effect|skill}}&lt;br /&gt;
{{Flink|element|to_element|strict_string}}&lt;br /&gt;
{{Flink|familiar|to_familiar|int}}&lt;br /&gt;
{{Flink|familiar|to_familiar|strict_string}}&lt;br /&gt;
{{Flink|float|to_float|any}}&lt;br /&gt;
{{Flink|int|to_int|any}}&lt;br /&gt;
{{Flink|item|to_item|strict_string}}&lt;br /&gt;
{{Flink|item|to_item|int}}&lt;br /&gt;
{{Flink|item|to_item|string|int}}&lt;br /&gt;
{{Flink|string|to_json|aggregate}}&lt;br /&gt;
{{Flink|location|to_location|strict_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|strict_string}}&lt;br /&gt;
{{Flink|phylum|to_phylum|string}}&lt;br /&gt;
{{Flink|string|to_plural|item}}&lt;br /&gt;
{{Flink|servant|to_servant|int}}&lt;br /&gt;
{{Flink|servant|to_servant|strict_string}}&lt;br /&gt;
{{Flink|skill|to_skill|effect}}&lt;br /&gt;
{{Flink|skill|to_skill|int}}&lt;br /&gt;
{{Flink|skill|to_skill|strict_string}}&lt;br /&gt;
{{Flink|slot|to_slot|item}}&lt;br /&gt;
{{Flink|skill|to_slot|strict_string}}&lt;br /&gt;
{{Flink|stat|to_stat|string}}&lt;br /&gt;
{{Flink|string|to_string|any}}&lt;br /&gt;
{{Flink|thrall|to_thrall|{{opt|string}}|{{opt|int}}}}&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|total_free_rests}}&lt;br /&gt;
{{flink|int|total_turns_played}}&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_servant|servant}}&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;
{{Flink|boolean|user_confirm|string|int|boolean}}&lt;br /&gt;
&lt;br /&gt;
===v===&lt;br /&gt;
{{Flink|boolean|visit|coinmaster}}&lt;br /&gt;
{{Flink|buffer|visit_url|{{opt|string}}|{{opt|boolean}}|{{opt|boolean}}}}&lt;br /&gt;
&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 [string]|who_clan|{{opt|string}}}}&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;br /&gt;
&lt;br /&gt;
===x===&lt;br /&gt;
{{Flink|string[int]|xpath|string|string}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2617</id>
		<title>Ash Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2617"/>
		<updated>2015-03-26T13:11:14Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Add some more that the script missed, and remove functions that no longer exist. Also, amend edit to use opt template.&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|int|adv_cost|skill}}&lt;br /&gt;
{{Flink|boolean|adventure|int|location|{{opt|string}}}}&lt;br /&gt;
{{Flink|string [int]|all_normal_outfits}}&lt;br /&gt;
{{Flink|float [monster]|appearance_rates|location|{{opt|boolean}}}}&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;
&lt;br /&gt;
===b===&lt;br /&gt;
{{Flink|boolean|batch_close}}&lt;br /&gt;
{{Flink|void|batch_open}}&lt;br /&gt;
{{Flink|boolean|bjornify_familiar|familiar}}&lt;br /&gt;
{{Flink|boolean|black_market_available}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|{{opt|string}}|string}}&lt;br /&gt;
{{Flink|boolean|boolean_modifier|item|string}}&lt;br /&gt;
{{Flink|int|buffed_hit_stat}}&lt;br /&gt;
{{Flink|boolean|buy|{{opt|coinmaster}}|int|item}}&lt;br /&gt;
{{Flink|int|buy|int|item|int}}&lt;br /&gt;
{{Flink|int|buy_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|buy_using_storage|int|item}}&lt;br /&gt;
{{Flink|int|buy_using_storage|int|item|int}}&lt;br /&gt;
{{Flink|boolean|buys_item|coinmaster|item}}&lt;br /&gt;
&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_faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|can_interact}}&lt;br /&gt;
{{flink|boolean|canadia_available}}&lt;br /&gt;
{{Flink|int|ceil|float}}&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|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|chat_macro|string}}&lt;br /&gt;
{{Flink|void|chat_notify|string|string}}&lt;br /&gt;
{{Flink|void|chat_private|string|string}}&lt;br /&gt;
{{Flink|boolean|chew|int|item}}&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|int|combat_mana_cost_modifier}}&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|string|craft_type|item}}&lt;br /&gt;
{{Flink|int|creatable_amount|item}}&lt;br /&gt;
{{Flink|int|creatable_turns|{{opt|item}}|{{opt|int}}|{{opt|boolean}}}}&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|element|dad_sea_monkee_weakness|int}}&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|boolean|dispensary_available}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item}}&lt;br /&gt;
&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|boolean|empty_closet}}&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|equip|{{opt|slot}}|item}}&lt;br /&gt;
{{Flink|boolean|equip_all_familiars}}&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|faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|boolean|find|matcher}}&lt;br /&gt;
{{Flink|int|floor|float}}&lt;br /&gt;
{{Flink|boolean|florist_available}}&lt;br /&gt;
{{Flink|string|form_field|string}}&lt;br /&gt;
{{Flink|string [string]|form_fields}}&lt;br /&gt;
{{Flink|string|format_date_time|string|string|string}}&lt;br /&gt;
{{Flink|boolean|friars_available}}&lt;br /&gt;
{{Flink|int|fullness_limit}}&lt;br /&gt;
&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|gametime_to_int}}&lt;br /&gt;
{{Flink|int|get_auto_attack}}&lt;br /&gt;
{{Flink|int [item]|get_campground}}&lt;br /&gt;
{{Flink|string|get_ccs_action|int}}&lt;br /&gt;
{{Flink|result|get_chateau}}&lt;br /&gt;
{{Flink|int|get_clan_id}}&lt;br /&gt;
{{Flink|string|get_clan_name}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int}}&lt;br /&gt;
{{Flink|string [int]|get_custom_outfits}}&lt;br /&gt;
{{Flink|item|get_dwelling}}&lt;br /&gt;
{{Flink|string [location, 3]|get_florist_plants}}&lt;br /&gt;
{{Flink|string [int]|get_goals}}&lt;br /&gt;
{{Flink|boolean|get_ignore_zone_warnings}}&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|string [int]|get_moods}}&lt;br /&gt;
{{Flink|string [int]|get_outfits}}&lt;br /&gt;
{{Flink|string|get_path}}&lt;br /&gt;
{{Flink|string|get_path_full}}&lt;br /&gt;
{{Flink|string|get_path_variables}}&lt;br /&gt;
{{Flink|string|get_player_id|string}}&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|int [item]|get_shop}}&lt;br /&gt;
{{Flink|string|get_version}}&lt;br /&gt;
{{flink|boolean|gnomads_available}}&lt;br /&gt;
{{flink|boolean|goal_exists|string}}&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|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_servant|servant}}&lt;br /&gt;
{{Flink|boolean|have_shop}}&lt;br /&gt;
{{Flink|boolean|have_skill|skill}}&lt;br /&gt;
{{Flink|boolean|hermit|int|item}}&lt;br /&gt;
{{flink|boolean|hidden_temple_unlocked}}&lt;br /&gt;
{{Flink|boolean|hippy_stone_broken}}&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;
{{Flink|string|holiday}}&lt;br /&gt;
&lt;br /&gt;
===i===&lt;br /&gt;
{{Flink|monster|image_to_monster|strict_string}}&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|string|inaccessible_reason|coinmaster}}&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_accessible|coinmaster}}&lt;br /&gt;
{{Flink|boolean|is_banished|monster}}&lt;br /&gt;
{{Flink|boolean|is_coinmaster_item|item}}&lt;br /&gt;
{{Flink|boolean|is_discardable|item}}&lt;br /&gt;
{{Flink|boolean|is_displayable|item}}&lt;br /&gt;
{{Flink|boolean|is_familiar_equipment_locked}}&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|boolean|is_trendy|item/familiar/skill/string}}&lt;br /&gt;
{{Flink|boolean|is_unrestricted|item/familiar/skill/string}}&lt;br /&gt;
{{Flink|boolean|is_wearing_outfit|string}}&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;
&lt;br /&gt;
===j===&lt;br /&gt;
{{flink|int|jump_chance|{{opt|monster}}|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
{{flink|int|jump_chance|location|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
&lt;br /&gt;
===k===&lt;br /&gt;
{{flink|boolean|knoll_available}}&lt;br /&gt;
&lt;br /&gt;
===l===&lt;br /&gt;
{{Flink|int|last_index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|string|last_item_message}}&lt;br /&gt;
{{Flink|monster|last_monster}}&lt;br /&gt;
{{Flink|string|last_skill_message}}&lt;br /&gt;
{{Flink|int|length|string}}&lt;br /&gt;
{{Flink|int|lightning_cost}}&lt;br /&gt;
{{Flink|string|limit_mode}}&lt;br /&gt;
{{Flink|buffer|load_html|string}}&lt;br /&gt;
{{Flink|void|lock_familiar_equipment|boolean}}&lt;br /&gt;
{{Flink|void|logprint|string}}&lt;br /&gt;
&lt;br /&gt;
===m===&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean}}&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|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|float|max|float|float}}&lt;br /&gt;
{{Flink|int|max|int|int}}&lt;br /&gt;
{{Flink|boolean|maximize|string|boolean}}&lt;br /&gt;
{{Flink|boolean|maximize|string|int|int|boolean}}&lt;br /&gt;
{{Flink|record [int]|maximize|string|int|int|boolean|boolean}}&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|item|minstrel_instrument}}&lt;br /&gt;
{{Flink|int|minstrel_level}}&lt;br /&gt;
{{Flink|boolean|minstrel_quest}}&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|string}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_initiative|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_level_adjustment}}&lt;br /&gt;
{{Flink|phylum|monster_phylum|{{opt|monster}}}}&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_audience}}&lt;br /&gt;
{{Flink|int|my_basestat|stat}}&lt;br /&gt;
{{Flink|familiar|my_bjorned_familiar}}&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|string|my_companion}}&lt;br /&gt;
{{Flink|int|my_daycount}}&lt;br /&gt;
{{Flink|int|my_discomomentum}}&lt;br /&gt;
{{Flink|familiar|my_effective_familiar}}&lt;br /&gt;
{{Flink|int [effect]|my_effects}}&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|int|my_fury}}&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|int|my_lightning}}&lt;br /&gt;
{{Flink|location|my_location}}&lt;br /&gt;
{{Flink|int|my_maxfury}}&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|string|my_path}}&lt;br /&gt;
{{Flink|stat|my_primestat}}&lt;br /&gt;
{{flink|int|my_rain}}&lt;br /&gt;
{{Flink|servant|my_servant|servant}}&lt;br /&gt;
{{flink|string|my_sign}}&lt;br /&gt;
{{flink|int|my_soulsauce}}&lt;br /&gt;
{{Flink|int|my_spleen_use}}&lt;br /&gt;
{{Flink|int|my_storage_meat}}&lt;br /&gt;
{{flink|thrall|my_thrall}}&lt;br /&gt;
{{flink|int|my_thunder}}&lt;br /&gt;
{{Flink|int|my_turncount}}&lt;br /&gt;
&lt;br /&gt;
===n===&lt;br /&gt;
{{Flink|float|now_to_string|string}}&lt;br /&gt;
{{Flink|int|npc_price|item}}&lt;br /&gt;
{{Flink|float|numeric_modifier|{{opt|string}}|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;
&lt;br /&gt;
===o===&lt;br /&gt;
{{Flink|boolean|outfit|string}}&lt;br /&gt;
{{Flink|item [int]|outfit_pieces|string}}&lt;br /&gt;
{{Flink|string|outfit_tattoo|{{opt|string}}}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
&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;
{{Flink|int|pvp_attacks_left}}&lt;br /&gt;
&lt;br /&gt;
===r===&lt;br /&gt;
{{Flink|int|rain_cost|skill}}&lt;br /&gt;
{{Flink|int|random|int}}&lt;br /&gt;
{{Flink|int|raw_damage_absorption}}&lt;br /&gt;
{{Flink|void|refresh_shop}}&lt;br /&gt;
{{Flink|void|refresh_stash}}&lt;br /&gt;
{{Flink|void|refresh_status}}&lt;br /&gt;
{{Flink|void|remove_item_condition|int|item}}&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_choice}}&lt;br /&gt;
{{Flink|buffer|run_combat|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|run_turn}}&lt;br /&gt;
{{Flink|buffer|runaway}}&lt;br /&gt;
&lt;br /&gt;
===s===&lt;br /&gt;
{{Flink|boolean|sell|coinmaster|int|item}}&lt;br /&gt;
{{Flink|int|sell_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|sells_item|coinmaster|item}}&lt;br /&gt;
{{Flink|string [int]|session_logs|{{opt|string}}|int}}&lt;br /&gt;
{{Flink|void|set_auto_attack|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|shop_price|item}}&lt;br /&gt;
{{Flink|int|soulsauce_cost|skill}}&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|{{opt|string}}|string}}&lt;br /&gt;
{{Flink|skill|stun_skill}}&lt;br /&gt;
{{Flink|string|substring|string|int|{{opt|int}}}}&lt;br /&gt;
{{Flink|boolean|svn_at_head|string}}&lt;br /&gt;
{{Flink|boolean|svn_exists|string}}&lt;br /&gt;
{{Flink|record|svn_info|string}}&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_shop|{{opt|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|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|throw_item|item}}&lt;br /&gt;
{{Flink|buffer|throw_items|item|item}}&lt;br /&gt;
{{Flink|int|thunder_cost|skill}}&lt;br /&gt;
{{Flink|buffer|time_to_string}}&lt;br /&gt;
{{Flink|boolean|to_boolean|any}}&lt;br /&gt;
{{Flink|bounty|to_bounty|strict_string}}&lt;br /&gt;
{{Flink|class|to_class|strict_string/int}}&lt;br /&gt;
{{Flink|coinmaster|to_coinmaster|strict_string}}&lt;br /&gt;
{{Flink|effect|to_effect|int}}&lt;br /&gt;
{{Flink|effect|to_effect|strict_string}}&lt;br /&gt;
{{Flink|effect|to_effect|skill}}&lt;br /&gt;
{{Flink|element|to_element|strict_string}}&lt;br /&gt;
{{Flink|familiar|to_familiar|int}}&lt;br /&gt;
{{Flink|familiar|to_familiar|strict_string}}&lt;br /&gt;
{{Flink|float|to_float|any}}&lt;br /&gt;
{{Flink|int|to_int|any}}&lt;br /&gt;
{{Flink|item|to_item|strict_string}}&lt;br /&gt;
{{Flink|item|to_item|int}}&lt;br /&gt;
{{Flink|item|to_item|string|int}}&lt;br /&gt;
{{Flink|string|to_json|aggregate}}&lt;br /&gt;
{{Flink|location|to_location|strict_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|strict_string}}&lt;br /&gt;
{{Flink|phylum|to_phylum|string}}&lt;br /&gt;
{{Flink|string|to_plural|item}}&lt;br /&gt;
{{Flink|servant|to_servant|int}}&lt;br /&gt;
{{Flink|servant|to_servant|strict_string}}&lt;br /&gt;
{{Flink|skill|to_skill|effect}}&lt;br /&gt;
{{Flink|skill|to_skill|int}}&lt;br /&gt;
{{Flink|skill|to_skill|strict_string}}&lt;br /&gt;
{{Flink|slot|to_slot|item}}&lt;br /&gt;
{{Flink|skill|to_slot|strict_string}}&lt;br /&gt;
{{Flink|stat|to_stat|string}}&lt;br /&gt;
{{Flink|string|to_string|any}}&lt;br /&gt;
{{Flink|thrall|to_thrall|{{opt|string}}|{{opt|int}}}}&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|total_free_rests}}&lt;br /&gt;
{{flink|int|total_turns_played}}&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_servant|servant}}&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;
{{Flink|boolean|user_confirm|string|int|boolean}}&lt;br /&gt;
&lt;br /&gt;
===v===&lt;br /&gt;
{{Flink|boolean|visit|coinmaster}}&lt;br /&gt;
{{Flink|buffer|visit_url|{{opt|string}}|{{opt|boolean}}|{{opt|boolean}}}}&lt;br /&gt;
&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 [string]|who_clan|{{opt|string}}}}&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;br /&gt;
&lt;br /&gt;
===x===&lt;br /&gt;
{{Flink|string[int]|xpath|string|string}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2616</id>
		<title>Ash Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2616"/>
		<updated>2015-03-26T12:31:46Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Add new functions that never made there way here.&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|int|adv_cost|skill}}&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|{{opt|boolean}}}}&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;
&lt;br /&gt;
===b===&lt;br /&gt;
{{Flink|boolean|batch_close}}&lt;br /&gt;
{{Flink|void|batch_open}}&lt;br /&gt;
{{Flink|boolean|bjornify_familiar|familiar}}&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|{{opt|coinmaster}}|int|item}}&lt;br /&gt;
{{Flink|int|buy|int|item|int}}&lt;br /&gt;
{{Flink|int|buy_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|buy_using_storage|int|item}}&lt;br /&gt;
{{Flink|int|buy_using_storage|int|item|int}}&lt;br /&gt;
{{Flink|boolean|buys_item|coinmaster|item}}&lt;br /&gt;
&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_faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|can_interact}}&lt;br /&gt;
{{flink|boolean|canadia_available}}&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|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|chat_macro|string}}&lt;br /&gt;
{{Flink|void|chat_notify|string|string}}&lt;br /&gt;
{{Flink|void|chat_private|string|string}}&lt;br /&gt;
{{Flink|boolean|chew|int|item}}&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|int|combat_mana_cost_modifier}}&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|string|craft_type|item}}&lt;br /&gt;
{{Flink|int|creatable_amount|item}}&lt;br /&gt;
{{Flink|int|creatable_turns|item}}&lt;br /&gt;
{{Flink|int|creatable_turns|item|int}}&lt;br /&gt;
{{Flink|int|creatable_turns|item|int|boolean}}&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|element|dad_sea_monkee_weakness|int}}&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|boolean|dispensary_available}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item}}&lt;br /&gt;
&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|boolean|empty_closet}}&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|boolean|equip_all_familiars}}&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|faxbot|monster}}&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|boolean|find|matcher}}&lt;br /&gt;
{{Flink|boolean|florist_available}}&lt;br /&gt;
{{Flink|int|floor|float}}&lt;br /&gt;
{{Flink|string|form_field|string}}&lt;br /&gt;
{{Flink|string [string]|form_fields}}&lt;br /&gt;
{{Flink|string|format_date_time|string|string|string}}&lt;br /&gt;
{{Flink|boolean|friars_available}}&lt;br /&gt;
{{Flink|int|fullness_limit}}&lt;br /&gt;
&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|gametime_to_int}}&lt;br /&gt;
{{Flink|int|get_auto_attack}}&lt;br /&gt;
{{Flink|int [item]|get_campground}}&lt;br /&gt;
{{Flink|string|get_ccs_action|int}}&lt;br /&gt;
{{Flink|result|get_chateau}}&lt;br /&gt;
{{Flink|int|get_clan_id}}&lt;br /&gt;
{{Flink|string|get_clan_name}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int}}&lt;br /&gt;
{{Flink|string [int]|get_custom_outfits}}&lt;br /&gt;
{{Flink|item|get_dwelling}}&lt;br /&gt;
{{Flink|string [location, 3]|get_florist_plants}}&lt;br /&gt;
{{Flink|string [int]|get_goals}}&lt;br /&gt;
{{Flink|boolean|get_ignore_zone_warnings}}&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|string [int]|get_moods}}&lt;br /&gt;
{{Flink|string [int]|get_outfits}}&lt;br /&gt;
{{Flink|string|get_path}}&lt;br /&gt;
{{Flink|string|get_path_full}}&lt;br /&gt;
{{Flink|string|get_path_variables}}&lt;br /&gt;
{{Flink|string|get_player_id|string}}&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|int [item]|get_shop}}&lt;br /&gt;
{{Flink|string|get_version}}&lt;br /&gt;
{{flink|boolean|gnomads_available}}&lt;br /&gt;
{{flink|boolean|goal_exists|string}}&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_servant|servant}}&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|hidden_temple_unlocked}}&lt;br /&gt;
{{Flink|boolean|hippy_stone_broken}}&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;
{{Flink|string|holiday}}&lt;br /&gt;
&lt;br /&gt;
===i===&lt;br /&gt;
{{Flink|monster|image_to_monster|strict_string}}&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|string|inaccessible_reason|coinmaster}}&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_accessible|coinmaster}}&lt;br /&gt;
{{Flink|boolean|is_banished|monster}}&lt;br /&gt;
{{Flink|boolean|is_coinmaster_item|item}}&lt;br /&gt;
{{Flink|boolean|is_discardable|item}}&lt;br /&gt;
{{Flink|boolean|is_displayable|item}}&lt;br /&gt;
{{Flink|boolean|is_familiar_equipment_locked}}&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|boolean|is_trendy|any}}&lt;br /&gt;
{{Flink|boolean|is_unrestricted|item/familiar/skill/string}}&lt;br /&gt;
{{Flink|boolean|is_wearing_outfit|string}}&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;
&lt;br /&gt;
===j===&lt;br /&gt;
{{flink|int|jump_chance|{{opt|monster}}|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
{{flink|int|jump_chance|location|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
&lt;br /&gt;
===k===&lt;br /&gt;
{{flink|boolean|knoll_available}}&lt;br /&gt;
===l===&lt;br /&gt;
{{Flink|int|last_index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|string|last_item_message}}&lt;br /&gt;
{{Flink|monster|last_monster}}&lt;br /&gt;
{{Flink|string|last_skill_message}}&lt;br /&gt;
{{Flink|int|length|string}}&lt;br /&gt;
{{Flink|string|limit_mode}}&lt;br /&gt;
{{Flink|int|lightning_cost}}&lt;br /&gt;
{{Flink|buffer|load_html|string}}&lt;br /&gt;
{{Flink|void|lock_familiar_equipment|boolean}}&lt;br /&gt;
{{Flink|void|logprint|string}}&lt;br /&gt;
===m===&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean}}&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|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|float|max|float|float}}&lt;br /&gt;
{{Flink|int|max|int|int}}&lt;br /&gt;
{{Flink|boolean|maximize|string|boolean}}&lt;br /&gt;
{{Flink|boolean|maximize|string|int|int|boolean}}&lt;br /&gt;
{{Flink|record [int]|maximize|string|int|int|boolean|boolean}}&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|item|minstrel_instrument}}&lt;br /&gt;
{{Flink|int|minstrel_level}}&lt;br /&gt;
{{Flink|boolean|minstrel_quest}}&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|int|monster_initiative|{{opt|monster}}}}&lt;br /&gt;
{{Flink|element|monster_element|{{opt|monster}}}}&lt;br /&gt;
{{Flink|float|monster_eval|string}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_level_adjustment}}&lt;br /&gt;
{{Flink|phylum|monster_phylum|{{opt|monster}}}}&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_audience}}&lt;br /&gt;
{{Flink|int|my_basestat|stat}}&lt;br /&gt;
{{Flink|familiar|my_bjorned_familiar}}&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|string|my_companion}}&lt;br /&gt;
{{Flink|int|my_daycount}}&lt;br /&gt;
{{Flink|int|my_discomomentum}}&lt;br /&gt;
{{Flink|familiar|my_effective_familiar}}&lt;br /&gt;
{{Flink|int [effect]|my_effects}}&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|int|my_fury}}&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|int|my_lightning}}&lt;br /&gt;
{{Flink|location|my_location}}&lt;br /&gt;
{{Flink|int|my_maxhp}}&lt;br /&gt;
{{Flink|int|my_maxfury}}&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|string|my_path}}&lt;br /&gt;
{{Flink|stat|my_primestat}}&lt;br /&gt;
{{flink|int|my_rain}}&lt;br /&gt;
{{Flink|servant|my_servant|servant}}&lt;br /&gt;
{{flink|string|my_sign}}&lt;br /&gt;
{{flink|int|my_soulsauce}}&lt;br /&gt;
{{Flink|int|my_spleen_use}}&lt;br /&gt;
{{Flink|int|my_storage_meat}}&lt;br /&gt;
{{flink|thrall|my_thrall}}&lt;br /&gt;
{{flink|int|my_thunder}}&lt;br /&gt;
{{Flink|int|my_turncount}}&lt;br /&gt;
&lt;br /&gt;
===n===&lt;br /&gt;
{{Flink|float|now_to_string|string}}&lt;br /&gt;
{{Flink|int|npc_price|item}}&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;
&lt;br /&gt;
===o===&lt;br /&gt;
{{Flink|boolean|outfit|string}}&lt;br /&gt;
{{Flink|item [int]|outfit_pieces|string}}&lt;br /&gt;
{{Flink|string|outfit_tattoo}}&lt;br /&gt;
{{Flink|string|outfit_tattoo|string}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
&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;
{{Flink|int|pvp_attacks_left}}&lt;br /&gt;
===r===&lt;br /&gt;
{{Flink|int|random|int}}&lt;br /&gt;
{{Flink|int|rain_cost|skill}}&lt;br /&gt;
{{Flink|int|raw_damage_absorption}}&lt;br /&gt;
{{Flink|void|refresh_shop}}&lt;br /&gt;
{{Flink|void|refresh_stash}}&lt;br /&gt;
{{Flink|void|refresh_status}}&lt;br /&gt;
{{Flink|void|remove_item_condition|int|item}}&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_choice}}&lt;br /&gt;
{{Flink|buffer|run_combat}}&lt;br /&gt;
{{Flink|buffer|run_turn}}&lt;br /&gt;
{{Flink|buffer|runaway}}&lt;br /&gt;
&lt;br /&gt;
===s===&lt;br /&gt;
{{Flink|boolean|sell|coinmaster|int|item}}&lt;br /&gt;
{{Flink|int|sell_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|sells_item|coinmaster|item}}&lt;br /&gt;
{{Flink|string [int]|session_logs|{{opt|string}}|int}}&lt;br /&gt;
{{Flink|void|set_auto_attack|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|shop_price|item}}&lt;br /&gt;
{{Flink|int|soulsauce_cost|skill}}&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|skill|stun_skill}}&lt;br /&gt;
{{Flink|string|substring|string|int|{{opt|int}}}}&lt;br /&gt;
{{Flink|boolean|svn_at_head|string}}&lt;br /&gt;
{{Flink|boolean|svn_exists|string}}&lt;br /&gt;
{{Flink|record|svn_info|string}}&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_shop|{{opt|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|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|throw_item|item}}&lt;br /&gt;
{{Flink|buffer|throw_items|item|item}}&lt;br /&gt;
{{Flink|int|thunder_cost|skill}}&lt;br /&gt;
{{Flink|buffer|time_to_string}}&lt;br /&gt;
{{Flink|boolean|to_boolean|any}}&lt;br /&gt;
{{Flink|bounty|to_bounty|string}}&lt;br /&gt;
{{Flink|class|to_class|string}}&lt;br /&gt;
{{Flink|coinmaster|to_coinmaster|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|string|to_json|aggregate}}&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|phylum|to_phylum|string}}&lt;br /&gt;
{{Flink|string|to_plural|item}}&lt;br /&gt;
{{Flink|servant|to_servant|int}}&lt;br /&gt;
{{Flink|servant|to_servant|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|thrall|to_thrall|{{opt|string}}{{opt|int}}}}&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|total_free_rests}}&lt;br /&gt;
{{flink|int|total_turns_played}}&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_servant}}&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;
{{Flink|boolean|user_confirm|string|int|boolean}}&lt;br /&gt;
&lt;br /&gt;
===v===&lt;br /&gt;
{{Flink|boolean|visit|coinmaster}}&lt;br /&gt;
{{Flink|buffer|visit_url|string}}&lt;br /&gt;
{{Flink|buffer|visit_url|string|boolean}}&lt;br /&gt;
{{Flink|buffer|visit_url|string|boolean|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 [string]|who_clan}}&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;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Use_skill&amp;diff=3294</id>
		<title>Use skill</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Use_skill&amp;diff=3294"/>
		<updated>2015-03-26T01:34:01Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Correct the claim that use_skill returns different things depending on calling context, as opposed to type of parameters passed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are two forms of this function. In a combat consult script, this returns a buffer, but otherwise it returns a boolean. Note both forms below.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
#vardefine:name|use_skill}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}=Normal Use={{&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|int|casts}}|&lt;br /&gt;
parameter2={{Param|skill|to_use}}|&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|int|casts}}|&lt;br /&gt;
parameter2={{Param|skill|to_use}}|&lt;br /&gt;
parameter3={{Param|string|target}}|&lt;br /&gt;
p1desc={{Pspan|casts}} is the number of casts|&lt;br /&gt;
p2desc={{Pspan|to_use}} is the skill to use|&lt;br /&gt;
p3desc={{Pspan|target}} is the recipient (optional, for use with buffs only)|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Attempts to cast the skill {{pspan|to_use}} a number of times specified by {{pspan|casts}}, or once if not specified. Defaults to casting on yourself, but you can specify a {{pspan|target}} for buffs.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This example will attempt to cast the specified skill as many times as it can with the MP the character has left.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
effect chosen = $effect[ Empathy ];&lt;br /&gt;
use_skill( my_mp() / mp_cost( to_skill(chosen) )  , to_skill(chosen) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;cast&amp;quot; functions similarly to the normal version of this function (with similar parameters).|&lt;br /&gt;
&lt;br /&gt;
}}=In-combat Consulting={{&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=buffer|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|skill|to_use}}|&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=boolean|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|int|casts}}|&lt;br /&gt;
parameter2={{Param|skill|to_use}}|&lt;br /&gt;
p1desc={{Pspan|casts}} is the (optional) number of casts|&lt;br /&gt;
p2desc={{Pspan|to_use}} is the skill to use|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=If the two-argument form is used in-combat, it will loop the specified number of {{pspan|casts}} using the specified skill {{pspan|to_use}}, never reconsulting the script until the loop is complete or the monster is defeated.  The single-argument form will use the skill, then return the HTML response text.  One exception: this will not work with Lasagna Bandages, since it tries to cast the out-of-combat version of the skill.  Using {{f|visit_url}} is required for casting Lasagna Bandages in combat.|&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Skills and Effects]][[Category:In-combat Consulting]]&lt;br /&gt;
{{RFI|Confirm: Is visit_url() still needed for Lasagna Bandages?}}&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Types&amp;diff=6794</id>
		<title>Data Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Types&amp;diff=6794"/>
		<updated>2014-01-11T17:14:24Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Special Datatypes */ Add pasta thralls, supercold (element)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Primitive Datatypes==&lt;br /&gt;
&lt;br /&gt;
===void===&lt;br /&gt;
Can be thought of better as the absence of a datatype. No value can be assigned to &#039;&#039;&#039;void&#039;&#039;&#039; nor can a value be returned from a function of datatype &#039;&#039;&#039;void&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===boolean===&lt;br /&gt;
A boolean value is either &#039;&#039;&#039;true&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039;. By default, a boolean variable is set to false.&lt;br /&gt;
&lt;br /&gt;
===int===&lt;br /&gt;
&lt;br /&gt;
A whole number (short for &amp;quot;integer&amp;quot;), either positive or negative (or 0).  The int used by KoLmafia is a 32-bit signed int, meaning it has a maximum value of 2,147,483,647 and a minimum value of -2,147,483,648. The default value of a integer variable is 0.&lt;br /&gt;
&lt;br /&gt;
Be careful when doing math with integers! As with some other strongly-typed languages, numbers are converted to integers at every step of the operation when only integer types are used. For example:&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int a = 1;&lt;br /&gt;
int b = 2;&lt;br /&gt;
print( a / b * 2 );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Will give the output &amp;quot;0,&amp;quot; not &amp;quot;1&amp;quot; as you may expect. Changing either variable to a float type will &amp;quot;correct&amp;quot; this.&lt;br /&gt;
&lt;br /&gt;
===float===&lt;br /&gt;
&lt;br /&gt;
The float data type is a single-precision 32-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in section 4.2.3 of the Java Language Specification. [http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3]&lt;br /&gt;
&lt;br /&gt;
When assigning to a variable of type float, one should be careful to always enter numbers in decimal form, as unwanted behavior can result from supplying a value that KoLmafia may interpret as an int type without the decimal point.&lt;br /&gt;
&lt;br /&gt;
Note that float is not infinitely precise; it intrinsically rounds off after a certain point. This loss of accuracy is for the sake of storage, but beware of the possibility of small errors compounding from multiple float types.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For instance, try the following code as an example of how rather long post-decimal portions are handled:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float f;&lt;br /&gt;
f = 4.9999999;&lt;br /&gt;
print( f );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The default value of a &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; variable is 0.0.&lt;br /&gt;
&lt;br /&gt;
===string===&lt;br /&gt;
&lt;br /&gt;
A group of characters including, but not limited to: lowercase letters, uppercase characters, numbers, and various control characters. When assigning a value to a string, always enclose the desired value in either single or double quotes (note you must use the same quote type on both ends of the string assignment). If you need to include the same character inside of the string itself, you will need to escape it first with a backslash.{{CodeSample|&lt;br /&gt;
description=For example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string s = &amp;quot;This is my \&amp;quot;friend\&amp;quot; Pete.&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
moreinfo=&lt;br /&gt;
Will result in the following being stored to s:&lt;br /&gt;
&amp;lt;pre&amp;gt;This is my &amp;quot;friend&amp;quot; Pete&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
The default value of a string is an empty string, or literally &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===buffer===&lt;br /&gt;
&lt;br /&gt;
Similar to a string, but more efficient in certain operations, including concatenation and passing as function arguments. For the most part, you can interchange references to strings and buffers. However, you should test all such actions first, as a few functions require a specific datatype to be supplied as a parameter. (Most notably, those listed under [[String Handling Routines#Regular Expressions|Regular Expressions]].)&lt;br /&gt;
&lt;br /&gt;
==Special Datatypes==&lt;br /&gt;
&lt;br /&gt;
Several datatypes are included in KoLmafia to represent common categories within the KoL universe.&lt;br /&gt;
&lt;br /&gt;
Note that while variables of these types are declared in the same way as for Primitive Datatypes; assigning and referencing them is done differently.&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=For example, to declare an item datatype and assign it a value, you would use the following line of code:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
item it = $item[ broken skull ];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The default values of any variable of one of the following types is &amp;lt;code&amp;gt;$&#039;&#039;type&#039;&#039;[ none ]&amp;lt;/code&amp;gt;. For example, the default value of a &amp;lt;code&amp;gt;item&amp;lt;/code&amp;gt; variable is &amp;lt;code&amp;gt;$item[ none ]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===class===&lt;br /&gt;
&lt;br /&gt;
Besides $class[ none ], there are six possible values for this datatype:&lt;br /&gt;
&lt;br /&gt;
* Seal Clubber&lt;br /&gt;
* Turtle Tamer&lt;br /&gt;
* Pastamancer&lt;br /&gt;
* Sauceror&lt;br /&gt;
* Disco Bandit&lt;br /&gt;
* Accordion Thief &lt;br /&gt;
&lt;br /&gt;
===coinmaster===&lt;br /&gt;
All shops that deal with currency other than meat.&lt;br /&gt;
&lt;br /&gt;
===effect===&lt;br /&gt;
&lt;br /&gt;
Any effect you can be under in KoL, whether from items, skills, or what-have-you, is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $effect[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Effects}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===element===&lt;br /&gt;
&lt;br /&gt;
Besides $element[ none ], there are six possible values for this datatype. (Note that &amp;quot;Bad Spelling&amp;quot; is not considered a true element.)&lt;br /&gt;
Also note that these names are case-sensitive (referencing $element[ Spooky ] will generate an error).&lt;br /&gt;
&lt;br /&gt;
* cold&lt;br /&gt;
* hot&lt;br /&gt;
* sleaze&lt;br /&gt;
* spooky&lt;br /&gt;
* stench&lt;br /&gt;
* slime&lt;br /&gt;
* supercold&lt;br /&gt;
&lt;br /&gt;
===familiar===&lt;br /&gt;
&lt;br /&gt;
Any familiar available in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $familiar[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Familiars}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===item===&lt;br /&gt;
&lt;br /&gt;
Any item in all of KoL is valid for this datatype. Note that unlike most special datatypes, item references can make use of the item ID number.&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=For example, you could assign the item plexiglass pants as follows:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
item it = $item[ 1234 ];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The full range, besides $item[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Items}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===location===&lt;br /&gt;
&lt;br /&gt;
Any location one can adventure at in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $location[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Locations}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===monster===&lt;br /&gt;
&lt;br /&gt;
Any monster you can encounter in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $monster[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Monster Compendium}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===phylum===&lt;br /&gt;
&lt;br /&gt;
Each monster has a {{kolwiki|Phylum}}. There may be 23 phyla in KoL, but so far only 22 have been discovered and named by the playerbase. The possible values for this datatype are:&lt;br /&gt;
&lt;br /&gt;
* beast&lt;br /&gt;
* bug&lt;br /&gt;
* constellation&lt;br /&gt;
* crimbo&lt;br /&gt;
* demihuman&lt;br /&gt;
* demon&lt;br /&gt;
* elemental&lt;br /&gt;
* fish&lt;br /&gt;
* goblin&lt;br /&gt;
* hippy&lt;br /&gt;
* hobo&lt;br /&gt;
* humanoid&lt;br /&gt;
* horror&lt;br /&gt;
* mer-kin&lt;br /&gt;
* object&lt;br /&gt;
* orc&lt;br /&gt;
* penguin&lt;br /&gt;
* pirate&lt;br /&gt;
* plant&lt;br /&gt;
* slime&lt;br /&gt;
* strange&lt;br /&gt;
* undead&lt;br /&gt;
&lt;br /&gt;
===skill===&lt;br /&gt;
Any skill you can have in KoL (whether permable or not, granted by items, etc.) is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $skill[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Skills}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===slot===&lt;br /&gt;
&lt;br /&gt;
Besides $slot[ none ], there are 14 possible values for this datatype.&lt;br /&gt;
&lt;br /&gt;
* hat&lt;br /&gt;
* back&lt;br /&gt;
* weapon&lt;br /&gt;
* off-hand&lt;br /&gt;
* shirt&lt;br /&gt;
* pants&lt;br /&gt;
* acc1&lt;br /&gt;
* acc2&lt;br /&gt;
* acc3&lt;br /&gt;
* familiar&lt;br /&gt;
* sticker1&lt;br /&gt;
* sticker2&lt;br /&gt;
* sticker3&lt;br /&gt;
* fakehand&lt;br /&gt;
&lt;br /&gt;
===stat===&lt;br /&gt;
&lt;br /&gt;
Besides $stat[ none ], there are six possible values for this datatype (the last three are for referencing sub-stats).&lt;br /&gt;
&lt;br /&gt;
* muscle&lt;br /&gt;
* mysticality&lt;br /&gt;
* moxie&lt;br /&gt;
* submuscle&lt;br /&gt;
* submysticality&lt;br /&gt;
* submoxie&lt;br /&gt;
&lt;br /&gt;
===thrall===&lt;br /&gt;
&lt;br /&gt;
Pastamancers have the ability to summon {{kolwiki|Pasta Thralls}}. &lt;br /&gt;
&lt;br /&gt;
* Angel Hair Wisp&lt;br /&gt;
* Elbow Macaroni&lt;br /&gt;
* Lasagmbie&lt;br /&gt;
* Penne Dreadful&lt;br /&gt;
* Spaghetti Elemental&lt;br /&gt;
* Spice Ghost&lt;br /&gt;
* Vampieroghi&lt;br /&gt;
* Vermincelli&lt;br /&gt;
&lt;br /&gt;
==aggregate==&lt;br /&gt;
&lt;br /&gt;
An aggregate is a complex datatype composed of two or more primitive or special datatypes. For more information, see [[Data Structures]].&lt;br /&gt;
&lt;br /&gt;
==record==&lt;br /&gt;
&lt;br /&gt;
Records are user-defined datatypes that hold as many sub-datatypes as desired. For more information, see the page for [[Data Structures]].&lt;br /&gt;
&lt;br /&gt;
==Plural Typed Constants==&lt;br /&gt;
&lt;br /&gt;
(see http://kolmafia.us/showthread.php?p=15592, from which this section is reproduced)&lt;br /&gt;
&lt;br /&gt;
Plural typed constants allow you to easily do something with a list of specified objects, without having to replicate code or laboriously build up an array of the objects so that you can iterate over it. Here&#039;s a quick example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach weapon in $items[star sword, star staff, star crossbow] {&lt;br /&gt;
   if (available_amount(weapon) &amp;gt; 0) {&lt;br /&gt;
      equip(weapon);&lt;br /&gt;
      break;&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The syntax is basically the same as the existing typed constant feature, but with an &amp;quot;s&amp;quot; or &amp;quot;es&amp;quot; after the type name. (The &amp;quot;es&amp;quot; case is there so that you can properly pluralize &amp;quot;class&amp;quot;.) The text between the square brackets is interpreted as a comma-separated list of elements, each of which is converted to the specified type as if it were an individual constant. More details:&lt;br /&gt;
* The list can span multiple lines.&lt;br /&gt;
* Whitespace before or after elements is ignored.&lt;br /&gt;
* Completely empty elements are ignored (so that you can leave a comma at the end of the list).&lt;br /&gt;
* You can include a comma or closing square bracket in an element by writing it as &amp;quot;\,&amp;quot; or &amp;quot;\]&amp;quot;.&lt;br /&gt;
* All the other escape sequences allowed in strings are possible, such as &amp;quot;\n&amp;quot; (newline), &amp;quot;\t&amp;quot; (tab), and &amp;quot;\uXXXX&amp;quot; (Unicode character value). To put an actual backslash in an element, you have to write it as &amp;quot;\\&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The value generated by a plural constant is of type boolean[type], with the keys being the specified elements, and the boolean value always being true - although you won&#039;t normally do anything with the boolean, you&#039;d use a foreach loop to iterate over the keys. You can assign a plural constant to a variable declared as that type, but note that the value differs from a normal map in three important respects:&lt;br /&gt;
* Since the expression that generates it is syntactically a constant, the value has to be immutable. If you were allowed to change it in any way, those changes would appear in every future use of the same constant.&lt;br /&gt;
* There can be multiple instances of the same key - $ints[1,1,2,3,5,8] is perfectly valid, and will result in the value 1 appearing twice in a foreach loop.&lt;br /&gt;
* The keys will appear in the order you wrote them, rather than being sorted alphanumerically as maps usually do.&lt;br /&gt;
&lt;br /&gt;
In addition to being used in a foreach loop, plural constants also efficiently support membership testing via the &#039;contains&#039; operator. Here&#039;s another example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
for hour from 1 to 12 {&lt;br /&gt;
   print(&amp;quot;It&#039;s &amp;quot; + hour + &amp;quot; o&#039;clock.&amp;quot;);&lt;br /&gt;
   if ($ints[10, 2, 4] contains hour) {&lt;br /&gt;
      print(&amp;quot;Time to drink a Dr Pepper!&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
(Yes, that example could just as easily have been done with a switch statement.)&lt;br /&gt;
&lt;br /&gt;
Iterating over an empty list is rather pointless, so plural constants with no elements are given a different meaning: they represent every value of the specified type, where this is practical. (The &#039;none&#039; value, if defined for a given type, is omitted.) The biggest benefit here is $items[], which lets you loop over every defined item, more efficiently than you could otherwise write in a script (since the list is generated once per session and then cached), and without having to hard-code a maximum item ID number in your script. Example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach it in $items[] {&lt;br /&gt;
   if (autosell_price(it) == 42) print(it);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Enumeration of all possible values works with the following types:&lt;br /&gt;
* $booleans[] - false and true.&lt;br /&gt;
* $items[]&lt;br /&gt;
* $locations[]&lt;br /&gt;
* $classes[]&lt;br /&gt;
* $stats[] - Muscle, Mysticality, Moxie: the substat values are omitted.&lt;br /&gt;
* $skills[]&lt;br /&gt;
* $effects[]&lt;br /&gt;
* $familiars[]&lt;br /&gt;
* $slots[] - includes sticker slots and fake hands, which you might not want to consider as normal slots.&lt;br /&gt;
* $monsters[]&lt;br /&gt;
* $elements[] - includes slime now, and possibly other not-quite-elements like cute in the future.&lt;br /&gt;
&lt;br /&gt;
The remaining types that can be used in plural constants require an explicit list of elements, since there are too many possible values:&lt;br /&gt;
* $ints[] - you don&#039;t have enough RAM to store a list with 4 billion elements.&lt;br /&gt;
* $floats[] - ditto.&lt;br /&gt;
* $strings[] - nobody has that much RAM.&lt;br /&gt;
&lt;br /&gt;
==Custom==&lt;br /&gt;
&lt;br /&gt;
===matcher===&lt;br /&gt;
&lt;br /&gt;
A matcher isn&#039;t really a datatype so much as it&#039;s a class, but it is included here for reference, as it is used much as datatypes are in ASH. It can only be declared through the function {{f|create_matcher}}, using two strings. One is the string to find matches in, the other a regular expression to test against. For more information on using a matcher, see [[Regular Expressions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Datatype_Conversions&amp;diff=2423</id>
		<title>Talk:Datatype Conversions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Datatype_Conversions&amp;diff=2423"/>
		<updated>2014-01-11T17:07:13Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Page needs updating :|&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page probably needs some amount of editing, since datatype conversions have been tightened up a bit --- for instance, to_boolean($class[seal clubber]) is no longer valid. Also, we have a few new types (coinmaster, thrall, phylum, to name a few). --[[User:Heeheehee|Heeheehee]] ([[User talk:Heeheehee|talk]]) 17:07, 11 January 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6102</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=6102"/>
		<updated>2014-01-11T17:00:13Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Chatbot (chatBotScript) */ Add channel data for events.&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>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Modifier_eval&amp;diff=8068</id>
		<title>Talk:Modifier eval</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Modifier_eval&amp;diff=8068"/>
		<updated>2013-08-13T16:32:03Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Re: recent edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I just removed &amp;quot;This must be used on preferences with a float value ONLY - merely retrieving an integer pref will corrupt it!&amp;quot; from pref(X), since I&#039;m not sure what it&#039;s supposed to mean. pref(X) doesn&#039;t write to preferences, and it parses integer prefs just fine... does anyone care to explain? --[[User:Heeheehee|Heeheehee]] ([[User talk:Heeheehee|talk]]) 16:32, 13 August 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6420</id>
		<title>Modifier eval</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6420"/>
		<updated>2013-08-13T16:29:51Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Remove incorrect information.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|modifier_eval}}{{&lt;br /&gt;
#vardefine:return_type|float}}{{&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|expression}}|&lt;br /&gt;
p1desc={{pspan|expression}} is a mathematical expression to be solved.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description= Evaluates an expression in the format used by variable modifiers:&lt;br /&gt;
&lt;br /&gt;
* No spaces are allowed within the expression, except as part of a zone/location name.&lt;br /&gt;
* + - * / ( ) have their usual mathematical meaning and precedence.&lt;br /&gt;
* ^ is exponentiation, with the highest precedence.&lt;br /&gt;
* Functions available: ceil(x) floor(x) sqrt(x) min(x,y) max(x,y)&lt;br /&gt;
* Location functions: loc(text) zone(text)&lt;br /&gt;
** These have a value of 1 if the current adventure location or zone contains the specified text, 0 elsewhere.&lt;br /&gt;
* Familiar function: fam(text)&lt;br /&gt;
** This has a value of 1 if the player&#039;s familiar type contains the text, else 0.&lt;br /&gt;
* Preferences function: pref(text)&lt;br /&gt;
* There could be at most one of each text function in an expression.&lt;br /&gt;
** This is no longer the case however and multiple of the same text functions should now work properly.&lt;br /&gt;
* All upper-case letters are reserved for internally-used variables. The available variables are:&lt;br /&gt;
** A - number of Ascensions&lt;br /&gt;
** B - Blood of Wereseal effect&lt;br /&gt;
** C - Clancy&#039;s level&lt;br /&gt;
** D - Drunkenness&lt;br /&gt;
** E - active (nonintrinsic) Effects&lt;br /&gt;
** F - Fullness&lt;br /&gt;
** G - Grimace darkness (0..5)&lt;br /&gt;
** H - Hobo Power&lt;br /&gt;
** J - 1 on Festival of Jarlsberg, 0 otherwise&lt;br /&gt;
** L - player Level&lt;br /&gt;
** M - total Moonlight (0..9)&lt;br /&gt;
** R - Reagent potion duration&lt;br /&gt;
** S - Spleenness&lt;br /&gt;
** T - Turns remaining of this effect&lt;br /&gt;
** U - telescope Upgrades&lt;br /&gt;
** W - familiar Weight&lt;br /&gt;
** X - gender (-1=male, 1=female)&lt;br /&gt;
* This wrapper allows user-defined variables to be used as well, which must have names starting with a lower-case letter (or underscore) to distinguish them from built-in variables.  Variables are supplied as a float[string] map.&lt;br /&gt;
&amp;amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This script expands modifier_eval() to include support for user-defined variables. It is extremely complex, but it is extremely useful to anyone who wants to use modifier_eval().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float eval(string expr, float[string] vars) {&lt;br /&gt;
   buffer b;&lt;br /&gt;
   matcher m = create_matcher( &amp;quot;\\b[a-z_][a-zA-Z0-9_]*\\b&amp;quot;, expr );&lt;br /&gt;
   while (m.find()) {&lt;br /&gt;
      string var = m.group(0);&lt;br /&gt;
      if (vars contains var) {&lt;br /&gt;
         m.append_replacement(b, vars[var].to_string());&lt;br /&gt;
      }&lt;br /&gt;
      // could implement functions, pref access, etc. here&lt;br /&gt;
   }&lt;br /&gt;
   m.append_tail(b);&lt;br /&gt;
   return modifier_eval(b.to_string());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Everything below this line shows how to make use of eval().&lt;br /&gt;
# TESTING:&lt;br /&gt;
&lt;br /&gt;
float[string] v;&lt;br /&gt;
v[&amp;quot;pi&amp;quot;] = 3.14159265;&lt;br /&gt;
v[&amp;quot;ten&amp;quot;] = 10;&lt;br /&gt;
print(eval(&amp;quot;2+3&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;max(pi^ten,ten^pi)&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;sqrt(pi)*L&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;undefined/2&amp;quot;, v));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Math and Numbers]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6419</id>
		<title>Modifier eval</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6419"/>
		<updated>2013-06-07T01:14:50Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: &amp;quot;special&amp;quot; no longer true -- div-by-zero now throws an error instead of generating NaN (or possibly +/- infinity).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|modifier_eval}}{{&lt;br /&gt;
#vardefine:return_type|float}}{{&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|expression}}|&lt;br /&gt;
p1desc={{pspan|expression}} is a mathematical expression to be solved.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description= Evaluates an expression in the format used by variable modifiers:&lt;br /&gt;
&lt;br /&gt;
* No spaces are allowed within the expression, except as part of a zone/location name.&lt;br /&gt;
* + - * / ( ) have their usual mathematical meaning and precedence.&lt;br /&gt;
* ^ is exponentiation, with the highest precedence.&lt;br /&gt;
* Functions available: ceil(x) floor(x) sqrt(x) min(x,y) max(x,y)&lt;br /&gt;
* Location functions: loc(text) zone(text)&lt;br /&gt;
** These have a value of 1 if the current adventure location or zone contains the specified text, 0 elsewhere.&lt;br /&gt;
* Familiar function: fam(text)&lt;br /&gt;
** This has a value of 1 if the player&#039;s familiar type contains the text, else 0.&lt;br /&gt;
* Preferences function: pref(text)&lt;br /&gt;
** This must be used on preferences with a float value ONLY - merely retrieving an integer pref will corrupt it!&lt;br /&gt;
* There could be at most one of each text function in an expression.&lt;br /&gt;
** This is no longer the case however and multiple of the same text functions should now work properly.&lt;br /&gt;
* All upper-case letters are reserved for internally-used variables. The available variables are:&lt;br /&gt;
** A - number of Ascensions&lt;br /&gt;
** B - Blood of Wereseal effect&lt;br /&gt;
** C - Clancy&#039;s level&lt;br /&gt;
** D - Drunkenness&lt;br /&gt;
** E - active (nonintrinsic) Effects&lt;br /&gt;
** F - Fullness&lt;br /&gt;
** G - Grimace darkness (0..5)&lt;br /&gt;
** H - Hobo Power&lt;br /&gt;
** J - 1 on Festival of Jarlsberg, 0 otherwise&lt;br /&gt;
** L - player Level&lt;br /&gt;
** M - total Moonlight (0..9)&lt;br /&gt;
** R - Reagent potion duration&lt;br /&gt;
** S - Spleenness&lt;br /&gt;
** T - Turns remaining of this effect&lt;br /&gt;
** U - telescope Upgrades&lt;br /&gt;
** W - familiar Weight&lt;br /&gt;
** X - gender (-1=male, 1=female)&lt;br /&gt;
* This wrapper allows user-defined variables to be used as well, which must have names starting with a lower-case letter (or underscore) to distinguish them from built-in variables.  Variables are supplied as a float[string] map.&lt;br /&gt;
&amp;amp;nbsp;|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=This script expands modifier_eval() to include support for user-defined variables. It is extremely complex, but it is extremely useful to anyone who wants to use modifier_eval().|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float eval(string expr, float[string] vars) {&lt;br /&gt;
   buffer b;&lt;br /&gt;
   matcher m = create_matcher( &amp;quot;\\b[a-z_][a-zA-Z0-9_]*\\b&amp;quot;, expr );&lt;br /&gt;
   while (m.find()) {&lt;br /&gt;
      string var = m.group(0);&lt;br /&gt;
      if (vars contains var) {&lt;br /&gt;
         m.append_replacement(b, vars[var].to_string());&lt;br /&gt;
      }&lt;br /&gt;
      // could implement functions, pref access, etc. here&lt;br /&gt;
   }&lt;br /&gt;
   m.append_tail(b);&lt;br /&gt;
   return modifier_eval(b.to_string());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Everything below this line shows how to make use of eval().&lt;br /&gt;
# TESTING:&lt;br /&gt;
&lt;br /&gt;
float[string] v;&lt;br /&gt;
v[&amp;quot;pi&amp;quot;] = 3.14159265;&lt;br /&gt;
v[&amp;quot;ten&amp;quot;] = 10;&lt;br /&gt;
print(eval(&amp;quot;2+3&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;max(pi^ten,ten^pi)&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;sqrt(pi)*L&amp;quot;, v));&lt;br /&gt;
print(eval(&amp;quot;undefined/2&amp;quot;, v));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Math and Numbers]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Have_effect&amp;diff=4327</id>
		<title>Have effect</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Have_effect&amp;diff=4327"/>
		<updated>2013-05-07T04:01:19Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Basis for RFI no longer valid, apparently.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|have_effect}}{{&lt;br /&gt;
#vardefine:return_type|int}}{{&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|effect|have_effect}}|&lt;br /&gt;
p1desc={{pspan|have_effect}} is an effect to check for|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns the number of turns for which you currently {{pspan|have_effect}}. Returns 0 if you do not have any turns of {{pspan|have_effect}}. If the effect is an intrinsic that you currently have, this function returns 2147483547 (which is 100 less than a signed integer&#039;s upper limit).|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=The following casts Disco Aerobics if you have less than 10 turns Disco State of Mind &amp;amp; have the skill.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
//This would normally be better handled with a mood, and is for illustration only&lt;br /&gt;
if ((have_effect($effect[Disco State of Mind]) &amp;lt; 10) &amp;amp;&amp;amp; have_skill($skill[Disco Aerobics]))&lt;br /&gt;
   use_skill(1 , $skill[Disco Aerobics]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|have_skill|use_skill}}|&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;effects&amp;quot; gives information on all of your current effect durations.|&lt;br /&gt;
special=Note that in KoL, having an effect from both an intrinsic and turn-limited source will only report the intrinsic (infinite) duration while active, and as such this function will return 2147483647 (Java&#039;s Integer.MAX_VALUE) when you are under an effect from both types of sources.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Skills and Effects]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2584</id>
		<title>Ash Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Ash_Functions&amp;diff=2584"/>
		<updated>2013-05-07T03:45:55Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Update list of ASH functions. Also, a few minor corrections.&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|{{opt|boolean}}}}&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;
{{Flink|boolean|buy|coinmaster|int|item}}&lt;br /&gt;
{{Flink|int|buy_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|buys_item|coinmaster|item}}&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|boolean|canadia_available}}&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|{{opt|string}}}}&lt;br /&gt;
{{Flink|void|chat_macro|string}}&lt;br /&gt;
{{Flink|void|chat_notify|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|int|combat_mana_cost_modifier}}&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|boolean|dispensary_available}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item}}&lt;br /&gt;
&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|boolean|empty_closet}}&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|{{opt|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|string [string]|form_fields}}&lt;br /&gt;
{{Flink|string|format_date_time|string|string|string}}&lt;br /&gt;
{{Flink|boolean|friars_available}}&lt;br /&gt;
{{Flink|int|fullness_limit}}&lt;br /&gt;
&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|gametime_to_int}}&lt;br /&gt;
{{Flink|int|get_auto_attack}}&lt;br /&gt;
{{Flink|int [item]|get_campground}}&lt;br /&gt;
{{Flink|string|get_ccs_action|int}}&lt;br /&gt;
{{Flink|int|get_clan_id}}&lt;br /&gt;
{{Flink|string|get_clan_name}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int}}&lt;br /&gt;
{{Flink|string [int]|get_custom_outfits}}&lt;br /&gt;
{{Flink|item|get_dwelling|}}&lt;br /&gt;
{{Flink|string [int]|get_goals}}&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|string [int]|get_moods}}&lt;br /&gt;
{{Flink|string [int]|get_outfits}}&lt;br /&gt;
{{Flink|string|get_path}}&lt;br /&gt;
{{Flink|string|get_path_full}}&lt;br /&gt;
{{Flink|string|get_path_variables}}&lt;br /&gt;
{{Flink|string|get_player_id|string}}&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|int [item]|get_shop}}&lt;br /&gt;
{{Flink|string|get_version}}&lt;br /&gt;
{{flink|boolean|gnomads_available}}&lt;br /&gt;
{{flink|boolean|goal_exists|string}}&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|hidden_temple_unlocked}}&lt;br /&gt;
{{Flink|boolean|hippy_stone_broken}}&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;
&lt;br /&gt;
===i===&lt;br /&gt;
{{Flink|monster|image_to_monster|strict_string}}&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|string|inaccessible_reason|coinmaster|}}&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_accessible|coinmaster}}&lt;br /&gt;
{{Flink|boolean|is_coinmaster_item|item}}&lt;br /&gt;
{{Flink|boolean|is_discardable|item}}&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|boolean|is_trendy|any}}&lt;br /&gt;
{{Flink|boolean|is_wearing_outfit|string}}&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;
&lt;br /&gt;
===k===&lt;br /&gt;
{{flink|boolean|knoll_available}}&lt;br /&gt;
===l===&lt;br /&gt;
{{Flink|int|last_index_of|string|string|{{opt|int}}}}&lt;br /&gt;
{{Flink|string|last_item_message}}&lt;br /&gt;
{{Flink|monster|last_monster}}&lt;br /&gt;
{{Flink|string|last_skill_message}}&lt;br /&gt;
{{Flink|int|length|string}}&lt;br /&gt;
{{Flink|buffer|load_html|string}}&lt;br /&gt;
{{Flink|void|lock_familiar_equipment|boolean}}&lt;br /&gt;
{{Flink|void|logprint|string}}&lt;br /&gt;
===m===&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean}}&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|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|float|max|float|float}}&lt;br /&gt;
{{Flink|int|max|int|int}}&lt;br /&gt;
{{Flink|boolean|maximize|string|boolean}}&lt;br /&gt;
{{Flink|boolean|maximize|string|int|int|boolean}}&lt;br /&gt;
{{Flink|record [int]|maximize|string|int|int|boolean|boolean}}&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|item|minstrel_instrument}}&lt;br /&gt;
{{Flink|int|minstrel_level}}&lt;br /&gt;
{{Flink|boolean|minstrel_quest}}&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|string}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}}}&lt;br /&gt;
{{Flink|int|monster_level_adjustment}}&lt;br /&gt;
{{Flink|phylum|monster_phylum|{{opt|monster}}}}&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|string|my_companion}}&lt;br /&gt;
{{Flink|int|my_daycount|}}&lt;br /&gt;
{{Flink|familiar|my_effective_familiar}}&lt;br /&gt;
{{Flink|int [effect]|my_effects}}&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|string|my_path}}&lt;br /&gt;
{{Flink|stat|my_primestat}}&lt;br /&gt;
{{flink|string|my_sign}}&lt;br /&gt;
{{Flink|int|my_spleen_use}}&lt;br /&gt;
{{Flink|int|my_turncount}}&lt;br /&gt;
&lt;br /&gt;
===n===&lt;br /&gt;
{{Flink|float|now_to_string|string}}&lt;br /&gt;
{{Flink|int|npc_price|item}}&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;
&lt;br /&gt;
===o===&lt;br /&gt;
{{Flink|boolean|outfit|string}}&lt;br /&gt;
{{Flink|item [int]|outfit_pieces|string}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
&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;
{{Flink|int|pvp_attacks_left}}&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|void|remove_item_condition|int|item}}&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;
&lt;br /&gt;
===s===&lt;br /&gt;
{{Flink|boolean|sell|coinmaster|int|item}}&lt;br /&gt;
{{Flink|int|sell_price|coinmaster|item}}&lt;br /&gt;
{{Flink|boolean|sells_item|coinmaster|item}}&lt;br /&gt;
{{Flink|string [int]|session_logs|{{opt|string}}|int}}&lt;br /&gt;
{{Flink|void|set_auto_attack|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_shop|item|{{opt|boolean}}}}&lt;br /&gt;
{{Flink|boolean|take_stash|int|item}}&lt;br /&gt;
{{Flink|boolean|take_storage|int|item}}&lt;br /&gt;
{{Flink|int|tavern|{{opt|string}}}}&lt;br /&gt;
{{Flink|buffer|throw_item|item}}&lt;br /&gt;
{{Flink|buffer|throw_items|item|item}}&lt;br /&gt;
{{Flink|buffer|time_to_string}}&lt;br /&gt;
{{Flink|boolean|to_boolean|any}}&lt;br /&gt;
{{Flink|class|to_class|string}}&lt;br /&gt;
{{Flink|coinmaster|to_coinmaster|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|string|to_json|null}}&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|phylum|to_phylum|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;
{{Flink|boolean|user_confirm|string|int|boolean}}&lt;br /&gt;
&lt;br /&gt;
===v===&lt;br /&gt;
{{Flink|boolean|visit|coinmaster}}&lt;br /&gt;
{{Flink|buffer|visit_url|string}}&lt;br /&gt;
{{Flink|buffer|visit_url|string|boolean}}&lt;br /&gt;
{{Flink|buffer|visit_url|string|boolean|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 [string]|who_clan}}&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>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Can_equip&amp;diff=4965</id>
		<title>Can equip</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Can_equip&amp;diff=4965"/>
		<updated>2012-08-25T19:43:03Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Update can_equip to account for various updates to kolmafia.session.EquipmentManager.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|can_equip}}{{&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|item|check_me}}|&lt;br /&gt;
p1desc={{Pspan|check_me}} is the item to check|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns true if, based on your current stats, you are capable of equipping {{pspan|check_me}} on your character, false if you cannot. Note that this function doesn&#039;t check for whether or not you actually have the item; just whether you&#039;re capable of equipping it. |&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Check to see if the character can equip a Hippo Poncho.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if(!have_skill($skill[torso awaregness]))&lt;br /&gt;
   print(&amp;quot;Cannot equip a shirt if you don&#039;t know how to find your own torso!&amp;quot;);&lt;br /&gt;
if(can_equip($item[hippo poncho]))&lt;br /&gt;
   print(&amp;quot;You&#039;re sexy enough to wear a hippo poncho.&amp;quot;, &amp;quot;green&amp;quot;);&lt;br /&gt;
else print(&amp;quot;You&#039;re not sexy enough to wear a hippo poncho.&amp;quot;, &amp;quot;red&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|have_equipped}}|&lt;br /&gt;
special= Note that this, for the most part, only checks for stat requirements to equip an item, so, for example, checking for a chefstaff will return true if you meet the stat requirements to equip it, even if you don&#039;t have Spirit of Rigatoni or a sauce glove. However, Torso Awareness is checked if applicable, as are ascension restrictions and, to some extent, familiar type.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Equipment]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Can_equip&amp;diff=4998</id>
		<title>Talk:Can equip</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Can_equip&amp;diff=4998"/>
		<updated>2012-08-25T19:34:14Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Torso now valid for can_equip()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(moved) by --[[User:StDoodle|StDoodle]] 18:08, 6 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Correct. Torso isn&#039;t taken into account, either. This may be a bug. --Heeheehee 17:46, 6 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
From glancing at Mafia&#039;s code, it checks if you are in hardcore and if the item cannot be equipped in hardcore, then it simply checks you stats against the stat requirement. [[User:Slyz|Slyz]] 17:05, 3 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
As of some time ago, evidently the code now checks for correct familiar type, Torso, Fistcore, and Axecore. However, it doesn&#039;t look like it takes hand/hatrack/scarecrow into account. --[[User:Heeheehee|Heeheehee]] 15:34, 25 August 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3200</id>
		<title>Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3200"/>
		<updated>2011-04-17T23:08:43Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Answered the RFI: added comments about iteration. Also added stuff about arrays in ASH and time/space considerations.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
KoLmafia supports complex data structures such as maps and records made from simple [[Data Types|data types]].&lt;br /&gt;
&lt;br /&gt;
== Maps ==&lt;br /&gt;
Most of this information was copied directly from ASH Maps Tutorial, by Veracity (http://kolmafia.sourceforge.net/advanced.html#maps)&lt;br /&gt;
&lt;br /&gt;
A map is indexed by one data type (the key) and associates that key with another (or the same) data type (the value). The key can be any ASH simple data type: boolean, int, float, string, item, location, class, stat, skill, effect, familiar, slot, or monster. The value can be any ASH data type at all: a simple type, a record, or can be another map. This effectively allows multi-dimensional maps and. In fact, that&#039;s how the syntax we provide for multi-dimensional maps actually operate: maps of maps of maps ...&lt;br /&gt;
&lt;br /&gt;
You can declare a map any time you can declare a variable: as a top level (global) variable, as a function parameter, or as a local variable in any scope.&lt;br /&gt;
&lt;br /&gt;
You can fetch data from a map any time you can provide a data value: in an expression, as a function parameter, on the right side of an assignment statement, from a &amp;quot;return&amp;quot; statement, as so on. You can pass around entire maps, individual elements, or intermediate maps: &amp;quot;slices&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Declarations ===&lt;br /&gt;
&lt;br /&gt;
The syntax for declaring the data type of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;data type&amp;gt; [ &amp;lt;key type&amp;gt;, ... ] &amp;lt;aggregate_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [item] map1;&lt;br /&gt;
float [class, string, int] another_map;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Assignments ===&lt;br /&gt;
&lt;br /&gt;
If you use a map on the left side of an assignment, you set the whole map at once to the new value.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
int [item] new_pricelist;&lt;br /&gt;
&lt;br /&gt;
/* Some code that updates new_pricelist */&lt;br /&gt;
&lt;br /&gt;
my_pricelist = new_pricelist;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a complete set of indices (of the correct types) on the left side of an assignment statement, you set a single element.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
my_pricelist[ $item[ pail ] ] = 1000;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a prefix of indices (of the correct type), you directly set one of the intermediate maps, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float [string, int, string] my_map;&lt;br /&gt;
float [int, string] slice1;&lt;br /&gt;
&lt;br /&gt;
/* Some code that fills slice1 */&lt;br /&gt;
my_map[ &amp;quot;slice1&amp;quot; ] = slice1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
The syntax for referencing an element (or slice) of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate name&amp;gt;[ &amp;lt;key expression&amp;gt;, ... ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the key expressions will be evaluated at run time. If you specify all the keys the map expects, you fetch data of the type specified by the map. If you specify fewer keys than the map expects, you get an intermediate map, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [string, string] props; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
might be used to hold &amp;quot;properties&amp;quot; associated with names.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;pet&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;mammal&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;pet&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;mammal&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;pet&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;fun&amp;quot; ] = true; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
references:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot;] =&amp;gt; true&lt;br /&gt;
boolean [string] animal = props[ &amp;quot;turtle&amp;quot; ];&lt;br /&gt;
animal[ &amp;quot;fun&amp;quot; ] =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&lt;br /&gt;
You can test the presence of a key in a map using the &amp;quot;contains&amp;quot; operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate reference expression&amp;gt; contains &amp;lt;key expression&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;aggregate reference expression&amp;gt; must evaluate at run time to a map or slice, and must evaluate at run time to a key of the appropriate type. (Note that that is enforced at parse time; ASH can tell the datatype any expression will produce).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props contains &amp;quot;dog&amp;quot; =&amp;gt; true&lt;br /&gt;
props contains &amp;quot;elephant&amp;quot; =&amp;gt; false&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot; ] contains &amp;quot;fun&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;pet&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;favorite food&amp;quot; =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove ===&lt;br /&gt;
&lt;br /&gt;
You can remove a key-value association from a map using the &amp;quot;remove&amp;quot; unary operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
remove &amp;lt;aggregate reference&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clarification, an aggregate reference is &amp;quot;&amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n&amp;gt; ]&amp;quot; where &amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n-1&amp;gt; ] specifies the &amp;quot;slice&amp;quot; and &amp;lt;index n&amp;gt; specifies the &amp;quot;key&amp;quot;. Which is just what you expect, if you fully specify the indices; for a single dimensional map, &amp;quot;map[10]&amp;quot; -&amp;gt; &amp;quot;map&amp;quot; is the slice and 10 is the key. The &amp;quot;remove&amp;quot; operator removes the &amp;quot;key&amp;quot; from the &amp;quot;slice&amp;quot;. For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [int] map1;&lt;br /&gt;
map1[5] = &amp;quot;foo&amp;quot;;&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot; + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot;  + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
int [string, string] map2;&lt;br /&gt;
map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] = 17;&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1 true foo&lt;br /&gt;
remove: foo&lt;br /&gt;
0 false&lt;br /&gt;
remove:&lt;br /&gt;
1 true 17&lt;br /&gt;
remove: 17&lt;br /&gt;
0 false 0&lt;br /&gt;
remove: 0&lt;br /&gt;
1 aggregate int [string]&lt;br /&gt;
remove: aggregate int [string]&lt;br /&gt;
0 aggregate int [string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clear ===&lt;br /&gt;
&lt;br /&gt;
You can remove all &amp;lt;code&amp;gt;key =&amp;gt; value&amp;lt;/code&amp;gt; entries from a map using the {{f|clear}} function:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;clear( &amp;lt;aggregate&amp;gt; );&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Sort ===&lt;br /&gt;
&lt;br /&gt;
From http://kolmafia.us/showthread.php?t=1738&lt;br /&gt;
&lt;br /&gt;
The syntax is:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;sort aggregate by keyExpr;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&amp;lt;code&amp;gt;aggregate&amp;lt;/code&amp;gt; is a reference to the object to be sorted - arrays are probably the most useful things to sort, but any mapping type can be used (even multidimensional maps, but note that you can only sort along a single dimension at a time). The reference must not be enclosed in parentheses, as that would look like a call to a function named &amp;lt;code&amp;gt;sort()&amp;lt;/code&amp;gt; - which is still perfectly valid, &amp;quot;sort&amp;quot; has not become a [[Reserved Words|reserved word]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is an arbitrary expression that defines how the items should be ordered. It is evaluated once for every entry in the aggregate, in a scope with two additional variables implicitly defined: &#039;&amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt;&#039; and &#039;&amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;&#039;, holding the details of that entry. The value of the &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is used as the sort key; typically it would be an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;, but can be any ASH type that can be compared via &amp;quot;&amp;lt;&amp;quot; and the other relational operators.&lt;br /&gt;
&lt;br /&gt;
The most basic form of sorting would therefore be &amp;quot;&amp;lt;code&amp;gt;sort ... by value&amp;lt;/code&amp;gt;&amp;quot;, but many useful things can be done with the use of a more complex &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; - the only real restriction is that the expression should not modify the object you&#039;re sorting. For example, if you had an array of items, you could sort it &amp;quot;&amp;lt;code&amp;gt;by autosell_price(value)&amp;lt;/code&amp;gt;&amp;quot;. An array of weapon items could be sorted &amp;quot;&amp;lt;code&amp;gt;by -get_power(value)&amp;lt;/code&amp;gt;&amp;quot; to put it in decreasing order of power. If the elements of your aggregate are records, you&#039;d need to use something like &amp;quot;&amp;lt;code&amp;gt;by value.fieldName&amp;lt;/code&amp;gt;&amp;quot;, since the records themselves can&#039;t be meaningfully compared.&lt;br /&gt;
&lt;br /&gt;
After the sort statement, the aggregate will have exactly the same sets of keys and values as before (even if the keys weren&#039;t consecutive), and the iteration order of the keys will be the same, but the values will likely be associated with different keys. The sort is stable - in other words, elements with sort keys that compare as equal will remain in the same order. This means that you can sort on multiple criteria by simply performing separate sorts for each of the criteria, in increasing order of significance.&lt;br /&gt;
&lt;br /&gt;
A few more examples of things you can do:&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -value&amp;lt;/code&amp;gt;&amp;quot; sorts integers in decreasing order (there&#039;s no similar trick for &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; values).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -index&amp;lt;/code&amp;gt;&amp;quot; reverses the existing order of an array (or map with integer keys).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by random(1000000)&amp;lt;/code&amp;gt;&amp;quot; shuffles into a random order.&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by otherArray[index]&amp;lt;/code&amp;gt;&amp;quot; uses values from a parallel array as the sort keys (you&#039;d then need to do &amp;quot;&amp;lt;code&amp;gt;sort otherArray by value;&amp;lt;/code&amp;gt;&amp;quot; if you wanted the two arrays to remain in sync).&lt;br /&gt;
&lt;br /&gt;
===Iteration===&lt;br /&gt;
To iterate through a map, use the &#039;&#039;&#039;foreach&#039;&#039;&#039; operator. For instance, if you wanted to print out how many of each item you had, you could do something like the following:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item] map = get_inventory();&lt;br /&gt;
foreach key in map {&lt;br /&gt;
    print(key + &amp;quot; (&amp;quot; + map[key] + &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Multidimensional maps are implemented as maps that map keys to maps. &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is really a mapping of items to int[string] maps. Iteration, therefore, is as follows:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
file_to_map(&amp;quot;somefile.txt&amp;quot;, map);&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    print(k1 + &amp;quot;: &amp;quot;);&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        print(&amp;quot;\t&amp;quot; + k2 + &amp;quot;: &amp;quot; + map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Two things to note: First, &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is equivalent to &#039;&#039;&#039;int[item, string]map&#039;&#039;&#039;. This really comes down to author preference, although the second form is generally more common. Second, the two following foreach loops are equivalent:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        func(map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
foreach k1, k2 in map {&lt;br /&gt;
    func(map[k1][k2]);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Of course, the latter does not lend itself to, say, only printing the first key once, whereas the former can be used that way (see the preceding example).&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
Maps in ASH are implemented internally as TreeMaps [http://download.oracle.com/javase/1.5.0/docs/api/java/util/TreeMap.html]. See below for some implications.&lt;br /&gt;
&lt;br /&gt;
== Arrays ==&lt;br /&gt;
These look and behave like mappings of integers to values, where the keys only take values from 0 to n, but these are implemented as Java Arrays.&lt;br /&gt;
&lt;br /&gt;
===Differences between arrays and maps===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [12] array;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use keys 0 - 11. You get a runtime error if you use any other key. It always uses memory to hold 12 items, even if you only use a couple of them. But it&#039;s a constant time - O(1) - to access any element.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [int] map;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use any int as a key. It has constant memory for the Java map, and additional memory for each element in the map, but is O( log n) to access any particular element.&lt;br /&gt;
&lt;br /&gt;
If you are able to use (a fairly densely packed set of) integers as keys, your program will be faster and use (potentially) slightly more memory.&lt;br /&gt;
&lt;br /&gt;
If you have a sparse set of integers, you can still use an array and get fast access, but you will waste a lot of memory.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t use integers as keys or don&#039;t want to waste memory on a sparse array, you can have a slower but less memory consuming map.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48703&amp;amp;viewfull=1#post48703]&lt;br /&gt;
&lt;br /&gt;
====Time considerations====&lt;br /&gt;
* Given &#039;&#039;&#039;if (a == item1 || a == item2 || a == item3)&#039;&#039;&#039; and &#039;&#039;&#039;if ($items[item1, item2, item3] contains a)&#039;&#039;&#039;, which is faster?&lt;br /&gt;
&lt;br /&gt;
This is going to depend on the number of items in the list, and which one happens to match; if &#039;a&#039; is almost always item1, then the first form is likely to win on practical grounds, even though it&#039;s theoretically slower (O(n) vs. O(log n)).&lt;br /&gt;
&lt;br /&gt;
The second form is a definite win assuming no such coincidences of the item chosen, a somewhat larger set of items, and that the code is executed more than once per run of the script. The first lookup in a plural constant actually builds an internal map that allows such queries to be efficiently done; this is deferred because typical use of a plural constant involves only iteration, not lookups.&lt;br /&gt;
&lt;br /&gt;
There&#039;s always the &amp;quot;profile&amp;quot; command, if you really need to know which is more efficient in a given situation - although it&#039;s unlikely that either would have a noticeable effect on your script&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48728&amp;amp;viewfull=1#post48728]&lt;br /&gt;
&lt;br /&gt;
== Records ==&lt;br /&gt;
&lt;br /&gt;
(copy-pasted from Veracity&#039;s post introducing the record [http://kolmafia.us/showthread.php?t=280])&lt;br /&gt;
&lt;br /&gt;
Starting with SVN revision 1311 of KoLmafia, ASH now supports a new kind of structured data: the record. Here is a little example of how you declare a record and variables of the new type you&#039;ve created by doing so.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record my_type {&lt;br /&gt;
  	int ifield;&lt;br /&gt;
	string sfield;&lt;br /&gt;
	record {&lt;br /&gt;
		int first;&lt;br /&gt;
		int second;&lt;br /&gt;
	} rfield;&lt;br /&gt;
	int [int, int] mfield;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
my_type rvar;&lt;br /&gt;
my_type [int] mrvar;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
What I&#039;ve done with the above is declare a new data type which I&#039;ve named &amp;quot;my_type&amp;quot;. Having declared the new type, I can use it (almost) anywhere that I can use a built-in type name. I declared a variable, &amp;quot;rvar&amp;quot;, of that type, and I defined a map, &amp;quot;mrvar&amp;quot;, which maps keys of type integer to values of type my_type.&lt;br /&gt;
&lt;br /&gt;
The new type, &amp;quot;my_type&amp;quot; is a &amp;quot;composite&amp;quot; type. It contains four fields. &amp;quot;ifield&amp;quot; is an integer. &amp;quot;sfield&amp;quot; is a string. &amp;quot;rfield&amp;quot; is another composite field: an anonymous record containing two integers named &amp;quot;first&amp;quot; and &amp;quot;second&amp;quot;. Finally, &amp;quot;mfield&amp;quot; is a map from [int, int] to int.&lt;br /&gt;
&lt;br /&gt;
As you can see, a record can combine data of all the types ASH supports: primitive, aggregate, and composite.&lt;br /&gt;
&lt;br /&gt;
Having defined the new data type and several variables using it, here are some examples of how to access the fields.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
rvar.ifield = 10;&lt;br /&gt;
rvar.sfield = &amp;quot;secret&amp;quot;;&lt;br /&gt;
rvar.rfield.first = 1000;&lt;br /&gt;
rvar.rfield.second = 2000;&lt;br /&gt;
rvar.mfield[ 2, 3 ] = 12;&lt;br /&gt;
&lt;br /&gt;
mrvar[ 1 ] = rvar;&lt;br /&gt;
&lt;br /&gt;
foreach key in mrvar&lt;br /&gt;
	foreach key1, key2 in mrvar[key].mfield&lt;br /&gt;
		print( &amp;quot;val = &amp;quot; + mrvar[key].mfield[key1,key2] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, if you have a variable that is a record, you access the fields of the record by following the variable name with &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;. The resulting value will be of whatever type you declared in the definition of the record. If the value is a map, you can give a list of keys within [], just like any other map. If the value is another record, you can access the fields of the nested record by using another &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with Pascal &amp;quot;records&amp;quot; or C/C++ &amp;quot;structs&amp;quot;, this should all be comfortably familiar.&lt;br /&gt;
&lt;br /&gt;
Finally, if you create a map whose values is a record, the file_to_map and map_to_file built-in ASH functions will Do The Right Thing; they will efficiently and reliably save and restore your data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Get_related&amp;diff=3880</id>
		<title>Get related</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Get_related&amp;diff=3880"/>
		<updated>2011-04-07T17:04:03Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Missed one, Z.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|get_related}}{{&lt;br /&gt;
#vardefine:aggregate|yes}}{{&lt;br /&gt;
#vardefine:return_type|int [item]}}{{&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|item|doodad}}|&lt;br /&gt;
parameter2={{Param|string|type}}|&lt;br /&gt;
p1desc={{Pspan|doodad}} is the item to check.|&lt;br /&gt;
p2desc={{Pspan|type}} is one of &amp;quot;zap&amp;quot;, &amp;quot;fold&amp;quot;, or &amp;quot;pulverize&amp;quot;.&lt;br /&gt;
* &amp;quot;zap&amp;quot; returns the zap group that the item is part of.  The integer values in the map are meaningless in this case, and the item itself isn&#039;t included.&lt;br /&gt;
* &amp;quot;fold&amp;quot; returns the fold group that the item is part of.  The integer is the position in the fold sequence (1..N), and the item itself IS included, so you can determine its position.&lt;br /&gt;
* &amp;quot;pulverize&amp;quot; returns the average products of pulverizing one million of the given item. The scaling is needed to preserve accuracy for the elemental gems, which can be produced at rates as low as 1/1200.|}}|&lt;br /&gt;
function_description=Retrieves some variable-length internal data that isn&#039;t readily readable via [[file_to_map|file_to_map()]].|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Simple Example|&lt;br /&gt;
description=If you need black pepper, this will try to zap something into it.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if(item_amount($item[black pepper]) == 0)&lt;br /&gt;
   // Here&#039;s the function! This will loop over every item that can be zapped into black pepper.&lt;br /&gt;
   foreach thing in get_related($item[black pepper], &amp;quot;zap&amp;quot;)&lt;br /&gt;
      // It will now check if you have each thing that can zap into black pepper.&lt;br /&gt;
      if(item_amount(thing)&amp;gt; 0) {&lt;br /&gt;
         // zap the item and end the foreach loop.&lt;br /&gt;
         cli_execute(&amp;quot;zap &amp;quot;+thing);&lt;br /&gt;
         break;&lt;br /&gt;
      }&lt;br /&gt;
// Note: this simple example doesn&#039;t check your wand&#039;s state &amp;amp; is therefore not recommended for actual use.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
title=Zap for stab bats!|&lt;br /&gt;
description=This small program will try to zap something into a tiny plastic stab bat and send it to zarqon.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean stab_zap() {&lt;br /&gt;
   int starting_stabbies = item_amount($item[tiny plastic stab bat]);&lt;br /&gt;
   foreach doohicky in get_related($item[tiny plastic stab bat], &amp;quot;zap&amp;quot;)&lt;br /&gt;
      if(item_amount(doohicky) &amp;gt; 0) {&lt;br /&gt;
         cli_execute(&amp;quot;zap &amp;quot;+doohicky);&lt;br /&gt;
         return item_amount($item[tiny plastic stab bat]) &amp;gt; starting_stabbies;&lt;br /&gt;
      }&lt;br /&gt;
   return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main() {&lt;br /&gt;
   if(stab_zap()) {&lt;br /&gt;
      cli_execute(&amp;quot;send 1 tiny plastic stab bat to zarqon | Something for your awesome bat collection!&amp;quot;);&lt;br /&gt;
      print(&amp;quot;Sent a tiny plastic stab bat to zarqon.&amp;quot;, &amp;quot;blue&amp;quot;);&lt;br /&gt;
   } else&lt;br /&gt;
      print(&amp;quot;Couldn&#039;t get a new tiny plastic stab bat today.&amp;quot;, &amp;quot;olive&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
title=Pulverization|&lt;br /&gt;
description=This function will detect if a pulverization has any affect on an item.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean is_pulverizable(item it) {&lt;br /&gt;
   int [item] pulvy = get_related(it, &amp;quot;pulverize&amp;quot;);&lt;br /&gt;
   if(pulvy contains $item[useless powder])&lt;br /&gt;
      return false; // Let&#039;s not count useless powder...&lt;br /&gt;
   if(count(pulvy) &amp;gt; 0)&lt;br /&gt;
      return true;  // Yay! Something useful!&lt;br /&gt;
   // Powders and nuggets can be pulverized also!&lt;br /&gt;
   if(it.to_int() &amp;gt;= 1438 &amp;amp;&amp;amp; it.to_int() &amp;lt;=1449)&lt;br /&gt;
      return true;&lt;br /&gt;
   switch(it) {&lt;br /&gt;
   case $item[sewer nugget]:&lt;br /&gt;
   case $item[floaty pebbles]: &lt;br /&gt;
   case $item[floaty gravel]:&lt;br /&gt;
      // These things can be turned into wads!&lt;br /&gt;
      return true;&lt;br /&gt;
   }&lt;br /&gt;
   return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|file_to_map}}|&lt;br /&gt;
special=Specifying anything other than &amp;quot;zap&amp;quot;, &amp;quot;fold&amp;quot;, or &amp;quot;pulverize&amp;quot; for the second parameter will return an empty map.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Item Management]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:CLI_Reference&amp;diff=6308</id>
		<title>Talk:CLI Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:CLI_Reference&amp;diff=6308"/>
		<updated>2011-04-03T21:19:54Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Remark */ provided link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;should we add that Csend will add make it&#039;s own message to the recipient if it is not given?--[[User:Icon315|Icon315]] 21:47, 21 April 2010 (UTC)&lt;br /&gt;
:That&#039;s the kind of detail that should go on it&#039;s own page if the command is important enough to get its own page. --[[User:Bale|Bale]] 01:03, 22 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I agree with Bale. My thoughts so far on CLI commands;&lt;br /&gt;
* Obvious stuff that anyone can figure out by looking at this table doesn&#039;t warrant it&#039;s own page.&lt;br /&gt;
* Stuff that behaves &#039;&#039;exactly&#039;&#039; the same as an ASH command should probably say so and link to the function page&lt;br /&gt;
** If it isn&#039;t &#039;&#039;exactly&#039;&#039; the same, but close enough that a line or two of explanation will clarify the difference, still link to the function but edit the function&#039;s CLI section to explain the difference.&lt;br /&gt;
** Said functions don&#039;t need their own pages&lt;br /&gt;
* Stuff that has a similar or identically named ASH function, but behaves &#039;&#039;significantly&#039;&#039; differently on the CLI, should have it&#039;s own page (with the command as a link).&lt;br /&gt;
** If the command names are the same, the cli command should be &amp;quot;command (CLI)&amp;quot; (ie &amp;quot;eat (CLI)&amp;quot;, if eat needed its own page)&lt;br /&gt;
** If the command has no ASH function with the same name, the &amp;quot;(CLI)&amp;quot; part can be omitted (we can always move a page later if an ASH equiv. is added)&lt;br /&gt;
* Create page names with alphanumeric characters when at all possible. Ie don&#039;t use &amp;quot;!&amp;quot; but rather &amp;quot;bang&amp;quot;&lt;br /&gt;
&lt;br /&gt;
All additional thoughts on this are welcome. --[[User:StDoodle|StDoodle (#1059825)]] 03:17, 22 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: My thought is that you&#039;ve covered everything perfectly. This should be our bible for CLI pages. --[[User:Bale|Bale]] 03:38, 22 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Bale recently explained a limitation with the acquire command that I was previously unaware of in [http://kolmafia.us/showthread.php?4575 this thread]. Perhaps acquire needs it&#039;s own page to account for this information? --[[User:That FN Ninja|That FN Ninja]] 16:10, 15 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* This is not a CLI issue. The exact same issue affects {{f|retrieve_item}}. It should probably be mentioned on that page. --[[User:Bale|Bale]] 20:37, 15 July 2010 (UTC)&lt;br /&gt;
 &lt;br /&gt;
==FYI==&lt;br /&gt;
&lt;br /&gt;
You can&#039;t simply copypasta stuff into these wiki tables; remember, the pipe character (&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;) is treated special in templates! Use &amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt; instead, or &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&#039;&#039;Stuff&#039;&#039;&amp;lt;nowiki&amp;gt;&amp;lt;/&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; tags. (P.S. You should see the source for this fyi...) This, by the way, is the reason a lot of parameter options appear to be missing. --[[User:StDoodle|StDoodle (#1059825)]] 03:26, 22 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Ugh, what a mess. Sometimes, &amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt; results in a &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt; tag or something inside of wiki tables. On the other hand, similar FUBARS happen when using &amp;lt;nowiki&amp;gt;&amp;amp;amp;#124;&amp;lt;/nowiki&amp;gt; &#039;&#039;outside&#039;&#039; of tables on a wiki. Long story short; inside of a table, use &amp;lt;nowiki&amp;gt;&amp;amp;amp;#124;&amp;lt;/nowiki&amp;gt; for &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; and outside of a table use &amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;. Messy enough for you? --[[User:StDoodle|StDoodle (#1059825)]] 03:59, 2 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Remark==&lt;br /&gt;
&lt;br /&gt;
While used intrinsically in the ASH examples, it seems that nowhere is it stated explicitly that to remark a line in either a CLI or ASH script to preface it with // [[User:Stanley|Stanley]] 14:28, 3 April 2011 (UTC)&lt;br /&gt;
:: [[Comments|Seriously? (this is a link. Click it!)]] --[[User:Heeheehee|Heeheehee]] 21:19, 3 April 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=User_talk:Bale&amp;diff=4344</id>
		<title>User talk:Bale</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=User_talk:Bale&amp;diff=4344"/>
		<updated>2011-03-04T06:00:41Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bale;&lt;br /&gt;
&lt;br /&gt;
Sorry, I was called away &amp;amp; didn&#039;t get back till you were gone, so I thought I&#039;d answer your questions here before I lost &#039;em.&lt;br /&gt;
&lt;br /&gt;
RE: Consult Scripts. How many rounds does the consult script act for? Does a consult script keep running until combat is over? Just for rounds it&#039;s specifically called? I totally don&#039;t understand how that works...&lt;br /&gt;
&lt;br /&gt;
RE: appearance_rates() &amp;amp; ultra-rares; when using said function on the treasury, it returned -42.5 for that UR monster. It just seems a point worth mentioning, in case anyone wants to parse UR availability by location; wouldn&#039;t want them to assume a STATIC negative number.&lt;br /&gt;
&lt;br /&gt;
Thanks, --[[User:StDoodle|StDoodle]] 23:52, 4 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
I&#039;ve updated the front page (again); it now includes a link to [[Help:Editing]], where I will try to keep all relevant information on what needs work on the wiki. --[[User:StDoodle|StDoodle]] 13:32, 4 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nice job on [[Custom Combat Script]]! I fixed two minor typos, but otherwise it looks great. There are a few things I&#039;d like to flesh out eventually, such as formatting (make sure to have a space on each side of monster / location name), mention that locations are acceptable, how to specify 2nd funksling item, etc. But most of that is &amp;quot;Regular Mafia&amp;quot; stuff, which, while I intend to get to, is after ash on my to-do list.&lt;br /&gt;
&lt;br /&gt;
For now, I&#039;m &#039;&#039;trying&#039;&#039; to keep up with tagging articles that need specific help, so keep an eye on:&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[:Category:Request_For_Information]]&lt;br /&gt;
* [[:Category:Needs_Code_Sample]]&lt;br /&gt;
if you want to know where I need the most help.&lt;br /&gt;
&lt;br /&gt;
Also, I want to eventually redo a lot of the regular-mafia stuff as well. I think it deserves its own section similar to &amp;quot;Quick Links for ASH Scripters&amp;quot; on the main page, with links to a page for each mafia tab / window. For page naming, I&#039;d like to go with &amp;quot;Adventuring Tab,&amp;quot; &amp;quot;Graphical CLI Tab,&amp;quot; etc. to avoid any collision with function names. I imagine that a lot of the info on these pages will either be stolen from, or added in by Sally.&lt;br /&gt;
&lt;br /&gt;
While in general this is a lower priority from my POV, I&#039;d like to get the pages set up so that others can work on them.&lt;br /&gt;
&lt;br /&gt;
If you want to tackle something more ASH-related, one thing that bugs me is the rather arbitrary (and in many cases outdated) categorization of ASH functions. If you&#039;d like to go through the list &amp;amp; break them up more sensibly, that would be much appreciated!&lt;br /&gt;
&lt;br /&gt;
Thanks! --[[User:StDoodle|StDoodle]] 14:56, 3 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
As you may have noticed me mentioning on the forum, I&#039;ve given you admin powers. Mostly, this makes it easier to quickly revert undesired changes, and to protect pages if needed. But also! you should no longer see nearly as many captcha&#039;s &amp;amp; such. --[[User:StDoodle|StDoodle (#1059825)]] 07:41, 22 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Regarding wiki-style lists (using * for bullet points): I generally find it easier to just add a non-breaking space (&amp;amp;amp;nbsp;) on the line after the list rather than add in HTML (see the source of [[to_slot]] to see what I mean -- I can&#039;t really articulate these things too well) --[[User:Heeheehee|Heeheehee]] 06:10, 28 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
drive-by. :P --[[User:StDoodle|StDoodle (#1059825)]] 04:30, 7 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Is this the right place to respond to your message to me here? If not, my apologies. In any event, yes, apparently I did have an account here and couldn&#039;t remember my password and had to get a temporary one sent to me. I&#039;ll probably forget the password that I changed it to if I get logged out of this and will have to get another temp password. I&#039;m terrible like that lol. --[[User:Spiny Twizzler|Spiny Twizzler]] 04:49, 11 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
You are now a Bureaucrat as well as an Administrator. I think this means you can now edit user permissions, but I was never just an admin, so I&#039;m not sure. ;) Good luck! --[[User:StDoodle|StDoodle (#1059825)]] 07:30, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Pipes ===&lt;br /&gt;
&lt;br /&gt;
Just a quick heads up; the wiki automatically puts a pipe between each category, whether it&#039;s called directly on-page or from a template; putting a pipe in manually between categories means the pipe will show up &#039;&#039;after&#039;&#039; the categories on its own line. ;) --[[User:StDoodle|StDoodle (#1059825)]] 04:36, 1 March 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yeah, I know. That&#039;s a mistake I made a long time ago before I understood. Hadn&#039;t noticed it on this page also. Sadly we&#039;re still cleaning up after that long gone error since I did it on too many pages. :( --[[User:Bale|Bale]] 05:30, 1 March 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== Recent blocking ===&lt;br /&gt;
   21:43, 3 March 2011 Bale (Talk | contribs | block) blocked Zanmatoer (Talk | contribs) with an expiry time of 6 months (account creation disabled) ‎ (Spamming links to external sites) (unblock | change block)&lt;br /&gt;
&lt;br /&gt;
Was this accidental? As far as I can tell, that was a legitimate poster, so, uh, I guess I&#039;ll be unblocking him, unless you had some reason for doing so, in which case I&#039;ll reverse the unblocking. --[[User:Heeheehee|Heeheehee]] 06:00, 4 March 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Data_Types&amp;diff=6948</id>
		<title>Talk:Data Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Data_Types&amp;diff=6948"/>
		<updated>2011-02-20T08:51:25Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Re: rollback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Note=&lt;br /&gt;
&lt;br /&gt;
This page copied from the deletion-in-progress Datatype Constants discussion page.&lt;br /&gt;
&lt;br /&gt;
=Old Discussion=&lt;br /&gt;
&lt;br /&gt;
Yes, this page should be renamed &amp;amp; such. It&#039;s another artifact of the way things were when I started working on the wiki, that unfortunately became a &amp;quot;hub&amp;quot; of sorts without being properly changed. However, since HUNDREDS of pages link here, we really need to be a bit more careful before moving this page. It should probably be done by a mod (to avoid automatic redirect creation) AFTER various prerequisites are taken care of. --[[User:StDoodle|StDoodle (#1059825)]] 04:29, 21 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Thanks for clarification, and sorry about not discussing it first. --[[User:PhilmASTErpLus|PhilmASTErpLus]]&lt;br /&gt;
&lt;br /&gt;
Ugh. It&#039;s worse than I thought; when templates are nested, it takes a while for the &amp;quot;what links here&amp;quot; pages to get updated. I&#039;ve started the process of transitioning from &amp;quot;Datatype Constantes&amp;quot; to &amp;quot;Data Types,&amp;quot; but it may be a while before it&#039;s complete. Warning: please leave this project alone, I&#039;ve got a handle on it &amp;amp; don&#039;t want confilcts. Thanks. --[[User:StDoodle|StDoodle (#1059825)]] 04:52, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yeah, uh, finger slipped. Oops. (Undone now, don&#039;t worry about it.) --[[User:Heeheehee|Heeheehee]] 12:09, 22 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
It&#039;s all yours. Good luck with it. --[[User:Bale|Bale]] 05:17, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Gee that was fun (not). But I think it&#039;s done; KoLmafia wiki, now 50% less untechnically accurate! --[[User:StDoodle|StDoodle (#1059825)]] 05:38, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Call by value or call by reference? ==&lt;br /&gt;
&lt;br /&gt;
I actually wrote a simple script to see how it works. Apparently all the primitive data types are called by value when passed to a function, whereas maps and records are called by reference (with smart garbage collection!). I presume this is the same for substitution(&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;), and that buffers are called by reference, though I haven&#039;t tried either. Could someone high up there please verify this information before I add it? --[[User:PhilmASTErpLus|PhilmASTErpLus]] 07:14, 23 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
= Re: rollback =&lt;br /&gt;
&lt;br /&gt;
I&#039;m not using the very latest daily, I know, but on r9045 it DOESN&#039;T change the result if you JUST change the 2 to 2.0. I get 0.0 as my result. Can you double-check that this has changed? --[[User:StDoodle|StDoodle (#1059825)]] 03:34, 18 February 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
Er, edit to clarify; could someone verify that this is INTENDED, and thus safe advice, vs. just being a side-effect of some other change, and subject to revert to the behavior I&#039;m seeing. --[[User:StDoodle|StDoodle (#1059825)]] 03:36, 18 February 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
You&#039;re right. My bad. Of course the division happens before the multiplication so I&#039;m sure it was never supposed to work that way I suggested. Thanks for correcting me. :(  --[[User:Bale|Bale]] 05:52, 18 February 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
Y&#039;know, if you were to move the 2 to the front, and change it to a 2.0... Do we want to bother trying to explain this? --[[User:Heeheehee|Heeheehee]] 08:51, 20 February 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Reserved_Words&amp;diff=6267</id>
		<title>Reserved Words</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Reserved_Words&amp;diff=6267"/>
		<updated>2011-02-14T15:41:11Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Added try/finally, added link to relevant file in source code.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
Following is a list of words that are reserved for special usage by KoLmafia. They can not be used as variable or function names.&lt;br /&gt;
&lt;br /&gt;
They are listed by category for ease of reference; the category names are not reserved words, themselves (though using them as variables would be considered poor practice in most cases).&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
*&amp;quot;true&amp;quot;&lt;br /&gt;
*&amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
*&amp;quot;contains&amp;quot;&lt;br /&gt;
*&amp;quot;remove&amp;quot;&lt;br /&gt;
*&amp;quot;new&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Control flow==&lt;br /&gt;
*&amp;quot;if&amp;quot;&lt;br /&gt;
*&amp;quot;else&amp;quot;&lt;br /&gt;
*&amp;quot;foreach&amp;quot;&lt;br /&gt;
*&amp;quot;in&amp;quot;&lt;br /&gt;
*&amp;quot;for&amp;quot;&lt;br /&gt;
*&amp;quot;from&amp;quot;&lt;br /&gt;
*&amp;quot;upto&amp;quot;&lt;br /&gt;
*&amp;quot;downto&amp;quot;&lt;br /&gt;
*&amp;quot;by&amp;quot;&lt;br /&gt;
*&amp;quot;while&amp;quot;&lt;br /&gt;
*&amp;quot;repeat&amp;quot;&lt;br /&gt;
*&amp;quot;until&amp;quot;&lt;br /&gt;
*&amp;quot;break&amp;quot;&lt;br /&gt;
*&amp;quot;continue&amp;quot;&lt;br /&gt;
*&amp;quot;return&amp;quot;&lt;br /&gt;
*&amp;quot;exit&amp;quot;&lt;br /&gt;
*&amp;quot;switch&amp;quot;&lt;br /&gt;
*&amp;quot;case&amp;quot;&lt;br /&gt;
*&amp;quot;default&amp;quot;&lt;br /&gt;
*&amp;quot;try&amp;quot;&lt;br /&gt;
*&amp;quot;finally&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
*&amp;quot;void&amp;quot;&lt;br /&gt;
*&amp;quot;boolean&amp;quot;&lt;br /&gt;
*&amp;quot;int&amp;quot;&lt;br /&gt;
*&amp;quot;float&amp;quot;&lt;br /&gt;
*&amp;quot;string&amp;quot;&lt;br /&gt;
*&amp;quot;buffer&amp;quot;&lt;br /&gt;
*&amp;quot;matcher&amp;quot;&lt;br /&gt;
*&amp;quot;aggregate&amp;quot;&lt;br /&gt;
*&amp;quot;item&amp;quot;&lt;br /&gt;
*&amp;quot;location&amp;quot;&lt;br /&gt;
*&amp;quot;class&amp;quot;&lt;br /&gt;
*&amp;quot;stat&amp;quot;&lt;br /&gt;
*&amp;quot;skill&amp;quot;&lt;br /&gt;
*&amp;quot;effect&amp;quot;&lt;br /&gt;
*&amp;quot;familiar&amp;quot;&lt;br /&gt;
*&amp;quot;slot&amp;quot;&lt;br /&gt;
*&amp;quot;monster&amp;quot;&lt;br /&gt;
*&amp;quot;element&amp;quot;&lt;br /&gt;
*&amp;quot;record&amp;quot;&lt;br /&gt;
*&amp;quot;typedef&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==More Information==&lt;br /&gt;
[http://kolmafia.svn.sourceforge.net/viewvc/kolmafia/src/net/sourceforge/kolmafia/textui/Parser.java?view=markup This particular page] contains the most up-to-date version of this list around line 272.&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Operators&amp;diff=1879</id>
		<title>Operators</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Operators&amp;diff=1879"/>
		<updated>2011-01-20T18:36:07Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Bitwise Operators */ Fixed a few more formatting issues. This&amp;#039;ll next be updated when ^ starts meaning XOR in ASH.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Mathematical Operators==&lt;br /&gt;
&lt;br /&gt;
The following mathematical operators are used in KoLmafia:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| + |Addition|Performs addition and string concatenation}}}}&lt;br /&gt;
{{eztr|{{eztd| - |Subtraction|Performs subtraction}}}}&lt;br /&gt;
{{eztr|{{eztd| * |Multiplication|Performs multiplication}}}}&lt;br /&gt;
{{eztr|{{eztd| / |Division|Performs division}}}}&lt;br /&gt;
{{eztr|{{eztd| % |Modulo|Returns the remainder after division}}}}&lt;br /&gt;
{{eztr|{{eztd| ** |Exponent|Performs exponentiation}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that, with the exception of using &amp;lt;nowiki&amp;gt;&amp;quot;+&amp;quot;&amp;lt;/nowiki&amp;gt; for string concatenation, these operators can only be used on int or float datatypes.&lt;br /&gt;
&lt;br /&gt;
==Assignment Operators==&lt;br /&gt;
The following assignment operators are used in KoLmafia (let a = left operand, b = right operand):&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;+=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a + b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;-=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a - b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;*=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a * b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;/=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a / b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;%=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a % b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;**=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a ** b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
}}&lt;br /&gt;
Of these, only += and = are usable for strings.  See [[Operators#Mathematical Operators|Mathematical Operators]] for information regarding the basic Mathematical Operators.&lt;br /&gt;
&lt;br /&gt;
==Relational Operators==&lt;br /&gt;
&lt;br /&gt;
To follow these examples, a basic understanding of the concepts found on [[Control Structures]] would be helpful.&lt;br /&gt;
&lt;br /&gt;
In order to create more complex if statements, we need to understand the basic relational operators:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; |equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;!=&amp;lt;/nowiki&amp;gt; |not equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt; |less than}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt; |greater than}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;lt;=&amp;lt;/nowiki&amp;gt; |less than or equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |greater than or equal to}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that you cannot mix datatypes within a comparison or KoLmafia will abort with an error, with the exception of mixing types int and float, where KoLmafia will do a transparent type conversion behind-the-scenes. If you need to compare different datatypes, use one or more of the [[Datatype Conversions|Datatype Conversion]] functions. Also, == is case-insensitive with respect to strings.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true == true )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true == false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( 1 == 1.0 )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( 1 == 2 )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( &amp;quot;Hello&amp;quot; == &amp;quot;hello&amp;quot; )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
==Boolean Operators==&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;amp;&amp;amp;&amp;lt;/nowiki&amp;gt; |and}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; |or}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt; |not}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that the above operators only work with boolean values &amp;amp; datatypes. To make use of them with other datatypes, you will either need to first perform a [[Datatype Conversions|Datatype Conversion]], or you will need to nest your operations such that a boolean value is used with the boolean operators.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true &amp;amp;&amp;amp; true )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (both possibilities proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed (only one possibility proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true || false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (since at least one of the possibilities proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( ! false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (since the not operator converted false to true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
We also need to understand operator precedence. Statements inside a () pair are always evaluated first, then from left to right.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true || true &amp;amp;&amp;amp; false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
   // evaluated left-to-right&lt;br /&gt;
   // true or (true &amp;amp;&amp;amp; false) returns true&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; ( true &amp;amp;&amp;amp; false ) )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; false ) is evaluated first since it is inside of parentheses&lt;br /&gt;
   // so we end up evaluating ( true &amp;amp;&amp;amp; false ) which returns false&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; ! ( true &amp;amp;&amp;amp; false ) )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; false ) is evaluated first since it is inside of parentheses&lt;br /&gt;
   // the ! operator converts the false from ( true &amp;amp;&amp;amp; false ) to true&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; true ) returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Bitwise Operators==&lt;br /&gt;
&lt;br /&gt;
The following mathematical operators are used for operating on the bits of integers. The operands must be integers; no coercion is allowed:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;amp;&amp;lt;/nowiki&amp;gt; |and|a &amp;amp; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; |or|a &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| ~ |not|~a}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;&amp;lt; |left shift|a &amp;lt;&amp;lt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;gt;&amp;gt; |right shift|a &amp;gt;&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;amp;=&amp;lt;/nowiki&amp;gt; |and|&amp;lt;nowiki&amp;gt;a &amp;amp;= b --&amp;gt; a = a &amp;amp; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;|=&amp;lt;/nowiki&amp;gt; |or|&amp;lt;nowiki&amp;gt;a |= b --&amp;gt; a = a | b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;gt;&amp;gt;&amp;gt; |unsigned right shift|a &amp;gt;&amp;gt;&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |right shift|&amp;lt;nowiki&amp;gt;a &amp;gt;&amp;gt;= b --&amp;gt; a = a &amp;gt;&amp;gt; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |unsigned right shift|&amp;lt;nowiki&amp;gt;a &amp;gt;&amp;gt;&amp;gt;= b -&amp;gt; a = &amp;gt;&amp;gt;&amp;gt; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Help:Frequently_Asked_Questions&amp;diff=4473</id>
		<title>Help:Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Help:Frequently_Asked_Questions&amp;diff=4473"/>
		<updated>2011-01-20T00:34:01Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Interface */ Added info about Jason&amp;#039;s breakable equip fine-tuning script.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Running Mafia==&lt;br /&gt;
;What / where are daily builds?&lt;br /&gt;
:Daily builds are revisions of KoLMafia that are released for testing new features and/or bugfixes. They can be found at http://builds.kolmafia.us/. These builds adapt to changes in KoL faster than the official release and are often preferred for that reason.&lt;br /&gt;
;These daily builds are .jar files!  They don&#039;t run in my OS!&lt;br /&gt;
:Yes they do, [http://www.wikihow.com/Run-a-.Jar-Java-File lookit].&lt;br /&gt;
;I found a bug! What should I do?&lt;br /&gt;
:Please double-check for user-error first. (No offense intended, but it happens a lot.) If you&#039;re fairly sure that you have a &amp;quot;real&amp;quot; Mafia bug (reproducible, describable, undesired, and not a script error), please post it in the [http://kolmafia.us/forumdisplay.php?24-Bug-Reports Bug Report Forum]. Make sure to list which version of KoLmafia you are using (which you can see by selecting the Help (menu) -&amp;gt; Copyright Notice). Also, list the operating system you are using, and a description of what to do to reproduce the bug, and any other helpful information.&lt;br /&gt;
;How can I synchronize Mafia across multiple computers using the same counters, scripts, builds, etc?&lt;br /&gt;
:The two most popular methods are to run it from a flash drive or use [http://www.dropbox.com/ Dropbox]. Please see our page about [[Dropbox]].&lt;br /&gt;
&lt;br /&gt;
==Interface==&lt;br /&gt;
;How do I apply stickers?&lt;br /&gt;
:Go to the Gear Changer tab in the main interface. See those bottom three dropdown menus?&lt;br /&gt;
;How do I get mafia to reapply stickers automatically when they wear out?&lt;br /&gt;
:Put it in your mood as described below, changing &amp;quot;&#039;&#039;stickers unicorn, unicorn, unicorn&#039;&#039;&amp;quot; to indicate whichever stickers you want to keep active. The &amp;quot;stickers&amp;quot; command will apply stickers if they are missing, but won&#039;t try to do anything if there are already stickers active.&lt;br /&gt;
:[[File:FAQstickers.png]]&lt;br /&gt;
;Can I get Mafia to do something other than abort when my sugar equipment breaks?&lt;br /&gt;
:Go to the Adventure tab in the main interface. At the bottom are some more tabs. Click on the Choice Advs tab. Now click on the Item tab on the left hand side. Change the Breakable Equipment setting as desired.&lt;br /&gt;
:[[Image:Breakable equipment.jpg]]&lt;br /&gt;
:If you want to fine-tune handling of breakable equipment (i.e. set different settings for different items), jasonharper has provided [http://kolmafia.us/showthread.php?3769-Breakable-equipment-fine-tuning this script].&lt;br /&gt;
;Is there a way to get mafia to stop auto-adventuring when a counter expires?&lt;br /&gt;
:Mafia will stop automating on most counters. Note that purely informational counters like he-boulder rays and hippy windchimes will not stop automation.&lt;br /&gt;
;Is there a way to get mafia to stop auto-adventuring when a hobo code or demon name is found?&lt;br /&gt;
:KoLmafia [[auto-stops]] on these adventures whenever you do not have any conditions set. Just adventure in the zone without conditions and those hobo codes or demon names become your condition. Easy-peasy.&lt;br /&gt;
&lt;br /&gt;
==Scripts==&lt;br /&gt;
;What do I do with a script?&lt;br /&gt;
:Download the ASH file to your [[mafia directories|/scripts directory]]. Either start mafia, or in the scripts menu at the top of the interface, click &amp;quot;refresh menu&amp;quot;. Then select the script from the scripts menu.&lt;br /&gt;
;How do I edit/create an ASH script?&lt;br /&gt;
:Use a nonformatting text editor such as [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] -- word processors like Microsoft Word will not work. When finished, save the file with the extension *.ash.&lt;br /&gt;
;Where are these mafia directories to which I need to download scripts? They have names like /scripts and /data .&lt;br /&gt;
:This varies depending on your operating system. Look for your system at [[mafia directories]].&lt;br /&gt;
;I get an error when I try to run a script!&lt;br /&gt;
:Nine times out of ten the problem is having an outdated version of something.  If a script that you downloaded won&#039;t run, have a look at this handy list:&lt;br /&gt;
: 1) [http://builds.kolmafia.us/ Check that your version of mafia is current].  This doesn&#039;t mean &amp;quot;version X.X&amp;quot;, it means &amp;quot;rXXXX&amp;quot; (that&#039;s a daily build, read above).  If you use Windows, [http://kolmafia.us/showthread.php?2856 this tool] will automatically keep your version of mafia cutting-edge current.&lt;br /&gt;
: 2) Check that you have the latest released version of the script you&#039;re trying to run (and whatever support scripts it includes).  Note that even scripts with version-checking can &#039;&#039;not&#039;&#039; notify you about updates if the error happens before the script starts to run.&lt;br /&gt;
: 3) Check that you don&#039;t have outdated data files (from using the &amp;quot;update data&amp;quot; command, which no one should ever use).  Type &amp;quot;update clear&amp;quot; to eliminate old data files.&lt;br /&gt;
: 4) Check the [[ASH Errors]] page for a description of your error and possible solutions.&lt;br /&gt;
: 5) If none of these solutions fix it -- &#039;&#039;then&#039;&#039; please report the error to the script author in the script thread.  The script author should be able to determine whether this is a script error or a mafia error, and deal with it appropriately.&lt;br /&gt;
;Help, my script aborts whenever [some function] returns false!&lt;br /&gt;
:By default, whenever an ASH function returns false, everything will abort &#039;&#039;unless&#039;&#039; you somehow capture the return value (i.e. assigning it to a variable or enclosing it in a control structure). For examples of how to do this, see [[Tips, Tricks and Workarounds#Capturing an Abort|Tips, Tricks and Workarounds]].&lt;br /&gt;
&lt;br /&gt;
[[Category:New User Help]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Tips,_Tricks_and_Workarounds&amp;diff=7182</id>
		<title>Talk:Tips, Tricks and Workarounds</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Tips,_Tricks_and_Workarounds&amp;diff=7182"/>
		<updated>2011-01-13T02:43:55Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Don&amp;#039;t think &amp;quot;Testing Scripts Offline&amp;quot; section is necessary. Discuss?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Discussion Recap ==&lt;br /&gt;
&lt;br /&gt;
=== Discussion from [[Talk:Storage amount]] ===&lt;br /&gt;
&lt;br /&gt;
Can anyone else verify, before I edit it in, that this function doesn&#039;t work on free pulls? --[[User:StDoodle|StDoodle (#1059825)]] 11:45, 21 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Verified. I believe that this was reported as a bug once. (Back when we had that awesome bug tracker.) However this behavior was clarified to be working as intended and hence, not a bug. The fact that an itemd doesn&#039;t require a pulls means that it is supposed to be treated differently. Use {{f|available_amount}} minus {{f|item_amount}} to verify presence of free pulls in Hangks. Then get them into inventory with {{f|retrieve_item}} instead of with {{f|take_storage}}. You&#039;re right that info should probably be on all relevant pages.  --[[User:Bale|Bale]] 05:17, 22 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Perhaps we should start a special &amp;quot;caveats&amp;quot; page, and link to subheadings on it, for such info; it seems a bit much may be required to explain the situation to include it on every page. It would also be a good place to put info on things like Between Battle Scripts and adventure count in automation, etc. Thoughts? --[[User:StDoodle|StDoodle (#1059825)]] 15:10, 22 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I favor a caveats page. Or perhaps we could call it Tricks &amp;amp; Tips. We should add [[User:PhilmASTErpLus#ASH_Quirks_and_Hacks|THIS]] there also. --[[User:Bale|Bale]] 22:22, 22 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Tips, Tricks and Workarounds* sounds good to me. I agree that those items philmaterplus points out should go there. Also, we should clean up the FAQ to only include one example of non-aborting booleans, and move the full list to this new page, I think (with a link of course). Perhaps this would even be a good page to put a dedicated file link to the syntax highlighting scheme for Notepadd++ (I favor having it on the wiki, so when it&#039;s updated with new ash functions, it&#039;s... you know, updated). I&#039;ll come up with other ideas, too, and leave them on the talk page when it&#039;s there. --[[User:StDoodle|StDoodle (#1059825)]] 17:04, 23 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Actually it doesn&#039;t sound perfect, which is why I&#039;m not making it yet... hrmph.&lt;br /&gt;
&lt;br /&gt;
Moving Discussion to [[Talk: Tips, Tricks and Workarounds]]. Since there may be a bit of discussion about the page before it gets created properly. We can always move the talk page if we change our minds about what it should be called. --[[User:Bale|Bale]] 21:18, 23 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quirks &amp;amp; Hacks from [[User:PhilmASTErpLus|PhilmASTErpLus]] ===&lt;br /&gt;
&lt;br /&gt;
*{{f|print}} displays a blank line when given a string starting with a slash (&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;). To prevent this, the text color must be explicitly given. Easy to bypass, but weird.&lt;br /&gt;
*&amp;quot;Anonymous&amp;quot; closures: ASH does not seem to accept anonymous closures by default.&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int var1;&lt;br /&gt;
/* Do stuff */&lt;br /&gt;
{&lt;br /&gt;
    int var1;&lt;br /&gt;
    call_some_function();&lt;br /&gt;
    /* Do other stuff */&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
However, you can use a workaround with a if-clause.&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int var1;&lt;br /&gt;
/* Do stuff */&lt;br /&gt;
if (true)&lt;br /&gt;
{&lt;br /&gt;
    int var1;&lt;br /&gt;
    /* Do other stuff */&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
As for where stuff like this could be used...I&#039;m using it for initializing ASH scripts without creating any unnecessary functions or variables in the &amp;quot;namespace&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:Great work so far, guys. One nitpick, though: I think the tip about using print() should be put in {{print|the appropriate function page}}, instead. I&#039;ll add it there ASAP. --[[User:PhilmASTErpLus|PhilmASTErpLus]] 12:18, 26 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== New Discussion ==&lt;br /&gt;
&lt;br /&gt;
Ugh, sorry. Can&#039;t think of the best way to fix that ATM, it was half a joke. (Note to self; don&#039;t edit wiki drunk.) --[[User:StDoodle|StDoodle (#1059825)]] 06:32, 24 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing Scripts Offline==&lt;br /&gt;
Is this section really necessary? I mean, there&#039;s a &amp;quot;validate &amp;lt;i&amp;gt;scriptname&amp;lt;/i&amp;gt;&amp;quot; command available in the CLI. --[[User:Heeheehee|Heeheehee]] 02:43, 13 January 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Operators&amp;diff=1877</id>
		<title>Operators</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Operators&amp;diff=1877"/>
		<updated>2011-01-13T02:40:03Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Bitwise Operators */ Added nowiki tags so stuff actually displays properly.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Mathematical Operators==&lt;br /&gt;
&lt;br /&gt;
The following mathematical operators are used in KoLmafia:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| + |Addition|Performs addition and string concatenation}}}}&lt;br /&gt;
{{eztr|{{eztd| - |Subtraction|Performs subtraction}}}}&lt;br /&gt;
{{eztr|{{eztd| * |Multiplication|Performs multiplication}}}}&lt;br /&gt;
{{eztr|{{eztd| / |Division|Performs division}}}}&lt;br /&gt;
{{eztr|{{eztd| % |Modulo|Returns the remainder after division}}}}&lt;br /&gt;
{{eztr|{{eztd| ^ |Exponent|Performs exponentiation}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that, with the exception of using &amp;lt;nowiki&amp;gt;&amp;quot;+&amp;quot;&amp;lt;/nowiki&amp;gt; for string concatenation, these operators can only be used on int or float datatypes.&lt;br /&gt;
&lt;br /&gt;
==Assignment Operators==&lt;br /&gt;
The following assignment operators are used in KoLmafia (let a = left operand, b = right operand):&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;+=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a + b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;-=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a - b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;*=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a * b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;/=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a / b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;%=&amp;lt;/nowiki&amp;gt; |&amp;lt;nowiki&amp;gt;a = a % b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
}}&lt;br /&gt;
Of these, only += and = are usable for strings.  See [[Operators#Mathematical Operators|Mathematical Operators]] for information regarding the basic Mathematical Operators.&lt;br /&gt;
&lt;br /&gt;
==Relational Operators==&lt;br /&gt;
&lt;br /&gt;
To follow these examples, a basic understanding of the concepts found on [[Control Structures]] would be helpful.&lt;br /&gt;
&lt;br /&gt;
In order to create more complex if statements, we need to understand the basic relational operators:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; |equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;!=&amp;lt;/nowiki&amp;gt; |not equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt; |less than}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt; |greater than}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;lt;=&amp;lt;/nowiki&amp;gt; |less than or equal to}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |greater than or equal to}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that you cannot mix datatypes within a comparison or KoLmafia will abort with an error, with the exception of mixing types int and float, where KoLmafia will do a transparent type conversion behind-the-scenes. If you need to compare different datatypes, use one or more of the [[Datatype Conversions|Datatype Conversion]] functions. Also, == is case-insensitive with respect to strings.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true == true )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true == false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( 1 == 1.0 )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( 1 == 2 )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( &amp;quot;Hello&amp;quot; == &amp;quot;hello&amp;quot; )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
==Boolean Operators==&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;amp;&amp;amp;&amp;lt;/nowiki&amp;gt; |and}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; |or}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt; |not}}}}&lt;br /&gt;
}}&lt;br /&gt;
Note that the above operators only work with boolean values &amp;amp; datatypes. To make use of them with other datatypes, you will either need to first perform a [[Datatype Conversions|Datatype Conversion]], or you will need to nest your operations such that a boolean value is used with the boolean operators.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true &amp;amp;&amp;amp; true )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (both possibilities proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed (only one possibility proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( true || false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (since at least one of the possibilities proved true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
if ( ! false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed (since the not operator converted false to true).&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
We also need to understand operator precedence. Statements inside a () pair are always evaluated first, then from left to right.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( true || true &amp;amp;&amp;amp; false )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
   // evaluated left-to-right&lt;br /&gt;
   // true or (true &amp;amp;&amp;amp; false) returns true&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; ( true &amp;amp;&amp;amp; false ) )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line does NOT get printed.&amp;quot; );&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; false ) is evaluated first since it is inside of parentheses&lt;br /&gt;
   // so we end up evaluating ( true &amp;amp;&amp;amp; false ) which returns false&lt;br /&gt;
}&lt;br /&gt;
if ( true &amp;amp;&amp;amp; ! ( true &amp;amp;&amp;amp; false ) )&lt;br /&gt;
{&lt;br /&gt;
   print( &amp;quot;This line DOES get printed.&amp;quot; );&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; false ) is evaluated first since it is inside of parentheses&lt;br /&gt;
   // the ! operator converts the false from ( true &amp;amp;&amp;amp; false ) to true&lt;br /&gt;
   // ( true &amp;amp;&amp;amp; true ) returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Bitwise Operators==&lt;br /&gt;
&lt;br /&gt;
The following mathematical operators are used for operating on the bits of integers. The operands must be integers; no coercion is allowed:&lt;br /&gt;
{{&lt;br /&gt;
eztable|&lt;br /&gt;
{{eztr|{{eztd| &amp;amp; |and|a &amp;amp; b}}}}&lt;br /&gt;
{{eztr|{{eztd| | |or|a &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| ~ |not|Performs multiplication}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;&amp;lt; |left shift|a &amp;lt;&amp;lt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;gt;&amp;gt; |right shift|a &amp;gt;&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;amp;=&amp;lt;/nowiki&amp;gt; |and|&amp;lt;nowiki&amp;gt;a &amp;amp;= b --&amp;gt; a = a &amp;amp; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;|=&amp;lt;/nowiki&amp;gt; |or|&amp;lt;nowiki&amp;gt;a |= b --&amp;gt; a = a | b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;gt;&amp;gt;&amp;gt; |unsigned right shift|a &amp;gt;&amp;gt;&amp;gt; b}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |right shift|&amp;lt;nowiki&amp;gt;a &amp;gt;&amp;gt;= b --&amp;gt; a = a &amp;gt;&amp;gt; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
{{eztr|{{eztd| &amp;lt;nowiki&amp;gt;&amp;gt;&amp;gt;&amp;gt;=&amp;lt;/nowiki&amp;gt; |unsigned right shift|&amp;lt;nowiki&amp;gt;a &amp;gt;&amp;gt;&amp;gt;= b -&amp;gt; a = &amp;gt;&amp;gt;&amp;gt; b&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:KoLmafia_Properties&amp;diff=1949</id>
		<title>Talk:KoLmafia Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:KoLmafia_Properties&amp;diff=1949"/>
		<updated>2011-01-10T00:41:47Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Preference-checker alias.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This should be rewritten as it&#039;s outdated of course. :P Here are new choice adventures (listed by number).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[blah blah blah list of choice adventures - snipped because it was taking up space --[[User:Heeheehee|Heeheehee]] 04:15, 26 April 2010 (UTC)]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I also recommend putting links to KoLwiki on those choice adventures. --[[User:MagiNinjA|MagiNinjA]] 18:30, 4 May 2007 (CDT) ------ EDIT: hit the edit button to see a NEAT list. I&#039;m still a n00b so I don&#039;t know how to work this, but the list SHOULD look like a real list if you&#039;re editing it. I don&#039;t feel like adding line breaks here. :) --[[User:MagiNinjA|MagiNinjA]] 18:31, 4 May 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
This says, &amp;quot;Part 11&amp;quot;. What were parts 1-10? Is this part of something or just an orphaned page? Should it be kept or cut to pieces and split up into other topics? --[[User:Bale|Bale]] 08:30, 25 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
That&#039;s from when this was all part of the ASHRM thingy, which itself was moved here from somewhere else. I left this for reference on the talk page, but it doesn&#039;t look like we need it. Feel free to look it over, and if you don&#039;t find anything useful, nuke away. --[[User:StDoodle|StDoodle (#1059825)]] 20:35, 25 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* If nobody says anything in the next couple of days I&#039;m gonna nuke it. It&#039;ll be gone from the front page and everything. --[[User:Bale|Bale]] 20:17, 7 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hmm... we also have [[List of KoLmafia Properties]]. Ideally, I&#039;d like one of the two to remain. Probably move that page here (maybe a redirect for preferences as well, or rename willy-nilly). Front page should point at whatever actual page we stick with. I would like to do the following;&lt;br /&gt;
* For choice adventures, point to the main wiki, and give a desc. of how they operate which I believe is&lt;br /&gt;
** 0 = show in browser&lt;br /&gt;
** 1-# of choices in KoL = nth choice button&lt;br /&gt;
** N+1 = complete outfit or mainstat&lt;br /&gt;
* There may be other condensable &amp;amp; wiki-pointable lists, I&#039;m not sure; if so similar to above&lt;br /&gt;
* I&#039;d really like more info on the rest; a lot are pretty obscure. In fact, I&#039;d mark this a high-priority task&lt;br /&gt;
&lt;br /&gt;
Thoughts, suggestions? --[[User:StDoodle|StDoodle (#1059825)]] 21:41, 7 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Okay, stage 1 is complete; no more duplicates, this page should cover everything. Of course, it needs a lot more info before it becomes useful, but at least it won&#039;t be scattered in several locations, now. --[[User:StDoodle|StDoodle (#1059825)]] 02:09, 9 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
By a lot more info, would you want something like what I did with [[Modifiers]]? (I&#039;m not saying I have time for this, just that if this is the case, anyone who wanted to tackle this has a point of reference.) --[[User:Heeheehee|Heeheehee]] 04:45, 9 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
One quick question -- for autoAbortThreshold, would any negative number mean &amp;quot;if autorecovery fails&amp;quot;, or just -0.05? I&#039;d think it&#039;s any negative number, because it makes more sense intuitively. --[[User:Heeheehee|Heeheehee]] 22:16, 11 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s almost certainly true. I just know that kolMafia uses -0.05 and never bothered to find out differently. --[[User:Bale|Bale]] 23:05, 11 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
While knowledge of properties can be quite useful for ASH, I&#039;m not sure I see the logic behind adding this page to said category. If ASH were the only way to change most of these preferences, it would be more understandable, but it isn&#039;t even the primary way for most of them. Thoughts? --[[User:StDoodle|StDoodle (#1059825)]] 09:47, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* Mostly properties are used in ash scripting, but I see you point. What category do you think it would be better suited for? Should we create a new one? I like for pages to belong to some category. --[[User:Bale|Bale]] 10:17, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Heh, define &amp;quot;mostly.&amp;quot; A good chunk of the properties are choice adventure settings that I&#039;d bet are set 90% of the time through the GUI (mostly &#039;cause the majority of KoLmafia users are much lighter on their ASH usage than our crowd). Anyway, CLI Commands should definitely get moved out of the ASH section on the main page as well, and these both fall under the ominous &amp;quot;how the heck to we organize the non-ASH portions of KoLmafia&amp;quot; project. I agree it&#039;s nice to have categories for as much as possible, and this would definitely qualify. But what should these categories be? Initially I thought of organizing by menu / windows / etc., but a lot of core functionality is accessed multiple ways, so this doesn&#039;t really work. This particular one would probably go in a &amp;quot;Settings&amp;quot; category, though I&#039;m not sure what else would be in it. Probably a page for the preference manager, choice adventure tabs, etc. What other categories, though? &amp;quot;Adventuring&amp;quot; should probably apply to a good deal beyond the current ASH functions; no need to break them up, either, as far as I can see. &amp;quot;Communications&amp;quot; perhaps, for kmail / chat stuff. Feel free to add on; and we should probably start some official page for tracking this... hmm... --[[User:StDoodle|StDoodle (#1059825)]] 11:57, 14 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shortcut for checking all the preferences that aren&#039;t here (generates wiki code for you, sorted into global and user preferences:&lt;br /&gt;
&amp;lt;div style=&amp;quot;word-wrap:break-word;&amp;quot;&amp;gt;&lt;br /&gt;
  alias wikiPrefs =&amp;gt; ashq buffer page; &amp;lt;nowiki&amp;gt;page.append(visit_url(&amp;quot;http://wiki.kolmafia.us/index.php?title=KoLmafia_Properties&amp;quot;)); string[string, string] map; file_to_map(&amp;quot;defaults.txt&amp;quot;, map); foreach i in map {print_html(&amp;quot;&amp;lt;b&amp;gt;&amp;quot;+i+&amp;quot;:&amp;lt;/b&amp;gt;&amp;quot;); foreach j,k in map[i] if(!j.contains_text(&amp;quot;choiceAdv&amp;quot;) &amp;amp;&amp;amp; !page.contains_text(j)) print_html(&amp;quot;|-&amp;lt;br&amp;gt;|  &amp;quot;+j+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;+&amp;quot;|  &amp;quot;+k+&amp;quot;&amp;lt;br&amp;gt;|&amp;quot;); print_html(&amp;quot;&amp;lt;br&amp;gt;&amp;quot;);&amp;lt;/nowiki&amp;gt;}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: Combing through the results, looks like certain things like badMoonEncounters and sugarCounters and manaBurn preferences would all take up lots of space, but should probably get a mention. Not sure, someone else can play around with the above alias and figure out how to deal with those. --[[User:Heeheehee|Heeheehee]] 00:41, 10 January 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Using&amp;diff=6854</id>
		<title>Using</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Using&amp;diff=6854"/>
		<updated>2010-12-07T08:31:52Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Three equal signs is a bit excessive, no?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:using (CLI)}}&lt;br /&gt;
===using===&lt;br /&gt;
Adds the following script&#039;s functions to the namespace. In other words, it makes the script&#039;s functions available as CLI commands.&lt;br /&gt;
&lt;br /&gt;
===namespace===&lt;br /&gt;
Contains a list of all user-created functions available for use as CLI commands. Note that KoLmafia is &#039;&#039;always&#039;&#039; &amp;quot;using&amp;quot; ASH, and so all ASH commands are available in this format. For instance, &amp;quot;&amp;lt;nowiki&amp;gt;&amp;gt; print_html &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;hello&amp;lt;/font&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;quot; will print &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;hello&amp;lt;/font&amp;gt; to the CLI, then return void.&lt;br /&gt;
&lt;br /&gt;
===== Clearing the namespace =====&lt;br /&gt;
To remove scripts from the namespace you need to clear the property commandLineNamespace. The command is this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set commandLineNamespace =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6684</id>
		<title>Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6684"/>
		<updated>2010-11-29T04:09:26Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* User Interface Scripts */ Added WOSSMAN.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
This is a list of well written scripts that are currently being maintained for the latest version of KoL and KoLmafia. All scripts on this list are free and certified safe for use without any hidden costs or malicious code. If these scripts become outdated for very long or any security risks are found they will be removed from this list, so users should feel free to make use of them.&lt;br /&gt;
&lt;br /&gt;
Of course it is possible that one of these scripts can cause trouble for the user if they are not used properly, so please read the opening post in each thread linked before using that script.&lt;br /&gt;
&lt;br /&gt;
==Turn-Burning Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn]&lt;br /&gt;
* Automates delving into Fernswarthy&#039;s Basement.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bounty&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1023-auto-BHH-and-friends&amp;amp;p=15204&amp;amp;viewfull=1#post15204 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?197-izchak izchak], [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Automates the bounty gathering quest.&lt;br /&gt;
* In conjunction with SmartStasis combat script (below) it will also olfact the monster for the bounty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CounterChecker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2519 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Automates semi-rare acquisition, use of dance cards and a few other counter related activities.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dwarven Factory&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2884 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2677-That-FN-Ninja That FN Ninja]&lt;br /&gt;
* Automates the optional Dwarven Factory quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MacGuffin&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1965 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Automation for the L11 MacGuffin Quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One-Click Wossname&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?960 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon] &lt;br /&gt;
* A complete script for completing the L12 Island War quest.&lt;br /&gt;
* It allows you to chose the medal you are rewarded with, including a Wossname.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rinn&#039;s Quest Scripts&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2584 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn] &lt;br /&gt;
* Automation for most of the game&#039;s quests.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slime Tube Adventuring Script&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2596 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=alhifar Alhifar]&lt;br /&gt;
* Complete automation for the Slime Tube. &lt;br /&gt;
* You set up the outfits for maximum ML and minimum ML. The script then switches between them.&lt;br /&gt;
* It even allows you to chose to kill or tatter slimes. &lt;br /&gt;
* The variety of options allows every type of Slime Tube play, even a slimeling run, to be automated.&lt;br /&gt;
&lt;br /&gt;
==Relay Override Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clan_basement.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4137 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
* Sorts dungeon loot by boss, presenting Hobopolis loot before Slime Tube loot.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pyramid.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3922 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
* Disables potentially harmful links in the Pyramid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;shore.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2813 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?872-lostcalpolydude lostcalpolydude] and [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* When you take a vacation it reminds you of which shore items you might need for floor 6 of the Sorceress&#039; Tower.&lt;br /&gt;
* It uses the telescope to determine the exact item needed if you have a full scope.&lt;br /&gt;
* It also keeps you from taking a vacation when you need the the forged documents &#039;cause it sucks to accidently lose those 3 adventures.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telescope Information&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4057 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* When you look through the telescope at your campsite it will explain what monsters you will meet at the lair and the item to defeat them.&lt;br /&gt;
* Tells you if you have the items. If you need any items it tells you where to find them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;woods.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4199-Acquire-Continuum-Transfunctioner&amp;amp;p=29908&amp;amp;viewfull=1#post29908 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Gets the Continuum Transfunctioner automatically on your first visit to the woods. You will not need to click anything, it just happens.&lt;br /&gt;
&lt;br /&gt;
===User Interface Scripts===&lt;br /&gt;
&lt;br /&gt;
These scripts are a special type of relay override scripts in that they create pages that do not exist as part of KoL. They are prefixed by &amp;quot;relay_&amp;quot; and must be placed in the user&#039;s \relay directory. These scripts are accessed via the &amp;quot;-run script-&amp;quot; dropdown menu in the relay browser.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Info&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4248 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=icon315 Icon315]&lt;br /&gt;
*This script shows you the daily information such as the moons&#039; effects on various modifiers, current stat day and Daily Dungeon rooms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;relay_SlimeTube&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2596-Slime-Tube-Adventuring-Script&amp;amp;p=29687&amp;amp;viewfull=1#post29687 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Adapted from Alhifar&#039;s Slime Tube Adventuring Script; does everything the original script does.&lt;br /&gt;
* Adds a UI to enable the user to easily configure the Slime Tube script without having to modify the base script.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ZLib Variable Editor&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4081 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
* This script provides a more user-friendly interface for modifying [http://kolmafia.us/showthread.php?2072 ZLib] variables. Deprecated by zarqon&#039;s WOSSMAN.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WOSSMAN&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library&amp;amp;p=38185&amp;amp;viewfull=1#post38185 download here] &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Zarqon&#039;s Wikified Online Script Settings Manager. Provides a more convenient method for editing ZLib variables. Since this script was released by the author of ZLib, this is essentially the official ZLib variable editor.&lt;br /&gt;
&lt;br /&gt;
==Custom Combat Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First Things First&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1255 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Takes care of the first few things needed in a fight: pickpocketing, entangling noodles, olfaction, spooky putty, etc&lt;br /&gt;
* Includes quest related events: insulting pirates, throwing flyers, driving away clingy pirates if clingfilm is not needed, etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SmartStasis&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1715 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Includes everything from First Things First. (Requires that to be downloaded also.)&lt;br /&gt;
* Stasis monsters for a variety of reasons: starfishing, hobo monkey meat.&lt;br /&gt;
* Notices when the monkey steals and recognizes if your slimeling or other chargeable starfish is out of juice and ends stasis.&lt;br /&gt;
* Quest related stasis: Using molybdenum magnet on the correct gremlin, getting essences in Seaside Megalopolis, learning rave dance moves Outside the Club.&lt;br /&gt;
* Uses disco combos and rave combos when they improve your profit.&lt;br /&gt;
&lt;br /&gt;
==Buff Upkeep Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;acquireBuff&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4048 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn]&lt;br /&gt;
* Gets a buff from a buffbot without needing to know the bot&#039;s name or pricelist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Best Between Battle Script Ever&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1240 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Executes between battles in automatic adventuring.&lt;br /&gt;
* Adjusts choice adventures, adjusts MCD for current moxie, auto-tames turtles.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;hatter.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4262 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2677-That-FN-Ninja That FN Ninja]&lt;br /&gt;
* To get a specific Mad Hatter buff painlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Universal Recovery&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1780 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Improves mafia&#039;s automated recovery to make best use of all items in hardcore/ronin or conserve meat if you have mall access.&lt;br /&gt;
* Keeps spare mp healing items on-hand in case they are needed in combat.&lt;br /&gt;
* Conserves healing items for use against your Shadow.&lt;br /&gt;
* Removes poison and keeps some extra antidotes for use in combat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VIP Hopping&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3620-VIP-Hopping!-Quick-clanhop-to-BAfH-for-all-VIP-room-goodies! download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Hops over the clan Bonus Adventures from Hell to get something from their VIP Lounge, then it hops back to your regular clan.&lt;br /&gt;
* Enables access to all VIP Lounge amenities and the ballpit without needing to spend time in BaFH.&lt;br /&gt;
* If you don&#039;t have a membership in Bonus Adventures from Hell, it submits a request to join the clan so that you can get access to a fully stocked VIP Lounge for free.&lt;br /&gt;
&lt;br /&gt;
==Item Handling Scripts==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Misshappen Animal Skeleton Familiar/Checker/Buyer&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?p=30995 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1789-eitak eitak]&lt;br /&gt;
* This script uses framework from Spiny Twizzler&#039;s Tiny Plastic Series 1 &amp;amp; 2 Checker script and facilitates the automated acquisition of the Misshapen Animal Skeleton. There are some settings you can tweak within the script itself to suit your needs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PriceAdvisor&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3110 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=aqualectrix aqualectrix]&lt;br /&gt;
* Gives advice on how to maximize profit from an item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rainbow Gravitation made easy&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1929 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* In hardcore/ronin it handles automatic wad transmutation to enable easy creation of Rainbow Wads.&lt;br /&gt;
* With mall access, it will purchase necessary wads to use daily casts of Rainbow Gravitation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scripting the birth of a new life&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2769 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Sets optimal choice adventures based on current class for your ascension. Perfect to run at the beginning of a new life.&lt;br /&gt;
* Automates simple tasks that are always run at the beginning of a new life like pulling your VIP Lounge Key and visiting the Toot Oriole.&lt;br /&gt;
&lt;br /&gt;
==Informational Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bumcheekcity&#039;s Easy Wiki Snapshot Maker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3001 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bumcheekcity bumcheekcity]&lt;br /&gt;
* This script will collect information about your character and generate a profile to display on [http://bumcheekcity.com/kol/profile.php bumcheekcity&#039;s website].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EatDrink.ash: Optimize your daily diet&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&amp;amp;p=30725&amp;amp;viewfull=1#post30725 best download here]) - ([http://kolmafia.us/showthread.php?1519 outdated official thread here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=fronobulax fronobulax]&lt;br /&gt;
* Tries to find an optimal diet for a given value of an adventure.&lt;br /&gt;
* Can be run in simulation mode, just to see what it would do.&lt;br /&gt;
* Since dj_d is taking a leave of absence, fronobulax has temporarily taken up maintenance of this script.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StDoodle&#039;s Custom Daily Deeds&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3443 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?720-StDoodle StDoodle]&lt;br /&gt;
* Tracks all events that have limited uses, from pool table to pasta summoning.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slime Vial Recipes&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3544-Slime-vial-recipes&amp;amp;p=25337&amp;amp;viewfull=1#post25337 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1017-jasonharper jasonharper]&lt;br /&gt;
* This script will help you get the {{kolwiki|Color Wheel of Yuck}} trophy by checking your discoveries list and mixing the vials in your inventory to create slime potions you do not know.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tiny Plastic Series 1 &amp;amp; 2 Checker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?goto=newpost&amp;amp;t=2587 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1897-Spiny Spiny Twizzler]&lt;br /&gt;
* Its default behaviour is informational to help you acquire your Tiny Plastic Trophy and/or Two-Tiered Tiny Plastic Trophy. You may optionally edit the preferences in the script to shop for missing trophies for you with a budget that you set yourself. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What are you worth?&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2628-What-are-you-worth-networth.ash-will-tell-you.&amp;amp;p=24990&amp;amp;viewfull=1#post24990 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* This calculates the current value of all items you own and informs you of what you are worth.&lt;br /&gt;
&lt;br /&gt;
==Script Libraries==&lt;br /&gt;
These scripts are libraries of functions that are required components of other scripts. By themselves they do little or nothing. Expect to download them when directed in a script&#039;s instructions, or if you want to be a scripter, then study them and learn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[htmlform|HTMLform]]&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3842 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1017-jasonharper jasonharper]&lt;br /&gt;
* Library of functions used for creating forms in [[Relay_Override_Scripting#User_Interface_Script|relay interface scripts]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SmashLib&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3065 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=aqualectrix aqualectrix]&lt;br /&gt;
* Determines the results of pulverizing equipment and reports it for use by scripts or aliases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[zlib|ZLib]]&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2072 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Ultimate toolbox of scripting functions for math, string manipulation, version checking, automatic mapfile updating, persistent variables, adventuring, kmailing and so much more. &#039;&#039;Many scripts require this.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clan Hopping&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2071 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Hop to a whitelisted clan quickly and easily from the CLI.&lt;br /&gt;
&lt;br /&gt;
[[Category:New User Help]][[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Zlib&amp;diff=7317</id>
		<title>Talk:Zlib</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Zlib&amp;diff=7317"/>
		<updated>2010-11-29T04:04:30Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: re: issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just getting started, but hopefully this will serve as a good guideline for library pages. --[[User:StDoodle|StDoodle (#1059825)]] 23:18, 28 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Oh yeah; please chime in with any format requests / criticisms / suggestions. I&#039;d like to nail down a standard format for such pages before adding htmlform&#039;s page and any others that may be justified. --[[User:StDoodle|StDoodle (#1059825)]] 23:20, 28 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Ok, here&#039;s the to-do list: 1) finish up the rest of the functions using what&#039;s there as a guide. 2) Bring in the external info (such as for eval()). 3) Proof, check format, etc. 4) Come up with a way to link to each function&#039;s section via &amp;quot;search&amp;quot;; may need to make redirects (ugh). --[[User:StDoodle|StDoodle (#1059825)]] 00:51, 29 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
4 is really pissing me off... ideally, I&#039;d like table of contents info &amp;amp; search results for each function, without adding extra headings (since they&#039;d either look bad w/o parentheses after function names or require the parentheses in search). Ugh! Halp! --[[User:StDoodle|StDoodle (#1059825)]] 02:46, 29 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Looks good so far. For concern #4, I want to say redirects are probably the best way to go. Might have to add anchors physically (i.e. via HTML), then have the redirects point to the proper locations on the page. You might want to also add in the function tocs in the same manner -- you can probably use the HTML as a point of reference. --[[User:Heeheehee|Heeheehee]] 04:04, 29 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Zlib&amp;diff=7239</id>
		<title>Zlib</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Zlib&amp;diff=7239"/>
		<updated>2010-11-29T01:44:43Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Fixed misspelling of &amp;quot;function&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}{{DISPLAYTITLE:ZLib (zlib.ash)}}&lt;br /&gt;
== About Zarqon&#039;s Useful Function Library ==&lt;br /&gt;
Behold, a single function library containing most of zarqon&#039;s most useful functions, which will be used by most of his scripts. He grew tired of tweaking a function that was in multiple scripts and making sure he had changed them all. &#039;&#039;It would be nice&#039;&#039;, he thought in his customary italics, &#039;&#039;to have it in just one place&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In choosing which functions to include, he have tried to select only those functions which are a) super useful, or 2) needed by another of the included functions. It&#039;s a bit less efficient in terms of individual scripts, but in terms of repeated code across a family of scripts it is far simpler.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{HideLink|excise}}{{Function|&lt;br /&gt;
name=excise|&lt;br /&gt;
return_type=string|&lt;br /&gt;
parameter1={{Param|string|source}}|&lt;br /&gt;
parameter2={{Param|string|start}}|&lt;br /&gt;
parameter3={{Param|string|end}}|&lt;br /&gt;
p1desc=The original {{pspan|source}} string|&lt;br /&gt;
p2desc={{pspan|start}} after this string|&lt;br /&gt;
p3desc={{pspan|end}} before this string|&lt;br /&gt;
}}&lt;br /&gt;
This function returns a portion of the {{pspan|source}} string, from after the first occurrence of {{pspan|start}} to just before the first occurrence of {{pspan|end}}. If either {{pspan|start}} or {{pspan|end}} are missing, it will return an empty string. You can also supply either {{pspan|start}} or {{pspan|end}} as blank strings to specify the actual start or end of the {{pspan|source}} string.&lt;br /&gt;
&lt;br /&gt;
{{HideLink|normalized}}{{Function|&lt;br /&gt;
name=normalized|&lt;br /&gt;
return_type=string|&lt;br /&gt;
parameter1={{Param|string|mixvar}}|&lt;br /&gt;
parameter2={{Param|string|type}}|&lt;br /&gt;
p1desc={{pspan|mixvar}} is the string to normalize|&lt;br /&gt;
p2desc={{pspan|type}} is the datatype to normalize to|&lt;br /&gt;
}}&lt;br /&gt;
Returns {{pspan|mixvar}}, normalized to the specified mafia {{pspan|type}}, which can be any primitive type or ASH datatype constant. For example, normalized(&amp;quot;badger&amp;quot;, &amp;quot;familiar&amp;quot;) would return &amp;quot;Astral Badger&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{HideLink|rnum}}{{Function|&lt;br /&gt;
name=rnum|&lt;br /&gt;
return_type=string|&lt;br /&gt;
parameter1={{Param|int|n}}|&lt;br /&gt;
}}&lt;br /&gt;
{{Function|&lt;br /&gt;
name=rnum|&lt;br /&gt;
return_type=string|&lt;br /&gt;
parameter1={{Param|float|n}}|&lt;br /&gt;
}}&lt;br /&gt;
{{Function|&lt;br /&gt;
name=rnum|&lt;br /&gt;
return_type=string|&lt;br /&gt;
parameter1={{Param|float|n}}|&lt;br /&gt;
parameter2={{Param|int|place}}|&lt;br /&gt;
p1desc={{pspan|n}} is a number|&lt;br /&gt;
p2desc={{pspan|place}} is the number of decimal places to round to|&lt;br /&gt;
}}&lt;br /&gt;
Returns your number {{pspan|n}} as a human-readable string. For ints, this means it adds commas where appropriate. For floats, it also rounds to the nearest {{pspan|place}} after the decimal. Default {{pspan|place}} for the float-only version is 2, although it may display fewer digits if they are 0&#039;s. Examples: rnum(12580) =&amp;gt; &amp;quot;12,580&amp;quot;, rnum(3.14152964,3) =&amp;gt; &amp;quot;3.142&amp;quot;, rnum(4.00008) =&amp;gt; &amp;quot;4&amp;quot;, rnum(123456789.87654321) =&amp;gt; &amp;quot;123,456,789.88&amp;quot;. Recommended as a substitute for to_string().&lt;br /&gt;
&lt;br /&gt;
{{HideLink|set_avg}}{{Function|&lt;br /&gt;
name=set_avg|&lt;br /&gt;
return_type=void|&lt;br /&gt;
parameter1={{Param|float|to_add}}|&lt;br /&gt;
parameter2={{Param|string|which_prop}}|&lt;br /&gt;
p1desc={{pspan|to_add}} is the data point to add|&lt;br /&gt;
p2desc={{pspan|which_prop}} is the property to add data to|&lt;br /&gt;
}}&lt;br /&gt;
Useful for adding spading to scripts. Adds one more statistic to an average value being stored in a property. For example, calling this script three times with the values 2, 4, and 6 for {{pspan|to_add}} would result in the property {{pspan|which_prop}} containing &amp;quot;4.0:3&amp;quot;, with 4.0 being the average of the three numbers added and 3 being the amount of numbers averaged.&lt;br /&gt;
&lt;br /&gt;
{{HideLink|get_avg}}{{Function|&lt;br /&gt;
name=get_avg|&lt;br /&gt;
return_type=float|&lt;br /&gt;
parameter1={{Param|string|which_prop}}|&lt;br /&gt;
p1desc={{pspan|which_prop}} is the property to access|&lt;br /&gt;
}}&lt;br /&gt;
Returns an average value set by set_avg().&lt;br /&gt;
&lt;br /&gt;
{{HideLink|eval}}{{Function|&lt;br /&gt;
name=eval|&lt;br /&gt;
return_type=vfloat|&lt;br /&gt;
parameter1={{Param|string|expression}}|&lt;br /&gt;
parameter2={{Param|float [string]|values|ag=t}}|&lt;br /&gt;
p1desc={{pspan|expression}} is the base expression|&lt;br /&gt;
p2desc={{pspan|values}} is a map of values to replace|&lt;br /&gt;
}}&lt;br /&gt;
By Jason Harper. Evaluates {{pspan|expression}} as a math expression, and allows you to substitute {{pspan|values}} for variables, as described in much greater detail here. A brief version of this documentation is also included in ZLib. (NB: This section needs more infoz.)&lt;br /&gt;
&lt;br /&gt;
boolean vprint(string message, string color, int level)&lt;br /&gt;
boolean vprint(string message, int level)&lt;br /&gt;
Wrapper for print() and abort(), prints message depending on vars[&amp;quot;verbosity&amp;quot;] setting. It has a boolean return value so it can replace { print(message); return t/f; }&lt;br /&gt;
if level == 0: abort with message&lt;br /&gt;
if level &amp;gt; 0: prints message if verbosity &amp;gt;= level, returns true&lt;br /&gt;
if level &amp;lt; 0: prints message if verbosity &amp;gt;= abs(level), returns false&lt;br /&gt;
More detailed explanation here.&lt;br /&gt;
&lt;br /&gt;
boolean vprint_html(string message, int level)&lt;br /&gt;
Same as above, but wraps print_html().&lt;br /&gt;
&lt;br /&gt;
int abs(int n)&lt;br /&gt;
float abs(float n)&lt;br /&gt;
Returns the absolute value of n.&lt;br /&gt;
&lt;br /&gt;
float minmax(float a, float min, float max)&lt;br /&gt;
Returns a, but no less than min and no more than max.&lt;br /&gt;
&lt;br /&gt;
string check_version(string soft, string prop, string thisver, int thread)&lt;br /&gt;
Server-friendly once-daily version-checking. (Also hyphen-friendly.) If the user hasn&#039;t checked yet today, visits the specified thread in this forum to find the current version of your script. The thread must include &amp;quot;&amp;lt;b&amp;gt;soft version&amp;lt;/b&amp;gt;&amp;quot; for the version info to be successfully parsed. Optionally, you may include &amp;quot;[requires revision XXXX]&amp;quot; in the post if you want to indicate a required minimum revision of mafia. If a new version is available, alerts the user in large text and provides an update link, then waits for a sufficiently annoying interval in case the user wishes to abort operation to go update the script. The return value is a blank string unless an update is found, in which case it is a &amp;lt;div id=&#039;versioninfo&#039;&amp;gt; containing the update message. This allows this function to work equally well for relay scripts. The current version is stored to a daily property, standardized to &amp;quot;_version_&amp;quot;+prop. Example:&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
check_version(&amp;quot;Hardcore Checklist&amp;quot;,&amp;quot;checklist&amp;quot;,&amp;quot;1.2.7&amp;quot;,1045);&lt;br /&gt;
&lt;br /&gt;
boolean load_current_map(string fname, aggregate dest)&lt;br /&gt;
Allows scripts to automatically update data files. Loads a map named fname.txt, either from disk or from the Map Manager if an update is available. (Yes, this means you shouldn&#039;t include &amp;quot;.txt&amp;quot; in the parameter.) The first time you try to load a given map on a given day, it checks if your version is current. If so, it merely loads it from disk. If not, it overwrites your local map with the map stored on the Map Manager.&lt;br /&gt;
&lt;br /&gt;
int setvar(string varname, mixed dfault)&lt;br /&gt;
Allows you to define a per-character script setting to be used across all scripts that use ZLib. The first time the script is run, the variable will be set to dfault. To reference this setting, use vars[varname] in any script that includes ZLib, keeping in mind that this will always be a string. Detailed information posted here.&lt;br /&gt;
&lt;br /&gt;
int have_item(string tolookup)&lt;br /&gt;
A residual function, used by the following and probably in several other scripts. Returns the amount of an item you have both in your inventory and equipped.&lt;br /&gt;
&lt;br /&gt;
float has_goal(item whatsit)&lt;br /&gt;
Returns the chance that an item is or results in a goal. If is_goal(item) == true or it&#039;s a bounty item, returns 1.0. Otherwise, returns the chance that you would get a goal from using the item. For example, with a goal of black pepper, has_goal($item[black picnic basket]) would return 0.58. Many thanks to aqualectrix for creating and sharing the container items results map.&lt;br /&gt;
&lt;br /&gt;
float has_goal(monster m)&lt;br /&gt;
Making use of the above function, returns the percent chance that encountering a given monster will result in a goal, taking into account +items, pickpocket availability (and +pickpocket), and Torso. For instance, with no +item and black pepper as a goal, has_goal($monster[black widow]) would return 0.087 (0.58 basket contains pepper * 0.15 basket drop rate). Also note that it will add multiple goals together, so with white pixels as a goal, a Blooper would return 2.1.&lt;br /&gt;
&lt;br /&gt;
float has_goal(location l)&lt;br /&gt;
Returns the chance that adventuring at a given location will yield a goal. For our black pepper example, has_goal($location[black forest]) would return 0.0174 (0.2 black widow appearance rate * 0.087 chance that a widow has black pepper). Presently this accounts for combat frequency modifiers but not Olfaction, and it will be off for areas with noncombats that grant goals, because it assumes that all noncombats do not yield items.&lt;br /&gt;
&lt;br /&gt;
boolean obtain(int n, string cond, location locale)&lt;br /&gt;
Attempts to get n (-existing) of cond, either by purchasing (if you have the mafia preference set), pulling from Hangk&#039;s, or adventuring at locale. It also works with choiceadvs.&lt;br /&gt;
&lt;br /&gt;
boolean use_upto(int n, item doodad, boolean purchase)&lt;br /&gt;
Gets (if purchase is true) and uses n doodads if possible. Otherwise, uses as many as you have up to n.&lt;br /&gt;
&lt;br /&gt;
boolean resist(element req, boolean reallydoit)&lt;br /&gt;
Returns whether you are able to resist a given element, or if reallydoit is true, attempts to actually achieve that resistance (casting buffs, changing gear, or equipping your Exotic Parrot), and returns its success.&lt;br /&gt;
&lt;br /&gt;
int my_defstat()&lt;br /&gt;
Returns the value of your buffed defense stat, taking into account Hero of the Half-Shell.&lt;br /&gt;
&lt;br /&gt;
int get_safemox(location wear)&lt;br /&gt;
Using mafia&#039;s location/monster data, returns the safe moxie of a given zone.&lt;br /&gt;
&lt;br /&gt;
boolean auto_mcd(int safemox)&lt;br /&gt;
boolean auto_mcd(monster mob)&lt;br /&gt;
boolean auto_mcd(location place)&lt;br /&gt;
If your automcd setting is true, automatically adjusts your mind-control device for maximum stat gains based on safemox (or the safe moxie for place or mob) and your threshold setting. Does not adjust for MCD-sensitive areas (certain bosses, Slime Tube), or areas with no known combats.&lt;br /&gt;
&lt;br /&gt;
familiar best_fam(string ftype)&lt;br /&gt;
Returns your heaviest familiar of a given type (currently possible: items, meat, produce, stat, delevel). If your is_100_run setting is anything other than $familiar[none], returns that familiar (so you don&#039;t have to make the check in your script).&lt;br /&gt;
&lt;br /&gt;
boolean send_gift(string to, string message, int meat, int[item] goodies, string insidenote)&lt;br /&gt;
boolean send_gift(string to, string message, int meat, int[item] goodies)&lt;br /&gt;
Self-explanatory, really. Sends a gift to a player, able to split large amounts of items, useful return value.&lt;br /&gt;
&lt;br /&gt;
boolean kmail(string to, string message, int meat, int[item] goodies, string insidenote)&lt;br /&gt;
boolean kmail(string to, string message, int meat, int[item] goodies)&lt;br /&gt;
boolean kmail(string to, string message, int meat)&lt;br /&gt;
Sends a kmail to a player, returning true if the kmail is successfully sent. Handles splitting the message into multiple messages if the number of item types is too large. Returns the result of send_gift() if the intended recipient is unable to receive the message due to being in HC or somesuch. Note that you can also specify the message to be used inside gifts in that case. Use &amp;quot;\n&amp;quot; to specify a new line in the message.&lt;br /&gt;
&lt;br /&gt;
== Making use of Zlib ==&lt;br /&gt;
To include this library in your script, simply add the following towards the top of your script:&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
import &amp;quot;zlib.ash&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Then all these functions will be available in your script. Have fun!&lt;br /&gt;
&lt;br /&gt;
== More Information ==&lt;br /&gt;
&amp;lt;p&amp;gt;See the thread for ZLib on the mafia forum [http://kolmafia.us/showthread.php?2072 here].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]][[Category:ASH Function Libraries]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Modifier_Maximizer&amp;diff=6744</id>
		<title>Modifier Maximizer</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Modifier_Maximizer&amp;diff=6744"/>
		<updated>2010-11-21T20:17:41Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Superfluous &amp;#039;+&amp;#039; removed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
==General==&lt;br /&gt;
The specification of what attributes to maximize is made by a comma-separated list of keywords, each possibly preceded by a numeric weight. Commas can be omitted if the next item starts with a +, -, or digit. Using just a +, or omitting the weight entirely, is equivalent to a weight of 1. Likewise, using just a - is equivalent to a weight of -1. Non-integer weights can be used, but may not be meaningful with all keywords.&lt;br /&gt;
&lt;br /&gt;
Numeric weights determine how much an individual keyword will be counted toward the score that Mafia assigns to each combination. For instance, &amp;quot;2 item drop&amp;quot; will force item drop to contribute four times as much as, say, &amp;quot;.5 meat drop&amp;quot; in the expression &amp;quot;maximize 2 item drop, meat drop&amp;quot;. The weights are simply multiplied with the corresponding modifier, so in the preceding expression, a natty blue ascot would contribute 20*.5 = 10 to your score, while a lucky rabbit&#039;s foot would contribute 2*7 + .5*7 = 17.5 to your score.&lt;br /&gt;
&lt;br /&gt;
==Numeric Modifiers==&lt;br /&gt;
The full name of any numeric modifier (as shown by the &#039;&#039;&#039;modref&#039;&#039;&#039; CLI command) is a valid keyword, requesting that its value be maximized. If multiple modifiers are given, their weights specify their relative importance. Negative weights mean that smaller values are more desirable for that modifier.&lt;br /&gt;
&lt;br /&gt;
Shorter forms are allowed for many commonly used modifiers. They can be abbreviated down to just the bold letters:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;mus&#039;&#039;&#039;, &#039;&#039;&#039;mys&#039;&#039;&#039;, &#039;&#039;&#039;mox&#039;&#039;&#039;, &#039;&#039;&#039;main&#039;&#039;&#039;stat, &#039;&#039;&#039;HP&#039;&#039;&#039;, &#039;&#039;&#039;MP&#039;&#039;&#039;, &#039;&#039;&#039;ML&#039;&#039;&#039;, &#039;&#039;&#039;DA&#039;&#039;&#039;, &#039;&#039;&#039;DR&#039;&#039;&#039;, &#039;&#039;&#039;com&#039;&#039;&#039;bat rate, &#039;&#039;&#039;item&#039;&#039;&#039; drop, &#039;&#039;&#039;meat&#039;&#039;&#039; drop, &#039;&#039;&#039;exp&#039;&#039;&#039;erience, &#039;&#039;&#039;adv&#039;&#039;&#039;entures&lt;br /&gt;
&amp;lt;br&amp;gt;Also, resistance (of any type) can be abbreviated as &#039;&#039;&#039;res&#039;&#039;&#039;, and damage can be abbreviated as &#039;&#039;&#039;dmg&#039;&#039;&#039;. &#039;&#039;&#039;all res&#039;&#039;&#039;istance is a shortcut for giving the same weight to all five basic elements. Likewise, &#039;&#039;&#039;elemental dmg&#039;&#039;&#039; is a shortcut for the five elemental damage types.&lt;br /&gt;
&lt;br /&gt;
Note that many modifiers come in pairs: a base value, plus a percentage boost (such as Moxie and Moxie Percent), or a penalty value. In general, you only need to specify the base modifier, and any related modifiers will automatically be taken into account.&lt;br /&gt;
&lt;br /&gt;
==Limits==&lt;br /&gt;
Any numeric modifier keyword can be followed by one or both of these special keywords:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;min&#039;&#039;&#039; - The weight specifies the minimum acceptable value for the preceding modifier. If the value is lower, the results will be flagged as a failure.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;max&#039;&#039;&#039; - The weight specifies the largest useful value for the preceding modifier. Larger values will be ignored in the score calculation, allowing other specified modifiers to be boosted instead.&lt;br /&gt;
&amp;lt;br&amp;gt;Note that the limit keywords won&#039;t quite work as expected for a modifier that you&#039;re trying to minimize.&lt;br /&gt;
&amp;lt;br&amp;gt;If &#039;&#039;&#039;min&#039;&#039;&#039; or &#039;&#039;&#039;max&#039;&#039;&#039; is specified at the start of the expression, it applies to the total score (the sum of each modifier value times its weight). A global &#039;&#039;&#039;max&#039;&#039;&#039; may allow equipment maximization to finish faster, since no further combinations will be considered once the specified value is reached.+&lt;br /&gt;
==Other Modifiers==&lt;br /&gt;
Boolean modifiers can also be used as keywords. With positive weight, the modifier is required to be true; with negative weight, it is required to be false. There is one shortcut available: &#039;&#039;&#039;sea&#039;&#039;&#039; requires both Adventure Underwater and Underwater Familiar to be true.&lt;br /&gt;
&lt;br /&gt;
The only bitmap modifiers that currently appear useful for maximization are Clownosity and Raveosity, so they are allowed as a special case. The weight specifies the required minimum value; only one value is actually meaningful for each keyword, so &#039;&#039;&#039;4 clownosity&#039;&#039;&#039; and &#039;&#039;&#039;7 raveosity&#039;&#039;&#039; are the only useful forms.&lt;br /&gt;
&lt;br /&gt;
String modifiers are not currently meaningful for maximization.&lt;br /&gt;
==Equipment==&lt;br /&gt;
Slot names can be used as keywords:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;hat&#039;&#039;&#039;, &#039;&#039;&#039;weapon&#039;&#039;&#039;, &#039;&#039;&#039;offhand&#039;&#039;&#039;, &#039;&#039;&#039;shirt&#039;&#039;&#039;, &#039;&#039;&#039;pants&#039;&#039;&#039;, &#039;&#039;&#039;acc1&#039;&#039;&#039;, &#039;&#039;&#039;acc2&#039;&#039;&#039;, &#039;&#039;&#039;acc3&#039;&#039;&#039;, &#039;&#039;&#039;familiar&#039;&#039;&#039; (stickers and fake hands are not currently planned.)&lt;br /&gt;
&amp;lt;br&amp;gt;With positive weights, only the specified slots will be considered for maximization. With negative weights, all but the specified slots will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;empty&#039;&#039;&#039; - With positive weight, consider only slots that are currently empty; with negative weight, only those that aren&#039;t empty. Either way, &#039;&#039;&#039;+&#039;&#039;slot&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;-&#039;&#039;slot&#039;&#039;&#039;&#039;&#039; can be used to further refine the selected slots.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;hand&#039;&#039;&#039;ed - With a weight of 1, only 1-handed weapons will be considered. With a larger weight, only weapons with at least that handedness will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;melee&#039;&#039;&#039; - With positive weight, only melee weapons will be considered. With negative weight, only ranged weapons will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;type &#039;&#039;text&#039;&#039;&#039;&#039;&#039; - Only weapons with a type containing &#039;&#039;text&#039;&#039; are considered; for example, &#039;&#039;&#039;type club&#039;&#039;&#039; if you plan to do some Seal Clubbing.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;shield&#039;&#039;&#039; - With positive weight, only shields will be considered for your off-hand. Implies &#039;&#039;&#039;1 handed&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;equip &#039;&#039;item&#039;&#039;&#039;&#039;&#039; - The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of &#039;&#039;&#039;+equip&#039;&#039;&#039; require all of the items to be equipped.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;outfit &#039;&#039;name&#039;&#039;&#039;&#039;&#039; - The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of &#039;&#039;&#039;+outfit&#039;&#039;&#039; are satisfied by any one of the outfits (since you can&#039;t be wearing more than one at a time).&lt;br /&gt;
&amp;lt;br&amp;gt;If both &#039;&#039;&#039;+equip&#039;&#039;&#039; and &#039;&#039;&#039;+outfit&#039;&#039;&#039; are used together, either one will satisfy the condition - all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;tie&#039;&#039;&#039;breaker - With negative weight, disables the use of a tiebreaker function that tries to choose equipment with generally beneficial attributes, even if not explicitly requested. There are only a few cases where this would be desirable: maximizing &#039;&#039;&#039;+combat&#039;&#039;&#039; or &#039;&#039;&#039;-combat&#039;&#039;&#039; (since there&#039;s usually only one item that can help), &#039;&#039;&#039;adv&#039;&#039;&#039; and/or &#039;&#039;&#039;PvP fights&#039;&#039;&#039; at rollover, and &#039;&#039;&#039;familiar weight&#039;&#039;&#039; when facing the Naughty Sorceress familiars.&lt;br /&gt;
==Familiars==&lt;br /&gt;
By default, the Modifier Maximizer does not recommend familiars, since there are many possible factors in choosing one beyond those that can be expressed via modifiers. However, you can request that specific familiars be compared with your current one:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;switch &#039;&#039;familiar&#039;&#039;&#039;&#039;&#039; - With positive weight, the familiar is added to the list to be considered (unless the player lacks that familiar, or is already using it, in which case there is no effect). With negative weight, the familiar is added to the list only if the player lacks the previously specified familiar. For example, &#039;&#039;&#039;switch hobo monkey, -switch leprechaun&#039;&#039;&#039; will only consider the leprechaun if the player doesn&#039;t have the monkey.&lt;br /&gt;
==Assumptions==&lt;br /&gt;
All suggestions are based on the assumption that you will be adventuring in the currently selected location, with all your current effects, prior to the next rollover (since some things depend on the moon phases). For best results, make sure the proper location is selected before maximizing. This is especially true in The Sea and clan dungeons, which have many location-specific modifiers.&lt;br /&gt;
&lt;br /&gt;
Among effects, stat equalizer potions have a major effect on the suggested boosts, since they change the relative importance of additive and percentage stat boosts. Likewise, elemental phials make certain resistance boosts pointless. If you plan to use an equalizer or phial while adventuring, please use them first so that the suggestions take them into account.&lt;br /&gt;
==GUI Use==&lt;br /&gt;
If the Max Price field is zero or blank, the limit will be the smaller of your available meat, or your autoBuyPriceLimit (default 20,000). The other options should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
You can select multiple boosts, and the title of the list will indicate the net effect of applying them all - note that this isn&#039;t always just the sum of their individual effects.&lt;br /&gt;
==CLI Use==&lt;br /&gt;
The Modifier Maximizer can be invoked from the gCLI or a script via &#039;&#039;&#039;maximize &#039;&#039;expression&#039;&#039;&#039;&#039;&#039;, and will behave as if you&#039;d selected Equipment: on-hand only, Max Price: don&#039;t check, and turned off the Include option. The best equipment will automatically be equipped (unless you invoked the command as &#039;&#039;&#039;maximize? &#039;&#039;expression&#039;&#039;&#039;&#039;&#039;), but you&#039;ll still need to visit the GUI to apply effect boosts - there are too many factors in choosing between the available boosts for that to be safely automated. An error will be generated if the equipment changes weren&#039;t sufficient to fulfill all &#039;&#039;&#039;min&#039;&#039;&#039; keywords in the expression.&lt;br /&gt;
==Limitations &amp;amp;amp; Bugs==&lt;br /&gt;
This is still a work-in-progress, so don&#039;t expect everything to work perfectly at the moment. However, here are some details that are especially broken:&lt;br /&gt;
* Items that can be installed at your campground for a bonus (such as Hobopolis bedding) aren&#039;t considered.&lt;br /&gt;
* Your song limit isn&#039;t considered when recommending buffs, nor are any daily casting limits.&lt;br /&gt;
* Mutually exclusive effects aren&#039;t handled properly.&lt;br /&gt;
* Weapon Damage, Ranged Damage, and Spell Damage are calculated assuming 100 points of base damage - in other words, additive and percentage boosts are considered to have exactly equal worth. It&#039;s possible that Weapon and Ranged damage might use a better estimate of the base damage in the future, but for Spell Damage, the proper base depends on which spell you end up using.&lt;br /&gt;
* Effects which vary in power based on how many turns are left (love songs, Mallowed Out, etc.) are handled poorly. If you don&#039;t have the effect, they&#039;ll be suggested based on the results you&#039;d get from having a single turn of it. If you have the effect already, extending it to raise the power won&#039;t even be considered. Similar problems occur with effects that are based on how full or drunk you currently are.&lt;br /&gt;
&lt;br /&gt;
=Useful Expressions=&lt;br /&gt;
&#039;&#039;&#039;MP regen&#039;&#039;&#039;: .5 mp regen max, .5 mp regen min&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pirates&#039;&#039;&#039;: mainstat, +outfit swashbuckling&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;War&#039;&#039;&#039;: mainstat, +outfit frat warrior&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shieldbutting&#039;&#039;&#039;: muscle, +shield &lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
&lt;br /&gt;
Here is the expression used as &#039;&#039;&#039;tie&#039;&#039;&#039;breaker:&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;1 familiar weight, 1 familiar experience, 1 initiative, 5 exp, 1 item, 1 meat, 0.1 DA 1000 max, 1 DR, 0.5 all res, -10 mana cost, 1.0 mus, 0.5 mys, 1.0 mox, 1.5 mainstat, 1 HP, 1 MP, 1 weapon damage, 1 ranged damage, 1 spell damage, 1 cold damage, 1 hot damage, 1 sleaze damage, 1 spooky damage, 1 stench damage, 1 cold spell damage, 1 hot spell damage, 1 sleaze spell damage, 1 spooky spell damage, 1 stench spell damage, 1 critical, -1 fumble, 1 HP regen max, 3 MP regen max, 1 critical hit percent, 0.1 food drop, 0.1 booze drop, 0.1 hat drop, 0.1 weapon drop, 0.1 offhand drop, 0.1 shirt drop, 0.1 pants drop, 0.1 accessory drop, 1 DB combat damage&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
See [http://kolmafia.us/showthread.php?4274 this thread] for details.&lt;br /&gt;
&amp;lt;h2&amp;gt;See Also&amp;lt;/h2&amp;gt;&amp;lt;div style=&amp;quot;border: dashed 1px green; margin: 0.2em; padding: 1em; width=75%; background-color: #fff8dc;&amp;quot;&amp;gt;&amp;lt;center&amp;gt;[[Modifiers]]&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:Automation]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Modifier_Maximizer&amp;diff=6742</id>
		<title>Modifier Maximizer</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Modifier_Maximizer&amp;diff=6742"/>
		<updated>2010-11-15T19:56:18Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* General */ I guess that&amp;#039;s enough explanation for weighting? Someone else can handle formatting, for now, I guess.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RFI}}&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
==General==&lt;br /&gt;
The specification of what attributes to maximize is made by a comma-separated list of keywords, each possibly preceded by a numeric weight. Commas can be omitted if the next item starts with a +, -, or digit. Using just a +, or omitting the weight entirely, is equivalent to a weight of 1. Likewise, using just a - is equivalent to a weight of -1. Non-integer weights can be used, but may not be meaningful with all keywords.&lt;br /&gt;
&lt;br /&gt;
Numeric weights determine how much an individual keyword will be counted toward the score that Mafia assigns to each combination. For instance, &amp;quot;2 item drop&amp;quot; will force item drop to contribute four times as much as, say, &amp;quot;.5 meat drop&amp;quot; in the expression &amp;quot;maximize 2 item drop, meat drop&amp;quot;. The weights are simply multiplied with the corresponding modifier, so in the preceding expression, a natty blue ascot would contribute 20*.5 = 10 to your score, while a lucky rabbit&#039;s foot would contribute 2*7 + .5*7 = 17.5 to your score.&lt;br /&gt;
&lt;br /&gt;
==Numeric Modifiers==&lt;br /&gt;
The full name of any numeric modifier (as shown by the &#039;&#039;&#039;modref&#039;&#039;&#039; CLI command) is a valid keyword, requesting that its value be maximized. If multiple modifiers are given, their weights specify their relative importance. Negative weights mean that smaller values are more desirable for that modifier.&lt;br /&gt;
&lt;br /&gt;
Shorter forms are allowed for many commonly used modifiers. They can be abbreviated down to just the bold letters:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;mus&#039;&#039;&#039;, &#039;&#039;&#039;mys&#039;&#039;&#039;, &#039;&#039;&#039;mox&#039;&#039;&#039;, &#039;&#039;&#039;main&#039;&#039;&#039;stat, &#039;&#039;&#039;HP&#039;&#039;&#039;, &#039;&#039;&#039;MP&#039;&#039;&#039;, &#039;&#039;&#039;ML&#039;&#039;&#039;, &#039;&#039;&#039;DA&#039;&#039;&#039;, &#039;&#039;&#039;DR&#039;&#039;&#039;, &#039;&#039;&#039;com&#039;&#039;&#039;bat rate, &#039;&#039;&#039;item&#039;&#039;&#039; drop, &#039;&#039;&#039;meat&#039;&#039;&#039; drop, &#039;&#039;&#039;exp&#039;&#039;&#039;erience, &#039;&#039;&#039;adv&#039;&#039;&#039;entures&lt;br /&gt;
&amp;lt;br&amp;gt;Also, resistance (of any type) can be abbreviated as &#039;&#039;&#039;res&#039;&#039;&#039;, and damage can be abbreviated as &#039;&#039;&#039;dmg&#039;&#039;&#039;. &#039;&#039;&#039;all res&#039;&#039;&#039;istance is a shortcut for giving the same weight to all five basic elements. Likewise, &#039;&#039;&#039;elemental dmg&#039;&#039;&#039; is a shortcut for the five elemental damage types.&lt;br /&gt;
&lt;br /&gt;
Note that many modifiers come in pairs: a base value, plus a percentage boost (such as Moxie and Moxie Percent), or a penalty value. In general, you only need to specify the base modifier, and any related modifiers will automatically be taken into account.&lt;br /&gt;
&lt;br /&gt;
==Limits==&lt;br /&gt;
Any numeric modifier keyword can be followed by one or both of these special keywords:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;min&#039;&#039;&#039; - The weight specifies the minimum acceptable value for the preceding modifier. If the value is lower, the results will be flagged as a failure.+&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;max&#039;&#039;&#039; - The weight specifies the largest useful value for the preceding modifier. Larger values will be ignored in the score calculation, allowing other specified modifiers to be boosted instead.&lt;br /&gt;
&amp;lt;br&amp;gt;Note that the limit keywords won&#039;t quite work as expected for a modifier that you&#039;re trying to minimize.&lt;br /&gt;
&amp;lt;br&amp;gt;If &#039;&#039;&#039;min&#039;&#039;&#039; or &#039;&#039;&#039;max&#039;&#039;&#039; is specified at the start of the expression, it applies to the total score (the sum of each modifier value times its weight). A global &#039;&#039;&#039;max&#039;&#039;&#039; may allow equipment maximization to finish faster, since no further combinations will be considered once the specified value is reached.+&lt;br /&gt;
==Other Modifiers==&lt;br /&gt;
Boolean modifiers can also be used as keywords. With positive weight, the modifier is required to be true; with negative weight, it is required to be false. There is one shortcut available: &#039;&#039;&#039;sea&#039;&#039;&#039; requires both Adventure Underwater and Underwater Familiar to be true.&lt;br /&gt;
&lt;br /&gt;
The only bitmap modifiers that currently appear useful for maximization are Clownosity and Raveosity, so they are allowed as a special case. The weight specifies the required minimum value; only one value is actually meaningful for each keyword, so &#039;&#039;&#039;4 clownosity&#039;&#039;&#039; and &#039;&#039;&#039;7 raveosity&#039;&#039;&#039; are the only useful forms.&lt;br /&gt;
&lt;br /&gt;
String modifiers are not currently meaningful for maximization.&lt;br /&gt;
==Equipment==&lt;br /&gt;
Slot names can be used as keywords:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;hat&#039;&#039;&#039;, &#039;&#039;&#039;weapon&#039;&#039;&#039;, &#039;&#039;&#039;offhand&#039;&#039;&#039;, &#039;&#039;&#039;shirt&#039;&#039;&#039;, &#039;&#039;&#039;pants&#039;&#039;&#039;, &#039;&#039;&#039;acc1&#039;&#039;&#039;, &#039;&#039;&#039;acc2&#039;&#039;&#039;, &#039;&#039;&#039;acc3&#039;&#039;&#039;, &#039;&#039;&#039;familiar&#039;&#039;&#039; (stickers and fake hands are not currently planned.)&lt;br /&gt;
&amp;lt;br&amp;gt;With positive weights, only the specified slots will be considered for maximization. With negative weights, all but the specified slots will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;empty&#039;&#039;&#039; - With positive weight, consider only slots that are currently empty; with negative weight, only those that aren&#039;t empty. Either way, &#039;&#039;&#039;+&#039;&#039;slot&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;-&#039;&#039;slot&#039;&#039;&#039;&#039;&#039; can be used to further refine the selected slots.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;hand&#039;&#039;&#039;ed - With a weight of 1, only 1-handed weapons will be considered. With a larger weight, only weapons with at least that handedness will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;melee&#039;&#039;&#039; - With positive weight, only melee weapons will be considered. With negative weight, only ranged weapons will be considered.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;type &#039;&#039;text&#039;&#039;&#039;&#039;&#039; - Only weapons with a type containing &#039;&#039;text&#039;&#039; are considered; for example, &#039;&#039;&#039;type club&#039;&#039;&#039; if you plan to do some Seal Clubbing.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;shield&#039;&#039;&#039; - With positive weight, only shields will be considered for your off-hand. Implies &#039;&#039;&#039;1 handed&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;equip &#039;&#039;item&#039;&#039;&#039;&#039;&#039; - The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of &#039;&#039;&#039;+equip&#039;&#039;&#039; require all of the items to be equipped.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;outfit &#039;&#039;name&#039;&#039;&#039;&#039;&#039; - The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of &#039;&#039;&#039;+outfit&#039;&#039;&#039; are satisfied by any one of the outfits (since you can&#039;t be wearing more than one at a time).&lt;br /&gt;
&amp;lt;br&amp;gt;If both &#039;&#039;&#039;+equip&#039;&#039;&#039; and &#039;&#039;&#039;+outfit&#039;&#039;&#039; are used together, either one will satisfy the condition - all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;tie&#039;&#039;&#039;breaker - With negative weight, disables the use of a tiebreaker function that tries to choose equipment with generally beneficial attributes, even if not explicitly requested. There are only a few cases where this would be desirable: maximizing &#039;&#039;&#039;+combat&#039;&#039;&#039; or &#039;&#039;&#039;-combat&#039;&#039;&#039; (since there&#039;s usually only one item that can help), &#039;&#039;&#039;adv&#039;&#039;&#039; and/or &#039;&#039;&#039;PvP fights&#039;&#039;&#039; at rollover, and &#039;&#039;&#039;familiar weight&#039;&#039;&#039; when facing the Naughty Sorceress familiars.&lt;br /&gt;
==Familiars==&lt;br /&gt;
By default, the Modifier Maximizer does not recommend familiars, since there are many possible factors in choosing one beyond those that can be expressed via modifiers. However, you can request that specific familiars be compared with your current one:&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;switch &#039;&#039;familiar&#039;&#039;&#039;&#039;&#039; - With positive weight, the familiar is added to the list to be considered (unless the player lacks that familiar, or is already using it, in which case there is no effect). With negative weight, the familiar is added to the list only if the player lacks the previously specified familiar. For example, &#039;&#039;&#039;switch hobo monkey, -switch leprechaun&#039;&#039;&#039; will only consider the leprechaun if the player doesn&#039;t have the monkey.&lt;br /&gt;
==Assumptions==&lt;br /&gt;
All suggestions are based on the assumption that you will be adventuring in the currently selected location, with all your current effects, prior to the next rollover (since some things depend on the moon phases). For best results, make sure the proper location is selected before maximizing. This is especially true in The Sea and clan dungeons, which have many location-specific modifiers.&lt;br /&gt;
&lt;br /&gt;
Among effects, stat equalizer potions have a major effect on the suggested boosts, since they change the relative importance of additive and percentage stat boosts. Likewise, elemental phials make certain resistance boosts pointless. If you plan to use an equalizer or phial while adventuring, please use them first so that the suggestions take them into account.&lt;br /&gt;
==GUI Use==&lt;br /&gt;
If the Max Price field is zero or blank, the limit will be the smaller of your available meat, or your autoBuyPriceLimit (default 20,000). The other options should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
You can select multiple boosts, and the title of the list will indicate the net effect of applying them all - note that this isn&#039;t always just the sum of their individual effects.&lt;br /&gt;
==CLI Use==&lt;br /&gt;
The Modifier Maximizer can be invoked from the gCLI or a script via &#039;&#039;&#039;maximize &#039;&#039;expression&#039;&#039;&#039;&#039;&#039;, and will behave as if you&#039;d selected Equipment: on-hand only, Max Price: don&#039;t check, and turned off the Include option. The best equipment will automatically be equipped (unless you invoked the command as &#039;&#039;&#039;maximize? &#039;&#039;expression&#039;&#039;&#039;&#039;&#039;), but you&#039;ll still need to visit the GUI to apply effect boosts - there are too many factors in choosing between the available boosts for that to be safely automated. An error will be generated if the equipment changes weren&#039;t sufficient to fulfill all &#039;&#039;&#039;min&#039;&#039;&#039; keywords in the expression.&lt;br /&gt;
==Limitations &amp;amp;amp; Bugs==&lt;br /&gt;
This is still a work-in-progress, so don&#039;t expect everything to work perfectly at the moment. However, here are some details that are especially broken:&lt;br /&gt;
* Items that can be installed at your campground for a bonus (such as Hobopolis bedding) aren&#039;t considered.&lt;br /&gt;
* Your song limit isn&#039;t considered when recommending buffs, nor are any daily casting limits.&lt;br /&gt;
* Mutually exclusive effects aren&#039;t handled properly.&lt;br /&gt;
* Weapon Damage, Ranged Damage, and Spell Damage are calculated assuming 100 points of base damage - in other words, additive and percentage boosts are considered to have exactly equal worth. It&#039;s possible that Weapon and Ranged damage might use a better estimate of the base damage in the future, but for Spell Damage, the proper base depends on which spell you end up using.&lt;br /&gt;
* Effects which vary in power based on how many turns are left (love songs, Mallowed Out, etc.) are handled poorly. If you don&#039;t have the effect, they&#039;ll be suggested based on the results you&#039;d get from having a single turn of it. If you have the effect already, extending it to raise the power won&#039;t even be considered. Similar problems occur with effects that are based on how full or drunk you currently are.&lt;br /&gt;
&lt;br /&gt;
=Useful Expressions=&lt;br /&gt;
&#039;&#039;&#039;MP regen&#039;&#039;&#039;: .5 mp regen max, .5 mp regen min&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pirates&#039;&#039;&#039;: mainstat, +outfit swashbuckling&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;War&#039;&#039;&#039;: mainstat, +outfit frat warrior&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shieldbutting&#039;&#039;&#039;: muscle, +shield &lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
&lt;br /&gt;
Here is the expression used as &#039;&#039;&#039;tie&#039;&#039;&#039;breaker:&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;1 familiar weight, 1 familiar experience, 1 initiative, 5 exp, 1 item, 1 meat, 0.1 DA 1000 max, 1 DR, 0.5 all res, -10 mana cost, 1.0 mus, 0.5 mys, 1.0 mox, 1.5 mainstat, 1 HP, 1 MP, 1 weapon damage, 1 ranged damage, 1 spell damage, 1 cold damage, 1 hot damage, 1 sleaze damage, 1 spooky damage, 1 stench damage, 1 cold spell damage, 1 hot spell damage, 1 sleaze spell damage, 1 spooky spell damage, 1 stench spell damage, 1 critical, -1 fumble, 1 HP regen max, 3 MP regen max, 1 critical hit percent, 0.1 food drop, 0.1 booze drop, 0.1 hat drop, 0.1 weapon drop, 0.1 offhand drop, 0.1 shirt drop, 0.1 pants drop, 0.1 accessory drop, 1 DB combat damage&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
See [http://kolmafia.us/showthread.php?4274 this thread] for details.&lt;br /&gt;
&amp;lt;h2&amp;gt;See Also&amp;lt;/h2&amp;gt;&amp;lt;div style=&amp;quot;border: dashed 1px green; margin: 0.2em; padding: 1em; width=75%; background-color: #fff8dc;&amp;quot;&amp;gt;&amp;lt;center&amp;gt;[[Modifiers]]&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:Automation]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:ASH_For_Beginners&amp;diff=6346</id>
		<title>Talk:ASH For Beginners</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:ASH_For_Beginners&amp;diff=6346"/>
		<updated>2010-11-11T21:08:40Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Holy Moley! You actually started it, StDoodle! Way to GO! --[[User:Bale|Bale]] 22:43, 28 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your recent edit is completely wrong; I would have reverted it, except that the reason field wasn&#039;t big enough to explain just how it was wrong.&lt;br /&gt;
&lt;br /&gt;
ALL values in ASH are passed and assigned in a completely uniform manner, regardless of type.  That manner could either be referred to as &amp;quot;call by value&amp;quot; or &amp;quot;call by reference&amp;quot;; the two concepts aren&#039;t distinct here, since all ASH values are references to some object.  No copying is ever done, except as part of an implicit type conversion.&lt;br /&gt;
&lt;br /&gt;
You appear to be confusing the concepts of call type and mutability.  There&#039;s no difference in how (for example) a map and an int value are passed; the observed differences in behavior are entirely due to the fact that there are ways to modify the contents of a map (with it still remaining the same map), yet no ways of modifying the value of an integer.  The closest you can come is to produce a new integer value, and assign it to the same variable that formerly held the old value; it is the variable that is changing, not the value. --[[User:Jasonharper|Jasonharper]] 05:49, 27 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
First, for Jasonharper: Don&#039;t hesitate to make such changes when they&#039;re wrong. If more explanation is needed, the discussion page for the relevant page is a good place. If you don&#039;t have time / energy for explanations, feel free to just say &amp;quot;will explain later&amp;quot; and that&#039;s good. Hell, you don&#039;t even need reasons; you and V are considered the finall authorities on mafia, as you&#039;re the most active in, you know, making it exist.  This isn&#039;t the guideline for most users, but you &amp;amp; V have a special place in the hierarchy. Since fewyn provides hosting, anything that affects his ability to keep this site going is priority #1. After that, all factual information given by you or V is simply not up for dispute. (Well, discussion on talk pages is welcome, but I won&#039;t tolerate edit / revert wars; if one of you says something isn&#039;t correct / needs changing, that&#039;s how it is.) Then come admins, then everyone else, as far as editing priority goes. The long and short is that the official policy is that if you or V says something needs to be changed, or you actually make said change, you don&#039;t have to worry about reverts; even if you don&#039;t have time to explain the reasoning at the moment.&lt;br /&gt;
&lt;br /&gt;
Also, regarding the information that was edited: Even had it been correct, it&#039;s really beyond the scope of a &amp;quot;for beginners&amp;quot; page, IMO. I&#039;m all for adding an &amp;quot;Advanced ASH Language Specifications&amp;quot; page or similar, for those behind-the-scenes, nitty-gritty details as to how ASH works, but I don&#039;t think the beginner&#039;s page is the best place for said info. However, if anyone would like to make said advanced-info page, please feel free.&lt;br /&gt;
&lt;br /&gt;
Also, just to be clear; this is a wiki, so don&#039;t feel bad about things changing and getting changed back, etc. ad nauseum. Unless you&#039;re a spam-bot. ;) --[[User:StDoodle|StDoodle (#1059825)]] 11:26, 27 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is there a syntax highlighting language model for BBEdit/TextWrangler for the Mac?  Does anyone want one?  They&#039;re pretty simple to make...--[[User:Mcroft|Mcroft]] 20:37, 11 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
There&#039;s [http://kolmafia.us/showthread.php?4185-syntax-highlighting-for-TextWrangler this] one, but it&#039;s kinda out of date. You&#039;d basically just have to manually edit in a few functions. --[[User:Heeheehee|Heeheehee]] 21:08, 11 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2955</id>
		<title>CLI Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=CLI_Reference&amp;diff=2955"/>
		<updated>2010-11-08T06:16:49Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Mafia */ Yes, uh, a pipe should&amp;#039;ve been HTML-encoded. :P&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 &amp;amp;#124; 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;
|  ballpit&lt;br /&gt;
|  &lt;br /&gt;
|  jump in your clan&#039;s awesome ball pit.&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;
|  chips&lt;br /&gt;
|  type [,type [,type]]&lt;br /&gt;
|  buy chips from your clan&#039;s snack machine: radium, ennui, wintergreen&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 (CLI)|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&lt;br /&gt;
|  (hp &amp;amp;#124; mp) [amount] &lt;br /&gt;
|  restore amount 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>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Alias&amp;diff=3094</id>
		<title>Alias</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Alias&amp;diff=3094"/>
		<updated>2010-10-24T17:15:19Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Added wordwrapping to &amp;lt;pre&amp;gt; tags, added a missing &amp;quot;alias&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:alias}}&lt;br /&gt;
Creates a new alias in the KoLmafia CLI or displays the list of registered aliases.&lt;br /&gt;
An alias is a shortcut for complex CLI command(s) that are too long to type every time you want to. To create a new alias, type&lt;br /&gt;
 alias &#039;&#039;[alias_name]&#039;&#039; =&amp;gt; &#039;&#039;[actual_command]&#039;&#039;&lt;br /&gt;
into the CLI, where &amp;lt;code&amp;gt;&#039;&#039;[alias_name]&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;[alias_command]&#039;&#039;&amp;lt;/code&amp;gt; are replaced with the shortcut string you want to use and the actual command string. For example, to create an alias &amp;quot;f&amp;quot; for the &amp;lt;code&amp;gt;[[familiar]]&amp;lt;/code&amp;gt; CLI command, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias f =&amp;gt; familiar&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, instead of typing &amp;lt;code&amp;gt;familiar pixie&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;familiar sandworm&amp;lt;/code&amp;gt;, you can just type &amp;lt;code&amp;gt;f pixie&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;f sandworm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To see the list of aliases that you have created so far, type &amp;lt;code&amp;gt;alias&amp;lt;/code&amp;gt; into the CLI without any arguments.&lt;br /&gt;
&lt;br /&gt;
Aliases are preserved across multiple characters. You can remove existing aliases by using the &amp;lt;code&amp;gt;[[unalias]]&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
== Complex Examples ==&lt;br /&gt;
=== Automatically Getting Dentures ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space:pre-wrap;&amp;quot;&amp;gt;alias dentures =&amp;gt; checkpoint; equip frilly skirt; ash visit_url(&amp;quot;inv_use.php?which=3&amp;amp;whichitem=2951&amp;amp;pwd&amp;quot;); visit_url(&amp;quot;choice.php?whichchoice=188&amp;amp;option=3&amp;amp;choiceform3=Catburgle&amp;amp;pwd&amp;quot;); cli_execute(&amp;quot;outfit checkpoint&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equips a frilly skirt, chooses the right choice in the Orcish Frat House Blueprints adventure, and then re-equips whatever pants you had on when you type &#039;&#039;dentures&#039;&#039; into the CLI.&lt;br /&gt;
&lt;br /&gt;
=== See How many charges left on Bartender/Chef ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space:pre-wrap;&amp;quot;&amp;gt;alias boxen =&amp;gt; ashq if(have_chef()) print(&amp;quot;Chef turns used: &amp;quot;+get_property(&amp;quot;chefTurnsUsed&amp;quot;),&amp;quot;green&amp;quot;); else print(&amp;quot;No chef-in-a-box&amp;quot;,&amp;quot;gray&amp;quot;); if(have_bartender()) print(&amp;quot;Bartender turns used: &amp;quot;+get_property(&amp;quot;bartenderTurnsUsed&amp;quot;),&amp;quot;green&amp;quot;); else print(&amp;quot;No bartender-in-a-box&amp;quot;,&amp;quot;gray&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prints something similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; boxen&lt;br /&gt;
&lt;br /&gt;
Chef turns used: 5&lt;br /&gt;
Bartender turns used: 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== See How Many Substats we need to Level ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space:pre-wrap;&amp;quot;&amp;gt;alias level =&amp;gt; ashq stat s; switch(my_primestat()){case $stat[muscle]:s=$stat[submuscle];break;case $stat[mysticality]:s=$stat[submysticality];break;case $stat[moxie]:s=$stat[submoxie];break;default: } int s_left =(my_level()^2+4)^2 - my_basestat(s);print(&amp;quot;Missing &amp;quot;+s_left+&amp;quot; substat for level &amp;quot;+(my_level()+1));&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints something similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; level&lt;br /&gt;
&lt;br /&gt;
Missing 2839 substat for level 12&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6086</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=6086"/>
		<updated>2010-10-17T03:19:06Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Added info for plantingScript, added section for secret Mafia features (link to hola&amp;#039;s thread).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&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;
==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;
==Errors==&lt;br /&gt;
&lt;br /&gt;
For help when things go wrong, please see the page on [[ASH Errors]].&lt;br /&gt;
&lt;br /&gt;
==Additional Script Uses==&lt;br /&gt;
&lt;br /&gt;
In addition to regular scripts, relay override 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;
&#039;&#039;&#039;Between Battle (betweenBattleScript)&#039;&#039;&#039;&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;
*Does not require any special main() declaration.&lt;br /&gt;
*Example: Zarqon&#039;s [http://kolmafia.us/showthread.php?t=1240 Best Between Battle]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Buy (buyScript)&#039;&#039;&#039;&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;
&#039;&#039;&#039;Chatbot (chatbotScript)&#039;&#039;&#039;&lt;br /&gt;
*Will execute whenever a private message is received&lt;br /&gt;
*Requires a special main declaration void main(string sender, string message)&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;
&lt;br /&gt;
&#039;&#039;&#039;Counters (counterScript)&#039;&#039;&#039;&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. &lt;br /&gt;
*Example: Bale&#039;s [http://kolmafia.us/showthread.php?t=2519 CounterChecker].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login (loginScript)&#039;&#039;&#039;&lt;br /&gt;
:This script is immediately executed once your character is logged in.  Requires no special main() declaration.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logout (logoutScript)&#039;&#039;&#039;&lt;br /&gt;
:Same as the loginScript, but runs on logout.  Note that an [[abort|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;
&#039;&#039;&#039;Planting (plantingScript)&#039;&#039;&#039;&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;
*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;
&#039;&#039;&#039;Post-Ascension (postAscensionScript)&#039;&#039;&#039;&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])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-Ascension (preAscensionScript)&#039;&#039;&#039;&lt;br /&gt;
:Executed right before entering Valhalla.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recovery (recoveryScript)&#039;&#039;&#039;&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;
Two 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;
&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>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Monster_element&amp;diff=5304</id>
		<title>Monster element</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Monster_element&amp;diff=5304"/>
		<updated>2010-10-04T05:07:49Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: $elements[] will return an array, not $element[].&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|monster_element}}{{&lt;br /&gt;
#vardefine:return_type|element}}{{&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;
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|monster|check_me}}|&lt;br /&gt;
p1desc={{Pspan|check_me}} is the (optional) monster to get the elemental alignment of|&lt;br /&gt;
}}|&lt;br /&gt;
function_description=Returns the elemental alignment of the specified monster {{pspan|check_me}}. If {{pspan|check_me}} is not specified, it defaults to the last monster you encountered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This function can be used from within an [[In-combat Consulting]] script to help determine your fight strategy. When used this way, it isn&#039;t necessary to specify a monster, as the function will default to the one currently being fought.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Sample Code|&lt;br /&gt;
description=This example attempts to find element(s) that the monster being fought right now is weak against.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [element] weak_elements;&lt;br /&gt;
&lt;br /&gt;
switch (monster_element())&lt;br /&gt;
{&lt;br /&gt;
   case $element[cold]:   weak_elements = $elements[spooky, hot];    break;&lt;br /&gt;
   case $element[spooky]: weak_elements = $elements[hot, stench];    break;&lt;br /&gt;
   case $element[hot]:    weak_elements = $elements[stench, sleaze]; break;&lt;br /&gt;
   case $element[stench]: weak_elements = $elements[sleaze, cold];   break;&lt;br /&gt;
   case $element[sleaze]: weak_elements = $elements[cold, spooky];   break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|monster_attack|monster_defense|monster_hp}}|&lt;br /&gt;
special=If no monster is specified and no monster has been fought in this session, this function returns $element[none]. This is because mafia forgets the value of [[last_monster|last_monster()]] when it logs out.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]]|[[Category:In-combat Consulting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6682</id>
		<title>Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6682"/>
		<updated>2010-10-04T05:06:08Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Informational Scripts */ KoLwiki link modded to use template.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
This is a list of well written scripts that are currently being maintained for the latest version of KoL and KoLmafia. All scripts on this list are free and certified safe for use without any hidden costs or malicious code. If these scripts become outdated for very long or any security risks are found they will be removed from this list, so users should feel free to make use of them.&lt;br /&gt;
&lt;br /&gt;
Of course it is possible that one of these scripts can cause trouble for the user if they are not used properly, so please read the opening post in each thread linked before using that script.&lt;br /&gt;
&lt;br /&gt;
==Turn-Burning Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn]&lt;br /&gt;
* Automates delving into Fernswarthy&#039;s Basement.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bounty&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1023-auto-BHH-and-friends&amp;amp;p=15204&amp;amp;viewfull=1#post15204 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?197-izchak izchak], [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Automates the bounty gathering quest.&lt;br /&gt;
* In conjunction with SmartStasis combat script (below) it will also olfact the monster for the bounty.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CounterChecker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2519 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Automates semi-rare acquisition, use of dance cards and a few other counter related activities.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dwarven Factory&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2884 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2677-That-FN-Ninja That FN Ninja]&lt;br /&gt;
* Automates the optional Dwarven Factory quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MacGuffin&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1965 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Automation for the L11 MacGuffin Quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One-Click Wossname&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?960 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon] &lt;br /&gt;
* A complete script for completing the L12 Island War quest.&lt;br /&gt;
* It allows you to chose the medal you are rewarded with, including a Wossname.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rinn&#039;s Quest Scripts&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2584 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn] &lt;br /&gt;
* Automation for most of the game&#039;s quests.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slime Tube Adventuring Script&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2596 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=alhifar Alhifar]&lt;br /&gt;
* Complete automation for the Slime Tube. &lt;br /&gt;
* You set up the outfits for maximum ML and minimum ML. The script then switches between them.&lt;br /&gt;
* It even allows you to chose to kill or tatter slimes. &lt;br /&gt;
* The variety of options allows every type of Slime Tube play, even a slimeling run, to be automated.&lt;br /&gt;
&lt;br /&gt;
==Relay Override Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clan_basement.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4137 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
* Sorts dungeon loot by boss, presenting Hobopolis loot before Slime Tube loot.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pyramid.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3922 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
* Disables potentially harmful links in the Pyramid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;shore.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2813 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?872-lostcalpolydude lostcalpolydude] and [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* When you take a vacation it reminds you of which shore items you might need for floor 6 of the Sorceress&#039; Tower.&lt;br /&gt;
* It uses the telescope to determine the exact item needed if you have a full scope.&lt;br /&gt;
* It also keeps you from taking a vacation when you need the the forged documents &#039;cause it sucks to accidently lose those 3 adventures.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Telescope Information&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4057 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* When you look through the telescope at your campsite it will explain what monsters you will meet at the lair and the item to defeat them.&lt;br /&gt;
* Tells you if you have the items. If you need any items it tells you where to find them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;woods.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4199-Acquire-Continuum-Transfunctioner&amp;amp;p=29908&amp;amp;viewfull=1#post29908 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Gets the Continuum Transfunctioner automatically on your first visit to the woods. You will not need to click anything, it just happens.&lt;br /&gt;
&lt;br /&gt;
===User Interface Scripts===&lt;br /&gt;
&lt;br /&gt;
These scripts are a special type of relay override scripts in that they create pages that do not exist as part of KoL. They are prefixed by &amp;quot;relay_&amp;quot; and must be placed in the user&#039;s \relay directory. These scripts are accessed via the &amp;quot;-run script-&amp;quot; dropdown menu in the relay browser.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Info&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4248 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=icon315 Icon315]&lt;br /&gt;
*This script shows you the daily information such as the moons&#039; effects on various modifiers, current stat day and Daily Dungeon rooms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;relay_SlimeTube&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2596-Slime-Tube-Adventuring-Script&amp;amp;p=29687&amp;amp;viewfull=1#post29687 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Adapted from Alhifar&#039;s Slime Tube Adventuring Script; does everything the original script does.&lt;br /&gt;
* Adds a UI to enable the user to easily configure the Slime Tube script without having to modify the base script.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ZLib Variable Editor&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4081 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2984-heeheehee Heeheehee]&lt;br /&gt;
*This script provides a more user-friendly interface for modifying [http://kolmafia.us/showthread.php?2072 ZLib] variables.&lt;br /&gt;
&lt;br /&gt;
==Custom Combat Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First Things First&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1255 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Takes care of the first few things needed in a fight: pickpocketing, entangling noodles, olfaction, spooky putty, etc&lt;br /&gt;
* Includes quest related events: insulting pirates, throwing flyers, driving away clingy pirates if clingfilm is not needed, etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SmartStasis&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1715 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Includes everything from First Things First. (Requires that to be downloaded also.)&lt;br /&gt;
* Stasis monsters for a variety of reasons: starfishing, hobo monkey meat.&lt;br /&gt;
* Notices when the monkey steals and recognizes if your slimeling or other chargeable starfish is out of juice and ends stasis.&lt;br /&gt;
* Quest related stasis: Using molybdenum magnet on the correct gremlin, getting essences in Seaside Megalopolis, learning rave dance moves Outside the Club.&lt;br /&gt;
* Uses disco combos and rave combos when they improve your profit.&lt;br /&gt;
&lt;br /&gt;
==Buff Upkeep Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;acquireBuff&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4048 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?46-Rinn Rinn]&lt;br /&gt;
* Gets a buff from a buffbot without needing to know the bot&#039;s name or pricelist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Best Between Battle Script Ever&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1240 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Executes between battles in automatic adventuring.&lt;br /&gt;
* Adjusts choice adventures, adjusts MCD for current moxie, auto-tames turtles.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;hatter.ash&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4262 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?2677-That-FN-Ninja That FN Ninja]&lt;br /&gt;
* To get a specific Mad Hatter buff painlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Universal Recovery&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1780 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Improves mafia&#039;s automated recovery to make best use of all items in hardcore/ronin or conserve meat if you have mall access.&lt;br /&gt;
* Keeps spare mp healing items on-hand in case they are needed in combat.&lt;br /&gt;
* Conserves healing items for use against your Shadow.&lt;br /&gt;
* Removes poison and keeps some extra antidotes for use in combat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VIP Hopping&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3620-VIP-Hopping!-Quick-clanhop-to-BAfH-for-all-VIP-room-goodies! download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Hops over the clan Bonus Adventures from Hell to get something from their VIP Lounge, then it hops back to your regular clan.&lt;br /&gt;
* Enables access to all VIP Lounge amenities and the ballpit without needing to spend time in BaFH.&lt;br /&gt;
* If you don&#039;t have a membership in Bonus Adventures from Hell, it submits a request to join the clan so that you can get access to a fully stocked VIP Lounge for free.&lt;br /&gt;
&lt;br /&gt;
==Item Handling Scripts==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Misshappen Animal Skeleton Familiar/Checker/Buyer&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?p=30995 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1789-eitak eitak]&lt;br /&gt;
* This script uses framework from Spiny Twizzler&#039;s Tiny Plastic Series 1 &amp;amp; 2 Checker script and facilitates the automated acquisition of the Misshapen Animal Skeleton. There are some settings you can tweak within the script itself to suit your needs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PriceAdvisor&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3110 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=aqualectrix aqualectrix]&lt;br /&gt;
* Gives advice on how to maximize profit from an item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rainbow Gravitation made easy&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?1929 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* In hardcore/ronin it handles automatic wad transmutation to enable easy creation of Rainbow Wads.&lt;br /&gt;
* With mall access, it will purchase necessary wads to use daily casts of Rainbow Gravitation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scripting the birth of a new life&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2769 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Sets optimal choice adventures based on current class for your ascension. Perfect to run at the beginning of a new life.&lt;br /&gt;
* Automates simple tasks that are always run at the beginning of a new life like pulling your VIP Lounge Key and visiting the Toot Oriole.&lt;br /&gt;
&lt;br /&gt;
==Informational Scripts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bumcheekcity&#039;s Easy Wiki Snapshot Maker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3001 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bumcheekcity bumcheekcity]&lt;br /&gt;
* This script will collect information about your character and generate a profile to display on [http://bumcheekcity.com/kol/profile.php bumcheekcity&#039;s website].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EatDrink.ash: Optimize your daily diet&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&amp;amp;p=30725&amp;amp;viewfull=1#post30725 best download here]) - ([http://kolmafia.us/showthread.php?1519 outdated official thread here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=fronobulax fronobulax]&lt;br /&gt;
* Tries to find an optimal diet for a given value of an adventure.&lt;br /&gt;
* Can be run in simulation mode, just to see what it would do.&lt;br /&gt;
* Since dj_d is taking a leave of absence, fronobulax has temporarily taken up maintenance of this script.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;StDoodle&#039;s Custom Daily Deeds&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3443 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?720-StDoodle StDoodle]&lt;br /&gt;
* Tracks all events that have limited uses, from pool table to pasta summoning.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slime Vial Recipes&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3544-Slime-vial-recipes&amp;amp;p=25337&amp;amp;viewfull=1#post25337 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1017-jasonharper jasonharper]&lt;br /&gt;
* This script will help you get the {{kolwiki|Color Wheel of Yuck}} trophy by checking your discoveries list and mixing the vials in your inventory to create slime potions you do not know.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tiny Plastic Series 1 &amp;amp; 2 Checker&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?goto=newpost&amp;amp;t=2587 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1897-Spiny Spiny Twizzler]&lt;br /&gt;
* Its default behaviour is informational to help you acquire your Tiny Plastic Trophy and/or Two-Tiered Tiny Plastic Trophy. You may optionally edit the preferences in the script to shop for missing trophies for you with a budget that you set yourself. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What are you worth?&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2628-What-are-you-worth-networth.ash-will-tell-you.&amp;amp;p=24990&amp;amp;viewfull=1#post24990 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d] and [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* This calculates the current value of all items you own and informs you of what you are worth.&lt;br /&gt;
&lt;br /&gt;
==Script Libraries==&lt;br /&gt;
These scripts are libraries of functions that are required components of other scripts. By themselves they do little or nothing. Expect to download them when directed in a script&#039;s instructions, or if you want to be a scripter, then study them and learn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HTMLform&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3842 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://kolmafia.us/member.php?1017-jasonharper jasonharper]&lt;br /&gt;
* Library of functions used for creating forms in [[Relay_Override_Scripting#User_Interface_Script|relay interface scripts]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SmashLib&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3065 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=aqualectrix aqualectrix]&lt;br /&gt;
* Determines the results of pulverizing equipment and reports it for use by scripts or aliases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ZLib&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2072 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=zarqon zarqon]&lt;br /&gt;
* Ultimate toolbox of scripting functions for math, string manipulation, version checking, automatic mapfile updating, persistent variables, adventuring, kmailing and so much more. &#039;&#039;Many scripts require this.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clan Hopping&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?2071 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=bale Bale]&lt;br /&gt;
* Hop to a whitelisted clan quickly and easily from the CLI.&lt;br /&gt;
&lt;br /&gt;
[[Category:New User Help]][[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=6000</id>
		<title>Talk:Use familiar</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=6000"/>
		<updated>2010-09-26T22:10:38Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm?&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash use_familiar($familiar[sandworm])&lt;br /&gt;
&lt;br /&gt;
: Putting Mexicana the Hovering Sombrero back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Hecho en Mexico the Baby Sandworm out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: true&amp;lt;br /&amp;gt;&lt;br /&gt;
I assume that the ash command should be enough to check return value; correct me if I&#039;m wrong. --[[User:Heeheehee|Heeheehee]] 21:03, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;ll have to recheck after RO, but here is what I was getting (doing things slightly differently):&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[slimeling]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Dusty the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Yuk the Slimeling out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: false&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Huh. Using that method, I get:&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[sombrero]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Hecho en Mexico the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Mexicana the Hovering Sombrero out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: true&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 07:51, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m also seeing expected behavior; true most of the time, false if I try a familiar I don&#039;t have.&lt;br /&gt;
--[[User:StDoodle|StDoodle (#1059825)]] 14:52, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the syntax as described on this page confusing. With other functions I do not have to specify the datatype, for example:&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit($string[Backup]);&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit(&amp;quot;Backup&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
both work identically. However, use_familiar(&amp;quot;hobo&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
returns the error &amp;quot;Function &#039;use_familiar( string )&#039; undefined...&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
This just happened to be the first function I looked up on this wiki, and if the discussion with examples had not been here, I don&#039;t think I would have worked it out at all.--[[User:RogerMexico|RogerMexico]] 12:04, 25 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
By default, supplying something inside of quotes is considered of the &amp;quot;string&amp;quot; datatype. So, $string[hello] is the same as &amp;quot;hello&amp;quot;. However, use_familiar() needs the familiar datatype. You can&#039;t just supply a string (ie &amp;quot;hobo&amp;quot;); you need to supply a familiar. Since datatypes like familiar, element, etc. aren&#039;t &amp;quot;normal&amp;quot; datatypes used in programming, we have to use an explicit datatype constant call (the dollar-sign thing) or a function that converts from a string to that datatype. --[[User:StDoodle|StDoodle (#1059825)]] 18:42, 25 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;ve done some further reading on this wiki (which is absolutely superb documentation by the way) and came to understand &#039;&#039;why&#039;&#039; it is that way. But for non-programmers like myself who are looking for a quick answer, I think an example on the page would help. I&#039;ll try adding one, hope I don&#039;t screw it up :) Oh, and is there a page that discusses syntax in general? The whole reason I went and looked at the outfit() function was to try and understand the syntax of the function (specifically, why is the word familiar inside the parentheses there?).The datatype page was helpful, I think something like that on syntax would be nice. --[[User:RogerMexico|RogerMexico]] 13:26, 26 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The word &amp;quot;familiar&amp;quot; inside the parentheses indicates the type of argument that this function accepts. An additional note: the functions for [[Datatype Conversions]] might help.&lt;br /&gt;
: Also, [[ASH For Beginners|this page]] might be what you&#039;re looking for; I dunno. --[[User:Heeheehee|Heeheehee]] 22:10, 26 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Kolmafia:Spam&amp;diff=7132</id>
		<title>Kolmafia:Spam</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Kolmafia:Spam&amp;diff=7132"/>
		<updated>2010-09-10T23:22:55Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Sneaky OCD capitalization!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:KoLmafia:Spam}}&lt;br /&gt;
&lt;br /&gt;
Whenever we have an anonymous bot spamming us we ban the IP address from posting for 6 months, but do not prevent that address from creating an account&lt;br /&gt;
&lt;br /&gt;
== The Chronicle of KoLmafia&#039;s spam problem. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our spam problem was originally confined to a page titled [[Talk:(ASHRM) String Handling Routines]]. That page was deleted since it is no longer relevant to our wiki. However the spambot kept re-recreating it. Endlessly. Finally the page was protected to see what would happen. &lt;br /&gt;
&lt;br /&gt;
Discussion about this problem was conducted on [[User talk:Heeheehee#(ASHRM) String Handling Routines|User talk:Heeheehee]]&lt;br /&gt;
&lt;br /&gt;
After that a spambot created spam on [[File talk:Breakable equipment.jpg]]. &lt;br /&gt;
&lt;br /&gt;
Finally we restricted anonymous IPs from editing out wiki in an attempt to stop the problem. We await the outcome of this experiment.&lt;br /&gt;
&lt;br /&gt;
The current spam discussion is on [[File talk:Breakable equipment.jpg]] where we restore it every time the spambot messes it up. We also keep a spam count on that page.&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Condition&amp;diff=7141</id>
		<title>Condition</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Condition&amp;diff=7141"/>
		<updated>2010-09-06T01:06:24Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Formatted CLI bits; do we want to keep this, or should some additional distinction be made? (I&amp;#039;m thinking a possible template at some point.)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:condition (CLI)}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;help condition&amp;lt;/span&amp;gt; offers the following:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;condition* clear | check | add condition | set condition&amp;lt;/span&amp;gt; - modify your adventuring goals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;goal* clear | check | add condition | set condition&amp;lt;/span&amp;gt; - modify your adventuring goals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;objective* clear | check | add condition | set condition&amp;lt;/span&amp;gt; - modify your adventuring goals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Commands]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Kolmafia_talk:Spam&amp;diff=7134</id>
		<title>Kolmafia talk:Spam</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Kolmafia_talk:Spam&amp;diff=7134"/>
		<updated>2010-09-01T17:14:57Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Created page with &amp;#039;I&amp;#039;m just slightly sad that I can&amp;#039;t move this page to &amp;quot;KoLmafia:Spam&amp;quot; (gogo ocd capitalization!). But more relevantly, basically the spambots have two options: start registering a…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;m just slightly sad that I can&#039;t move this page to &amp;quot;KoLmafia:Spam&amp;quot; (gogo ocd capitalization!). But more relevantly, basically the spambots have two options: start registering accounts or pick on some other wiki. If the former is the case, then we have a problem. Hopefully that&#039;s too much effort (although it can be done simply enough). If the latter, we&#039;re safe. I guess we should give it a few weeks, at the very least. --[[User:Heeheehee|Heeheehee]] 17:14, 1 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7118</id>
		<title>File talk:Breakable equipment.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7118"/>
		<updated>2010-08-29T04:40:06Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Times this page has been spammed: 3&lt;br /&gt;
&lt;br /&gt;
Now we know what happens when we protect the page that spambots like. This seems to be the new spambot page. ;) --Bale 21:29, 17 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 5 --[[User:Bale|Bale]] 06:56, 18 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 7 --[[User:Heeheehee|Heeheehee]] 23:54, 20 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 9 --[[User:Bale|Bale]] 19:14, 21 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 10 --[[User:Heeheehee|Heeheehee]] 04:13, 22 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 11 (That&#039;s ridiculous. It&#039;s not even funny. Seriously it isn&#039;t)----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 23:22, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* You&#039;re right that it really isn&#039;t funny, but thanks to your &amp;quot;seriously it isn&#039;t&amp;quot; comment, I spit tea out my nose. So I guess it was funny after all. Either that or I just have a bad case of reverse-schadenfreude where I take delight in my own misery. --[[User:Bale|Bale]] 23:31, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 12. Ok first of all, why would you spam here? Secondly, should we block this page?----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 19:54, 24 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* NO! We should not block this page. There was another page on this wiki (whose name escapes me since it was weird) which was spammed exclusively. We didn&#039;t use that page for anything, so we deleted it every time the spambot created it. We finally decided to protect that page 3 days before this page became the new spam lightening rod. If we protected this page, the new spambot favorite page might be one that actually gets used. That would be BAD! --[[User:Bale|Bale]] 20:53, 24 August 2010 (UTC)&lt;br /&gt;
** &#039;&#039;&#039;(ASHRM) String Handling Routines&#039;&#039;&#039; or something like that? But yeah, I had originally protected the page but was convinced to unprotect it because of the cool analogy (lightning rod!). It was eventually StD who reprotected it because he got sick of the spam problem. But since it&#039;s resurfaced, we really should learn to stop protecting pages. If it spreads to a new page while this one&#039;s still unprotected, then we might consider protecting pages en masse (alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond). But okay, it&#039;s been hit 12 times in a row without any other targets coming into sight. Guess we&#039;ll have to wait another 25 before being really sure that spambots won&#039;t target any other pages. --[[User:Heeheehee|Heeheehee]] 21:23, 24 August 2010 (UTC)&lt;br /&gt;
***Isn&#039;t there a way to make it so that only registered users can edit pages? That would keep away lots of spam bots----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 22:00, 24 August 2010 (UTC)&lt;br /&gt;
***It seems that only fewyn can change [[Special:ListGroupRights|permissions]]. --[[User:Bale|Bale]] 23:49, 24 August 2010 (UTC)&lt;br /&gt;
*** Yep. &amp;quot;(alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond)&amp;quot; --[[User:Heeheehee|Heeheehee]] 05:56, 25 August 2010 (UTC)&lt;br /&gt;
*** We try not to bother fewyn about the wiki as much as we can get away with. Not making fewyn work except for something important is one of our guiding principles. However I think that this may be important. But what does StDoodle think? --[[User:Bale|Bale]] 07:07, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry guys, been busy lately. Here&#039;s my take:&lt;br /&gt;
# The original &amp;quot;protect this page&amp;quot; was equal parts frustration &amp;amp; experiment. The experiment was fruitful, in that we learned something, but unfortunately not what we wanted to. IE it didn&#039;t stop the spam, it just moved it. So unless anyone can think of something useful to add to that process, we should think carefully about that option. (Note: this does NOT apply if the spam moves on its own to a useful page).&lt;br /&gt;
# As mentioned above, this page isn&#039;t all that useful. I mean, yeah, kinda, but it&#039;s easy to make a new one for the content, and just leave this one here as a spam honeypot. (Plus, it&#039;s name isn&#039;t one that represents what I was trying to move the wiki away from, as the ASHRM one did.)&lt;br /&gt;
# Long-term solution would be to bug fewyn to make the changes mentioned above. I think I&#039;m going to go ahead and do that, since we all seem to agree that it&#039;s the best idea. But I&#039;m not going to pressure him to hurry; it looks like you guys have stayed on top of things fairly well, so no major need to have it done RIGHT NAOO.&lt;br /&gt;
# I&#039;m likely to be busy for the near-to-mid future with personal junk. (Possible divorce, ew.) From this point on, I&#039;d like to designate Bale as being officially, 100% in charge of day-to-day operations (fewyn of course keeping the &amp;quot;final say,&amp;quot; when he wants it). Thanks for all of your efforts!&lt;br /&gt;
-- [[User:StDoodle|StDoodle]] 07:27, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== oqNpkWoecHwzmsh ==&lt;br /&gt;
&lt;br /&gt;
Isn&#039;t this cute? The spambot has created a new section with a nonsense name so that our discussion wasn&#039;t deleted. I don&#039;t know what to make of it. I&#039;m leaving the section header here just &#039;cause I&#039;m curious if future spambots will use it or create their own nonsense sections. I suspect the later. &lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 13 --[[User:Bale|Bale]] 20:12, 25 August 2010 (UTC)&lt;br /&gt;
: Times this page has been spammed: 14. Also, uh, what was up with the latest spam hit? --[[User:Heeheehee|Heeheehee]] 23:53, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Okay, that &#039;&#039;WAS&#039;&#039; weird. It never crossed my mind that it might over-write only the first section, leaving this one untouched. Just puzzling. --[[User:Bale|Bale]] 00:39, 26 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 15. Ridiculous. Just Ridiculous ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 02:12, 26 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 16 --[[User:Bale|Bale]] 07:19, 28 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 17 ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 13:08, 28 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 18 ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 20:50, 28 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
19! Fun! --[[User:Heeheehee|Heeheehee]] 04:40, 29 August 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7117</id>
		<title>File talk:Breakable equipment.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7117"/>
		<updated>2010-08-29T04:39:06Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Reverted edits by 217.6.171.194 (Talk) to last revision by Icon315&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Times this page has been spammed: 3&lt;br /&gt;
&lt;br /&gt;
Now we know what happens when we protect the page that spambots like. This seems to be the new spambot page. ;) --Bale 21:29, 17 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 5 --[[User:Bale|Bale]] 06:56, 18 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 7 --[[User:Heeheehee|Heeheehee]] 23:54, 20 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 9 --[[User:Bale|Bale]] 19:14, 21 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 10 --[[User:Heeheehee|Heeheehee]] 04:13, 22 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 11 (That&#039;s ridiculous. It&#039;s not even funny. Seriously it isn&#039;t)----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 23:22, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* You&#039;re right that it really isn&#039;t funny, but thanks to your &amp;quot;seriously it isn&#039;t&amp;quot; comment, I spit tea out my nose. So I guess it was funny after all. Either that or I just have a bad case of reverse-schadenfreude where I take delight in my own misery. --[[User:Bale|Bale]] 23:31, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 12. Ok first of all, why would you spam here? Secondly, should we block this page?----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 19:54, 24 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* NO! We should not block this page. There was another page on this wiki (whose name escapes me since it was weird) which was spammed exclusively. We didn&#039;t use that page for anything, so we deleted it every time the spambot created it. We finally decided to protect that page 3 days before this page became the new spam lightening rod. If we protected this page, the new spambot favorite page might be one that actually gets used. That would be BAD! --[[User:Bale|Bale]] 20:53, 24 August 2010 (UTC)&lt;br /&gt;
** &#039;&#039;&#039;(ASHRM) String Handling Routines&#039;&#039;&#039; or something like that? But yeah, I had originally protected the page but was convinced to unprotect it because of the cool analogy (lightning rod!). It was eventually StD who reprotected it because he got sick of the spam problem. But since it&#039;s resurfaced, we really should learn to stop protecting pages. If it spreads to a new page while this one&#039;s still unprotected, then we might consider protecting pages en masse (alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond). But okay, it&#039;s been hit 12 times in a row without any other targets coming into sight. Guess we&#039;ll have to wait another 25 before being really sure that spambots won&#039;t target any other pages. --[[User:Heeheehee|Heeheehee]] 21:23, 24 August 2010 (UTC)&lt;br /&gt;
***Isn&#039;t there a way to make it so that only registered users can edit pages? That would keep away lots of spam bots----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 22:00, 24 August 2010 (UTC)&lt;br /&gt;
***It seems that only fewyn can change [[Special:ListGroupRights|permissions]]. --[[User:Bale|Bale]] 23:49, 24 August 2010 (UTC)&lt;br /&gt;
*** Yep. &amp;quot;(alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond)&amp;quot; --[[User:Heeheehee|Heeheehee]] 05:56, 25 August 2010 (UTC)&lt;br /&gt;
*** We try not to bother fewyn about the wiki as much as we can get away with. Not making fewyn work except for something important is one of our guiding principles. However I think that this may be important. But what does StDoodle think? --[[User:Bale|Bale]] 07:07, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry guys, been busy lately. Here&#039;s my take:&lt;br /&gt;
# The original &amp;quot;protect this page&amp;quot; was equal parts frustration &amp;amp; experiment. The experiment was fruitful, in that we learned something, but unfortunately not what we wanted to. IE it didn&#039;t stop the spam, it just moved it. So unless anyone can think of something useful to add to that process, we should think carefully about that option. (Note: this does NOT apply if the spam moves on its own to a useful page).&lt;br /&gt;
# As mentioned above, this page isn&#039;t all that useful. I mean, yeah, kinda, but it&#039;s easy to make a new one for the content, and just leave this one here as a spam honeypot. (Plus, it&#039;s name isn&#039;t one that represents what I was trying to move the wiki away from, as the ASHRM one did.)&lt;br /&gt;
# Long-term solution would be to bug fewyn to make the changes mentioned above. I think I&#039;m going to go ahead and do that, since we all seem to agree that it&#039;s the best idea. But I&#039;m not going to pressure him to hurry; it looks like you guys have stayed on top of things fairly well, so no major need to have it done RIGHT NAOO.&lt;br /&gt;
# I&#039;m likely to be busy for the near-to-mid future with personal junk. (Possible divorce, ew.) From this point on, I&#039;d like to designate Bale as being officially, 100% in charge of day-to-day operations (fewyn of course keeping the &amp;quot;final say,&amp;quot; when he wants it). Thanks for all of your efforts!&lt;br /&gt;
-- [[User:StDoodle|StDoodle]] 07:27, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== oqNpkWoecHwzmsh ==&lt;br /&gt;
&lt;br /&gt;
Isn&#039;t this cute? The spambot has created a new section with a nonsense name so that our discussion wasn&#039;t deleted. I don&#039;t know what to make of it. I&#039;m leaving the section header here just &#039;cause I&#039;m curious if future spambots will use it or create their own nonsense sections. I suspect the later. &lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 13 --[[User:Bale|Bale]] 20:12, 25 August 2010 (UTC)&lt;br /&gt;
: Times this page has been spammed: 14. Also, uh, what was up with the latest spam hit? --[[User:Heeheehee|Heeheehee]] 23:53, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Okay, that &#039;&#039;WAS&#039;&#039; weird. It never crossed my mind that it might over-write only the first section, leaving this one untouched. Just puzzling. --[[User:Bale|Bale]] 00:39, 26 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 15. Ridiculous. Just Ridiculous ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 02:12, 26 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 16 --[[User:Bale|Bale]] 07:19, 28 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 17 ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 13:08, 28 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 18 ----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 20:50, 28 August 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6220</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6220"/>
		<updated>2010-08-26T13:27:58Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: /* Map modified within foreach */ Elaborated on this bit.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
Errors happen. When they do, it helps to have some idea of what what wrong.&lt;br /&gt;
&lt;br /&gt;
===Abort===&lt;br /&gt;
&lt;br /&gt;
Whenever a script runs the [[abort|abort()]] function, this error is generated.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=The zero-parameter form:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
abort();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will stop the execution and print: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;KoLmafia declares world peace.&amp;lt;/span&amp;gt; Note that this message may also appear as a result of pressing Esc in the Main Interface or hitting &amp;quot;stop now&amp;quot; in the Adventure tab.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=The one-parameter form:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
abort(&amp;quot;Aborting script...&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will stop the execution and print: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Aborting script...&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cannot initialize parameter [parameter]===&lt;br /&gt;
&lt;br /&gt;
This error is created when an assignment is attempted inside a function declaration.&lt;br /&gt;
The following code results in an error.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/* test.ash */&lt;br /&gt;
&lt;br /&gt;
void my_function( string myvar = &amp;quot;value&amp;quot; )&lt;br /&gt;
{&lt;br /&gt;
   /* Do something */&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will halt the script and print: &amp;lt;span style=&amp;quot;color: red;&amp;quot;&amp;gt;Cannot initialize parameter myvar (test.ash, line X)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cannot return [datatype] from [datatype] function===&lt;br /&gt;
&lt;br /&gt;
This indicates that the return value does not match the function&#039;s type.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int stuff(){&lt;br /&gt;
   return &amp;quot;4&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Cannot return string value from int function (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Similarly, for void functions:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
void stuff(){&lt;br /&gt;
   return 4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Cannot return a value from a void function (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Encountered &#039;[break|continue]&#039; outside loop===&lt;br /&gt;
&lt;br /&gt;
This indicates that the control structure in question was not in a loop.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
continue;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Encountered &#039;continue&#039; outside of loop (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Expected===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem (missing ending semi-colon, unmatched braces, unmatched parenthesis etc...).&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int a = 1&lt;br /&gt;
print(a);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Expected ;, found print (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Function defined multiple times===&lt;br /&gt;
&lt;br /&gt;
This indicates that the function in question has already been defined.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int abs(int a){&lt;br /&gt;
    return a*((a&amp;gt;0).to_int()*2 - 1);&lt;br /&gt;
}&lt;br /&gt;
int abs(int a){&lt;br /&gt;
    if(a&amp;lt;0) a = -a;&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Function &amp;lt;nowiki&amp;gt;&#039;abs( int )&#039;&amp;lt;/nowiki&amp;gt; defined multiple times (test.ash, line 4)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;if&amp;quot; requires a boolean conditional expression ===&lt;br /&gt;
&lt;br /&gt;
This indicates that the condition inside an if statement is not a boolean.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if(42) {&lt;br /&gt;
   print(&amp;quot;Don&#039;t panic.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;if&amp;quot; requires a boolean conditional expression (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Index type is not a primitive type===&lt;br /&gt;
&lt;br /&gt;
This indicates that the map&#039;s index is not a standard datatype (float, int, string, etc.).&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record alpha{&lt;br /&gt;
   int a;&lt;br /&gt;
   int b;&lt;br /&gt;
};&lt;br /&gt;
int[alpha] map;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Index type &#039;alpha&#039; is not a primitive type (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Invalid field name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record does not contain the field in question.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record my_record {&lt;br /&gt;
   string a;&lt;br /&gt;
   string b;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
my_record [int] my_map;&lt;br /&gt;
my_map[1].c = &amp;quot;hello&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Invalid field name &#039;c&#039; (test.ash, line 7)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this error may also be encountered when neglecting to name a field.&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description= For instance:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record my_record {&lt;br /&gt;
   string;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Invalid field name &#039;;&#039; (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Invalid type name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the specified type is not recognized by Mafia.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[fruit] map;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Invalid type name &#039;fruit&#039; (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Main method must appear at top level===&lt;br /&gt;
&lt;br /&gt;
This indicates that the script&#039;s main method is inside another method, for some reason. This is usually caused by a missing brace.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
void stuff() {&lt;br /&gt;
   // stuff happens here&lt;br /&gt;
&lt;br /&gt;
void main() {&lt;br /&gt;
   stuff();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;main method must appear at top level (test.ash, line 6)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Map modified within foreach===&lt;br /&gt;
&lt;br /&gt;
You cannot add or remove new entries into a map within a &amp;lt;code&amp;gt;[[foreach]]&amp;lt;/code&amp;gt; loop, with the exception of removing the current key. This can happen if you accidentally wrap the name of a string variable with double-quotes for referencing a map entry.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=For example, the following code:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/* test.ash */&lt;br /&gt;
item [string] my_map;&lt;br /&gt;
/* Populate my_map with several entries */&lt;br /&gt;
foreach str in my_map&lt;br /&gt;
   print( str + &amp;quot; =&amp;gt; &amp;quot; + my_map[ &amp;quot;str&amp;quot; ] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Yields: &amp;lt;span style=&amp;quot;color: red;&amp;quot;&amp;gt;Map modified within foreach (test.ash, line X)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Missing return value===&lt;br /&gt;
&lt;br /&gt;
The last line of a user-defined function has to be &amp;quot;return &amp;lt;value&amp;gt;;&amp;quot; (although the [[Control_Structures#return|return]] command can be used before too).&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int my_function( int a, int b ) {	&lt;br /&gt;
    if ( a &amp;gt; b ) return a ;&lt;br /&gt;
    else return b ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Missing return value (test.ash, line 4)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===No closing found===&lt;br /&gt;
&lt;br /&gt;
This can be caused by forgetting to put a &#039;&#039;&#039;&amp;quot;&#039;&#039;&#039; or a &#039;&#039;&#039;]&#039;&#039;&#039; at the end of an argument&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
buy(1000 , $item[disco ball, 225);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;No closing ] found (testing.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Record expected===&lt;br /&gt;
&lt;br /&gt;
This indicates that an unrecognized record was found. This often appears when you forget to append &amp;quot;()&amp;quot; to a function name.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
print(4.to_string);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Record expected (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Record name is already defined===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been defined, and so cannot be reused. The solution is to change the record name.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record str {&lt;br /&gt;
   string a;&lt;br /&gt;
   string b;&lt;br /&gt;
};&lt;br /&gt;
record str {&lt;br /&gt;
   int a;&lt;br /&gt;
   int b;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Record name &#039;str&#039; is already defined (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return needs [datatype] value===&lt;br /&gt;
&lt;br /&gt;
This indicates that the return value is void when the function is not.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int stuff() {&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Return needs int value (test.ash, line 2)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reserved word cannot be a [function|record|variable] name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the desired name has been [[Reserved Words|reserved]], and so cannot be used. The solution is to use a different name.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=An invalid name:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int float(float a) {&lt;br /&gt;
   return round(a);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Reserved word &#039;float&#039; cannot be used as a function name (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An interesting point to note is that ASH functions take precedent over identically named custom functions rather than throw an exception.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=An invalid record name:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record string {&lt;br /&gt;
   string a;&lt;br /&gt;
   string b;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Reserved word &#039;string&#039; cannot be a record name (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=An invalid variable name:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string item = &amp;quot;bottle of gin&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Reserved word &#039;item&#039; cannot be a variable name (test.ash, line 1)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces or a variable/function/record name that starts with an invalid character.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
put_shop(0 ,0 ,$item[wolf mask]);&lt;br /&gt;
put_shop(0 ,0 ,$item[rave whistle]);&lt;br /&gt;
put_shop(0 ,0 ,$item[giant needle]);&lt;br /&gt;
cli_execute (&amp;quot;undercut&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Script parsing error (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variable is already defined===&lt;br /&gt;
&lt;br /&gt;
This indicates that the same variable has been declared twice.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int Drops ;&lt;br /&gt;
int Meat ;&lt;br /&gt;
int Drops = numeric_modifier(&amp;quot;Item Drop&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
will cause this error: &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Variable Drops is already defined (test.ash, line 3)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Regular_Expressions&amp;diff=6495</id>
		<title>Regular Expressions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Regular_Expressions&amp;diff=6495"/>
		<updated>2010-08-26T13:25:24Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Special groups! Okay, that might be a bit too complicated. =P&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regular expressions, (commonly shortened to regex), are a language designed to enable creating very explicit patterns for searching strings. The regex language has wildcards for virtually every possible pattern of characters you might want to search for. Only some of the generally most common forms of regexes will be described on this page. For more details you are advised to search the internet where you will find many detailed resources on the subject. This writer will point the student at [http://www.regular-expressions.info/tutorial.html this tutorial] in particular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commonly used Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
===Literal Characters===&lt;br /&gt;
A character will match the first instance of itself in a string. &lt;br /&gt;
&lt;br /&gt;
*E.g. {{Pspan|a}} will match the first a in &amp;quot;J{{Pspan|a}}ck is a dull boy.&amp;quot; &lt;br /&gt;
*E.g. {{Pspan|cat}} is a set of three literal character which will find a match in &amp;quot;about {{Pspan|cat}}s and dogs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Special Characters===&lt;br /&gt;
It&#039;s often more interesting to search for less specific patterns than literal characters. There are a number of characters reserved for this purpose. These special characters are often called &amp;quot;metacharacters&amp;quot;. If you want to use any of these characters as a literal in a regex, you need to escape them with a backslash.&lt;br /&gt;
&lt;br /&gt;
* Backslash &#039;&#039;&#039;\&#039;&#039;&#039;&lt;br /&gt;
*: Used to grant special meaning to a normally literal character or employ a special character as a literal. &lt;br /&gt;
*: E.g. If you want to find the beginning of a word, the combination {{Pspan|\b}} will match a word&#039;s boundary.&lt;br /&gt;
*: E.g. to match &amp;quot;1+1=2&amp;quot;, the correct regex is &amp;lt;span style=&amp;quot;font-weight: bold; font-style: italic; padding-left: .2em; padding-right: .2em; color: #006400; background: #fff8dc;&amp;quot;&amp;gt;1\+1=2&amp;lt;/span&amp;gt;. Otherwise, the plus sign will have a special meaning. &lt;br /&gt;
* Question mark &#039;&#039;&#039;?&#039;&#039;&#039;&lt;br /&gt;
*: The question mark makes the preceding token in the regular expression optional. &lt;br /&gt;
*: E.g. {{Pspan|colou?r}} matches both &amp;quot;colour&amp;quot; and &amp;quot;color&amp;quot;.&lt;br /&gt;
* Asterisk or star &#039;&#039;&#039;*&#039;&#039;&#039;&lt;br /&gt;
*: The asterisk attempts to match the preceding token zero or more times.&lt;br /&gt;
* Plus sign &#039;&#039;&#039;+&#039;&#039;&#039;&lt;br /&gt;
*: The plus attempts to match the preceding token once or more.&lt;br /&gt;
* Period or dot &#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
*: Matches any character except for line breaks.&lt;br /&gt;
* Caret &#039;&#039;&#039;^&#039;&#039;&#039;&lt;br /&gt;
*: Matches the beginning of the string only. &lt;br /&gt;
*: E.g. {{Pspan|^the}} will match only the first word in &amp;quot;{{Pspan|the}} way of the world.&amp;quot;&lt;br /&gt;
* Dollar sign &#039;&#039;&#039;$&#039;&#039;&#039;&lt;br /&gt;
*: Matches the end of the string only. &lt;br /&gt;
*: E.g. {{Pspan|dog$}} will match only the last word in &amp;quot;dog eat {{Pspan|dog}}&amp;quot;.&lt;br /&gt;
* Opening and closing round brackets &#039;&#039;&#039;(&#039;&#039;&#039; and &#039;&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
*: Used for grouping allowing a regex operator (like +) to be applied to the entire group. It also creates a capturing group for storing the match. &lt;br /&gt;
* Opening and closing square bracket &#039;&#039;&#039;[&#039;&#039;&#039; and &#039;&#039;&#039;]&#039;&#039;&#039;&lt;br /&gt;
*: Used to create &amp;quot;character sets&amp;quot; to match only one of several characters. Inside these brackets different rules apply to several characters: ^-&lt;br /&gt;
*: E.g. {{Pspan|gr[ae]y}} will match either &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;, but it will not match &amp;quot;graey&amp;quot;.&lt;br /&gt;
* Opening and closing braces &#039;&#039;&#039;{&#039;&#039;&#039; and &#039;&#039;&#039;}&#039;&#039;&#039;&lt;br /&gt;
*: This is a limited repetition operator matching only {min,max} of what preceeds it. &lt;br /&gt;
*: E.g. {{Pspan|\b[1-9][0-9]{2,4}\b}} matches a number between 100 and 99999. (\b matches a word boundry.)&lt;br /&gt;
* Vertical bar or pipe symbol &#039;&#039;&#039;|&#039;&#039;&#039;&lt;br /&gt;
*: This is an &amp;quot;or&amp;quot; operator to match one of several possibilities. &lt;br /&gt;
*: E.g. &amp;lt;span style=&amp;quot;font-weight: bold; font-style: italic; padding-left: .2em; padding-right: .2em; color: #006400; background: #fff8dc;&amp;quot;&amp;gt;\b(cat|dog|fish)\b&amp;lt;/span&amp;gt; will match either &amp;quot;cat&amp;quot;, &amp;quot;dog&amp;quot; or &amp;quot;fish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Other Common Matchers===&lt;br /&gt;
{|&lt;br /&gt;
| \w&lt;br /&gt;
| Matches any word character (alphanumeric &amp;amp; underscore).&lt;br /&gt;
|-&lt;br /&gt;
| \W&lt;br /&gt;
| Matches any character that is not a word character (alphanumeric &amp;amp; underscore).&lt;br /&gt;
|-&lt;br /&gt;
| \d&lt;br /&gt;
| Matches any digit character (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D&lt;br /&gt;
| Matches any character that is not a digit character (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \s&lt;br /&gt;
| Matches any whitespace character (spaces, tabs, line breaks).&lt;br /&gt;
|-&lt;br /&gt;
| \S&lt;br /&gt;
| Matches any character that is not a whitespace character (spaces, tabs, line breaks).&lt;br /&gt;
|-&lt;br /&gt;
| \n&lt;br /&gt;
| Line break character.&lt;br /&gt;
|-&lt;br /&gt;
| \t&lt;br /&gt;
| Tab character.&lt;br /&gt;
|-&lt;br /&gt;
| \b&lt;br /&gt;
| Matches a word boundary position such as whitespace or the beginning or end of the string.&lt;br /&gt;
|-&lt;br /&gt;
| \B&lt;br /&gt;
| Matches any position that is not a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| [A-Za-z]&lt;br /&gt;
| Matches any single character in the range a-z or A-Z.&lt;br /&gt;
|-&lt;br /&gt;
| [^A-Za-z]&lt;br /&gt;
| Matches any single character, except for the range a-z or A-Z.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Greedy vs Lazy Matching===&lt;br /&gt;
Beware greedy matching! Matchers that can match multiple tokens will attempt to match as much as possible.&lt;br /&gt;
: E.g. {{Pspan|&amp;lt;.+&amp;gt;}} will match &amp;quot;This is a {{Pspan|&amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;test&amp;lt;/b&amp;gt;&amp;lt;/nowiki&amp;gt;}}.&amp;quot; instead of matching &#039;&#039;&#039;only&#039;&#039;&#039; the html tag as you might have expected.&lt;br /&gt;
&lt;br /&gt;
To fix this, you can make the match lazy, by adding a ? after the greedy character.&lt;br /&gt;
: E.g. {{Pspan|&amp;lt;.+?&amp;gt;}} will match &amp;quot;This is a {{Pspan|&amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/nowiki&amp;gt;}}test&amp;lt;nowiki&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/nowiki&amp;gt;.&amp;quot; so that you can pick out html tags.&lt;br /&gt;
&lt;br /&gt;
===Special Groups===&lt;br /&gt;
These are special types of groups that can allow you to do more advanced things with regex. For the most part, they can be declared by adding a question mark to the beginning of a special group.&lt;br /&gt;
&lt;br /&gt;
Noncapturing groups are declared by adding a colon after the question mark.&lt;br /&gt;
: E.g. {{Pspan|(?:hello)}} will match &amp;quot;{{Pspan|hello}}world&amp;quot; without actually creating a new capturing group.&lt;br /&gt;
&lt;br /&gt;
Special quantifiers can be used in a standalone special group that has a length of 0.&lt;br /&gt;
: E.g. {{Pspan|(?i)hello)}} will match &amp;quot;{{Pspan|HELLO}}&amp;quot;, since {{Pspan|(?i)}} tells the regex to ignore case.&lt;br /&gt;
&lt;br /&gt;
Negative/positive lookahead/lookbehind can help you finetune your regex by restricting what can appear without capturing more of the target string&lt;br /&gt;
: E.g. {{Pspan|(?&amp;lt;!\\S)([\\d]+)(?!\\S)}} uses negative lookahead and negative lookbehind, and so it will only match a series of digits not bounded by non-space characters, which is to say, a series of digits bounded by spaces. Presumably it would be functionally identical to {{Pspan|&amp;lt;nowiki&amp;gt;(?&amp;lt;=\\s)([\\d]+)(?=\\s)&amp;lt;/nowiki&amp;gt;}}.&lt;br /&gt;
&lt;br /&gt;
Since ASH&#039;s regular expressions are directly passed to Java, ASH does not support named groups.&lt;br /&gt;
&lt;br /&gt;
===Testing Resources===&lt;br /&gt;
If you&#039;re not sure if your regex will work, try testing it with one of these resources:&lt;br /&gt;
* [http://gskinner.com/RegExr/ gskinner.com]&lt;br /&gt;
* [http://www.regexplanet.com/simple/ regexplanet.com]&lt;br /&gt;
&lt;br /&gt;
==Using Regexes in KoLmafia==&lt;br /&gt;
Regular expressions in ASH are wrappers for the Java java.util.regex package. You can find detailed information about that in this [http://java.sun.com/docs/books/tutorial/essential/regex/index.html Java Tutorial]. Only the highlights will be described in this section.&lt;br /&gt;
&lt;br /&gt;
Using regular expressions in ash follows this basic formula:&lt;br /&gt;
#First a regular expression needs to be defined with the [[matcher]] datatype. Defining a matcher also requires the use of the [[create_matcher|create_matcher()]] function.&lt;br /&gt;
#:&#039;&#039;&#039;Important&#039;&#039;&#039;: in ash backslashes have special meaning inside a string, so any backslashes need to be backslashed or else ash will interpret them differently.&lt;br /&gt;
#Then the matcher can be operated upon by the various [[String Handling Routines#Regular Expressions|regex functions]], notably [[find|find()]].&lt;br /&gt;
#Finally, if there were capturing groups in the matcher, they can be checked using the [[group|group()]] function.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=This example will use a regular expression to determine how many chamois are left in the slime tube&#039;s bucket.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
// Visit the bucket to get the page&#039;s text&lt;br /&gt;
string page = visit_url(&amp;quot;clan_slimetube.php?action=bucket&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// In the following matcher: (is|are) will match either word&lt;br /&gt;
//     (\\d+) will match and capture 1 or more digits. Note the double-backslash!&lt;br /&gt;
matcher cham_left = create_matcher(&amp;quot;(There (is|are) (\\d+) chamoi(s|x))( in the bucket.)&amp;quot; , page);&lt;br /&gt;
&lt;br /&gt;
// Then you use find to capture patterns with the parenthesis.&lt;br /&gt;
if(cham_left.find()) {&lt;br /&gt;
&lt;br /&gt;
   // Finally group() is used to reference the patterns that were captured.&lt;br /&gt;
   print(cham_left.group(1)+ &amp;quot; left&amp;quot;+ cham_left.group(5), &amp;quot;blue&amp;quot;);&lt;br /&gt;
} else&lt;br /&gt;
   print(&amp;quot;The bucket is empty.&amp;quot;, &amp;quot;blue&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
[[Category:String Handling Routines]][[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7102</id>
		<title>File talk:Breakable equipment.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=File_talk:Breakable_equipment.jpg&amp;diff=7102"/>
		<updated>2010-08-25T23:53:34Z</updated>

		<summary type="html">&lt;p&gt;Heeheehee: Uhh... what?!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== THIS! IS! SPAMBOT! ==&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 3&lt;br /&gt;
&lt;br /&gt;
Now we know what happens when we protect the page that spambots like. This seems to be the new spambot page. ;) --Bale 21:29, 17 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 5 --[[User:Bale|Bale]] 06:56, 18 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 7 --[[User:Heeheehee|Heeheehee]] 23:54, 20 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 9 --[[User:Bale|Bale]] 19:14, 21 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 10 --[[User:Heeheehee|Heeheehee]] 04:13, 22 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 11 (That&#039;s ridiculous. It&#039;s not even funny. Seriously it isn&#039;t)----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 23:22, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* You&#039;re right that it really isn&#039;t funny, but thanks to your &amp;quot;seriously it isn&#039;t&amp;quot; comment, I spit tea out my nose. So I guess it was funny after all. Either that or I just have a bad case of reverse-schadenfreude where I take delight in my own misery. --[[User:Bale|Bale]] 23:31, 23 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 12. Ok first of all, why would you spam here? Secondly, should we block this page?----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 19:54, 24 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* NO! We should not block this page. There was another page on this wiki (whose name escapes me since it was weird) which was spammed exclusively. We didn&#039;t use that page for anything, so we deleted it every time the spambot created it. We finally decided to protect that page 3 days before this page became the new spam lightening rod. If we protected this page, the new spambot favorite page might be one that actually gets used. That would be BAD! --[[User:Bale|Bale]] 20:53, 24 August 2010 (UTC)&lt;br /&gt;
** &#039;&#039;&#039;(ASHRM) String Handling Routines&#039;&#039;&#039; or something like that? But yeah, I had originally protected the page but was convinced to unprotect it because of the cool analogy (lightning rod!). It was eventually StD who reprotected it because he got sick of the spam problem. But since it&#039;s resurfaced, we really should learn to stop protecting pages. If it spreads to a new page while this one&#039;s still unprotected, then we might consider protecting pages en masse (alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond). But okay, it&#039;s been hit 12 times in a row without any other targets coming into sight. Guess we&#039;ll have to wait another 25 before being really sure that spambots won&#039;t target any other pages. --[[User:Heeheehee|Heeheehee]] 21:23, 24 August 2010 (UTC)&lt;br /&gt;
***Isn&#039;t there a way to make it so that only registered users can edit pages? That would keep away lots of spam bots----[[User:Icon315|Icon315&amp;amp;#9813;]] ([[User talk:Icon315|&amp;amp;#9742;]]|[[Special:Contributions/Icon315|♤]]) 22:00, 24 August 2010 (UTC)&lt;br /&gt;
***It seems that only fewyn can change [[Special:ListGroupRights|permissions]]. --[[User:Bale|Bale]] 23:49, 24 August 2010 (UTC)&lt;br /&gt;
*** Yep. &amp;quot;(alternative solution, pester Fewyn to restrict editing to logged-in users only, but we&#039;d have to wait for him to respond)&amp;quot; --[[User:Heeheehee|Heeheehee]] 05:56, 25 August 2010 (UTC)&lt;br /&gt;
*** We try not to bother fewyn about the wiki as much as we can get away with. Not making fewyn work except for something important is one of our guiding principles. However I think that this may be important. But what does StDoodle think? --[[User:Bale|Bale]] 07:07, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry guys, been busy lately. Here&#039;s my take:&lt;br /&gt;
# The original &amp;quot;protect this page&amp;quot; was equal parts frustration &amp;amp; experiment. The experiment was fruitful, in that we learned something, but unfortunately not what we wanted to. IE it didn&#039;t stop the spam, it just moved it. So unless anyone can think of something useful to add to that process, we should think carefully about that option. (Note: this does NOT apply if the spam moves on its own to a useful page).&lt;br /&gt;
# As mentioned above, this page isn&#039;t all that useful. I mean, yeah, kinda, but it&#039;s easy to make a new one for the content, and just leave this one here as a spam honeypot. (Plus, it&#039;s name isn&#039;t one that represents what I was trying to move the wiki away from, as the ASHRM one did.)&lt;br /&gt;
# Long-term solution would be to bug fewyn to make the changes mentioned above. I think I&#039;m going to go ahead and do that, since we all seem to agree that it&#039;s the best idea. But I&#039;m not going to pressure him to hurry; it looks like you guys have stayed on top of things fairly well, so no major need to have it done RIGHT NAOO.&lt;br /&gt;
# I&#039;m likely to be busy for the near-to-mid future with personal junk. (Possible divorce, ew.) From this point on, I&#039;d like to designate Bale as being officially, 100% in charge of day-to-day operations (fewyn of course keeping the &amp;quot;final say,&amp;quot; when he wants it). Thanks for all of your efforts!&lt;br /&gt;
-- [[User:StDoodle|StDoodle]] 07:27, 25 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== oqNpkWoecHwzmsh ==&lt;br /&gt;
&lt;br /&gt;
Isn&#039;t this cute? The spambot has created a new section with a nonsense name so that our discussion wasn&#039;t deleted. I don&#039;t know what to make of it. I&#039;m leaving the section header here just &#039;cause I&#039;m curious if future spambots will use it or create their own nonsense sections. I suspect the later. &lt;br /&gt;
&lt;br /&gt;
Times this page has been spammed: 13 --[[User:Bale|Bale]] 20:12, 25 August 2010 (UTC)&lt;br /&gt;
: Times this page has been spammed: 14. Also, uh, what was up with the latest spam hit? --[[User:Heeheehee|Heeheehee]] 23:53, 25 August 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Heeheehee</name></author>
	</entry>
</feed>