Miscellaneous Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
Add "gCLI Command Functions" section
 
(191 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://igarosa.ifrance.com/description/tulum.htm tulum] [http://zeldaskidsi.ifrance.com/topic/www-iasi/ www iasi it] [http://thebigabolich.ifrance.com/styles/bella-bimba/ bella bimba canzone] [http://loprenat.ifrance.com/resources/prefetura-palermo.htm prefetura palermo it] [http://thebigabolich.ifrance.com/styles/inno-nationale/ inno nationale] [http://konchitfta.ifrance.com/resources/dymo.htm dymo 400] [http://finkyhojo.ifrance.com/description/natanz/ natanz] [http://popknaacks.ifrance.com/description/tv-color/ tv color lcd 7] [http://popknaacks.ifrance.com/description/stefano-fi/ stefano fi] [http://mangart.ifrance.com/new/forasa/ forasa] [http://thebigabolich.ifrance.com/styles/mere-naseeb/ mere naseeb me tu hai] [http://Love03a86.ifrance.com/toner-samsung1/ toner samsung 4116] [http://igarosa.ifrance.com/description/File-midi1.htm file midi scugnizzi] [http://sweetpikachu.ifrance.com/lib/villa-margherita.htm villa margherita srl] [http://mangart.ifrance.com/new/nicholasgreen/ nicholasgreen] [http://igarosa.ifrance.com/description/jeep-rimini.htm jeep rimini] [http://fffindabar.ifrance.com/blog/sapphic/ sapphic] [http://finkyhojo.ifrance.com/description/stampante-hp6/ stampante hp inkjet business 1200] [http://finkyhojo.ifrance.com/description/plasma-3/ plasma 42 pollici samsung] [http://finkyhojo.ifrance.com/description/www-leonardo/ www leonardo] [http://alexloak.ifrance.com/data/daje-tuga/ daje tuga snijeg] [http://udaltsova.ifrance.com/data/novastorm/ novastorm] [http://thebigabolich.ifrance.com/styles/lettori-mp4/ lettori mp3 con batteria a litio] [http://thebigabolich.ifrance.com/styles/zozza/ zozza] [http://mangart.ifrance.com/new/karla-poire/ karla poire] [http://popknaacks.ifrance.com/description/machael-buble/ machael buble] [http://loprenat.ifrance.com/resources/scotte.htm scotte] [http://popknaacks.ifrance.com/description/officejet/ officejet 7310] [http://fffindabar.ifrance.com/blog/i-libri/ i libri piu venduti classifica] [http://udaltsova.ifrance.com/data/parigi-alberghi/ parigi alberghi e hotel] [http://fffindabar.ifrance.com/blog/le-ragazze/ le ragazze americane] [http://finkyhojo.ifrance.com/description/la-collera/ la collera del vento] [http://popknaacks.ifrance.com/description/centro-commerciale/ centro commerciale i portali] [http://fffindabar.ifrance.com/blog/this-is/ this is better] [http://mangart.ifrance.com/new/nikon-af/ nikon af s dx 55 200] [http://avaharuka.ifrance.com/view/cavalli-che/ cavalli che cantano] [http://zeldaskidsi.ifrance.com/topic/jeep-col/ jeep col pelo] [http://thebigabolich.ifrance.com/styles/ragazzo-lecce/ ragazzo lecce] [http://udaltsova.ifrance.com/data/www-chihuahua/ www chihuahua gov] [http://popknaacks.ifrance.com/description/il-crepuscolo/ il crepuscolo degli eroi] [http://udaltsova.ifrance.com/data/anle/ anle] [http://furgyta.ifrance.com/styles/online-personal/ online personal] [http://furgyta.ifrance.com/styles/servizi-piatti/ servizi piatti thun] [http://thebigabolich.ifrance.com/styles/monstro-it/ monstro it] [http://loprenat.ifrance.com/resources/pornostar.htm pornostar] [http://thebigabolich.ifrance.com/styles/incinte-porno/ incinte porno] [http://loprenat.ifrance.com/resources/rasmus-in.htm rasmus in shadow] [http://furgyta.ifrance.com/styles/susana-ramalho/ susana ramalho] [http://zeldaskidsi.ifrance.com/topic/hp-pda/ hp pda 2210] [http://monsfenior.ifrance.com/giorgio-fabbri.htm giorgio fabbri] [http://konchitfta.ifrance.com/resources/schouten-willem.htm schouten willem cornelis] [http://mangart.ifrance.com/new/istituto-bio/ istituto bio] [http://suhanfili.ifrance.com/blog/jentina-bass.htm jentina bass as a trip] [http://taylorsaacolyte.ifrance.com/small/jamelia-see1.htm jamelia see it in the boys eyes] [http://furgyta.ifrance.com/styles/ocm-porte/ ocm porte] [http://zeldaskidsi.ifrance.com/topic/mitico-amore/ mitico amore] [http://igarosa.ifrance.com/description/rj-protezione.htm rj45 protezione] [http://Love03a86.ifrance.com/padova-battaglia/ padova battaglia terme] [http://moneayshaker.ifrance.com/styles/sparkle-fx.htm sparkle fx5500] [http://sweetpikachu.ifrance.com/lib/don-marco.htm don marco frisina] [http://fffindabar.ifrance.com/blog/von/ von] [http://sweetpikachu.ifrance.com/lib/pigro-pinodaniele.htm pigro pinodaniele] [http://finkyhojo.ifrance.com/description/sin-tuo/ sin tuo amor] [http://popknaacks.ifrance.com/description/lettori-dvd/ lettori dvd divx amstrad] [http://loprenat.ifrance.com/resources/viviana-greco.htm viviana greco] [http://loprenat.ifrance.com/resources/oceanfree.htm oceanfree] [http://fffindabar.ifrance.com/blog/dragonstea-din/ dragonstea din tei traduzione] [http://zeldaskidsi.ifrance.com/topic/www-dacia/ www dacia renault com] [http://moneayshaker.ifrance.com/styles/un-senso.htm un senso and vasco] [http://sweetpikachu.ifrance.com/lib/pasta-abrasiva.htm pasta abrasiva] [http://popknaacks.ifrance.com/description/televisore-plasma/ televisore plasma 32] [http://suhanfili.ifrance.com/blog/malattie-reumatiche.htm malattie reumatiche e sport] [http://Love03a86.ifrance.com/febbre/ febbre] [http://oiyaoif.ifrance.com/data/stampato-busta.htm stampato busta paga] [http://dlinea.ifrance.com/lib/inner-self.htm inner self] [http://avaharuka.ifrance.com/view/ponzone-alessandria/ ponzone alessandria sagra] [http://mangart.ifrance.com/new/dvb-schede/ dvb schede tv] [http://popknaacks.ifrance.com/description/parole-de/ parole de rohff] [http://monsfenior.ifrance.com/plasma-tv2.htm plasma tv hitachi] [http://Love03a86.ifrance.com/compuprint-sp/ compuprint sp40] [http://dlinea.ifrance.com/lib/incontro-parigi.htm incontro parigi] [http://finkyhojo.ifrance.com/description/passat-1/ passat 18 benzina] [http://oiyaoif.ifrance.com/data/ricambi-yamaha.htm ricambi yamaha virago 250] [http://udaltsova.ifrance.com/data/led-fan/ led fan 120] [http://udaltsova.ifrance.com/data/camicie-maniche/ camicie maniche corte] [http://finkyhojo.ifrance.com/description/ligabue-a/ ligabue a san siro film dvd] [http://loprenat.ifrance.com/resources/pokemon-hentai.htm pokemon hentai] [http://zeldaskidsi.ifrance.com/topic/bridge-usb/ bridge usb] [http://oiyaoif.ifrance.com/data/foggis.htm foggis] [http://fffindabar.ifrance.com/blog/novedrate/ novedrate] [http://Love03a86.ifrance.com/n-acer/ n35 acer] [http://igarosa.ifrance.com/description/zeta-uno.htm zeta uno] [http://monsfenior.ifrance.com/cartier-essence.htm cartier essence declaration] [http://fffindabar.ifrance.com/blog/batteria-gig/ batteria gig nikko] [http://konchitfta.ifrance.com/resources/preteens-models.htm preteens models] [http://taylorsaacolyte.ifrance.com/small/hp-caricabatterie.htm hp caricabatterie auto] [http://zeldaskidsi.ifrance.com/topic/travel-mate/ travel mate 4152lmi] [http://Love03a86.ifrance.com/risultati-campionato/ risultati campionato calcio serie b] [http://finkyhojo.ifrance.com/description/mitsubishi-evo1/ mitsubishi evo viii] [http://mangart.ifrance.com/new/www-ass/ www ass com] [http://wishing-stone-x.freehostia.com/library/www-rompecadenas.htm www rompecadenas com ar] [http://spawnyone.freehostia.com/jessica-alba6/ jessica alba foto nuda] [http://spawnyone.freehostia.com/francesca-collini/ francesca collini] [http://dissected-voice.freehostia.com/violentata-nel.htm violentata nel culo] [http://dimeticon.freehostia.com/content/le-teorie1.htm le teorie del mercato] [http://dissected-voice.freehostia.com/munari-autofficina.htm munari autofficina] [http://katishe07.freehostia.com/new/cover-cd34/ cover cd32] [http://bteboy.freehostia.com/web/sottomessa.htm sottomessa] [http://bopox.freehostia.com/small/montebianco.htm montebianco] [http://bteboy.freehostia.com/web/city-of6.htm city of laramie] [http://dissected-voice.freehostia.com/voli-low20.htm voli low cost cagliari] [http://iknowiona.freehostia.com/view/businesses-for1/ businesses for sala] [http://bopox.freehostia.com/small/manchester-united.htm manchester united] [http://chanharrison.freehostia.com/winfax-pro1.htm winfax pro] [http://0rlandine.freehostia.com/content/dragostea-din106/ dragostea din tei o zone haiducii] [http://spawnyone.freehostia.com/panasonic-dmc14/ panasonic dmc fz4] [http://wildwildhoney.freehostia.com/ejsk/ ejsk] [http://bopox.freehostia.com/small/michel-jackson.htm michel jackson] [http://dissected-voice.freehostia.com/spartiti-mia.htm spartiti mia martini] [http://bteboy.freehostia.com/web/women-of1.htm women of home depot] [http://iknowiona.freehostia.com/view/kenwood-home2/ kenwood home theatre] [http://sub-sa-de.freehostia.com/articles/videeo-porno/ videeo porno gratuiti] [http://bopox.freehostia.com/small/cardo-mariano.htm cardo mariano] [http://chowchan.freehostia.com/topic/giochi-di195.htm giochi di cani] [http://jornadas.freehostia.com/lib/syncmaster-t5/ syncmaster 323t] [http://sub-sa-de.freehostia.com/articles/i-temerari/ i temerari] [http://katishe07.freehostia.com/new/freud-e3/ freud e la memoria] [http://decataracted.freehostia.com/html/www-google51/ www google clm] [http://sub-sa-de.freehostia.com/articles/tagliatele-di/ tagliatele di nonna pina] [http://wildwildhoney.freehostia.com/sfondi-paesaggio1/ sfondi paesaggio] [http://iknowiona.freehostia.com/view/veddasca/ veddasca] [http://chowchan.freehostia.com/topic/fujitsusiemens-scaleo3.htm fujitsusiemens scaleo] [http://mave-wong.freehostia.com/blog/sposi-dai/ sposi dai frati] [http://bopox.freehostia.com/small/regolamento-carta.htm regolamento carta gioco] [http://iknowiona.freehostia.com/view/nba-logo/ nba logo] [http://chowchan.freehostia.com/topic/lettori-cd59.htm lettori cd mp3 radio portatili] [http://chowchan.freehostia.com/topic/foto-uccisione1.htm foto uccisione di baldoni] [http://ericstuff.freehostia.com/styles/nuova-toyota15.htm nuova toyota land cruiser diesel auto] [http://bopox.freehostia.com/small/lupimannari.htm lupimannari] [http://mave-wong.freehostia.com/blog/claudio-lo/ claudio lo piccolo] [http://chowchan.freehostia.com/topic/i-ragazzi37.htm i ragazzi della compagnia delle indie] [http://sub-sa-de.freehostia.com/articles/growth-il1/ growth il bene  e il male] [http://ioannoula.freehostia.com/john-olms.htm john olms foto] [http://evilcatsterer.freehostia.com/directory/follow.htm follow] [http://chowchan.freehostia.com/topic/i-carabbimatti.htm i carabbimatti] [http://katishe07.freehostia.com/new/le-bonitas/ le bonitas] [http://ioannoula.freehostia.com/hl-2.htm hl 1450 toner] [http://bopox.freehostia.com/small/lucida-follia.htm lucida follia] [http://bopox.freehostia.com/small/calzedonia-catalogo.htm calzedonia catalogo costumi] [http://mave-wong.freehostia.com/blog/stufa-a1/ stufa a pellet] [http://evilcatsterer.freehostia.com/directory/sony-mp12.htm sony mp3 1gb] [http://bteboy.freehostia.com/web/surfin-u.htm surfin u s a] [http://wishing-stone-x.freehostia.com/library/un-data.htm un data per virtua fighter cyber generation] [http://chanharrison.freehostia.com/lilli-carati2.htm lilli carati mepg] [http://bopox.freehostia.com/small/mixer-attivo.htm mixer attivo] [http://ioannoula.freehostia.com/mamma-scopa1.htm mamma scopa figli] [http://sub-sa-de.freehostia.com/articles/www-annalisa1/ www annalisa it] [http://chowchan.freehostia.com/topic/sardegna-case1.htm sardegna case vacanza] [http://mave-wong.freehostia.com/blog/addetti-amministrazione/ addetti amministrazione (regione emilia romagna)] [http://0rlandine.freehostia.com/content/mb-asrock2/ mb asrock 775] [http://chowchan.freehostia.com/topic/gallerie-foto1.htm gallerie foto gratuite] [http://jornadas.freehostia.com/lib/quaderni-anelli/ quaderni anelli] [http://wildwildhoney.freehostia.com/allison-ragusa/ allison ragusa] [http://mave-wong.freehostia.com/blog/toshiba-18/ toshiba  m50  106] [http://katishe07.freehostia.com/new/densey/ densey] [http://bopox.freehostia.com/small/peg-pliko.htm peg pliko navetta] [http://vinmusic.freehostia.com/library/inno-della14/ inno della spagna] [http://0rlandine.freehostia.com/content/www-samsung2/ www samsung com] [http://vinmusic.freehostia.com/library/sintoampli-denon/ sintoampli denon] [http://0rlandine.freehostia.com/content/fisted/ fisted] [http://evilcatsterer.freehostia.com/directory/tables-de.htm tables de multiplication] [http://chanharrison.freehostia.com/progetto-video.htm progetto video] [http://mave-wong.freehostia.com/blog/elezioni-comunali5/ elezioni comunali in provincia di trevis] [http://katishe07.freehostia.com/new/lego4/ lego 4406] [http://wishing-stone-x.freehostia.com/library/porno-over2.htm porno over50] [http://dissected-voice.freehostia.com/ragazze-con5.htm ragazze con numeri di telefono] [http://vinmusic.freehostia.com/library/volo-perugia/ volo perugia] [http://katishe07.freehostia.com/new/video-lesbo3/ video lesbo gratuiti] [http://chowchan.freehostia.com/topic/moglie-superdotato.htm moglie superdotato] [http://katishe07.freehostia.com/new/hp-fax5/ hp fax] [http://chanharrison.freehostia.com/jelena-jensen.htm jelena jensen] [http://iknowiona.freehostia.com/view/capitan-harlock7/ capitan harlock 1] [http://chanharrison.freehostia.com/villa-da1.htm villa da posse] [http://katishe07.freehostia.com/new/bosch-kgs3/ bosch kgs] [http://dimeticon.freehostia.com/content/sapphire-radeon67.htm sapphire radeon x700 agp 128] [http://dimeticon.freehostia.com/content/leggi-testo.htm leggi testo canzone this love] [http://0rlandine.freehostia.com/content/albergo-shangai/ albergo shangai] [http://katishe07.freehostia.com/new/scheda-madre141/ scheda madre asus per amd sata] [http://wildwildhoney.freehostia.com/larvale/ larvale] [http://sub-sa-de.freehostia.com/articles/foto-hard30/ foto hard jessica rizzo senza dialer] [http://decataracted.freehostia.com/html/huic/ huic] [http://iknowiona.freehostia.com/view/canon-109/ canon  powershot a510 3 2 megapixel] [http://katishe07.freehostia.com/new/obiettivi-canon34/ obiettivi canon 28300] [http://0rlandine.freehostia.com/content/guardata/ guardata] [http://ioannoula.freehostia.com/usb-compact.htm usb compact flash] [http://chowchan.freehostia.com/topic/terrorismo-psicologico.htm terrorismo psicologico] [http://vinmusic.freehostia.com/library/negozi-di19/ negozi di giocattoli di genova] [http://vinmusic.freehostia.com/library/i-siti1/ i siti piu visitati] [http://vinmusic.freehostia.com/library/canon-mm14/ canon 28135mm f 3 55 6 usm] [http://bopox.freehostia.com/small/nikon-d52.htm nikon d 1] == Part 7 - Miscellaneous ==
{{TOCright}}
<p><em>Mostly internal stuff. Some good for everyone, some only for ASH wizards.</em></p>
== Chat Functions ==
{{Flink|void|chat_clan|string}}
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player's own chat.}}
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}
{{Flink|boolean [string]|who_clan|desc=Returns a list of whom is in your clan and if they are in chat.}}
{{Flink|boolean|can_faxbot|monster|desc=Check to see if a monster can be faxed.}}
{{Flink|boolean|faxbot|monster|desc=Attempts to receive a fax of a given monster.}}


