<?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=Ikzann</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=Ikzann"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Ikzann"/>
	<updated>2026-04-24T19:13:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Browser_JSON_API&amp;diff=9244</id>
		<title>Browser JSON API</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Browser_JSON_API&amp;diff=9244"/>
		<updated>2024-10-26T15:06:08Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: add details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Any relay script that injects client-side JavaScript code into the relay browser can get access to Mafia data by making an HTTP request to the &amp;lt;code&amp;gt;/KoLmafia/jsonApi&amp;lt;/code&amp;gt; endpoint. Requests should be x-www-urlencoded with &amp;lt;code&amp;gt;pwd=[hash]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;body=[json object]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Request API ==&lt;br /&gt;
&lt;br /&gt;
The JSON request object has the type &amp;lt;code&amp;gt;{ properties?: string[], functions?: { name: string, args: unknown[] }[] }&amp;lt;/code&amp;gt;. Names of functions are in JS style (camelCase).&lt;br /&gt;
&lt;br /&gt;
The response will have type &amp;lt;code&amp;gt;{ error: string }&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;{ properties?: string[], functions?: unknown[] }&amp;lt;/code&amp;gt;, with &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;functions&amp;lt;/code&amp;gt; each present if they were present on the request object. The ordering of each of &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;functions&amp;lt;/code&amp;gt; will correspond to the request ordering.&lt;br /&gt;
&lt;br /&gt;
Enumerated types (Item, Familiar, Modifier, etc.) can be passed in with either of the following placeholder formats: &amp;lt;code&amp;gt;{ objectType: EnumeratedTypeName, identifierString: string } | { objectType: EnumeratedTypeName, identifierNumber: number }&amp;lt;/code&amp;gt;. If both &amp;lt;code&amp;gt;identifierString&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; are present, &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; will be prioritized. Enumerated types will be returned as a POJO with all the fields of a JS enumerated type, with field names in camelCase, except any second-level referenced objects will be left as placeholders. Objects will also have the placeholder fields (&amp;lt;code&amp;gt;objectType&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;identifierString&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; if applicable) set.&lt;br /&gt;
&lt;br /&gt;
Details for an enumerated type instance can be requested with the special &amp;lt;code&amp;gt;identity&amp;lt;/code&amp;gt; function, which can take placeholder arguments and return the full object.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Example request body:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;properties&amp;quot;: [&amp;quot;kingLiberated&amp;quot;],&lt;br /&gt;
  &amp;quot;functions&amp;quot;: [{ &amp;quot;name&amp;quot;: &amp;quot;availableAmount&amp;quot;, &amp;quot;args&amp;quot;: [{&lt;br /&gt;
    &amp;quot;objectType&amp;quot;: &amp;quot;Item&amp;quot;,&lt;br /&gt;
    &amp;quot;identifierString&amp;quot;: &amp;quot;seal-clubbing club&amp;quot;&lt;br /&gt;
  }] }]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;properties&amp;quot;: [true],&lt;br /&gt;
  &amp;quot;functions&amp;quot;: [0]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TypeScript code ==&lt;br /&gt;
