<?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=Slyz</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=Slyz"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Slyz"/>
	<updated>2026-04-30T14:44:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6418</id>
		<title>Modifier eval</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Modifier_eval&amp;diff=6418"/>
		<updated>2012-09-25T20:25:13Z</updated>

		<summary type="html">&lt;p&gt;Slyz: add all the modifier variables&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;
special=Note that modifier_eval &#039;&#039;&#039;never&#039;&#039;&#039; generates errors - a malformed expression will just print a message, and return an arbitrary value.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Math and Numbers]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=KoLmafia_Properties&amp;diff=1271</id>
		<title>KoLmafia Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=KoLmafia_Properties&amp;diff=1271"/>
		<updated>2011-10-13T09:14:07Z</updated>

		<summary type="html">&lt;p&gt;Slyz: add raveCombo properties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
Inside your KoLmafia &amp;quot;settings&amp;quot; directory, you should find several files. KoLmafia properties are stored in the files that end with &amp;quot;_prefs.txt&amp;quot;. One of these files will start with &amp;quot;GLOBAL&amp;quot;; the settings inside are shared by all characters using the program (and some of these properties are needed by KoLmafia even when no character is logged in). The other files ending with &amp;quot;_prefs.txt&amp;quot; will start with the name of a character, one for each who has been logged in to date. (Note: the names will all be converted to lowercase.)&lt;br /&gt;
&lt;br /&gt;
==Choice Adventures==&lt;br /&gt;
A large number of the preferences saved by KoLmafia are used to determine the default behavior when a choice adventure is automated (either through auto-adventuring or use of the &amp;quot;auto&amp;quot; button in the relay browser). The number of choice adventures in KoL is too large and too often updated to list each individual preference here. Please consult the main wiki&#039;s [http://kol.coldfront.net/thekolwiki/index.php/Choice_Adventures_by_Number Choice Adventures by Number] page for a comprehensive list. Note that each preference follows the same numbering scheme as KoL itself. For example, the adventure &amp;quot;Minnesota Incorporeals&amp;quot; is number 77 in KoL, and its KoLmafia preference is &amp;quot;choiceAdventure77&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Each choiceAdventure is set to a number, which corresponds to which choice you want to make from the available options in KoL (or in the GUI, in the case that mafia provides more options than KoL).  According to Holatuwol ([http://kolmafia.us/index.php/topic,1155.0.html here]), the settings map to &amp;quot;X=pick the Xth Option&amp;quot; and &amp;quot;X+1=pick an item you don&#039;t have&amp;quot; (i.e., complete the outfit). Many preferences also have a &amp;quot;Show in [Mini] Browser&amp;quot; option, which corresponds to a setting of 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all the Property variables included in KoLmafia. It was automatically generated from r7582. Note that, however, the latest (and most up-to-date) data is located in Mafia&#039;s internally-stored datafile defaults.txt (available for viewing at [https://kolmafia.svn.sourceforge.net/svnroot/kolmafia/src/data/defaults.txt the SourceForge page]).&lt;br /&gt;
&lt;br /&gt;
==Global Variables==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Variable Name&lt;br /&gt;
!  scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; | Default Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  addChatCommandLine&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  addCreationQueue&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  addStatusBarToFrames&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowCloseableDesktopTabs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowNegativeTally&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowNonMoodBurning&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  alwaysGetBreakfast&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoLogin&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowSocketTimeout&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoHighlightOnFocus&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoPlantHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoPlantSoftcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithCloset&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithMall&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithNPCs&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithStash&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakfastHardcore&lt;br /&gt;
|  Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakfastSoftcore&lt;br /&gt;
|  Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  browserBookmarks&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cacheMallSearches&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  charsheetDropdown&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatBeep&lt;br /&gt;
|  false&lt;br /&gt;
|  Beep on private message in chat&lt;br /&gt;
|-&lt;br /&gt;
|  chatFontSize&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatLinksUseRelay&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatStyle&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cloverProtectActive&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey0&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey6&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey7&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey8&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey9&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  commandLineNamespace&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  connectViaAddress&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cookies.inventory&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  copyAsHTML&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  createHackerSummons&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  customizedTabs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  debugPathnames&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultBorderColor&lt;br /&gt;
|  blue&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdown1&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdown2&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdownSplit&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultLimit&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultLoginServer&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  displayName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  eSoluScriptType&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  getBreakfast&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grabCloversHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grabCloversSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  greenScreenProtection&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoireSkillsHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoireSkillsSoftcore&lt;br /&gt;
|  Summon Hilarious Objects&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  guiUsesOneWindow&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  harvestGardenHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  The crop that breakfast will harvest, if in your garden.&lt;br /&gt;
|-&lt;br /&gt;
|  harvestGardenSoftcore&lt;br /&gt;
|  none&lt;br /&gt;
|  The crop that breakfast will harvest, if in your garden.&lt;br /&gt;
|-&lt;br /&gt;
|  hideServerDebugText&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  highlightList&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyHost&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyPassword&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyPort&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyUser&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  initialDesktop&lt;br /&gt;
|  AdventureFrame,CommandDisplayFrame,&amp;lt;br /&amp;gt;MallSearchFrame,GearChangeFrame,SkillBuffFrame &lt;br /&gt;
|  starting tab configuration&lt;br /&gt;
|-&lt;br /&gt;
|  initialFrames&lt;br /&gt;
|  RecentEventsFrame&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  innerChatColor&lt;br /&gt;
|  #ffa98c&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  innerTabColor&lt;br /&gt;
|  #8ca9ff&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  itemManagerIndex&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBuffRequestType&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRelayUpdate&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRssUpdate&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRssVersion&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastUserAgent&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastUsername&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libramSkillsHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libramSkillsSoftcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logAcquiredItems&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logBattleAction&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logBrowserInteractions&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logChatMessages&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logDecoratedResponses&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logFamiliarActions&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logGainMessages&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logReadableHTML&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginRecoveryHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginRecoverySoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginServerName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginWindowLogo&lt;br /&gt;
|  lantern.jpg&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logMonsterHealth&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logoutScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logReverseOrder&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatGains&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatusEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatusOnLogin&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mementoListActive&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mergeHobopolisChat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  outerChatColor&lt;br /&gt;
|  #b4460f&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  outerTabColor&lt;br /&gt;
|  #0f46b4&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pathedSummonsHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pathedSummonsSoftcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preferredWebBrowser&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  previousNotifyList&lt;br /&gt;
|  &amp;lt;&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  previousUpdateVersion&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  protectAgainstOverdrink&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  proxySet&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  readManualHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  readManualSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsCustomCombat&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsGraphicalCLI&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsKoLSimulator&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsQuickScripts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsRestoreLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsRoundNumber&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsUpArrowLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsUseLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsWikiLinks&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAllowsOverrides&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayBrowserOnly&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayBrowserOnly&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayFormatsChatText&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayHidesJunkMallItems&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsHealth&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsMana&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayTextualizesEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayTrimsZapList&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayUsesCachedImages&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayUsesInlineLinks&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayUsesIntegratedChat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayViewsCustomItems&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  removeMalignantEffects&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveSettingsOnSet&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveState&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveStateActive&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptButtonPosition&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptList&lt;br /&gt;
|  restore hp | restore mp&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showAllRequests&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stealthLogin&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  swingLookAndFeel&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  switchEquipmentForBuffs&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tomeSkillsHardcore&lt;br /&gt;
|  Summon Snowcone&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tomeSkillsSoftcore&lt;br /&gt;
|  Summon Snowcone&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  toolbarPosition&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useChatMonitor&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useChatToolbar&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useContactsFrame&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useCrimboToysHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useCrimboToysSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useDecoratedTabs&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useLastUserAgent&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useSeparateChannels&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useShinyTabbedChat&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useSystemTrayIcon&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useTabbedChatFrame&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useToolbars&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useZoneComboBox&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  userAgent&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitLoungeHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitLoungeSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitRumpusHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitRumpusSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Per-Account Variables==&lt;br /&gt;
[[KoLmafia Properties#Daily Variables|Daily]] and [[KoLmafia Properties#Choice Adventures|Choice Adventure]] preferences have been omitted. Each of those has their own section.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Variable Name&lt;br /&gt;
!  scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; | Default Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  autoAbortThreshold&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  Abort adventuring at this percentage of HP. (-0.05 means if HP restoration failed)&lt;br /&gt;
|-&lt;br /&gt;
|  autoAntidote&lt;br /&gt;
|  0&lt;br /&gt;
|  Use antidotes in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoBuyPriceLimit&lt;br /&gt;
|  20000&lt;br /&gt;
|  Don&#039;t auto purchase anything that costs more than this&lt;br /&gt;
|-&lt;br /&gt;
|  autoEntangle&lt;br /&gt;
|  false&lt;br /&gt;
|  Use Entangling Noodles at the beginning of combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoManaRestore&lt;br /&gt;
|  true&lt;br /&gt;
|  Restore MP in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoOlfact&lt;br /&gt;
|  &lt;br /&gt;
|  Automatically cast Olfaction&lt;br /&gt;
|-&lt;br /&gt;
|  autoPotionID&lt;br /&gt;
|  false&lt;br /&gt;
|  Attempt to ID ! potions in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoPutty&lt;br /&gt;
|  &lt;br /&gt;
|  Automatically use Spooky Putty&lt;br /&gt;
|-&lt;br /&gt;
|  autoRepairBoxServants&lt;br /&gt;
|  true&lt;br /&gt;
|  Create in-a-boxen before cooking or mixing &lt;br /&gt;
|-&lt;br /&gt;
|  autoSphereID&lt;br /&gt;
|  false&lt;br /&gt;
|  Attempt to ID spheres from the Hidden City&lt;br /&gt;
|-&lt;br /&gt;
|  autoSteal&lt;br /&gt;
|  true&lt;br /&gt;
|  Attempt to pickpocket in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autostartGalaktikQuest&lt;br /&gt;
|  true&lt;br /&gt;
|  Get Doc Galaktik&#039;s Quest at the start of ascension&lt;br /&gt;
|-&lt;br /&gt;
|  availableDimes&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableLucre&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableQuarters&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableSandDollars&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  barrelGoal&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  barrelLayout&lt;br /&gt;
|  ?????????&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  basementMallPrices&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  battleAction&lt;br /&gt;
|  attack with weapon&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  betweenBattleScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformCold&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformHot&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformRoc&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformSleaze&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformSpooky&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformStench&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blackPuddingsDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blankOutUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  Tracks current amount of active Blank-out&lt;br /&gt;
|-&lt;br /&gt;
|  bootsCharged&lt;br /&gt;
|  false&lt;br /&gt;
|  Are fairy worn boots currently ready to stomp&lt;br /&gt;
|-&lt;br /&gt;
|  breakfastCompleted&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotCasting&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotMessageDisposal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotPhilanthropyType&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  burrowgrubHiveUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  burrowgrubSummonsRemaining&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buyScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cameraMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cellarLayout&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatbotScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatbotScriptExecuted&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chosenTrip&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  clanAttacksEnabled&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cocktailSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  concertVisited&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentBountyItem&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentFullness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentHippyStore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentJunkyardTool&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentJunkyardLocation&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentMojoFilters&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentMood&lt;br /&gt;
|  default&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentNunneryMeat&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentPvpVictories&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentSpleenUse&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentWheelPosition&lt;br /&gt;
|  muscle&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  customCombatScript&lt;br /&gt;
|  default&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dailyDungeonDone&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultAutoAttack&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultFlowerLossMessage&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultFlowerWinMessage&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  demonName1&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives pies&lt;br /&gt;
|-&lt;br /&gt;
|  demonName2&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Preternatural Greed&lt;br /&gt;
|-&lt;br /&gt;
|  demonName3&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Fit To Be Tide&lt;br /&gt;
|-&lt;br /&gt;
|  demonName4&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Big Flaming Whip&lt;br /&gt;
|-&lt;br /&gt;
|  demonName5&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Demonic Taint&lt;br /&gt;
|-&lt;br /&gt;
|  demonName6&lt;br /&gt;
|  Tatter&lt;br /&gt;
|  Name of demon that gives pile of smoking rags&lt;br /&gt;
|-&lt;br /&gt;
|  demonName7&lt;br /&gt;
|  Ak&#039;gyxoth&lt;br /&gt;
|  Name of demon that gives drinks&lt;br /&gt;
|-&lt;br /&gt;
|  demonName8&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon found in the Nemesis&#039; Lair&lt;br /&gt;
|-&lt;br /&gt;
|  demonName9&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Burning, Man&lt;br /&gt;
|-&lt;br /&gt;
|  demonSummoned&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  expressCardUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  extraRolloverAdventures&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  flyeredML&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  fossilB&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of bat teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilD&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of demon teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilN&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of baboon teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilP&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of spider teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilS&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of serpent teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilW&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of wyrm teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fratboysDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  friarsBlessingReceived&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gongPath&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gourdItemCount&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoire1Summons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoire2Summons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  guardTurtlesFreed&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of times that [http://kol.coldfront.net/thekolwiki/index.php/Cold-Blooded_Warm_Fuzzies guard turtles have been freed] this ascension.&lt;br /&gt;
|-&lt;br /&gt;
|  guyMadeOfBeesCount&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  guyMadeOfBeesDefeated&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationBoris&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Boris&lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationJarlsberg&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Jarlsberg&lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationSneakyPete&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Sneaky Pete&lt;br /&gt;
|-&lt;br /&gt;
|  [[hiddenCityLayout]]&lt;br /&gt;
|  0000000000000000000000000&lt;br /&gt;
|  The map of the Hidden City&lt;br /&gt;
|-&lt;br /&gt;
|  hiddenCitySquare&lt;br /&gt;
|  0&lt;br /&gt;
|  The last square explored in the Hidden City. This square will be auto-adventured.&lt;br /&gt;
|-&lt;br /&gt;
|  hippiesDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecovery&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecoveryItems&lt;br /&gt;
|  cannelloni cocoon;scroll of drastic healing;tongue of the walrus;lasagna bandages;doc galaktik&#039;s ailment ointment&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecoveryTarget&lt;br /&gt;
|  1.0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  invalidBuffMessage&lt;br /&gt;
|  You sent an amount which does not correspond to a valid buff amount.&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  kingLiberated&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  knownAscensions&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastAdventure&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBarrelSmashed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion819&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion820&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion821&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion822&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion823&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion824&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion825&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion826&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion827&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotionReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBarrelSmashed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBattlefieldReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBreakfast&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCellarReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastChanceBurn&lt;br /&gt;
|  &lt;br /&gt;
|  CLI command executed at lastChanceThreshold (&amp;quot;#&amp;quot; is replaced by the amount of MP to burn)&lt;br /&gt;
|-&lt;br /&gt;
|  lastChanceThreshold&lt;br /&gt;
|  100&lt;br /&gt;
|  amount of unburned MP at which alternatives to extending existing buffs will be considered&lt;br /&gt;
|-&lt;br /&gt;
|  lastCouncilVisit&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCounterDay&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2271&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2272&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2273&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2274&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2275&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottle2276&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDustyBottleReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfDiceRolls&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfDigitRunes&lt;br /&gt;
|  -------&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfEquipmentRunes&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem118&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem119&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem120&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem360&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem361&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem362&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem363&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem364&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem365&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem910&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem3199&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3208&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3209&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3210&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3211&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3212&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3213&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3214&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOreRunes&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEVHelmetValue&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEVHelmetReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEmptiedStorage&lt;br /&gt;
|  -1&lt;br /&gt;
|  Number of the last ascension that Hangk&#039;s storage was emptied.&lt;br /&gt;
|-&lt;br /&gt;
|  lastFilthClearance&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGalleryUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGuildStoreOpen&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGuyMadeOfBeesReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastHiddenCityAscension&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastFratboyCall&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastHippyCall&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastKingLiberation&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastLouvreMap&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastMessageId&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastMiningReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStripReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip3144&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4138&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4139&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4140&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4141&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4142&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4143&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4144&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPastamancerGhostReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateEphemera&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateEphemeraReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult1&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult2&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult3&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult4&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult5&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult6&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult7&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult8&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsultReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPyramidReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastQuartetAscension&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastQuartetRequest&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastSecondFloorUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastSemirareReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastStoneSphere2174&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastStoneSphere2175&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastStoneSphere2176&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastStoneSphere2177&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastStoneSphereReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTavernAscension&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTavernSquare&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTelescopeReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTowerClimb&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastVioletFogMap&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastZapperWand&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libramSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libraryCardUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreDesiredGoal&lt;br /&gt;
|  7&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreGoal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreLayout&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreOverride&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  luckySewerAdventure&lt;br /&gt;
|  stolen accordion&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  manaBurnSummonThreshold&lt;br /&gt;
|  10&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  manaBurningThreshold&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  maxManaBurn&lt;br /&gt;
|  1000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mayflyExperience&lt;br /&gt;
| 0&lt;br /&gt;
| Uses of mayfly bait necklace. Reset each ascension.&lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  moleTunnelLevel&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecovery&lt;br /&gt;
|  0.0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecoveryItems&lt;br /&gt;
|  phonics down;knob goblin superseltzer;mountain stream soda;magical mystery juice;knob goblin seltzer;cherry cloaca cola;soda water&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecoveryTarget&lt;br /&gt;
|  0.3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  munchiesPillsUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  noodleSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  nunsVisits&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  oceanAction&lt;br /&gt;
|  savecontinue&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  oceanDestination&lt;br /&gt;
|  manual&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  olfactedMonster&lt;br /&gt;
|  unknown&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  oscusSodaUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  outrageousSombreroUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastamancerGhostExperience&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastamancerGhostName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastamancerGhostSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastamancerGhostType&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingDate&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingDay&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingLength&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  postAscensionScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preAscensionScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preBlackbirdFamiliar&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  prismaticSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pyramidPosition&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pyramidBombUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  rageGlandVented&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo1&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Nirvana&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo2&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Knockout&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo3&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Bleeding&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo4&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Steal&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo5&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Substats&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo6&lt;br /&gt;
|  &lt;br /&gt;
|  Random Rave&lt;br /&gt;
|-&lt;br /&gt;
|  reagentSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  recentLocations&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  recoveryScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayCounters&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  requireBoxServants&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  requireSewerTestItems&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  retrieveContacts&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  seaodesFound&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  semirareCounter&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  semirareLocation&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  serverAddsCustomCombat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  setAutoAttack&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showGainsPerUnit&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sideDefeated&lt;br /&gt;
|  neither&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestArenaCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestFarmCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestJunkyardCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestLighthouseCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestNunsCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestOrchardCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel46&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel47&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel48&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  slimelingFullness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sortByRoom&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spadingData&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spiceMelangeUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spookyPuttyCopiesMade&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spookyPuttyMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  styxPixieVisited&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  [[tavernLayout]]&lt;br /&gt;
|  0000000000000000000000000&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope6&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope7&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescopeLookedHigh&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescopeUpgrades&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tempuraSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  thanksMessage&lt;br /&gt;
|  Thank you for the donation!&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  timesRested&lt;br /&gt;
|  99&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tomeSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  trapperOre&lt;br /&gt;
|  chrome ore&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable1HWeapons&lt;br /&gt;
|  3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable1xAccs&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable2HWeapons&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable3HWeapons&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableAccessories&lt;br /&gt;
|  3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableHats&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableOffhands&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableOther&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usablePants&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableShirts&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  violetFogGoal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  violetFogLayout&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  warProgress&lt;br /&gt;
|  unstarted&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  welcomeBackAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3542&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3543&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3544&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3545&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3546&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3547&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3548&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3749&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3751&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4172&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4173&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4174&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Daily Variables==&lt;br /&gt;
These per-account variables are reset to default value at the beginning of each day.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Variable Name&lt;br /&gt;
!  scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; | Default Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  _absintheDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _aguaDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _aprilShower&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _astralDrops&lt;br /&gt;
|  0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|  _badlyRomanticArrows&lt;br /&gt;
|  0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|  _bagOfCandy&lt;br /&gt;
|  false&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|  _bagOTricksUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  Has the Bag of Tricks been used today?&lt;br /&gt;
|-&lt;br /&gt;
|  _ballpit&lt;br /&gt;
|  false&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|  _banderRunaways&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _benettonsCasts&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _bootStomps&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _borrowedTimeUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _boxingGloveArrows&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _brickoFights&lt;br /&gt;
|  Number of times Bricko monsters have been fought today&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _cameraUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _candySummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _carboLoaded&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _chipBags&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _companionshipCasts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _crimboTree&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _deluxeKlawSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _distentionPillUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _donhosCasts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _elronsCasts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _feastedFamiliars&lt;br /&gt;
|  semicolon separated list of familiars&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _feastUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of times moveable feast is used&lt;br /&gt;
|-&lt;br /&gt;
|  _fingertrapArrows&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _gapBuffs&lt;br /&gt;
|  0&lt;br /&gt;
|  Greatest American Pants buffs&lt;br /&gt;
|-&lt;br /&gt;
|  _gibbererAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _gongDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _hareAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _hipsterAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _hotTubSoaks&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _iceballUses&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _inigosCasts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _ironicMoustache&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _klawSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _lastZomboEye&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _leafblowerML&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _legendaryBeat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _lookingGlass&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _lunchBreak&lt;br /&gt;
|  false&lt;br /&gt;
|  Has the Lunch Break skill been used?&lt;br /&gt;
|-&lt;br /&gt;
| _madTeaParty&lt;br /&gt;
| false&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| _mayflySummons&lt;br /&gt;
| 0&lt;br /&gt;
| Mayfly summonings today&lt;br /&gt;
|-&lt;br /&gt;
|  _navelRunaways&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _pasteDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of times Stomping Boots have stomped (badly named)&lt;br /&gt;
|-&lt;br /&gt;
|  _photocopyUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _pieDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of pies made by Knob Goblin Organ Grinder&lt;br /&gt;
|-&lt;br /&gt;
|  _poisonArrows&lt;br /&gt;
|  0&lt;br /&gt;
|  Obtuse Angel ability&lt;br /&gt;
|-&lt;br /&gt;
|  _poolGames&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _poolGames&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _precisionCasts&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _riftletAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _sealFigurineUses&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _sealsSummoned&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _sexChanged&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _skateBuff1&lt;br /&gt;
|  false&lt;br /&gt;
|  lutz&lt;br /&gt;
|-&lt;br /&gt;
|  _skateBuff2&lt;br /&gt;
|  false&lt;br /&gt;
|  comet&lt;br /&gt;
|-&lt;br /&gt;
|  _skateBuff3&lt;br /&gt;
|  false&lt;br /&gt;
|  band shell&lt;br /&gt;
|-&lt;br /&gt;
|  _skateBuff4&lt;br /&gt;
|  false&lt;br /&gt;
|  skate eels&lt;br /&gt;
|-&lt;br /&gt;
|  _skateBuff5&lt;br /&gt;
|  false&lt;br /&gt;
|  merry-go-round&lt;br /&gt;
|-&lt;br /&gt;
|  _stinkyCheeseCount&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _stressBallSqueezes&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _syntheticDogHairPillUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _thingfinderCasts&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _timeHelmetAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _toastSummons&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _tokenDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  Rogue Program drop&lt;br /&gt;
|-&lt;br /&gt;
|  _transponderDrops&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _userMods&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _vmaskAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  _zapCount&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==User-defined variables==&lt;br /&gt;
In addition to setting the variables that KoLmafia predefines, you can also create any others to cover any information you wish.  As you do so, keep in mind that while you can clear a variable&amp;amp;#8217;s value to the null string, there is currently no way to delete a key (aside from editing the .txt file in the text processor of your choice and deleting the line that contains the key).&lt;br /&gt;
{{SeeAlso|get_property|set_property}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6221</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6221"/>
		<updated>2011-06-24T11:25:21Z</updated>

		<summary type="html">&lt;p&gt;Slyz: added &amp;quot;Function undefined&amp;quot; error&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;
===Function undefined===&lt;br /&gt;
&lt;br /&gt;
This happens when calling a function that KoLMafia doesn&#039;t know, either because the script uses a built-in ASH function that doesn&#039;t exist yet in the user&#039;s build, or because the function hasn&#039;t been defined yet, neither in the imported scripts nor in the script itself. &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;
my_function();&lt;br /&gt;
&lt;br /&gt;
void my_function(){&lt;br /&gt;
    print( &amp;quot;hello world&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;Function &amp;lt;nowiki&amp;gt;&#039;my_function()&#039;&amp;lt;/nowiki&amp;gt; undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (test.ash, line 1)&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>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Retrieval_order&amp;diff=4870</id>
		<title>Retrieval order</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Retrieval_order&amp;diff=4870"/>
		<updated>2011-06-20T02:52:20Z</updated>

		<summary type="html">&lt;p&gt;Slyz: updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the current order in which retrieval options are tried for both the CLI command &amp;quot;retrieve&amp;quot; and the ASH command [[retrieve_item|retrieve_item()]], as of about r8200.  Note that this is an extremely condensed summary of several hundred lines of internal code, and that the details are subject to change&lt;br /&gt;
* items already in inventory&lt;br /&gt;
* items currently equipped&lt;br /&gt;
* items equipped on a non-current familiar&lt;br /&gt;
* if needed, retrieval of worthless items by using 31337 scrolls or using chewing gums&lt;br /&gt;
* untinkering a dictionary to get the bridge&lt;br /&gt;
* items in closet, if enabled&lt;br /&gt;
* free pulls from Hagnk&#039;s&lt;br /&gt;
* items in storage, if no longer under ronin/HC restrictions (note that all of the item is pulled, not just the amount requested)&lt;br /&gt;
* retrieval of coffee pixie sticks by trying to retrieve game grid tickets and redeeming them&lt;br /&gt;
* retrieval of Lunar Lunch-o-Mat items by trying to retrieve lunar isotopes and redeeming them&lt;br /&gt;
* items in the clan stash, if enabled&lt;br /&gt;
* item creation, up to the quantity creatable from ingredients on hand (this can be overriden by a buyScript)&lt;br /&gt;
* trading worthless items to the Hermit&lt;br /&gt;
* trading yeti furs to the Tr4pz0r&lt;br /&gt;
* retrieval of Ye Wizard&#039;s Shack Game Shoppe Free Snacks items by trying to retrieve snack vouchers and redeeming them&lt;br /&gt;
* NPC purchase (if enabled), or Mall purchase (if enabled, and none of the ingredients on hand)&lt;br /&gt;
* use budgeted pulls from storage if in Ronin&lt;br /&gt;
* item creation, unless buying the item is enabled and appears to be cheaper than the cost of acquiring all the ingredients&lt;br /&gt;
* one final attempt at Mall purchase, if enabled and everything else has failed&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Adventure&amp;diff=3979</id>
		<title>Adventure</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Adventure&amp;diff=3979"/>
		<updated>2011-06-07T08:42:02Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|adventure}}{{&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|int|adventures}}|&lt;br /&gt;
parameter2={{Param|location|place}}|&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|adventures}}|&lt;br /&gt;
parameter2={{Param|location|place}}|&lt;br /&gt;
parameter3={{Param|string|filter}}|&lt;br /&gt;
p1desc={{Pspan|int}} is the number of adventures to spend.|&lt;br /&gt;
p2desc={{Pspan|place}} is the adventuring location.|&lt;br /&gt;
p3desc={{Pspan|filter}} is a combat action filter. If {{Pspan|filter}} contains a semicolon it is interpreted as a macro, otherwise this is the name of a top-level function which modifies the current CCS. A combat filter function takes the parameters of a consult script, but returns lines like a CCS, not like a consult script. Essentially, this allows the scripter to put a CCS or macro into a script.|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function runs the specified number of {{pspan|adventures}} at the given {{pspan|place}}, keeping up your current mood &amp;amp; obeying restore settings.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If {{Pspan|filter}} contains a semicolon it will use {{Pspan|filter}} as a macro.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If {{Pspan|filter}} is omitted or assigned an empty string, this function will use your current CCS / battle action.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This function returns true if the specified number of adventures were used, and false if not.  Possible reasons for returning false include being out of adventures, a location being unavailable, conditions being statisfied &#039;&#039;before&#039;&#039; {{Pspan|adventures}} were used up and all [[auto-stops]], including encountering a demon name or hobo glyph.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note that {{Pspan|adventures}} is the number of adventures to spend in the specified location {{pspan|place}}. Any &amp;quot;free&amp;quot; turns (choiceadventures that don&#039;t consume an adventure, usually) or adventures spend in other locations (by a counterScript or a betweenBattleScript for example) will not count towards this total.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As with auto-adventuring from the Adventure tab, adventure() checks against goals set via [[add_item_condition|add_item_condition()]] or via other methods of specifying goals in KoLmafia, and will auto-stop if all goals were satisfied.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Adventure 5 times at the Giant&#039;s Castle:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
adventure(5 , $location[giant&#039;s castle]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
title=Example of a Combat Filter|&lt;br /&gt;
description=This uses the combat filter to automatically olfact Goth Giants while adventuring.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
string olfact_goth(int round, string opp, string text) {&lt;br /&gt;
   if(opp != &amp;quot;Goth Giant&amp;quot;)&lt;br /&gt;
      return get_ccs_action(round);&lt;br /&gt;
   if(round == 1 &amp;amp;&amp;amp; have_effect($effect[On the Trail]) &amp;lt; 1)&lt;br /&gt;
      return &amp;quot;skill transcendent olfaction&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      return get_ccs_action(round - 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
adventure(5 , $location[giant castle], &amp;quot;olfact_goth&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Uses a combat filter to ensure that all sewer monsters are being cleeshed while you try to make your way to Hobopolis.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string combat_cleesh(int round, string opp, string text) {&lt;br /&gt;
   if (opp == $monster[frog].to_string() || opp == $monster[newt].to_string() &lt;br /&gt;
    || opp == $monster[salamander].to_string()) {&lt;br /&gt;
      return &amp;quot;attack&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   return &amp;quot;skill CLEESH&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
adventure(1, $location[a maze of sewer tunnels], &amp;quot;combat_cleesh&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=This makes use of the combat filter to ensure that salve is being used.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
// Adds salve to beginning of combat if it doesn&#039;t already exist in the CCS. &lt;br /&gt;
// Otherwise it simply returns the current CCS.&lt;br /&gt;
string insert_salve(int round, string opp, string text) {&lt;br /&gt;
   boolean salve = false;&lt;br /&gt;
   for i from 1 to 30&lt;br /&gt;
      if(get_ccs_action(round) == &amp;quot;skill saucy salve&amp;quot;)&lt;br /&gt;
         salve = true;&lt;br /&gt;
   if(salve)&lt;br /&gt;
      return get_ccs_action(round);&lt;br /&gt;
   else {&lt;br /&gt;
      if(round == 1)&lt;br /&gt;
         return &amp;quot;skill saucy salve&amp;quot;;&lt;br /&gt;
      if(round &amp;gt; 1)&lt;br /&gt;
         round = round - 1;              // compensate for insertion&lt;br /&gt;
      return get_ccs_action(round);      // for the rest of the combat, executes your existing ccs&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
adventure(5 , $location[giant castle], &amp;quot;insert_salve&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|adv1}}|&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;adv&amp;quot; works similarly.|&lt;br /&gt;
special=This function will return false if KoLmafia conditions are met before completing the specified number of turns.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Also, if the filter function is not top-level code, it will not be found, since it&#039;s being called outside of ASH. As a result, it will return &amp;quot;void&amp;quot;, which may result in the use of $item[ovoid leather thing].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Mall_price&amp;diff=2746</id>
		<title>Mall price</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Mall_price&amp;diff=2746"/>
		<updated>2011-05-24T14:06:00Z</updated>

		<summary type="html">&lt;p&gt;Slyz: mall-price() does only one mall search per item per session&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|mall_price}}{{&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|item|shop_for}}|&lt;br /&gt;
p1desc={{Pspan|shop_for}} is the item to inquire on the mall price of|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns the current mall price of the given item, ignoring the first five items listed to compensate for stores with limits and min-priced sales. To prevent abuse, this will only perform an actual Mall search once per item per session; subsequent calls for the same item will return a cached value. The cache will be updated after attempts to purchase the item (even unsuccessful ones), but not in any other conditions.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|historical_price|buy|retrieve_item}}|&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;searchmall&amp;quot; also returns current mall prices.|&lt;br /&gt;
special=Items not listed in the mall will return 0 (untradeable items will return 0 without any server requests). When not logged in, this function returns -1.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Item Management]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3199</id>
		<title>Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3199"/>
		<updated>2011-04-11T22:39:21Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Records */ small typo&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;
== 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;
{{RFI|I, for one, don&#039;t have a good handle on multi-dimensional maps. Any effort to clarify how they are defined &amp;amp; accessed would be greatly appreciated.|Don&#039;t worry about formatting for now; I&#039;ll get to that once the info is there, unless you&#039;re feeling super-ambitious.}}&lt;br /&gt;
{{Format}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Control_Structures&amp;diff=3166</id>
		<title>Control Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Control_Structures&amp;diff=3166"/>
		<updated>2011-04-03T21:05:37Z</updated>

		<summary type="html">&lt;p&gt;Slyz: add try / finally (these should be added as ASH keywords I think)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Conditional==&lt;br /&gt;
===if===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // any statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if the boolean returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=Single-statement conditionals may omit the curly braces.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
   // curly braces aren&#039;t required if only one statement follows the conditional&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
===else===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // statements if true&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
   // the statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if the boolean returns false&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===else if===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean 1 )&lt;br /&gt;
{&lt;br /&gt;
   // statements if true&lt;br /&gt;
}&lt;br /&gt;
else if ( boolean 2 )&lt;br /&gt;
{&lt;br /&gt;
   // the statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if boolean 1 returns false&lt;br /&gt;
   // &amp;amp; boolean 2 returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===switch===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
switch ( variable )&lt;br /&gt;
{&lt;br /&gt;
   case value:&lt;br /&gt;
      // statements if variable == value&lt;br /&gt;
      // more such statements&lt;br /&gt;
      break;&lt;br /&gt;
   //repeat above for as many values as desired&lt;br /&gt;
   default:&lt;br /&gt;
      // statements executed if&lt;br /&gt;
      // none of the cases were true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note that each &amp;quot;case&amp;quot; can only test against a single value; that value can be a variable itself, but not a test expression.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=If switch has no parameter, then each case is evaluated as a boolean expression, like a string of if-then statements.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
switch&lt;br /&gt;
{&lt;br /&gt;
   case boolean expression:&lt;br /&gt;
      // if the expression is true, this statement is executed&lt;br /&gt;
      // more such statements&lt;br /&gt;
      break;&lt;br /&gt;
   //repeat above for as many conditionals as desired&lt;br /&gt;
   default:&lt;br /&gt;
      // statements executed if&lt;br /&gt;
      // none of the cases were true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Unconditional==&lt;br /&gt;
===try / finally===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=Block1 is executed as normal, and then block2 is executed regardless of whether&lt;br /&gt;
block1 finished normally, generated an error, or encountered a &#039;return&#039;,&lt;br /&gt;
&#039;break&#039;, or &#039;continue&#039; statement.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
   // block1&lt;br /&gt;
}&lt;br /&gt;
finally&lt;br /&gt;
{&lt;br /&gt;
   // block2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Loops==&lt;br /&gt;
===while===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
while ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // as with an if statement&lt;br /&gt;
   // this area is only entered&lt;br /&gt;
   // if the boolean tests true&lt;br /&gt;
   // once all this is done&lt;br /&gt;
   // it goes back to the begining&lt;br /&gt;
   // and will keep executing&lt;br /&gt;
   // as long as the boolean remains true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===repeat until===&lt;br /&gt;
&lt;br /&gt;
This is similar to the [http://en.wikipedia.org/wiki/Do_while_loop do...while loop], but only ends the loop when the &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; expression evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&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;
repeat&lt;br /&gt;
{&lt;br /&gt;
   // this is the same&lt;br /&gt;
   // as the while loop above&lt;br /&gt;
   // with one exception:&lt;br /&gt;
   // all of this code will&lt;br /&gt;
   // execute at least once&lt;br /&gt;
   // as the test doesn&#039;t occur&lt;br /&gt;
   // until the very end&lt;br /&gt;
} until ( boolean );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===for===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
for x from a to b by c {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Above is the general case. You don&#039;t need to specify whether it&#039;s going up or down - although doing so by using upto or downto does allow a runtime check to make sure you didn&#039;t screw up.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specify &amp;quot;c&amp;quot;, it defaults to incrementing/decrementing by 1.  The first iteration is at a and the last is at b (that is to say, it goes from a to b, inclusive).&lt;br /&gt;
&lt;br /&gt;
===foreach===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach key in aggregate {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Assigns each key in the supplied map or slice to &amp;quot;&amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt;&amp;quot; and iterates through the map. Due to how maps are handled, &amp;lt;code&amp;gt;foreach&amp;lt;/code&amp;gt; is guaranteed to iterate through the map in sorted order.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [int][string] map;&lt;br /&gt;
map[15][&amp;quot;test&amp;quot;] = true;&lt;br /&gt;
foreach int_index in map {&lt;br /&gt;
   print(int_index); //this will print &#039;15&#039; once, since there is only one valid value for this index&lt;br /&gt;
   foreach string_index in map[int_index] //this iterates over the &amp;quot;slice&amp;quot; of the map where 1 is fixed as the index&lt;br /&gt;
   { &lt;br /&gt;
      print(string_index); //This will print &amp;quot;test&amp;quot; once, since there is only one valid value for this index&lt;br /&gt;
      print(map[int_index][string_index]); //this will print &amp;quot;true&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
moreinfo=&lt;br /&gt;
So the output is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15&lt;br /&gt;
test&lt;br /&gt;
true&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For a multidimensional map, instead of nesting &amp;lt;code&amp;gt;foreach&amp;lt;/code&amp;gt; statements two iterators can be used inline.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach x, y in map {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=This is identical to:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach x in map {&lt;br /&gt;
   foreach y in map[x] {&lt;br /&gt;
      //do stuff&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=You can also directly specify the value stored in the map by specifying one more variable than the number of keys in the map:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
//string [string, int, item] my_map;&lt;br /&gt;
foreach s, i, m, value in my_map {&lt;br /&gt;
    print( s + &amp;quot;, &amp;quot; + i + &amp;quot;, &amp;quot; + m + &amp;quot; =&amp;gt; &amp;quot; + value );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See the page for [[Data Structures]] for more information on aggregates.&lt;br /&gt;
&lt;br /&gt;
==Continuation &amp;amp; Exiting==&lt;br /&gt;
Like many languages with looping structures, ASH supports the break and continue statements.  All looping structures (for, while, repeat until, and foreach) support these statements.&lt;br /&gt;
&lt;br /&gt;
===break===&lt;br /&gt;
Breaks out of the smallest enclosing loop.  In a switch statement, breaks out of the switch statement.  Execution resumes at the first statement after the end of the loop/switch statement.&lt;br /&gt;
&lt;br /&gt;
===continue===&lt;br /&gt;
Continues on to the next iteration of the loop (skipping any statements in this iteration that occur after the continue statement).  In a switch statement, continue is allowed iff the switch is inside a loop, and acts as any other continue.&lt;br /&gt;
&lt;br /&gt;
===return===&lt;br /&gt;
Exits the function and returns the value following the return statement, if specified. Note that the value&#039;s datatype must match that of the function itself (void functions can only use return by itself).&lt;br /&gt;
&lt;br /&gt;
===exit===&lt;br /&gt;
Exits the script. Using return when in main() achieves the same effect. Note that while this will end the current script, it will not stop automation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6092</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=6092"/>
		<updated>2011-02-21T08:18:38Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &amp;quot;command&amp;quot; takes 2 &amp;quot;m&amp;quot;s&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;
*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;
*This only works for automated adventuring. The script will not fire if you&#039;re using the relay browser.&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 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 and the empty string for private messages&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.   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;
&#039;&#039;&#039;Login (loginScript)&#039;&#039;&#039;&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;
&#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;
*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;
&#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]). 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;
&#039;&#039;&#039;Pre-Ascension (preAscensionScript)&#039;&#039;&#039;&lt;br /&gt;
:Same as the Post-Ascension, but 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;
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;
==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>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6091</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=6091"/>
		<updated>2011-02-21T08:17:07Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Added info about which preferences (I called them &amp;#039;settings&amp;#039;) can be CLI commands.&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;
*The betweenBattleScript setting is executed like a CLI comand. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
*This only works for automated adventuring. The script will not fire if you&#039;re using the relay browser.&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 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 and the empty string for private messages&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.   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;
&#039;&#039;&#039;Login (loginScript)&#039;&#039;&#039;&lt;br /&gt;
:This script is immediately executed once your character is logged in. The loginScript setting is executed like a CLI comand. If it is the name of an ASH script, that script does not require any 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;
*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;
&#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]). The postAscensionScript setting is executed like a CLI comand. If it is the name of an ASH script, that script does not require any special main() declaration.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-Ascension (preAscensionScript)&#039;&#039;&#039;&lt;br /&gt;
:Same as the Post-Ascension, but 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;
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;
==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>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Control_Structures&amp;diff=3164</id>
		<title>Control Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Control_Structures&amp;diff=3164"/>
		<updated>2010-11-12T18:22:31Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Continuation &amp;amp; Exiting */  added exit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Conditional==&lt;br /&gt;
===if===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // any statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if the boolean returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=Single-statement conditionals may omit the curly braces.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
   // curly braces aren&#039;t required if only one statement follows the conditional&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
===else===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // statements if true&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
   // the statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if the boolean returns false&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===else if===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
if ( boolean 1 )&lt;br /&gt;
{&lt;br /&gt;
   // statements if true&lt;br /&gt;
}&lt;br /&gt;
else if ( boolean 2 )&lt;br /&gt;
{&lt;br /&gt;
   // the statements here&lt;br /&gt;
   // are only going to be executed&lt;br /&gt;
   // if boolean 1 returns false&lt;br /&gt;
   // &amp;amp; boolean 2 returns true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===switch===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
switch ( variable )&lt;br /&gt;
{&lt;br /&gt;
   case value:&lt;br /&gt;
      // statements if variable == value&lt;br /&gt;
      // more such statements&lt;br /&gt;
      break;&lt;br /&gt;
   //repeat above for as many values as desired&lt;br /&gt;
   default:&lt;br /&gt;
      // statements executed if&lt;br /&gt;
      // none of the cases were true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note that each &amp;quot;case&amp;quot; can only test against a single value; that value can be a variable itself, but not a test expression.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=If switch has no parameter, then each case is evaluated as a boolean expression, like a string of if-then statements.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
switch&lt;br /&gt;
{&lt;br /&gt;
   case boolean expression:&lt;br /&gt;
      // if the expression is true, this statement is executed&lt;br /&gt;
      // more such statements&lt;br /&gt;
      break;&lt;br /&gt;
   //repeat above for as many conditionals as desired&lt;br /&gt;
   default:&lt;br /&gt;
      // statements executed if&lt;br /&gt;
      // none of the cases were true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Loops==&lt;br /&gt;
===while===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
while ( boolean )&lt;br /&gt;
{&lt;br /&gt;
   // as with an if statement&lt;br /&gt;
   // this area is only entered&lt;br /&gt;
   // if the boolean tests true&lt;br /&gt;
   // once all this is done&lt;br /&gt;
   // it goes back to the begining&lt;br /&gt;
   // and will keep executing&lt;br /&gt;
   // as long as the boolean remains true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===repeat until===&lt;br /&gt;
&lt;br /&gt;
This is similar to the [http://en.wikipedia.org/wiki/Do_while_loop do...while loop], but only ends the loop when the &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; expression evaluates to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&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;
repeat&lt;br /&gt;
{&lt;br /&gt;
   // this is the same&lt;br /&gt;
   // as the while loop above&lt;br /&gt;
   // with one exception:&lt;br /&gt;
   // all of this code will&lt;br /&gt;
   // execute at least once&lt;br /&gt;
   // as the test doesn&#039;t occur&lt;br /&gt;
   // until the very end&lt;br /&gt;
} until ( boolean );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===for===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
for x from a to b by c {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Above is the general case. You don&#039;t need to specify whether it&#039;s going up or down - although doing so by using upto or downto does allow a runtime check to make sure you didn&#039;t screw up.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specify &amp;quot;c&amp;quot;, it defaults to incrementing/decrementing by 1.  The first iteration is at a and the last is at b (that is to say, it goes from a to b, inclusive).&lt;br /&gt;
&lt;br /&gt;
===foreach===&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach key in aggregate {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Assigns each key in the supplied map or slice to &amp;quot;&amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt;&amp;quot; and iterates through the map. Due to how maps are handled, &amp;lt;code&amp;gt;foreach&amp;lt;/code&amp;gt; is guaranteed to iterate through the map in sorted order.&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [int][string] map;&lt;br /&gt;
map[15][&amp;quot;test&amp;quot;] = true;&lt;br /&gt;
foreach int_index in map {&lt;br /&gt;
   print(int_index); //this will print &#039;15&#039; once, since there is only one valid value for this index&lt;br /&gt;
   foreach string_index in map[int_index] //this iterates over the &amp;quot;slice&amp;quot; of the map where 1 is fixed as the index&lt;br /&gt;
   { &lt;br /&gt;
      print(string_index); //This will print &amp;quot;test&amp;quot; once, since there is only one valid value for this index&lt;br /&gt;
      print(map[int_index][string_index]); //this will print &amp;quot;true&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
moreinfo=&lt;br /&gt;
So the output is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
15&lt;br /&gt;
test&lt;br /&gt;
true&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For a multidimensional map, instead of nesting &amp;lt;code&amp;gt;foreach&amp;lt;/code&amp;gt; statements two iterators can be used inline.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach x, y in map {&lt;br /&gt;
   //do stuff&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=This is identical to:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach x in map {&lt;br /&gt;
   foreach y in map[x] {&lt;br /&gt;
      //do stuff&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=You can also directly specify the value stored in the map by specifying one more variable than the number of keys in the map:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
//string [string, int, item] my_map;&lt;br /&gt;
foreach s, i, m, value in my_map {&lt;br /&gt;
    print( s + &amp;quot;, &amp;quot; + i + &amp;quot;, &amp;quot; + m + &amp;quot; =&amp;gt; &amp;quot; + value );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See the page for [[Data Structures]] for more information on aggregates.&lt;br /&gt;
&lt;br /&gt;
==Continuation &amp;amp; Exiting==&lt;br /&gt;
Like many languages with looping structures, ASH supports the break and continue statements.  All looping structures (for, while, repeat until, and foreach) support these statements.&lt;br /&gt;
&lt;br /&gt;
===break===&lt;br /&gt;
Breaks out of the smallest enclosing loop.  In a switch statement, breaks out of the switch statement.  Execution resumes at the first statement after the end of the loop/switch statement.&lt;br /&gt;
&lt;br /&gt;
===continue===&lt;br /&gt;
Continues on to the next iteration of the loop (skipping any statements in this iteration that occur after the continue statement).  In a switch statement, continue is allowed iff the switch is inside a loop, and acts as any other continue.&lt;br /&gt;
&lt;br /&gt;
===return===&lt;br /&gt;
Exits the function and returns the value following the return statement, if specified. Note that the value&#039;s datatype must match that of the function itself (void functions can only use return by itself).&lt;br /&gt;
&lt;br /&gt;
===exit===&lt;br /&gt;
Exits the script. Works like return when used in main().&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Regular_Expressions&amp;diff=6496</id>
		<title>Regular Expressions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Regular_Expressions&amp;diff=6496"/>
		<updated>2010-11-09T16:31:52Z</updated>

		<summary type="html">&lt;p&gt;Slyz: removed an extra &amp;#039;)&amp;#039; in the example for a case-insensitive matcher&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>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Auto-stops&amp;diff=6624</id>
		<title>Auto-stops</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Auto-stops&amp;diff=6624"/>
		<updated>2010-06-30T16:51:42Z</updated>

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

		<summary type="html">&lt;p&gt;Slyz: moved stuff to the Talk page, formating, added useful expressions&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;
==Numeric Modifiers==&lt;br /&gt;
The full name of any numeric modifier (as shown by the &amp;lt;b&amp;gt;modref&amp;lt;/b&amp;gt; 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;
&amp;lt;p&amp;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;&amp;lt;b&amp;gt;mus&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;mys&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;mox&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;main&amp;lt;/b&amp;gt;stat, &amp;lt;b&amp;gt;HP&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;MP&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;ML&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;DA&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;DR&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;com&amp;lt;/b&amp;gt;bat rate, &amp;lt;b&amp;gt;item&amp;lt;/b&amp;gt; drop, &amp;lt;b&amp;gt;meat&amp;lt;/b&amp;gt; drop, &amp;lt;b&amp;gt;exp&amp;lt;/b&amp;gt;erience, &amp;lt;b&amp;gt;adv&amp;lt;/b&amp;gt;entures&lt;br /&gt;
&amp;lt;br&amp;gt;Also, resistance (of any type) can be abbreviated as &amp;lt;b&amp;gt;res&amp;lt;/b&amp;gt;, and damage can be abbreviated as &amp;lt;b&amp;gt;dmg&amp;lt;/b&amp;gt;. &amp;lt;b&amp;gt;all res&amp;lt;/b&amp;gt;istance is a shortcut for giving the same weight to all five basic elements. Likewise, &amp;lt;b&amp;gt;elemental dmg&amp;lt;/b&amp;gt; is a shortcut for the five elemental damage types.&lt;br /&gt;
&amp;lt;p&amp;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;
==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;&amp;lt;b&amp;gt;min&amp;lt;/b&amp;gt; - 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;&amp;lt;b&amp;gt;max&amp;lt;/b&amp;gt; - 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 &amp;lt;b&amp;gt;min&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;max&amp;lt;/b&amp;gt; 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 &amp;lt;b&amp;gt;max&amp;lt;/b&amp;gt; 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: &amp;lt;b&amp;gt;sea&amp;lt;/b&amp;gt; requires both Adventure Underwater and Underwater Familiar to be true.&lt;br /&gt;
&amp;lt;p&amp;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 &amp;lt;b&amp;gt;4 clownosity&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;7 raveosity&amp;lt;/b&amp;gt; are the only useful forms.&lt;br /&gt;
&amp;lt;p&amp;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;&amp;lt;b&amp;gt;hat&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;weapon&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;offhand&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;shirt&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;pants&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;acc1&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;acc2&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;acc3&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;familiar&amp;lt;/b&amp;gt; (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;&amp;lt;b&amp;gt;empty&amp;lt;/b&amp;gt; - With positive weight, consider only slots that are currently empty; with negative weight, only those that aren&#039;t empty. Either way, &amp;lt;b&amp;gt;+&amp;lt;i&amp;gt;slot&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;-&amp;lt;i&amp;gt;slot&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; can be used to further refine the selected slots.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;hand&amp;lt;/b&amp;gt;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;&amp;lt;b&amp;gt;melee&amp;lt;/b&amp;gt; - 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;&amp;lt;b&amp;gt;type &amp;lt;i&amp;gt;text&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; - Only weapons with a type containing &amp;lt;i&amp;gt;text&amp;lt;/i&amp;gt; are considered; for example, &amp;lt;b&amp;gt;type club&amp;lt;/b&amp;gt; if you plan to do some Seal Clubbing.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;shield&amp;lt;/b&amp;gt; - With positive weight, only shields will be considered for your off-hand. Implies &amp;lt;b&amp;gt;1 handed&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;equip &amp;lt;i&amp;gt;item&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; - The specified item is required (positive weight) or forbidden (negative weight). Multiple uses of &amp;lt;b&amp;gt;+equip&amp;lt;/b&amp;gt; require all of the items to be equipped.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;outfit &amp;lt;i&amp;gt;name&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; - The specified standard outfit is required or forbidden. If the name is omitted, the currently equipped outfit is used. Multiple uses of &amp;lt;b&amp;gt;+outfit&amp;lt;/b&amp;gt; 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 &amp;lt;b&amp;gt;+equip&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;+outfit&amp;lt;/b&amp;gt; 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;&amp;lt;b&amp;gt;tie&amp;lt;/b&amp;gt;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 &amp;lt;b&amp;gt;+combat&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;-combat&amp;lt;/b&amp;gt; (since there&#039;s usually only one item that can help), &amp;lt;b&amp;gt;adv&amp;lt;/b&amp;gt; and/or &amp;lt;b&amp;gt;PvP fights&amp;lt;/b&amp;gt; at rollover, and &amp;lt;b&amp;gt;familiar weight&amp;lt;/b&amp;gt; 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;&amp;lt;b&amp;gt;switch &amp;lt;i&amp;gt;familiar&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; - 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, &amp;lt;b&amp;gt;switch hobo monkey, -switch leprechaun&amp;lt;/b&amp;gt; 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;
&amp;lt;p&amp;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;
&amp;lt;p&amp;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 &amp;lt;b&amp;gt;maximize &amp;lt;i&amp;gt;expression&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, 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 &amp;lt;b&amp;gt;maximize? &amp;lt;i&amp;gt;expression&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;), 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 &amp;lt;b&amp;gt;min&amp;lt;/b&amp;gt; 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 tiebreaker:&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;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Modifier_Maximizer&amp;diff=6752</id>
		<title>Talk:Modifier Maximizer</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Modifier_Maximizer&amp;diff=6752"/>
		<updated>2010-06-20T10:02:12Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Created page with &amp;#039;I keep getting questions from clannies, especially, on how to use this tool. Unfortunately, I don&amp;#039;t know much beyond the basics, myself. So, if someone who DOES know the ins-and-…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I keep getting questions from clannies, especially, on how to use this tool. Unfortunately, I don&#039;t know much beyond the basics, myself. So, if someone who DOES know the ins-and-outs could jot some info down, it would be much appreciated. --[[User:StDoodle|StDoodle (#1059825)]] 22:36, 19 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The core functionality is to maximize various [[modifiers]] according to certain parameters. A number preceding the modifier determines its weight -- this number (not restricted to integers) can be negative (for discouraged modifiers), zero (to ignore certain modifiers&#039; effect), or positive (duh).&lt;br /&gt;
&lt;br /&gt;
There&#039;s something about the +, but I&#039;m not completely sure what it is. I think it&#039;s used to force an outfit (e.g. &amp;quot;item drop, +outfit hodg&amp;quot; when boss-killing), but I&#039;m pretty sure there&#039;s something else to it. --[[User:Heeheehee|Heeheehee]] 02:33, 20 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6710</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6710"/>
		<updated>2010-06-08T02:36:17Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* To list or not to list */  Forgot to sign earlier&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Sorry about that, i just thought it was really helpful. I won&#039;t add any more scripts to this page. Also if you want you can remove it.I do agree though --[[User:Icon315|Icon315]] 20:25, 4 June 2010 (UTC)&lt;br /&gt;
**No no, your edit just made me think about what people might start doing, maybe my wording wasn&#039;t well chosen. From reading your script&#039;s thread, it seems people do like it, and it is useful. I simply wanted to start a talk on how scripts get put here.--[[User:Slyz|Slyz]] 12:23, 5 June 2010 (UTC)&lt;br /&gt;
***Can I vouch for &amp;quot;if people other than the author refer to it to solve certain problems or whatever, then it&#039;s safe to put it on here&amp;quot;? That&#039;d be at least one of the criteria, I&#039;d hope. Also, for libraries, I guess if they&#039;re widely used or used by one of the scripts here? I&#039;m still not sure whether to put my DateLib.ash on here, since it still seems like it&#039;d be too limited in its applications. --[[User:Heeheehee|Heeheehee]] 15:30, 5 June 2010 (UTC)&lt;br /&gt;
***Agreed on both counts. A script here should have more than a handful of people that find it helpful. A library script (no matter how clever) shouldn&#039;t be listed unless there is more than 1 script on the mafia forum that makes use of it. --[[User:Bale|Bale]] 16:55, 5 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To list or not to list ==&lt;br /&gt;
&lt;br /&gt;
potionBuy? Seriously? I wrote the script, but I doubt it is really more than a marginal script of interest to edge cases. I&#039;ve only been notified by 8 users. Do we want to make the list that complete? Or is it good to list such minor scripts.? --[[User:Bale|Bale]] 16:16, 6 June 2010 (UTC)&lt;br /&gt;
*Well hey, hatter.ash only has one notification. To be fair, it also isn&#039;t that old. Honestly, though, I don&#039;t know. We have examples of most of the other [[Miscellaneous_ASH_Features#Additional_Script_Uses|event-driven scripts]] listed, but those are more widely used and, well, more complex. --[[User:Heeheehee|Heeheehee]] 21:53, 6 June 2010 (UTC)&lt;br /&gt;
**By notifications do you mean the whole notify; thing? If so i don&#039;t think we should base the scripting on this too much. Mostly because there is a difference between Helpful and Not used. Also i think people remove that command from their scripts alot. My script has had many downloads but only half of that in notifications --[[User:Icon315|Icon315]] 23:08, 6 June 2010 (UTC)&lt;br /&gt;
**I would have put potionBuy up here, but I&#039;m not sure it&#039;s still useful: doesn&#039;t Mafia check mall prices before creating things?--[[User:Slyz|Slyz]] 02:36, 8 June 2010 (UTC)&lt;br /&gt;
**Yes. Mafia even started detecting if saucerors would make three of them. potionBuy only exists for the neurotic. I&#039;ve never really approved of it since it panders to people who believe making potions as a non-sauceror is never right. They&#039;re wrong. It&#039;s not really any use, except as an example of a buyScript. --[[User:Bale|Bale]] 19:25, 7 June 2010 (UTC)&lt;br /&gt;
***[http://kolmafia.us/showthread.php?2815-7760-Start-of-major-concoctions-overhaul-The-mixing-type-in-concoctions.txt-can-..&amp;amp;p=19190&amp;amp;viewfull=1#post19190 This post by JH] suggests otherwise -- if you have all the ingredients already, Mafia won&#039;t check prices. I haven&#039;t actually looked at the code, but it would make sense for Mafia to check prices for items you don&#039;t have at various stages of the process. --[[User:Heeheehee|Heeheehee]] 22:17, 7 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
My 2 cents: there&#039;s merit in having an example of each unique type of script (in this case a buyScript), so I&#039;d say even if it isn&#039;t what the author considers &amp;quot;top-tier,&amp;quot; it&#039;s better than nothing. Also, wanted to chime in on the whole &amp;quot;listing one&#039;s own scripts&amp;quot; issue (but just haven&#039;t had much time lately): if one looks at the list of script authors, and then looks at the list of wiki contributors, one notices a lot of overlap. The list of currently-active KoLmafia enthusiasts is pretty small, and in large part said people contribute both in writing scripts and in editing the wiki. So I wouldn&#039;t worry about it, but if anyone reverts an addition, please discuss here before un-reverting. Though, since the list is pretty well fleshed out, it&#039;s less of an issue now. --[[User:StDoodle|StDoodle (#1059825)]] 02:09, 8 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6706</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6706"/>
		<updated>2010-06-07T14:21:01Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* To list or not to list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Sorry about that, i just thought it was really helpful. I won&#039;t add any more scripts to this page. Also if you want you can remove it.I do agree though --[[User:Icon315|Icon315]] 20:25, 4 June 2010 (UTC)&lt;br /&gt;
**No no, your edit just made me think about what people might start doing, maybe my wording wasn&#039;t well chosen. From reading your script&#039;s thread, it seems people do like it, and it is useful. I simply wanted to start a talk on how scripts get put here.--[[User:Slyz|Slyz]] 12:23, 5 June 2010 (UTC)&lt;br /&gt;
***Can I vouch for &amp;quot;if people other than the author refer to it to solve certain problems or whatever, then it&#039;s safe to put it on here&amp;quot;? That&#039;d be at least one of the criteria, I&#039;d hope. Also, for libraries, I guess if they&#039;re widely used or used by one of the scripts here? I&#039;m still not sure whether to put my DateLib.ash on here, since it still seems like it&#039;d be too limited in its applications. --[[User:Heeheehee|Heeheehee]] 15:30, 5 June 2010 (UTC)&lt;br /&gt;
***Agreed on both counts. A script here should have more than a handful of people that find it helpful. A library script (no matter how clever) shouldn&#039;t be listed unless there is more than 1 script on the mafia forum that makes use of it. --[[User:Bale|Bale]] 16:55, 5 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To list or not to list ==&lt;br /&gt;
&lt;br /&gt;
potionBuy? Seriously? I wrote the script, but I doubt it is really more than a marginal script of interest to edge cases. I&#039;ve only been notified by 8 users. Do we want to make the list that complete? Or is it good to list such minor scripts.? --[[User:Bale|Bale]] 16:16, 6 June 2010 (UTC)&lt;br /&gt;
*Well hey, hatter.ash only has one notification. To be fair, it also isn&#039;t that old. Honestly, though, I don&#039;t know. We have examples of most of the other [[Miscellaneous_ASH_Features#Additional_Script_Uses|event-driven scripts]] listed, but those are more widely used and, well, more complex. --[[User:Heeheehee|Heeheehee]] 21:53, 6 June 2010 (UTC)&lt;br /&gt;
**By notifications do you mean the whole notify; thing? If so i don&#039;t think we should base the scripting on this too much. Mostly because there is a difference between Helpful and Not used. Also i think people remove that command from their scripts alot. My script has had many downloads but only half of that in notifications --[[User:Icon315|Icon315]] 23:08, 6 June 2010 (UTC)&lt;br /&gt;
**I would have put potionBuy up here, but I&#039;m not sure it&#039;s still useful: doesn&#039;t Mafia check mall prices before creating things?&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6700</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6700"/>
		<updated>2010-06-05T12:23:32Z</updated>

		<summary type="html">&lt;p&gt;Slyz: learning about lists&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Sorry about that, i just thought it was really helpful. I won&#039;t add any more scripts to this page. Also if you want you can remove it.I do agree though --[[User:Icon315|Icon315]] 20:25, 4 June 2010 (UTC)&lt;br /&gt;
**No no, your edit just made me think about what people might start doing, maybe my wording wasn&#039;t well chosen. From reading your script&#039;s thread, it seems people do like it, and it is useful. I simply wanted to start a talk on how scripts get put here.--[[User:Slyz|Slyz]] 12:23, 5 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6699</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6699"/>
		<updated>2010-06-05T12:23:08Z</updated>

		<summary type="html">&lt;p&gt;Slyz: forgot to sign&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Sorry about that, i just thought it was really helpful. I won&#039;t add any more scripts to this page. Also if you want you can remove it.I do agree though --[[User:Icon315|Icon315]] 20:25, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
**No no, your edit just made me think about what people might start doing, maybe my wording wasn&#039;t well chosen. From reading your script&#039;s thread, it seems people do like it, and it is useful. I simply wanted to start a talk on how scripts get put here.--[[User:Slyz|Slyz]] 12:23, 5 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6698</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6698"/>
		<updated>2010-06-05T12:22:30Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
*Sorry about that, i just thought it was really helpful. I won&#039;t add any more scripts to this page. Also if you want you can remove it.I do agree though --[[User:Icon315|Icon315]] 20:25, 4 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
** No no, your edit just made me think about what people might start doing, maybe my wording wasn&#039;t well chosen. From reading your script&#039;s thread, it seems people do like it, and it is useful. I simply wanted to start a talk on how scripts get put here.&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6667</id>
		<title>Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Helpful_Scripts&amp;diff=6667"/>
		<updated>2010-06-04T14:25:22Z</updated>

		<summary type="html">&lt;p&gt;Slyz: added Slime Vial Recipes, added description for hatter.ash and priceAdvisor&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 conjuction 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; 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; 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 at level 11 unless you have the forged documents &#039;cause it sucks to lose those three adventures accidentally.&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:&lt;br /&gt;
**The moons&#039; effects on various modifiers&lt;br /&gt;
**Current stat day&lt;br /&gt;
**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, this UI script enables the user to 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; Heeheehee&lt;br /&gt;
*This script provides a more user-friendly interface for modifying 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;
* Stasises 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 stops stasising.&lt;br /&gt;
* Quest related stasis: Using molybdenum magnet on the correct gremlin, getting essence in Seaside Megalopolis, learning 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;
&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;
&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;
* Automatically hops over the clan Bonus Adventures from Hell to get something (buff, crimbo present, etc) from the VIP Lounge, then it hops back to your regular clan.&lt;br /&gt;
* If you don&#039;t have a membership in Bonus Adventures from Hell, it will submit a request to join the clan so that you can get access to the fully stocked VIP Lounge.&lt;br /&gt;
&lt;br /&gt;
==Item Handling Scripts==&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;
* Manages 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?1519 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; [http://zachbardon.com/mafiatools/details.php?a=dj_d dj_d]&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;
&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 [http://kol.coldfront.net/thekolwiki/index.php/Color_Wheel_of_Yuck Color Wheel of Yuck] trophy by using the vials in your inventory to create slime potions you do not know yet.&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&#039;&#039; scripts require this.&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;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6696</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6696"/>
		<updated>2010-06-04T14:08:21Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
*** Both suggestions have merit, but I&#039;m leaning a bit closer toward &amp;quot;new category&amp;quot;, if not only because the UI scripts need to go in the relay folder, as opposed to the scripts folder.  --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
** For everything other than UI scripts, the mafia subforum describes what they do. Even relay override scripts have the common element of modifying the KoL interface. However, the UI scripts do such wildly different things that they break the meaning of the categorization. Perhaps we&#039;ll just let UI scripts wander around this list based on their purpose. --[[User:Bale|Bale]] 09:07, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** Yup, looks great! (Also, I guessed that was the case after looking at the revision history a bit more carefully but wasn&#039;t entirely sure.) --[[User:Heeheehee|Heeheehee]] 02:15, 3 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I saw Icon315&#039;s edit to add his Daily Info script and thought that maybe script authors shouldn&#039;t put their own scripts on this page.&lt;br /&gt;
I don&#039;t have anything against Daily Info of course, and the original list was very subjective to start with, but I think we should put here other people&#039;s scripts that we think would be useful to a large community of Mafia users. Otherwise this page would end up being too big to actually be useful. Any thoughts on this?--[[User:Slyz|Slyz]] 14:08, 4 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6693</id>
		<title>Talk:Helpful Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Helpful_Scripts&amp;diff=6693"/>
		<updated>2010-06-02T08:03:52Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One question -- should relay override scripts be distinguished from those that create entirely new pages, or should we just rename them to &amp;quot;relay browser scripts&amp;quot; (or something like that)? (Asking because I&#039;m not entirely sure where the ZLib variable editor would fall.) --[[User:Heeheehee|Heeheehee]] 22:47, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That&#039;s a toughie! Dunno. Maybe we should categorize relay overrides based on what they do, rather than the fact that they work with the relay browser. So, my Slime Tubing override would go into Turn-burning while zlib variable editor can go under... I dunno, just tuck it right under zlib and nobody will get too upset about it I guess... --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;br /&gt;
** I simply sorted them in function of the kolmafia subforum where they are located, but maybe other categories would be better, like &amp;quot;Quests&amp;quot;, &amp;quot;Combat&amp;quot;, &amp;quot;Relay Override&amp;quot;, &amp;quot;User Interface Script&amp;quot;, &amp;quot;Informational&amp;quot;, &amp;quot;Libraries&amp;quot; etc... [[User:Slyz|Slyz]] 08:03, 2 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, what format should we make the standard? Already I see two different ones: &amp;lt;br&amp;gt;&#039;&#039;&#039;autoBasement&#039;&#039;&#039; - ([http://kolmafia.us/showthread.php?3113 download here]) &#039;&#039;&#039;Author:&#039;&#039;&#039; Rinn&amp;lt;br&amp;gt;and&amp;lt;br&amp;gt;&#039;&#039;&#039;ZLib&#039;&#039;&#039; by Zarqon ([http://kolmafia.us/showthread.php?2072 download here])&lt;br /&gt;
&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 22:51, 1 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
* That was kinda a work in progress. I never intended to leave it with two different formats, I just ran out of time and had to quit half-way. It&#039;s settled now. Does it look good? --[[User:Bale|Bale]] 07:51, 2 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=User:Slyz&amp;diff=6645</id>
		<title>User:Slyz</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=User:Slyz&amp;diff=6645"/>
		<updated>2010-06-01T17:23:42Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Created page with &amp;#039;==Turn-Burning Scripts==  *&amp;#039;&amp;#039;&amp;#039;autoBasement&amp;#039;&amp;#039;&amp;#039; by Rinn (http://kolmafia.us/showthread.php?3113)  *&amp;#039;&amp;#039;&amp;#039;Rinn&amp;#039;s Quest Scripts&amp;#039;&amp;#039;&amp;#039; by Rinn (http://kolmafia.us/showthread.php?2584) *&amp;#039;&amp;#039;&amp;#039;S…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Turn-Burning Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;autoBasement&#039;&#039;&#039; by Rinn (http://kolmafia.us/showthread.php?3113) &lt;br /&gt;
*&#039;&#039;&#039;Rinn&#039;s Quest Scripts&#039;&#039;&#039; by Rinn (http://kolmafia.us/showthread.php?2584)&lt;br /&gt;
*&#039;&#039;&#039;Slime Tube Adventuring Script&#039;&#039;&#039; by Alhifar ( http://kolmafia.us/showthread.php?2596)&lt;br /&gt;
*&#039;&#039;&#039;One-Click Wossname&#039;&#039;&#039; by zarqon (http://kolmafia.us/showthread.php?960)&lt;br /&gt;
*&#039;&#039;&#039;MacGuffin&#039;&#039;&#039; by zarqon (http://kolmafia.us/showthread.php?1965)&lt;br /&gt;
*&#039;&#039;&#039;CounterChecker&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?2519)&lt;br /&gt;
*&#039;&#039;&#039;Dwarven Factory&#039;&#039;&#039; by That FN Ninja (http://kolmafia.us/showthread.php?2884)&lt;br /&gt;
&lt;br /&gt;
==Relay Override Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Telescope Information&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?4057)&lt;br /&gt;
*&#039;&#039;&#039;shore.ash&#039;&#039;&#039; by lostcalpolydude and Bale (http://kolmafia.us/showthread.php?2813)&lt;br /&gt;
*&#039;&#039;&#039;woods.ash&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?4199-Acquire-Continuum-Transfunctioner&amp;amp;p=29908&amp;amp;viewfull=1#post29908)&lt;br /&gt;
&lt;br /&gt;
==Custom Combat Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;First Things First&#039;&#039;&#039; by zarqon (http://kolmafia.us/showthread.php?1255)&lt;br /&gt;
*&#039;&#039;&#039;SmartStasis&#039;&#039;&#039; by zarqon (http://kolmafia.us/showthread.php?1715)&lt;br /&gt;
&lt;br /&gt;
==Buff Upkeep Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Universal Recovery&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?1780)&lt;br /&gt;
*&#039;&#039;&#039;Best Between Battle Script Ever&#039;&#039;&#039; by zarqon (http://kolmafia.us/showthread.php?1240)&lt;br /&gt;
*&#039;&#039;&#039;hatter.ash&#039;&#039;&#039; by That FN Ninja (http://kolmafia.us/showthread.php?4262)&lt;br /&gt;
*&#039;&#039;&#039;acquireBuff&#039;&#039;&#039; by Rinn (http://kolmafia.us/showthread.php?4048)&lt;br /&gt;
&lt;br /&gt;
==Item Handling Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Rainbow Gravitation made easy&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?1929)&lt;br /&gt;
*&#039;&#039;&#039;Scripting the birth of a new life&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?2769)&lt;br /&gt;
*&#039;&#039;&#039;PriceAdvisor&#039;&#039;&#039; by aqualectrix (http://kolmafia.us/showthread.php?3110)&lt;br /&gt;
&lt;br /&gt;
==Informational Scripts==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;What are you worth?&#039;&#039;&#039; by dj_d and zarqon (http://kolmafia.us/showthread.php?2628-What-are-you-worth-networth.ash-will-tell-you.&amp;amp;p=24990&amp;amp;viewfull=1#post24990)&lt;br /&gt;
*&#039;&#039;&#039;bumcheekcity&#039;s Easy Wiki Snapshot Maker&#039;&#039;&#039; by bumcheekcity (http://kolmafia.us/showthread.php?3001)&lt;br /&gt;
*&#039;&#039;&#039;EatDrink.ash: Optimize your daily diet&#039;&#039;&#039; by dj_d (http://kolmafia.us/showthread.php?1519)&lt;br /&gt;
*&#039;&#039;&#039;StDoodle&#039;s Custom Daily Deeds&#039;&#039;&#039; by StDoodle (http://kolmafia.us/showthread.php?3443)&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Clan Hopping&#039;&#039;&#039; by Bale (http://kolmafia.us/showthread.php?2071)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Relay_Override_Scripting&amp;diff=6047</id>
		<title>Talk:Relay Override Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Relay_Override_Scripting&amp;diff=6047"/>
		<updated>2010-04-18T08:43:32Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Icon&#039;s edit reminds me; we should note the difference between regular relay override scripts and the brand-new &amp;quot;relay_&amp;quot; scripts. For the former, it should be noted as BAD PRACTICE to completely ignore the unmodified page (as that could really bork things). But for the latter, it&#039;s fairly likely you&#039;ll be doing the entire page write from your script.--[[User:StDoodle|StDoodle (#1059825)]] 12:56, 12 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
What would be a good name for those? Scripts with Graphical Interfaces? Relay scripts?&lt;br /&gt;
--[[User:Slyz|Slyz]] 08:43, 18 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:ASH_Errors&amp;diff=6245</id>
		<title>Talk:ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:ASH_Errors&amp;diff=6245"/>
		<updated>2010-04-18T08:36:08Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is this like were things like &amp;lt;font color=&amp;quot;#ff7000&amp;quot;&amp;gt;Script parsing error (X.ash, line Y)&amp;lt;/font&amp;gt; are listed?--[[User:Icon315|Icon315]] 22:33, 14 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s where they WILL be listed, once they are listed. --[[User:Bale|Bale]] 22:52, 14 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
What Bale said. Also, I changed that to orange; I kept trying to click on it. :( --[[User:StDoodle|StDoodle (#1059825)]] 00:35, 15 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, if anyone&#039;s feeling particularly ambitious, https://kolmafia.svn.sourceforge.net/svnroot/kolmafia/src/net/sourceforge/kolmafia/textui/Parser.java should help. Just look for all the instances of parseException. (Speaking of which, would it be useful if these were presented in the order that they&#039;re checked?) --[[User:Heeheehee|Heeheehee]] 00:17, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think alphabetical order would be better: this page is going to be excellent for first-time ASH scripters to understand what&#039;s wrong with their script. --[[User:Slyz|Slyz]] 10:41, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Should we add the correct examples? Or are the fixes clear enough?&lt;br /&gt;
--[[User:Slyz|Slyz]] 08:36, 18 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6204</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6204"/>
		<updated>2010-04-18T08:35:14Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Variable is already defined */ Oh my grammar! &amp;#039;Tis that of a fawning pox-marked flax-wench!&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 may also be 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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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;
===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;
===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;
===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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Extract_meat&amp;diff=5483</id>
		<title>Extract meat</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Extract_meat&amp;diff=5483"/>
		<updated>2010-04-17T11:27:29Z</updated>

		<summary type="html">&lt;p&gt;Slyz: removed RFI - no other matches will work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|extract_meat}}{{&lt;br /&gt;
#vardefine:return_type|int}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=String Handling Routines|&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|text}}|&lt;br /&gt;
p1desc={{Pspan|text}} is the string to search|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=This function searches your supplied {{pspan|text}}, searching for either the phrase &amp;quot;You gain X Meat&amp;quot; or &amp;quot;You lose X Meat&amp;quot; and returns X. For &amp;quot;gain&amp;quot; X will be positive, and for &amp;quot;lose&amp;quot; negative. The number X can be formatted with or without commas. Note that the phrases to search are both case-sensitive (it will not match on &amp;quot;You gain 10 meat&amp;quot;). This function can be used for parsing meat gains and losses from combat and kmails (though additional parsing is necessary for kmail to avoid considering the text of the kmail itself, which could contain the meat gain/loss string).|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|extract_items}}|&lt;br /&gt;
special=This function returns 0 if it does not find a match.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Extract_meat&amp;diff=6269</id>
		<title>Talk:Extract meat</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Extract_meat&amp;diff=6269"/>
		<updated>2010-04-17T11:27:04Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Created page with &amp;#039;From what I can gather in the mafia source, only &amp;quot;You gain&amp;quot; and &amp;quot;You loose&amp;quot; will result in a match. --~~~~&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;From what I can gather in the mafia source, only &amp;quot;You gain&amp;quot; and &amp;quot;You loose&amp;quot; will result in a match.&lt;br /&gt;
--[[User:Slyz|Slyz]] 11:27, 17 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6202</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6202"/>
		<updated>2010-04-17T10:42:49Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &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=Example:|&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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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 generally indicates that you declare the same variable 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;
===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;
===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;
===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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:ASH_Errors&amp;diff=6244</id>
		<title>Talk:ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:ASH_Errors&amp;diff=6244"/>
		<updated>2010-04-17T10:41:33Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is this like were things like &amp;lt;font color=&amp;quot;#ff7000&amp;quot;&amp;gt;Script parsing error (X.ash, line Y)&amp;lt;/font&amp;gt; are listed?--[[User:Icon315|Icon315]] 22:33, 14 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s where they WILL be listed, once they are listed. --[[User:Bale|Bale]] 22:52, 14 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
What Bale said. Also, I changed that to orange; I kept trying to click on it. :( --[[User:StDoodle|StDoodle (#1059825)]] 00:35, 15 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also, if anyone&#039;s feeling particularly ambitious, https://kolmafia.svn.sourceforge.net/svnroot/kolmafia/src/net/sourceforge/kolmafia/textui/Parser.java should help. Just look for all the instances of parseException. (Speaking of which, would it be useful if these were presented in the order that they&#039;re checked?) --[[User:Heeheehee|Heeheehee]] 00:17, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think alphabetical order would be better: this page is going to be excellent for first-time ASH scripters to understand what&#039;s wrong with their script. --[[User:Slyz|Slyz]] 10:41, 17 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6201</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6201"/>
		<updated>2010-04-17T10:34:37Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Record name is already defined */&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=Example:|&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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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 generally indicates that you declare the same variable 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 ;&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;
===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;
===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;
===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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6200</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6200"/>
		<updated>2010-04-17T10:33:50Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Invalid field name */&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=Example:|&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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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 generally indicates that you declare the same variable 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 ;&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;
===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;
===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;
===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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
   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;Record name &#039;str&#039; is already defined (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6199</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6199"/>
		<updated>2010-04-17T10:32:33Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Variable is already defined */&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=Example:|&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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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 generally indicates that you declare the same variable 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 ;&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;
===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;
===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;
===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 dblstr {&lt;br /&gt;
   string a;&lt;br /&gt;
   string b;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dblstr [int] map;&lt;br /&gt;
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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
   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;Record name &#039;str&#039; is already defined (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6198</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6198"/>
		<updated>2010-04-17T10:31:53Z</updated>

		<summary type="html">&lt;p&gt;Slyz: /* Variable is already defined */  the problem isn&amp;#039;t the name, it&amp;#039;s declaring the same variable twice.&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=Example:|&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;
===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;
===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 [[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;
===Script parsing error===&lt;br /&gt;
&lt;br /&gt;
This generally indicates a syntax problem, as in having an excess amount of braces.&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 generally indicates that you declare the same variable 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 = numeric_modifier(&amp;quot;Item Drop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
int Drops = numeric_modifier(&amp;quot;Meat Drops&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;
===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;
===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;
===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 dblstr {&lt;br /&gt;
   string a;&lt;br /&gt;
   string b;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dblstr [int] map;&lt;br /&gt;
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;
===Reserved word cannot be a record name===&lt;br /&gt;
&lt;br /&gt;
This indicates that the record name has already been reserved, and so cannot be used. 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 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;
===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;
   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;Record name &#039;str&#039; is already defined (test.ash, line 5)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6191</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6191"/>
		<updated>2010-04-16T17:35:53Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Errors happen.&lt;br /&gt;
&lt;br /&gt;
Also, I don&#039;t happen to have this page done, yet.&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=Example:|&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;
===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;
===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 [[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;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6190</id>
		<title>ASH Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_Errors&amp;diff=6190"/>
		<updated>2010-04-16T17:34:46Z</updated>

		<summary type="html">&lt;p&gt;Slyz: someone might want to check the formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Errors happen.&lt;br /&gt;
&lt;br /&gt;
Also, I don&#039;t happen to have this page done, yet.&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=Example|&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;
===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;
&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 [[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;
{{RFI|Obviously, a lot more info is needed here.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_ASH_Features&amp;diff=6064</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=6064"/>
		<updated>2010-04-14T21:55:11Z</updated>

		<summary type="html">&lt;p&gt;Slyz: added some additional scripts and their associated preferences&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;
&#039;&#039;&#039;[[import]]&#039;&#039;&#039;&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 menu-or-CLI-selectable scripts and relay override scripts, you can also use a script for:&lt;br /&gt;
* Login (loginScript)&lt;br /&gt;
* Logout (logoutScript)&lt;br /&gt;
* Recovery (recoveryScript)&lt;br /&gt;
* Between Battle (betweenBattleScript)&lt;br /&gt;
* Buy (buyScript)&lt;br /&gt;
* Chatbot (chatbotScript)&lt;br /&gt;
* Planting (plantingScript)&lt;br /&gt;
* Pre Ascension (preAscensionScript)&lt;br /&gt;
* Post Ascension (postAscensionScript)&lt;br /&gt;
* Counters (counterScript)&lt;br /&gt;
* ??&lt;br /&gt;
* Profit (profitScript?)&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;
{{RFI|Where are all the other places a script can be used? Help plox.}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:To_upper_case&amp;diff=6238</id>
		<title>Talk:To upper case</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:To_upper_case&amp;diff=6238"/>
		<updated>2010-04-14T21:45:00Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Best code sample EVER!&lt;br /&gt;
&lt;br /&gt;
Now think of what Nigerian princes can achieve with kmails! [[User:Slyz|Slyz]] 21:45, 14 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_upper_case&amp;diff=6119</id>
		<title>To upper case</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_upper_case&amp;diff=6119"/>
		<updated>2010-04-14T21:43:47Z</updated>

		<summary type="html">&lt;p&gt;Slyz: best code sample ever was using to_lower_case()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_upper_case}}{{&lt;br /&gt;
#vardefine:return_type|string}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=String Handling Routines|&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|text}}|&lt;br /&gt;
p1desc={{Pspan|text}} is the original string|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Converts all lower-case alphabetic characters (a-z) found in {{pspan|text}} to their upper-case equivalents (A-Z) and returns the resulting string.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Turns &amp;quot;normal&amp;quot; text into &amp;quot;loud&amp;quot; text.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string s = &amp;quot;hi i am a nigerian prince, would you like 1 million us dollar?&amp;quot;;&lt;br /&gt;
s = to_upper_case(s);&lt;br /&gt;
print(s);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
moreinfo=&lt;br /&gt;
Returns:&amp;lt;pre&amp;gt;HI I AM A NIGERIAN PRINCE, WOULD YOU LIKE 1 MILLION US DOLLAR?&amp;lt;/pre&amp;gt;}}|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|to_lower_case}}|&lt;br /&gt;
}}&lt;br /&gt;
{{RFI|Does this have any effect on accented / tilded characters?}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Get_power&amp;diff=6234</id>
		<title>Get power</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Get_power&amp;diff=6234"/>
		<updated>2010-04-14T18:54:02Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|get_power}}{{&lt;br /&gt;
#vardefine:return_type|int}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Item Management|&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|it}}|&lt;br /&gt;
p1desc={{Pspan|it}} is the item to check for.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns the power of the item {{pspan|it}} or 0 if the item doesn&#039;t have a power|&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Item_Management&amp;diff=4208</id>
		<title>Item Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Item_Management&amp;diff=4208"/>
		<updated>2010-04-14T18:53:19Z</updated>

		<summary type="html">&lt;p&gt;Slyz: add get_power()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Informational==&lt;br /&gt;
{{Flink|int|my_meat|desc=Returns the amount of meat you have on hand.}}&lt;br /&gt;
{{Flink|int|my_closet_meat|desc=Returns the amount of meat you have in your Colossal Closet.}}&lt;br /&gt;
{{Flink|int|pulls_remaining|desc=Returns the number of pulls you can make from storage, or 0 if not applicable.}}&lt;br /&gt;
{{Flink|boolean|have_chef|desc=Returns true if you have a chef-boxen at your campground.}}&lt;br /&gt;
{{Flink|boolean|have_bartender|desc=Returns true if you have a bartender-boxen at your campground.}}&lt;br /&gt;
{{Flink|int [item]|get_campground|desc=Returns a map of your campground items.}}&lt;br /&gt;
{{Flink|boolean|have_mushroom_plot|desc=Returns true if and only if you&#039;ve purchased a mushroom plot this run.}}&lt;br /&gt;
{{Flink|int|stills_available|desc=Returns the number of Nash Crosby&#039;s Still uses left for the day (0 if not accessible).}}&lt;br /&gt;
{{Flink|int|item_amount|item}}&lt;br /&gt;
{{Flink|int|closet_amount|item}}&lt;br /&gt;
{{Flink|int|display_amount|item}}&lt;br /&gt;
{{Flink|int|equipped_amount|item}}&lt;br /&gt;
{{Flink|int|shop_amount|item}}&lt;br /&gt;
{{Flink|int|stash_amount|item|}}&lt;br /&gt;
{{Flink|int|storage_amount|item|desc=These 7 functions return the total number available of a given item in the respective section of your inventory.}}&lt;br /&gt;
{{Flink|int|available_amount|item|desc=Returns the total number available of a given item in all inventory sections accessible to your character based on current restrictions.}}&lt;br /&gt;
{{Flink|int|creatable_amount|item|desc=Returns the amount of the item that you are capable of creating given your current inventory and skills.}}&lt;br /&gt;
{{Flink|int [item]|get_ingredients|item|desc=Returns a map where each key is one of the required ingredients, with the integer value the number required. If you don&#039;t have the skills needed to make the item, it will return an empty map.}}&lt;br /&gt;
{{Flink|int [item]|get_inventory|desc=Returns a map where each key is an item in your inventory, with the integer value its quantity.}}&lt;br /&gt;
{{Flink|int [item]|get_related|item|string|desc=Returns associated items in a zap or fold group (see page for details).}}&lt;br /&gt;
{{Flink|boolean|is_tradeable|item|desc=Returns whether the item can be placed in the mall.}}&lt;br /&gt;
{{Flink|boolean|is_giftable|item|desc=Returns whether the item can be traded in a gift package.}}&lt;br /&gt;
{{Flink|boolean|have_shop|desc=Returns whether you have a mall store.}}&lt;br /&gt;
{{Flink|boolean|have_display|desc=Returns whether you have a display case.}}&lt;br /&gt;
{{Flink|boolean|is_displayable|item|desc=Returns whether the item can be put in a display case (true for all but quest items).}}&lt;br /&gt;
{{Flink|boolean|is_npc_item|item|desc=Returns whether the item can be bought from an NPC store.}}&lt;br /&gt;
{{Flink|void|refresh_stash|desc=Takes a new look at the contents of your clan stash, as that section of inventory cannot be internally tracked due to access by others.}}&lt;br /&gt;
{{Flink|boolean|mall_price|item|desc=Returns the current (lowest) mall price of the given item.}}&lt;br /&gt;
{{Flink|int|autosell_price|item|desc=Returns the autosell price of the item (0 for items that cannot be autosold).}}&lt;br /&gt;
{{Flink|int|get_power|item|desc=Returns the power of the item (0 for items that don&#039;t have a power).}}&lt;br /&gt;
{{Flink|string|to_plural|item|desc=Returns the plural of an item as a string.}}&lt;br /&gt;
{{Flink|int|meat_drop|{{opt|monster}}|desc=Returns a certain monster&#039;s base meat drop.}}&lt;br /&gt;
{{Flink|int [item]|item_drops|{{opt|monster}}|desc=Returns an array of a certain monster&#039;s base item drops, keying item to drop rate. Has certain limitations detailed on individual page.}}&lt;br /&gt;
{{Flink|record [int]|item_drops_array|{{opt|monster}}|desc=Returns an array of records holding information regarding a certain monster&#039;s base item drops.}}&lt;br /&gt;
&lt;br /&gt;
==Moving Items Around==&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_stash|int|item}}&lt;br /&gt;
{{Flink|boolean|take_closet|int|{{opt|item}}}}&lt;br /&gt;
{{Flink|boolean|take_display|int|item}}&lt;br /&gt;
{{Flink|boolean|take_stash|int|item}}&lt;br /&gt;
{{Flink|boolean|take_storage|int|item|desc=Attempts to take or put the specified item in the appropriate section of your inventory, and returns its success.&amp;lt;br /&amp;gt;If the item parameter is omitted from put_closet() or take_closet(), meat is transferred instead of an item.}}&lt;br /&gt;
{{Flink|boolean|put_shop|int|int|{{opt|int}}|item|desc=Puts items in your store (see page for details).}}&lt;br /&gt;
&lt;br /&gt;
==Acquiring &amp;amp; Using Items==&lt;br /&gt;
{{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items (see page for details).}}&lt;br /&gt;
{{Flink|boolean|hermit|int|item|desc=Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items (see page for details).}}&lt;br /&gt;
{{Flink|boolean|use|int|item|desc=Attempts to use items as specified and reports success.}}&lt;br /&gt;
{{Flink|boolean|eatsilent|int|item}}&lt;br /&gt;
{{Flink|boolean|eat|int|item|desc=Attempts to eat items as specified and reports success.}}&lt;br /&gt;
{{Flink|boolean|overdrink|int|item}}&lt;br /&gt;
{{Flink|boolean|drink|int|item|desc=Attempts to drink items as specified and reports success.}}&lt;br /&gt;
{{Flink|boolean|create|int|item|desc=Attempts to create the specified items, following your KoLmafia settings regarding purchases to gather ingredients &amp;amp; require boxen.}}&lt;br /&gt;
{{Flink|boolean|buy|int|item}}&lt;br /&gt;
{{Flink|int|buy|int|item|int|desc=Tries to purchase the specified items (see page for details).}}&lt;br /&gt;
{{Flink|boolean|autosell|int|item|desc=Attempts to autosell the given items and reports success.}}&lt;br /&gt;
{{Flink|int|craft|string|int|item|item|desc=Raw crafting that obeys KoLmafia settings (see page for details).}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Get_power&amp;diff=6233</id>
		<title>Get power</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Get_power&amp;diff=6233"/>
		<updated>2010-04-14T18:51:15Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Created page with &amp;#039;{{ #vardefine:name|get_power}}{{ #vardefine:return_type|int}}{{  FunctionPage| name={{#var:name}}| function_category=Item Management|  function1={{Function| name={{#var:name}}| a…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|get_power}}{{&lt;br /&gt;
#vardefine:return_type|int}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Item Management|&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|it}}|&lt;br /&gt;
p1desc={{Pspan|it}} is the item to check for.&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns the power of the item {{pspan|it}}|&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Attack_Script&amp;diff=4578</id>
		<title>KoLmafia Guide: Attack Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Attack_Script&amp;diff=4578"/>
		<updated>2010-04-12T09:21:56Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Now we are going to fight a foe using a Mafia script instead of our standard method. It is very easy!&lt;br /&gt;
&lt;br /&gt;
1) In the Mafia frame with the Adventure Top Tab active, on the far right there is a pulldown that is labeled &#039;Action:&#039;. It defaults to &#039;Attack with Weapon&#039;. Not surprisingly, when auto-combat is activated the script will keep attacking until the combat is over. By clicking this pulldown, you can choose several other options, based on what your character has available. For example, you can have it spam Thrust-Smack, or cast a spell, or whatever.&lt;br /&gt;
For now, either stick with weapon-attack, or casting a low MP offensive spell.&lt;br /&gt;
&lt;br /&gt;
You can click in the bar below that lableled &#039;Special:&#039; to set up any special beginning-of-fight actions. For example, as a Moxie-Class, an option is for Mafia to automatically pickpocket all non-bosses if you win initiative. If you are a moxie-class, pick this option. You can also autocast Noodles (if you don&#039;t have the skill, nothing will happen). When selected, a corresponding symbol shows up in the Special Box.&lt;br /&gt;
&lt;br /&gt;
: [[File:Lesson4 actions.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) In your relay browser, go fight something easy but takes a few rounds to kill. If you use Combat Action Bars, click the &#039;Script&#039; button. If you don&#039;t use action bars, Mafia adds several buttons for easier combat and the &#039;Script&#039; will be one of them.&lt;br /&gt;
&lt;br /&gt;
3) The script will execute, which will pickpocket if possible (if you are a Moxie class, noodle if Myst,etc.), and then spam the default action until the fight is over. Cool huh? No more clicking the Attack button 6 times every fight! If you run out of mana, it will try to recover mana or default to a weapon attack. (more on this later).&lt;br /&gt;
&lt;br /&gt;
You will notice the fight will go a lot faster too in that it will appear to &#039;skip rounds&#039;. This is because KoLMafia can send commands and receive results back faster than your browser will refresh. Hence a 12 round fight may only take 3 or 4 refreshes. This speeds up fighting significantly.&lt;br /&gt;
&lt;br /&gt;
BOTTOM LINE: You can save clicks and lag by using the Script button to fight easy battles for you.&lt;br /&gt;
&lt;br /&gt;
Continue to [[KoLmafia Guide: Custom Combat Script|Lesson 5: Custom Combat Script]]&lt;br /&gt;
&lt;br /&gt;
[[Category:KoLmafia Guide]]&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Replace_string&amp;diff=5573</id>
		<title>Replace string</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Replace_string&amp;diff=5573"/>
		<updated>2010-04-12T08:51:13Z</updated>

		<summary type="html">&lt;p&gt;Slyz: replaced \&amp;quot; with &amp;#039; in the code sample for easier reading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|replace_string}}{{&lt;br /&gt;
#vardefine:return_type|buffer}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=String Handling Routines|&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|buffer|original}}|&lt;br /&gt;
parameter2={{Param|string|find}}|&lt;br /&gt;
parameter3={{Param|string|replace}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|original}}|&lt;br /&gt;
parameter2={{Param|string|find}}|&lt;br /&gt;
parameter3={{Param|string|replace}}|&lt;br /&gt;
p1desc={{Pspan|original}} is the starting string or buffer|&lt;br /&gt;
p2desc={{Pspan|find}} is the text to find in {{pspan|original}}|&lt;br /&gt;
p3desc={{Pspan|replace}} is the text to substitute for {{pspan|find}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Searches through the supplied {{pspan|original}} text, replacing every instance of {{pspan|find}} with {{pspan|replace}}, and returns the result.|&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Replaces the center image of the Cyrpt (it&#039;s blank, don&#039;t worry) with some information regarding the noncombats of the zones.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
   buffer results;&lt;br /&gt;
   results.append(visit_url());&lt;br /&gt;
&lt;br /&gt;
   string cyrpt = &amp;quot;&amp;lt;font size=1&amp;gt;&amp;amp;lt;- Muscle &amp;amp;nbsp; &amp;amp;nbsp; Mys -&amp;amp;gt;&amp;lt;br /&amp;gt;&amp;amp;lt;- Mox &amp;amp;nbsp; &amp;amp;nbsp; All -&amp;amp;gt;&amp;lt;/font&amp;gt;&amp;quot;;&lt;br /&gt;
   results.replace_string(&amp;quot;&amp;lt;img src=&#039;http://images.kingdomofloathing.com/otherimages/cyrpt/cyrpt5.gif&#039;&amp;gt;&amp;quot;, cyrpt);&lt;br /&gt;
	&lt;br /&gt;
   results.write();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}|&lt;br /&gt;
&lt;br /&gt;
special=Matches are made left-to-right, and once a portion of the supplied {{pspan|original}} is noted as a match, searching continues from the next character after said match.|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5994</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=5994"/>
		<updated>2010-04-10T03:34:09Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &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;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5993</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=5993"/>
		<updated>2010-04-10T03:33:34Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm?&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...&lt;br /&gt;
Taking Yuk the Slimeling out of terrarium...&lt;br /&gt;
false&lt;br /&gt;
Returned: void&lt;br /&gt;
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5992</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=5992"/>
		<updated>2010-04-10T03:33:07Z</updated>

		<summary type="html">&lt;p&gt;Slyz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm? [[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...&lt;br /&gt;
Taking Yuk the Slimeling out of terrarium...&lt;br /&gt;
false&lt;br /&gt;
Returned: void[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5990</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=5990"/>
		<updated>2010-04-09T20:56:09Z</updated>

		<summary type="html">&lt;p&gt;Slyz: Created page with &amp;#039;This always seems to return false for me, can anyone confirm? ~~~~&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm? [[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Use_familiar&amp;diff=5015</id>
		<title>Use familiar</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Use_familiar&amp;diff=5015"/>
		<updated>2010-04-09T20:55:14Z</updated>

		<summary type="html">&lt;p&gt;Slyz: return value is boolean, not familiar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|use_familiar}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
function_category=Equipment|&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|familiar|buddy}}|&lt;br /&gt;
p1desc={{Pspan|buddy}} is the familiar to equip|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Switches your current familiar for the the  familiar {{pspan|buddy}} specified. Returns true if the specified familiar {{pspan|buddy}} is your current familiar after the function&#039;s completion (so it will return true if you try to switch to your current familiar).|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|have_familiar}}|&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;familiar&amp;quot; has the same function when a familiar type is specified as the only parameter.|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Slyz</name></author>
	</entry>
</feed>