<p><strong>void print( string helloworld )</strong><br />
== Debugging Functions ==
Prints the given string to the graphical CLI window and to the status line of the main Adventuring window</p>
{{Flink|void|disable|string|desc=Disables the specified function.}}
{{Flink|void|enable|string|desc=Enables the specified function.}}
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}


<p><strong>boolean cli_execute( string command )</strong><br />
== File Input/Output Functions ==
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you
{{FunctionEmbed|buffer_to_file|format=signature|desc=yes}}
{{FunctionEmbed|file_to_array|format=signature|desc=yes}}
{{FunctionEmbed|file_to_buffer|format=signature|desc=yes}}
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}
 
== gCLI Command Functions ==
{{FunctionEmbed|cli_execute|format=signature|desc=yes}}
{{FunctionEmbed|cli_execute_output|format=signature|desc=yes}}
 
== Map Management Functions ==
''Note: Information about maps (including creating, assigning, and removing keys, can be found at [[Data Structures#Maps|Map Data Structures]].''
 
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}
 
== Time Functions ==
{{Flink|string|format_date_time|string|string|string|desc=Reformats dates.}}
{{Flink|int|gameday_to_int|desc=Returns the current KoL date as an integer.}}
{{Flink|string|gameday_to_string|desc=Returns the current KoL date as a string.}}
{{Flink|int|gametime_to_int|desc=Returns the current KoL time in ms as an integer.}}
{{Flink|string|now_to_string|string|desc=Returns current local time/date in SimpleDateFormat format.}}
{{Flink|string|time_to_string|desc=Returns the current local time in HH:mm:ss z format.}}
{{Flink|string|today_to_string|desc=Returns the current local day in ISO format.}}
 
== SVN Functions ==
''There is much additional information in the [[SVN Primer]]''.
{{Flink|boolean|svn_exists|string|desc=Returns true if a valid working copy named projectname exists in the svn/ folder.}}
{{Flink|boolean|svn_at_head|string|desc=Returns true if projectname exists, is a valid working copy, and is currently at the same revision number as the repository.}}
{{Flink|record|svn_info|string|desc=Returns a record containing additional information about the given projectname: svnurl, last author, last revision, last change date.}}
 
== User Interaction ==
{{Flink|void|print|string|{{opt|string}}|desc=Prints to CLI and status line of Adventuring window, optionally in a specified color.}}
{{Flink|void|print_html|string|desc=Prints to CLI, parsing any included html.}}
{{Flink|void|logprint|string|desc=Prints to the session log.}}
{{Flink|void|wait|int}}
{{Flink|void|waitq|int|desc=Sleeps for the specified number of seconds.}}
{{Flink|boolean|user_confirm|string|desc=Allows user input in Y/N format.}}
 
== Property Functions ==
{{Flink|boolean [string]|get_all_properties|string|boolean|desc=Returns a map of all user or global properties.}}
{{FunctionEmbed|property_exists|format=signature|desc=yes}}
{{FunctionEmbed|property_has_default|format=signature|desc=yes}}
{{FunctionEmbed|property_default_value|format=signature|desc=yes}}
{{Flink|string|get_property|string}}
{{Flink|string|get_property|string|boolean|desc=Gets a global or user preference as appropriate.}}
{{Flink|void|set_property|string|string|desc=Sets a global or user preference as appropriate.}}
{{FunctionEmbed|remove_property|format=signature|desc=yes}}
{{FunctionEmbed|rename_property|format=signature|desc=yes}}
 
== Other Functions ==
{{FunctionEmbed|abort|format=signature|desc=yes}}
{{FunctionEmbed|all_monsters_with_id|format=signature|desc=yes}}
{{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for {{f|batch_close}} for details).}}
{{Flink|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}
{{Flink|int|get_revision|desc=Returns the current KoLmafia revision number.}}
{{Flink|string|get_version|desc=Returns the most recent KoLmafia version.}}
{{Flink|string|get_player_id|string|desc=Returns the user id number of a given player.}}
{{FunctionEmbed|is_dark_mode|format=signature|desc=yes}}
{{Flink|string|to_json|aggregate|desc=Converts a simple aggregate into JSON.}}
 
Additional functions that are considered not really to be ash functions are available in [[Miscellaneous ASH Features#Special Syntax Functions|Misc ASH Features]]
 
[[Category:Scripting]]

Latest revision as of 14:55, 23 December 2020

Chat Functions

void chat_clan( string )

void chat_clan( string, string )

Sends a message to clan chat.

void chat_macro( string )

Submits a chat macro to KoL.

void chat_notify( string, string )

Sends a notification to the player's own chat.

void chat_private( string, string )

Sends a private message to another player.

boolean is_online( string )

Check to see if a player is online.

boolean [string] who_clan()

Returns a list of whom is in your clan and if they are in chat.

boolean can_faxbot( monster )

Check to see if a monster can be faxed.

boolean faxbot( monster )

Attempts to receive a fax of a given monster.


Debugging Functions

void disable( string )

Disables the specified function.

void enable( string )

Enables the specified function.

buffer load_html( string )

Works like visit_url(), but for debugging.

string make_url( string, boolean, boolean )

Crafts the URL to visit.


File Input/Output Functions

boolean buffer_to_filebuffer, string )

Saves a buffer to a text file. Returns true on success, false on failure.

string [int] file_to_arraystring )

Reads data from a text file and returns a map of strings containing each line.

buffer file_to_bufferstring )

Loads the entire contents of a text file into a buffer.

boolean file_to_map( string, aggregate )

Loads a map from a tab-delimited text file.

boolean map_to_file( aggregate, string )

Saves a map to a tab-delimited text file.


gCLI Command Functions

boolean cli_executestring )