&lt;br /&gt;
The following browser TypeScript code will allow easy submission of API calls. Or you can use the more full-featured &amp;lt;code&amp;gt;tome-kolmafia&amp;lt;/code&amp;gt; library to handle this all for you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
type ApiRequest = {&lt;br /&gt;
  properties?: readonly string[];&lt;br /&gt;
  functions?: readonly { name: string; args: unknown[] }[];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
type ApiResponse = {&lt;br /&gt;
  properties?: string[];&lt;br /&gt;
  functions?: unknown[];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
export async function apiCall(&lt;br /&gt;
  request: ApiRequest,&lt;br /&gt;
  pwd: string,&lt;br /&gt;
): Promise&amp;lt;ApiResponse&amp;gt; {&lt;br /&gt;
  const response = await fetch(&amp;quot;/KoLmafia/jsonApi&amp;quot;, {&lt;br /&gt;
    method: &amp;quot;post&amp;quot;,&lt;br /&gt;
    body: new URLSearchParams({&lt;br /&gt;
      body: JSON.stringify(request),&lt;br /&gt;
      pwd,&lt;br /&gt;
    }),&lt;br /&gt;
    headers: {&lt;br /&gt;
      // Mafia only accepts this format.&lt;br /&gt;
      &amp;quot;Content-Type&amp;quot;: &amp;quot;application/x-www-form-urlencoded&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
  });&lt;br /&gt;
  const json = await response.json();&lt;br /&gt;
  if (&amp;quot;error&amp;quot; in json) {&lt;br /&gt;
    throw new Error(json.error);&lt;br /&gt;
  }&lt;br /&gt;
  return json;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Browser_JSON_API&amp;diff=9243</id>
		<title>Browser JSON API</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Browser_JSON_API&amp;diff=9243"/>
		<updated>2024-10-26T14:58:46Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: create browser json page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Any relay script that injects client-side JavaScript code into the relay browser can get access to Mafia data by making an HTTP request to the &amp;lt;code&amp;gt;/KoLmafia/jsonApi&amp;lt;/code&amp;gt; endpoint. Requests should be x-www-urlencoded with &amp;lt;code&amp;gt;pwd=[hash]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;body=[json object]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The JSON request object has the type &amp;lt;code&amp;gt;{ properties?: string[], functions?: { name: string, args: unknown[] }[] }&amp;lt;/code&amp;gt;. Names of functions are in JS style (camelCase).&lt;br /&gt;
&lt;br /&gt;
The response will have type &amp;lt;code&amp;gt;{ error: string }&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;{ properties?: string[], functions?: unknown[] }&amp;lt;/code&amp;gt;, with &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;functions&amp;lt;/code&amp;gt; each present if they were present on the request object. The ordering of each of &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;functions&amp;lt;/code&amp;gt; will correspond to the request ordering.&lt;br /&gt;
&lt;br /&gt;
Enumerated types (Item, Familiar, Modifier, etc.) can be passed in with either of the following placeholder formats: &amp;lt;code&amp;gt;{ objectType: EnumeratedTypeName, identifierString: string } | { objectType: EnumeratedTypeName, identifierNumber: number }&amp;lt;/code&amp;gt;. If both &amp;lt;code&amp;gt;identifierString&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; are present, &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; will be prioritized. Enumerated types will be returned as a POJO with all the fields of a JS enumerated type, with field names in camelCase, except any second-level referenced objects will be left as placeholders. Objects will also have the placeholder fields (&amp;lt;code&amp;gt;objectType&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;identifierString&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;identifierNumber&amp;lt;/code&amp;gt; if applicable) set.&lt;br /&gt;
&lt;br /&gt;
Details for an enumerated type instance can be requested with the special &amp;lt;code&amp;gt;identity&amp;lt;/code&amp;gt; function, which can take placeholder arguments and return the full object.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Main_Page&amp;diff=9242</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Main_Page&amp;diff=9242"/>
		<updated>2024-10-26T14:50:21Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: add browser JSON API page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;margin: 0 0 20px 0; text-align: center; border: none;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 1.4em;&amp;quot;&amp;gt;Welcome to the KoLmafia Wiki!&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 1em; line-height: 1.6em;&amp;quot;&amp;gt;Progress level: [[Special:Statistics|{{NUMBEROFARTICLES}}]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 50%; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left div START--&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=2 style=&amp;quot;background-color: #ffac62; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Quick Links for ASH Scripters&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #ffc48e; padding: 4px; vertical-align: top;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;FUNCTION CATEGORIES&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[Your Character]]&lt;br /&gt;
* [[Item Management]]&lt;br /&gt;
* [[Equipment]]&lt;br /&gt;
* [[Skills and Effects]]&lt;br /&gt;
* [[Adventuring]]&lt;br /&gt;
* [[In-combat Consulting]]&lt;br /&gt;
* [[Math and Numbers]]&lt;br /&gt;
* [[String Handling Routines]]&lt;br /&gt;
* [[Datatype Conversions]]&lt;br /&gt;
* [[Modifier Functions]]&lt;br /&gt;
* [[Relay Browser Functions]]&lt;br /&gt;
* [[Miscellaneous Functions|Miscellaneous]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #ffc48e; padding: 4px; vertical-align: top;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;LANGUAGE CONVENTIONS&amp;lt;/span&amp;gt;&lt;br /&gt;
* [[Operators]]&lt;br /&gt;
* [[Data Types]]&lt;br /&gt;
* [[Control Structures]]&lt;br /&gt;
* [[Data Structures]]&lt;br /&gt;
* [[Proxy Records]]&lt;br /&gt;
* [[Miscellaneous ASH Features|Misc. ASH Features]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top: 2em;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;HELPFUL RESOURCES&amp;lt;/span&amp;gt;&lt;br /&gt;
* [[ASH For Beginners]]&lt;br /&gt;
* [[KoLmafia Properties]]&lt;br /&gt;
* [[Ash Functions|Master Function List]]&lt;br /&gt;
* [[CLI Reference|CLI Commands]]&lt;br /&gt;
* [[Helpful Scripts]]&lt;br /&gt;
* [[JavaScript Support]]&lt;br /&gt;
* [[Browser JSON API]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #b0ddb0; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;How Does KoLmafia Help?&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #c0ffc0; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Automation]]&lt;br /&gt;
* [[Quests|Helping with Quests]]&lt;br /&gt;
* [[Basement|Basement Diving]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left div END--&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 50%; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right div START--&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;New User Help&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
{{&lt;br /&gt;
Hidelist&lt;br /&gt;
|title=[[KoLmafia Guide]] by SinginSally&lt;br /&gt;
|1=[[KoLmafia Guide: Preface|Preface]]&lt;br /&gt;
|2=[[KoLmafia Guide: Basics (Relay Browser)|Lesson 1: Basics (Relay Browser)]]&lt;br /&gt;
|3=[[KoLmafia Guide: Java Interface|Lesson 2: Java Interface]]&lt;br /&gt;
|4=[[KoLmafia Guide: Stats-Checking|Lesson 3: Stats-Checking]]&lt;br /&gt;
|5=[[KoLmafia Guide: Attack Script|Lesson 4: Attack Script]]&lt;br /&gt;
|6=[[KoLmafia Guide: Custom Combat Script|Lesson 5: Custom Combat Script]]&lt;br /&gt;
|7=[[KoLmafia Guide: Auto-Adventuring|Lesson 6: Auto-Adventuring]]&lt;br /&gt;
|8=[[KoLmafia Guide: Automatic HP/MP Recovery|Lesson 7: Automatic HP/MP Recovery]]&lt;br /&gt;
|9=[[KoLmafia Guide: Goal-Oriented Adventuring|Lesson 8: Goal-Oriented Adventuring]]&lt;br /&gt;
|10=[[KoLmafia Guide: Setting Preferences|Lesson 9: Setting Preferences]]&lt;br /&gt;
|11=[[KoLmafia Guide: Setting Up Breakfast|Lesson 10: Setting Up Breakfast]]&lt;br /&gt;
|12=[[KoLmafia Guide: Eating &amp;amp; Drinking|Lesson 11: Eating &amp;amp; Drinking]]&lt;br /&gt;
|13=[[KoLmafia Guide: PvP (Beating Up People)|Lesson 12: PvP (Beating Up People)]]&lt;br /&gt;
|14=[[KoLmafia Guide: Running ASH Scripts|Lesson 13: Running ASH Scripts]]&lt;br /&gt;
|15=[[KoLmafia Guide: Useful Commands|Lesson 14: Useful Commands]]&lt;br /&gt;
|16=[[KoLmafia Guide: Closing Thoughts|Lesson 15: Closing Thoughts]]&lt;br /&gt;
}}&lt;br /&gt;
* [[SVN Primer]]&lt;br /&gt;
* [[Helpful Links]]&lt;br /&gt;
* [[Help:Frequently Asked Questions|KoLmafia FAQ]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Advanced Features&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Modifier Maximizer]]&lt;br /&gt;
* [[Daily Deeds]]&lt;br /&gt;
* [[Hidden Features]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Contributing to the KoLmafia Project&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Compiling from Source]]&lt;br /&gt;
* [[Development Environment Setup]]&lt;br /&gt;
* [[Mafia&#039;s Code]]&lt;br /&gt;
* [[Making a Patch]]&lt;br /&gt;
* [[Reporting a Bug/Requesting a Feature]]&lt;br /&gt;
* [[Help:Editing|Editing the Wiki Documentation]]&lt;br /&gt;
* [[Help:To Do List|Wiki &amp;quot;To Do&amp;quot; List]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right div END--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Write_ccs&amp;diff=9181</id>
		<title>Write ccs</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Write_ccs&amp;diff=9181"/>
		<updated>2023-01-09T00:07:29Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: create&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|write_ccs}}{{&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|buffer|text}}|&lt;br /&gt;
parameter2={{Param|string|name}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function_description=Writes the text of a given custom combat script to the given value. Returns success.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|set_ccs|read_ccs}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]][[Category:Misc.]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Read_ccs&amp;diff=9180</id>
		<title>Read ccs</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Read_ccs&amp;diff=9180"/>
		<updated>2023-01-09T00:06:42Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Created page with &amp;quot;{{ #vardefine:name|read_ccs}}{{ #vardefine:return_type|buffer}}{{  FunctionPage| name={{#var:name}}|  function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}}| r...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|read_ccs}}{{&lt;br /&gt;
#vardefine:return_type|buffer}}{{&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|name}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function_description=Reads the text of a given custom combat script and returns a buffer with the result.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|set_ccs|write_ccs}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]][[Category:Misc.]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Set_ccs&amp;diff=9179</id>
		<title>Set ccs</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Set_ccs&amp;diff=9179"/>
		<updated>2023-01-09T00:06:04Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: param name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|set_ccs}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|name}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function_description=Sets your custom combat script. Returns success. Note that you will need to set the battleAction preference to &amp;quot;custom combat script&amp;quot; as well and possibly disable autoattack for custom combat scripts to be useful.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|read_ccs|write_ccs}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]][[Category:Misc.]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Set_ccs&amp;diff=9178</id>
		<title>Set ccs</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Set_ccs&amp;diff=9178"/>
		<updated>2023-01-09T00:05:31Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: create&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|set_ccs}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|string|image}}|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function_description=Sets your custom combat script. Returns success. Note that you will need to set the battleAction preference to &amp;quot;custom combat script&amp;quot; as well and possibly disable autoattack for custom combat scripts to be useful.|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|read_ccs|write_ccs}}|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventuring]][[Category:Misc.]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Adventuring&amp;diff=9177</id>
		<title>Adventuring</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Adventuring&amp;diff=9177"/>
		<updated>2023-01-09T00:02:47Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: /* Misc. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==General Adventuring==&lt;br /&gt;
{{Flink|boolean| adventure|int|location|desc=Visits the desired location the the desired number of times.}}&lt;br /&gt;
{{Flink|boolean| adventure|int|location|string|desc=Visits the desired location a specified number of times, using a combat filter function defined elsewhere in your script.}}&lt;br /&gt;
{{Flink|boolean| adv1|location|int|string|desc=Adventure exactly once in the specified location (even if it uses no turns). Chained choice adventures &#039;&#039;&#039;are&#039;&#039;&#039; followed. Int overrides default settings, and string is a filter, same as in [[adventure|adventure()]]}}&lt;br /&gt;
{{FunctionEmbed|visit_url|format=signature|desc=yes}}&lt;br /&gt;
{{Flink|string|get_counters|string|int|int|desc=Determine if a counter will expire in a specified&lt;br /&gt;
period of time.}}&lt;br /&gt;
{{Flink|void|council|desc=Visits the Council of Loathing.}}&lt;br /&gt;
{{Flink|item|guardians|desc=Climbs the Naughty Sorceress&#039; Tower and passes the challenges it can, returning the first item needed to pass a failed stage.}}&lt;br /&gt;
{{Flink|int|tavern|desc=Attempt to complete the tavern, and returns the number of squares visited}}&lt;br /&gt;
{{Flink|boolean|entryway}}&lt;br /&gt;
{{Flink|boolean|hedgemaze}}&lt;br /&gt;
{{Flink|boolean|chamber|desc=These three functions attempt to perform the associated tasks. The return value indicates the success.}}&lt;br /&gt;
{{Flink|location|my_location|desc=Returns the location where you last adventured.}}&lt;br /&gt;
{{Flink|void|set_location|location|desc=Changes the value returned by my_location().}}&lt;br /&gt;
{{Flink|void|refresh_status|desc=Refreshes the side-pane character info (health, effects, etc.).}}&lt;br /&gt;
{{Flink|buffer|run_combat|desc=Uses the current KoLmafia settings to run a combat (for use with [[visit_url|visit_url()]]).}}&lt;br /&gt;
{{Flink|buffer|run_choice|desc=Chooses an option in the current choice adventure.}}&lt;br /&gt;
{{Flink|buffer|run_turn|desc=Works as run_combat() or run_choice( -1 ) depending on whether you are in combat or in a choice.}}&lt;br /&gt;
{{Flink|boolean|change_mcd|int|desc=Tries to set your +ML device to a specified setting and reports on success.}}&lt;br /&gt;
{{Flink|boolean|hermit|int|item|desc=Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items.}}&lt;br /&gt;
==Goals and Conditions==&lt;br /&gt;
{{FunctionEmbed|add_item_condition|format=signature|desc=yes}}&lt;br /&gt;
{{Flink|string [int]|get_goals|desc=Lists all current goals.}}&lt;br /&gt;
{{Flink|boolean| is_goal|item|desc=Checks if a given item is a goal.}}&lt;br /&gt;
{{Flink|boolean|goal_exists|string|desc=Checks if there is currently a given type of goal.}}&lt;br /&gt;
{{Flink|void| remove_item_condition|int|item|desc=Removes adventuring conditions.}}&lt;br /&gt;
==About Monsters==&lt;br /&gt;
For all of the below functions that accept an optional monster parameter, the default value is your most recently-encountered monster (that means your current monster if you&#039;re in combat).&lt;br /&gt;
&lt;br /&gt;
{{flink|int|jump_chance|{{opt|monster}}|{{opt|int}}|{{opt|int}}}}&lt;br /&gt;
{{flink|int|jump_chance|location|{{opt|int}}|{{opt|int}}|desc=Returns the chance of successfully getting the jump against the monster or in the location.}}&lt;br /&gt;
{{Flink|monster|last_monster|desc=Returns last monster encountered.}}&lt;br /&gt;
{{Flink|monster [int]|get_monsters|location|desc=Returns a map of potential monsters at a given location.}}&lt;br /&gt;
{{Flink|float [monster]|appearance_rates|location|{{opt|boolean}}|desc=Returns a map of the expected frequency of each monster at the specified location.}}&lt;br /&gt;
{{Flink|int|monster_attack|{{opt|monster}}|desc=Returns the starting/current attack value of the specified monster.}}&lt;br /&gt;
{{Flink|int|monster_defense|{{opt|monster}}|desc=Returns the starting/current defense value of the specified monster.}}&lt;br /&gt;
{{Flink|int|monster_hp|{{opt|monster}}|desc=Returns the starting/current HP of the specified monster.}}&lt;br /&gt;
{{Flink|int|monster_initiative|{{opt|monster}}|desc=Returns the starting/current initiative of the specified monster.}}&lt;br /&gt;
{{Flink|phylum|monster_phylum|{{opt|monster}}|desc=Returns the phylum of the specified monster.}}&lt;br /&gt;
{{Flink|int|expected_damage|{{opt|monster}}|desc=Returns the amount of damage you are expected to take each round from the specified monster.}}&lt;br /&gt;
{{Flink|element|monster_element|{{opt|monster}}|desc=Returns the elemental alignment of the specified monster.}}&lt;br /&gt;
{{Flink|monster|image_to_monster|string|desc=Looks up monster by image name.}}&lt;br /&gt;
{{Flink|boolean|is_banished|monster|desc=Returns true if the specified monster is banished}}&lt;br /&gt;
&lt;br /&gt;
==Choice Adventures==&lt;br /&gt;
{{FunctionEmbed|available_choice_options|format=signature|desc=yes}}&lt;br /&gt;
{{flink|boolean|choice_follows_fight|desc=Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the last finished combat is about to lead into a choice adventure.}}&lt;br /&gt;
{{flink|boolean|handling_choice|desc=Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if you are currently in a choice.}}&lt;br /&gt;
{{flink|int|last_choice|desc=Returns the ID of the current (or last) choice adventure you encountered.}}&lt;br /&gt;
{{FunctionEmbed|run_choice|format=signature|desc=yes}}&lt;br /&gt;
&lt;br /&gt;
==Misc.==&lt;br /&gt;
{{Flink|int|get_auto_attack|desc=Returns your current auto-attack setting.}}&lt;br /&gt;
{{Flink|void|set_auto_attack|int|desc=Sets your auto-attack setting.}}&lt;br /&gt;
{{Flink|boolean|set_ccs|string|desc=Sets your custom combat script.}}&lt;br /&gt;
{{Flink|buffer|read_ccs|string|desc=Reads the text of your custom combat script.}}&lt;br /&gt;
{{Flink|boolean|write_ccs|buffer|string|desc=Writes the text of your custom combat script.}}&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8681</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8681"/>
		<updated>2020-12-12T03:49:02Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Added more docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519. &#039;&#039;&#039;This support is still experimental - you have been warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
* All the methods in the ASH runtime library are available, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* In scripts called from a file, you can access the runtime library by calling &amp;lt;code&amp;gt;require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;, so &amp;lt;code&amp;gt;const { printHtml } = require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;. If running from the command line via &amp;lt;code&amp;gt;js&amp;lt;/code&amp;gt;, the runtime library functions are all available in the global scope (so you can do &amp;lt;code&amp;gt;js print(&amp;quot;Hello world!&amp;quot;);&amp;lt;/code&amp;gt;).&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS version of the ASH runtime library with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module. For the uninitiated, this just means adding &amp;lt;code&amp;gt;module.exports.main = main&amp;lt;/code&amp;gt; to the end of your script. You will want to do the same with any function or value you want to be available to other scripts via require.&lt;br /&gt;
&lt;br /&gt;
== Bundlers ==&lt;br /&gt;
Folks with experience doing JS web development are likely used to using a suite of tools such as Babel, Webpack, and potentially Typescript to write more modern code that transpiles down to a dialect of JS that is supported by browsers or an engine. That approach works well with Rhino. As of r20558, you will still need to apply several patches to Babel in order to get babel-preset-env to work. See [https://github.com/phulin/bean-casual/tree/ts] for an example of a working Babel/Webpack/Typescript configuration; you&#039;ll need the configuration files and also the patches, which can be applied with patch-package.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8680</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8680"/>
		<updated>2020-12-12T03:42:41Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519. &#039;&#039;&#039;This support is still experimental - you have been warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* In scripts called from a file, you can access the runtime library by calling &amp;lt;code&amp;gt;require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;, so &amp;lt;code&amp;gt;const { printHtml } = require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;. If running from the command line via &amp;lt;code&amp;gt;js&amp;lt;/code&amp;gt;, the runtime library functions are all available in the global scope (so you can do &amp;lt;code&amp;gt;js print(&amp;quot;Hello world!&amp;quot;);&amp;lt;/code&amp;gt;).&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS version of the ASH runtime library with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module. For the uninitiated, this just means adding &amp;lt;code&amp;gt;module.exports.main = main&amp;lt;/code&amp;gt; to the end of your script. You will want to do the same with any function or value you want to be available to other scripts via require.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8666</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8666"/>
		<updated>2020-11-27T15:19:04Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519. &#039;&#039;&#039;This support is still experimental - you have been warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;Lib.printHtml&amp;lt;/code&amp;gt; in JS. In scripts called from a file, you can access the runtime library by calling &amp;lt;code&amp;gt;require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;. If running from the command line via &amp;lt;code&amp;gt;js&amp;lt;/code&amp;gt;, the runtime library functions are all available in the global scope (so you can do &amp;lt;code&amp;gt;js print(&amp;quot;hello world&amp;quot;);&amp;lt;/code&amp;gt;).&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS version of the ASH runtime library with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module. For the uninitiated, this just means adding &amp;lt;code&amp;gt;module.exports.main = main&amp;lt;/code&amp;gt; to the end of your script. You will want to do the same with any function or value you want to be available to other scripts via require.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8665</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8665"/>
		<updated>2020-11-27T15:15:14Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519. &#039;&#039;&#039;This support is still experimental - you have been warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;Lib.printHtml&amp;lt;/code&amp;gt; in JS. In scripts called from a file, you can access the runtime library by calling &amp;lt;code&amp;gt;require(&amp;quot;kolmafia&amp;quot;)&amp;lt;/code&amp;gt;. If running from the command line via &amp;lt;code&amp;gt;js&amp;lt;/code&amp;gt;, the runtime library functions are all available in the global scope (so you can do &amp;lt;code&amp;gt;js print(&amp;quot;hello world&amp;quot;);&amp;lt;/code&amp;gt;).&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS version of the ASH runtime library with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8663</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8663"/>
		<updated>2020-11-24T21:21:25Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519.&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available on the &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; global object in JS, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;Lib.printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;br /&gt;
* If you want Mafia to run your &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, you &#039;&#039;&#039;&amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt;&#039;&#039;&#039; export it by adding it to module.exports, just as you would for a Node module.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8662</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8662"/>
		<updated>2020-11-23T19:40:15Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: add revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision 20519.&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available on the &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; global object in JS, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;Lib.printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8661</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8661"/>
		<updated>2020-11-22T15:20:29Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Initial write. Some of this is premature.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript! You can run JS code from the CLI using &amp;lt;code&amp;gt;js &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and you can call scripts through any of the normal methods. Consult and &amp;quot;lifecycle&amp;quot; scripts (e.g. &amp;lt;code&amp;gt;betweenBattleScript&amp;lt;/code&amp;gt;) are supported as well as of revision XXX.&lt;br /&gt;
&lt;br /&gt;
* All the methods in the ASH runtime library are available on the &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; global object in JS, with names of methods converted to camelCase. So, for example, &amp;lt;code&amp;gt;print_html&amp;lt;/code&amp;gt; in ASH becomes &amp;lt;code&amp;gt;Lib.printHtml&amp;lt;/code&amp;gt; in JS.&lt;br /&gt;
* ASH maps are converted to plain JS objects, and ASH arrays are converted to JS arrays.&lt;br /&gt;
* You can look at the type reference for the JS &amp;lt;code&amp;gt;Lib&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;jsref&amp;lt;/code&amp;gt;, which works just like &amp;lt;code&amp;gt;ashref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Objects like monsters and items can be constructed via the &amp;lt;code&amp;gt;Monster&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt; global objects, along with the rest of ASH&#039;s enumerated types (stat, phylum, location, etc.). &amp;lt;code&amp;gt;Monster.get&amp;lt;/code&amp;gt; takes a number or a string, just like &amp;lt;code&amp;gt;$monster&amp;lt;/code&amp;gt; in ASH, or an array of numbers and strings to construct an array of monsters. &amp;lt;code&amp;gt;Monster.all&amp;lt;/code&amp;gt; works like &amp;lt;code&amp;gt;$monsters[]&amp;lt;/code&amp;gt; in ASH; it takes no arguments and returns an array of all monsters.&lt;br /&gt;
* Mafia supports &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; for both ASH and JS scripts. For ASH scripts, it will execute top-level code but only export functions, not variables, in the top scope.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8660</id>
		<title>JavaScript Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=JavaScript_Support&amp;diff=8660"/>
		<updated>2020-11-22T15:07:09Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Page creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of revision 20509, KoLmafia supports scripting in JavaScript!&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Main_Page&amp;diff=8659</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Main_Page&amp;diff=8659"/>
		<updated>2020-11-22T15:05:57Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Added link for JS support in prep for writing docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;margin: 0 0 20px 0; text-align: center; border: none;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 1.4em;&amp;quot;&amp;gt;Welcome to the KoLmafia Wiki!&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 1em; line-height: 1.6em;&amp;quot;&amp;gt;Progress level: [[Special:Statistics|{{NUMBEROFARTICLES}}]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 50%; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left div START--&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=2 style=&amp;quot;background-color: #ffac62; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Quick Links for ASH Scripters&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #ffc48e; padding: 4px; vertical-align: top;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;FUNCTION CATEGORIES&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[Your Character]]&lt;br /&gt;
* [[Item Management]]&lt;br /&gt;
* [[Equipment]]&lt;br /&gt;
* [[Skills and Effects]]&lt;br /&gt;
* [[Adventuring]]&lt;br /&gt;
* [[In-combat Consulting]]&lt;br /&gt;
* [[Math and Numbers]]&lt;br /&gt;
* [[String Handling Routines]]&lt;br /&gt;
* [[Money Making Game]]&lt;br /&gt;
* [[Datatype Conversions]]&lt;br /&gt;
* [[Modifier Functions]]&lt;br /&gt;
* [[Relay Browser Functions]]&lt;br /&gt;
* [[Miscellaneous Functions|Miscellaneous]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #ffc48e; padding: 4px; vertical-align: top;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;LANGUAGE CONVENTIONS&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[Operators]]&lt;br /&gt;
* [[Data Types]]&lt;br /&gt;
* [[Control Structures]]&lt;br /&gt;
* [[Data Structures]]&lt;br /&gt;
* [[Proxy Records]]&lt;br /&gt;
* [[Miscellaneous ASH Features|Misc. ASH Features]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top: 2em;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;line-height: 0.875em; font-size: 0.875em; font-weight: bold; padding: 0; margin: 0 0 0 0.4em;&amp;quot;&amp;gt;HELPFUL RESOURCES&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[ASH For Beginners]]&lt;br /&gt;
* [[KoLmafia Properties]]&lt;br /&gt;
* [[Ash Functions|Master Function List]]&lt;br /&gt;
* [[CLI Reference|CLI Commands]]&lt;br /&gt;
* [[Helpful Scripts]]&lt;br /&gt;
* [[JavaScript Support]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #b0ddb0; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;How Does KoLmafia Help?&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #c0ffc0; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Automation]]&lt;br /&gt;
* [[Quests|Helping with Quests]]&lt;br /&gt;
* [[Basement|Basement Diving]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left div END--&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 50%; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right div START--&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;New User Help&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
{{&lt;br /&gt;
Hidelist&lt;br /&gt;
|title=[[KoLmafia Guide]] by SinginSally&lt;br /&gt;
|1=[[KoLmafia Guide: Preface|Preface]]&lt;br /&gt;
|2=[[KoLmafia Guide: Basics (Relay Browser)|Lesson 1: Basics (Relay Browser)]]&lt;br /&gt;
|3=[[KoLmafia Guide: Java Interface|Lesson 2: Java Interface]]&lt;br /&gt;
|4=[[KoLmafia Guide: Stats-Checking|Lesson 3: Stats-Checking]]&lt;br /&gt;
|5=[[KoLmafia Guide: Attack Script|Lesson 4: Attack Script]]&lt;br /&gt;
|6=[[KoLmafia Guide: Custom Combat Script|Lesson 5: Custom Combat Script]]&lt;br /&gt;
|7=[[KoLmafia Guide: Auto-Adventuring|Lesson 6: Auto-Adventuring]]&lt;br /&gt;
|8=[[KoLmafia Guide: Automatic HP/MP Recovery|Lesson 7: Automatic HP/MP Recovery]]&lt;br /&gt;
|9=[[KoLmafia Guide: Goal-Oriented Adventuring|Lesson 8: Goal-Oriented Adventuring]]&lt;br /&gt;
|10=[[KoLmafia Guide: Setting Preferences|Lesson 9: Setting Preferences]]&lt;br /&gt;
|11=[[KoLmafia Guide: Setting Up Breakfast|Lesson 10: Setting Up Breakfast]]&lt;br /&gt;
|12=[[KoLmafia Guide: Eating &amp;amp; Drinking|Lesson 11: Eating &amp;amp; Drinking]]&lt;br /&gt;
|13=[[KoLmafia Guide: PvP (Beating Up People)|Lesson 12: PvP (Beating Up People)]]&lt;br /&gt;
|14=[[KoLmafia Guide: Running ASH Scripts|Lesson 13: Running ASH Scripts]]&lt;br /&gt;
|15=[[KoLmafia Guide: Useful Commands|Lesson 14: Useful Commands]]&lt;br /&gt;
|16=[[KoLmafia Guide: Closing Thoughts|Lesson 15: Closing Thoughts]]&lt;br /&gt;
}}&lt;br /&gt;
* [[SVN Primer]]&lt;br /&gt;
* [[Helpful Links]]&lt;br /&gt;
* [[Help:Frequently Asked Questions|KoLmafia FAQ]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Advanced Features&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Modifier Maximizer]]&lt;br /&gt;
* [[Daily Deeds]]&lt;br /&gt;
* [[Hidden Features]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 90%; border: 2px solid black; margin: 5px 5px 15px 5px;&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #aeaeee; padding: 4px; border-bottom: 1px solid black&amp;quot;&amp;gt;Contributing to the KoLmafia Project&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #bfbfff; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Compiling from Source]]&lt;br /&gt;
* [[Development Environment Setup]]&lt;br /&gt;
* [[Mafia&#039;s Code]]&lt;br /&gt;
* [[Making a Patch]]&lt;br /&gt;
* [[Reporting a Bug/Requesting a Feature]]&lt;br /&gt;
* [[Help:Editing|Editing the Wiki Documentation]]&lt;br /&gt;
* [[Help:To Do List|Wiki &amp;quot;To Do&amp;quot; List]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- Right div END--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=VS_Code_Setup&amp;diff=8658</id>
		<title>VS Code Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=VS_Code_Setup&amp;diff=8658"/>
		<updated>2020-11-19T01:29:00Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: fix formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide assumes that you have a recent enough version of the Java JDK, ANT, and VS Code.  Completing [[Compiling from Source]] is a requirement for this guide, although experienced developers can skip to whatever step is appropriate.&lt;br /&gt;
&lt;br /&gt;
=== Build and Config Project Setup ===&lt;br /&gt;
# Open the KoLmafia directory in VS Code.&lt;br /&gt;
# Install the Java Extension Pack, Language Support for Java, Project Manager for Java, and Debugger for Java VS Code extensions.&lt;br /&gt;
# Install the following files in .vscode:&lt;br /&gt;
&lt;br /&gt;
===== launch.json: =====&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;version&amp;quot;: &amp;quot;0.2.0&amp;quot;,&lt;br /&gt;
     &amp;quot;configurations&amp;quot;: [&lt;br /&gt;
         {&lt;br /&gt;
             &amp;quot;type&amp;quot;: &amp;quot;java&amp;quot;,&lt;br /&gt;
             &amp;quot;name&amp;quot;: &amp;quot;Debug (Launch)-KoLmafia&amp;lt;kolmafia&amp;gt;&amp;quot;,&lt;br /&gt;
             &amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,&lt;br /&gt;
             &amp;quot;mainClass&amp;quot;: &amp;quot;net.sourceforge.kolmafia.KoLmafia&amp;quot;,&lt;br /&gt;
             &amp;quot;projectName&amp;quot;: &amp;quot;kolmafia&amp;quot;,&lt;br /&gt;
             &amp;quot;args&amp;quot;: &amp;quot;--CLI&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
     ]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== settings.json: =====&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;files.exclude&amp;quot;: {&lt;br /&gt;
         &amp;quot;**/.classpath&amp;quot;: true,&lt;br /&gt;
         &amp;quot;**/.factorypath&amp;quot;: true,&lt;br /&gt;
         &amp;quot;**/.project&amp;quot;: true,&lt;br /&gt;
         &amp;quot;**/.settings&amp;quot;: true,&lt;br /&gt;
         &amp;quot;**/*.class&amp;quot;: true&lt;br /&gt;
     },&lt;br /&gt;
     &amp;quot;java.project.referencedLibraries&amp;quot;: [&lt;br /&gt;
         &amp;quot;lib/**/*.jar&amp;quot;,&lt;br /&gt;
         &amp;quot;src/**/*.jar&amp;quot;&lt;br /&gt;
     ]&lt;br /&gt;
 }&lt;br /&gt;
Test by pressing F5 to run KoLmafia.&lt;br /&gt;
====== Optional Steps ======&lt;br /&gt;
* For easier coding, download the [[:File:KoLMafia Style.xml|KoLMafia Style Definitions]] and figure out how to install them in VS Code.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=VS_Code_Setup&amp;diff=8657</id>
		<title>VS Code Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=VS_Code_Setup&amp;diff=8657"/>
		<updated>2020-11-19T01:27:34Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: Created page with &amp;quot;This guide assumes that you have a recent enough version of the Java JDK, ANT, and VS Code.  Completing Compiling from Source is a requirement for this guide, although exp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide assumes that you have a recent enough version of the Java JDK, ANT, and VS Code.  Completing [[Compiling from Source]] is a requirement for this guide, although experienced developers can skip to whatever step is appropriate.&lt;br /&gt;
&lt;br /&gt;
=== Build and Config Project Setup ===&lt;br /&gt;
# Open the KoLmafia directory in VS Code.&lt;br /&gt;
# Install the Java Extension Pack, Language Support for Java, Project Manager for Java, and Debugger for Java VS Code extensions.&lt;br /&gt;
# Install the following files in .vscode:&lt;br /&gt;
&lt;br /&gt;
launch.json:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;version&amp;quot;: &amp;quot;0.2.0&amp;quot;,&lt;br /&gt;
    &amp;quot;configurations&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;java&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Debug (Launch)-KoLmafia&amp;lt;kolmafia&amp;gt;&amp;quot;,&lt;br /&gt;
            &amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,&lt;br /&gt;
            &amp;quot;mainClass&amp;quot;: &amp;quot;net.sourceforge.kolmafia.KoLmafia&amp;quot;,&lt;br /&gt;
            &amp;quot;projectName&amp;quot;: &amp;quot;kolmafia&amp;quot;,&lt;br /&gt;
            &amp;quot;args&amp;quot;: &amp;quot;--CLI&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