Executes a string as a gCLI command. Returns true on success, false on failure.

string cli_execute_outputstring )

Executes a gCLI command, capturing and returning the gCLI output.

Map Management Functions

Note: Information about maps (including creating, assigning, and removing keys, can be found at Map Data Structures.

int count( aggregate )

Returns the number of defined keys for the specified aggregate.

void clear( aggregate )

Removes all keys from the specified aggregate.


Time Functions

string format_date_time( string, string, string )

Reformats dates.

int gameday_to_int()

Returns the current KoL date as an integer.

string gameday_to_string()

Returns the current KoL date as a string.

int gametime_to_int()

Returns the current KoL time in ms as an integer.

string now_to_string( string )

Returns current local time/date in SimpleDateFormat format.

string time_to_string()

Returns the current local time in HH:mm:ss z format.

string today_to_string()

Returns the current local day in ISO format.


SVN Functions

There is much additional information in the SVN Primer.

boolean svn_exists( string )

Returns true if a valid working copy named projectname exists in the svn/ folder.

boolean svn_at_head( string )

Returns true if projectname exists, is a valid working copy, and is currently at the same revision number as the repository.

record svn_info( string )

Returns a record containing additional information about the given projectname: svnurl, last author, last revision, last change date.


User Interaction

void print( string, [string] )

Prints to CLI and status line of Adventuring window, optionally in a specified color.

void print_html( string )

Prints to CLI, parsing any included html.

void logprint( string )

Prints to the session log.

void wait( int )

void waitq( int )

Sleeps for the specified number of seconds.

boolean user_confirm( string )

Allows user input in Y/N format.


Property Functions

boolean [string] get_all_properties( string, boolean )

Returns a map of all user or global properties.

boolean property_existsstring, boolean? )

Checks whether a property exists.

boolean property_has_defaultstring )

Checks if a property has a built-in default value.

string property_default_valuestring )

Returns the default value of a property, or an empty string if a default value does not exist.

string get_property( string )

string get_property( string, boolean )

Gets a global or user preference as appropriate.

void set_property( string, string )

Sets a global or user preference as appropriate.

string remove_propertystring, boolean? )

Removes or resets a property and returns its previous value.

boolean rename_propertystring, string )

Renames a property. Returns true on success, false on failure.

Other Functions

void abortstring? )

Immediately halts the current script and all queued functions.

boolean [monster] all_monsters_with_id()

Returns a map of all monsters that have a non-zero monster ID.

void batch_open()

Used to mark the beginning of a block of functions to operate in batch mode (see page for batch_close() for details).

boolean batch_close()

Used to mark the end of a block of functions to operate in batch mode (see page for details).

int get_revision()

Returns the current KoLmafia revision number.

string get_version()

Returns the most recent KoLmafia version.

string get_player_id( string )

Returns the user id number of a given player.

boolean is_dark_mode()

Checks if the current KoLmafia theme is dark mode.

string to_json( aggregate )

Converts a simple aggregate into JSON.


Additional functions that are considered not really to be ash functions are available in Misc ASH Features