settings.json:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;files.exclude&amp;quot;: {&lt;br /&gt;
        &amp;quot;**/.classpath&amp;quot;: true,&lt;br /&gt;
        &amp;quot;**/.factorypath&amp;quot;: true,&lt;br /&gt;
        &amp;quot;**/.project&amp;quot;: true,&lt;br /&gt;
        &amp;quot;**/.settings&amp;quot;: true,&lt;br /&gt;
        &amp;quot;**/*.class&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;java.project.referencedLibraries&amp;quot;: [&lt;br /&gt;
        &amp;quot;lib/**/*.jar&amp;quot;,&lt;br /&gt;
        &amp;quot;src/**/*.jar&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test by pressing F5 to run KoLmafia.&lt;br /&gt;
====== Optional Steps ======&lt;br /&gt;
* For easier coding, download the [[:File:KoLMafia Style.xml|KoLMafia Style Definitions]] and figure out how to install them in VS Code.&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Development_Environment_Setup&amp;diff=8656</id>
		<title>Development Environment Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Development_Environment_Setup&amp;diff=8656"/>
		<updated>2020-11-19T01:17:29Z</updated>

		<summary type="html">&lt;p&gt;Ikzann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After succeeding at [[Compiling from Source]] for your platform, you can add set up your KoLMafia source in an Integrated Development Environment (IDE) of your choice.  It is entirely possible to build and change KoLMafia without and IDE and some of the developers do just that.&lt;br /&gt;
====Platform-specific Development Tools====&lt;br /&gt;
; Apple&#039;s OS X notes on development for Java, including the XCode Tools setup, can make command line work easier.&lt;br /&gt;
::[https://developer.apple.com/library/archive/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html Apple Developer Tools for Java]&lt;br /&gt;
====Developer Text Editors====&lt;br /&gt;
Choose your favorite, or add your favorite.&lt;br /&gt;
; [http://www.barebones.com BBEdit]&lt;br /&gt;
:: Mac OS X based text editor&lt;br /&gt;
; [https://macromates.com TextMate]&lt;br /&gt;
:: Another Mac based editor&lt;br /&gt;
; [https://www.ultraedit.com Ultra Edit]&lt;br /&gt;
:: cross-platform text editor&lt;br /&gt;
&lt;br /&gt;
====IDEs====&lt;br /&gt;
This list will be out of date shortly after it&#039;s written, but can be updated as newer tools and versions are released. &lt;br /&gt;
; [https://www.jetbrains.com/idea/download/ IntelliJ IDEA]&lt;br /&gt;
:: [[IntelliJ Setup]]&lt;br /&gt;
; [http://www.eclipse.org Eclipse]&lt;br /&gt;
:: [[eclipse Setup]]&lt;br /&gt;
; [https://code.visualstudio.com/ VS Code]&lt;br /&gt;
:: [[VS Code Setup]]&lt;br /&gt;
; [https://www.jetbrains.com/idea/download/ NetBeans]&lt;br /&gt;
:: [[NetBeans Setup]]&lt;br /&gt;
; [http://developer.apple.com/tools/xcode/) Xcode] (Mac only)&lt;br /&gt;
:: [[XCode Setup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Source Control Management tools====&lt;br /&gt;
; [http://path/to/something/ TortoiseSVN]&lt;br /&gt;
:: [[Tortoise Setup]]&lt;/div&gt;</summary>
		<author><name>Ikzann</name></author>
	</entry>
</feed>