Miscellaneous Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
Add "gCLI Command Functions" section
 
(273 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://oiyaoi.ifrance.com/images/small/codici-di/ codici di sblocco per lg] [http://akmokanzen.ifrance.com/images/small/il-re.htm il re leone si avvicina] [http://girlwho-is.ifrance.com/img/styles/editor-programmazione.htm editor programmazione] [http://lovereceier.ifrance.com/lib/amd-athlon.htm amd athlon64 3000 socket 939 venice] [http://kalian42.ifrance.com/text/directory/giochi-di/ giochi di elicotteri] [http://lovereceier.ifrance.com/lib/back-to.htm back to street] [http://kalian42.ifrance.com/text/directory/nikon-digital/ nikon digital flash] [http://kalian42.ifrance.com/text/directory/agenzia-matrimoniale/ agenzia matrimoniale on line] [http://oiyaoi.ifrance.com/images/small/krizia-profumi/ krizia profumi] [http://lordsander.ifrance.com/topic/cbr.htm cbr 600 2001] [http://lovereceier.ifrance.com/lib/casting-gf.htm casting gf5] [http://demurediablo.ifrance.com/library/html/ed-hunter/ ed hunter iron maiden] [http://girlwho-is.ifrance.com/img/styles/accessori-i.htm accessori i mate] [http://girlwho-is.ifrance.com/img/styles/hard-disk.htm hard disk sata] [http://lordsander.ifrance.com/topic/correo-electronico.htm correo electronico] [http://singaporepets.ifrance.com/library/html/gruppi-elettrogeni.htm gruppi elettrogeni valex] [http://speedofsoun.ifrance.com/text/directory/mayra.htm mayra] [http://lordsander.ifrance.com/topic/hotel-houston.htm hotel houston] [http://oiyaoi.ifrance.com/images/small/sito-di/ sito di playboy] [http://tat-ooin.ifrance.com/resources/articles/nastase.htm nastase] [http://oiyaoi.ifrance.com/images/small/buon-anno/ buon anno] [http://voltia.ifrance.com/content/view/coppia-scambista.htm coppia scambista] [http://lordsander.ifrance.com/topic/gaetano-donizetti.htm gaetano donizetti 1797 1848] [http://speedofsoun.ifrance.com/text/directory/incidente-senna.htm incidente senna] [http://oiyaoi.ifrance.com/images/small/depressione-ansiosa/ depressione ansiosa reattiva maggiore] [http://highbulp.ifrance.com/images/small/leave-get/ leave get up jojo] [http://tizolaa.ifrance.com/web/www-immagini/ www immagini cani carlini] [http://toofarfrommaybe.ifrance.com/view/new/classic-car/ classic car] [http://lordsander.ifrance.com/topic/los-fronterizos.htm los fronterizos] [http://girlwho-is.ifrance.com/img/styles/dlink-pci.htm d-link pci usb] [http://tat-ooin.ifrance.com/resources/articles/diffusione-sonora.htm diffusione sonora] [http://speedofsoun.ifrance.com/text/directory/dvd-player.htm dvd player portable] [http://lordsander.ifrance.com/topic/albergo-riviera.htm albergo riviera adriatica] [http://lordsander.ifrance.com/topic/sound-blaster.htm sound blaster bulk] [http://oiyaoi.ifrance.com/images/small/ice-cream/ ice cream car] [http://toofarfrommaybe.ifrance.com/view/new/il-tredici/ il tredici non risponde] [http://singaporepets.ifrance.com/library/html/etichette-cd.htm etichette cd] [http://lordsander.ifrance.com/topic/il-decameron.htm il decameron] [http://noxuhax.ifrance.com/content/view/toxisity.htm toxisity] [http://noxuhax.ifrance.com/content/view/tamron.htm tamron 90] [http://lovereceier.ifrance.com/lib/un-burattino.htm un burattino di nome pinocchio] [http://jdawsona.ifrance.com/data/mojarras/ mojarras] [http://kalian42.ifrance.com/text/directory/cinque-giorni/ cinque giorni michele zarillo] [http://girlwho-is.ifrance.com/img/styles/winxp-pro.htm winxp pro] [http://toofarfrommaybe.ifrance.com/view/new/alamo-bay/ alamo bay] [http://yeeden.ifrance.com/img/styles/olivetti-dcopia/ olivetti d-copia 200] [http://girlwho-is.ifrance.com/img/styles/video-onde.htm video onde alex baroni] [http://noxuhax.ifrance.com/content/view/il-resto.htm il resto e nella mente] [http://demurediablo.ifrance.com/library/html/kim-possible/ kim possible. secret files] [http://demurediablo.ifrance.com/library/html/game-zone/ game zone] [http://voltia.ifrance.com/content/view/stampante-laser.htm stampante laser a colori professionale] [http://singaporepets.ifrance.com/library/html/www-fnac.htm www fnac it] [http://broadwaylili.ifrance.com/content/view/pirelli-calzature.htm pirelli calzature uomo p] [http://singaporepets.ifrance.com/library/html/i-was.htm i was born to try] [http://girlwho-is.ifrance.com/img/styles/ladri-per.htm ladri per amore] [http://deviantrus.ifrance.com/topic/motore-ricerca/ motore ricerca midi] [http://igaros.ifrance.com/lib/receitafederal/ receitafederal] [http://voltia.ifrance.com/content/view/escort-cosworth.htm escort cosworth] [http://highbulp.ifrance.com/images/small/mx/ mx 300] [http://highbulp.ifrance.com/images/small/noleggio-auto/ noleggio auto morgan] [http://demurediablo.ifrance.com/library/html/i-simpson/ i simpson. greatest hits] [http://tizolaa.ifrance.com/web/wp-cp/ wp cp1] [http://singaporepets.ifrance.com/library/html/memoria-sdram.htm memoria sdram acquisto] [http://kalian42.ifrance.com/text/directory/la-calunnia/ la calunnia] [http://voltia.ifrance.com/content/view/testi-canzoni.htm testi canzoni toxicity] [http://yeeden.ifrance.com/img/styles/body-lana/ body lana abbigliamento per neonati] [http://highbulp.ifrance.com/images/small/videocamere-samsung/ videocamere samsung ego] [http://lovereceier.ifrance.com/lib/mapeche.htm mapeche] [http://toofarfrommaybe.ifrance.com/view/new/frusta-bondage/ frusta bondage] [http://deviantrus.ifrance.com/topic/lettori-di/ lettori di card] [http://toofarfrommaybe.ifrance.com/view/new/www-gonline/ www gonline com br] [http://girlwho-is.ifrance.com/img/styles/lefta-outside.htm lefta outside alone] [http://lovereceier.ifrance.com/lib/tally.htm tally 9132] [http://lordsander.ifrance.com/topic/chitarra-suona.htm chitarra suona] [http://toofarfrommaybe.ifrance.com/view/new/boom-boom/ boom boom boom boom] [http://singaporepets.ifrance.com/library/html/scultura.htm scultura] [http://demurediablo.ifrance.com/library/html/mypal-a/ mypal a620 asus] [http://jdawsona.ifrance.com/data/roleplayinggames-com/ roleplayinggames com] [http://tizolaa.ifrance.com/web/michelle-hunzicher/ michelle hunzicher calendario] [http://lordsander.ifrance.com/topic/bleem.htm bleem2] [http://kalian42.ifrance.com/text/directory/traghetti-procida/ traghetti procida] [http://oiyaoi.ifrance.com/images/small/meteoriti/ meteoriti] [http://yeeden.ifrance.com/img/styles/lg-digitale/ lg digitale terrestre] [http://broadwaylili.ifrance.com/content/view/wireless-tv.htm wireless tv lcd] [http://highbulp.ifrance.com/images/small/dielectric/ dielectric] [http://voltia.ifrance.com/content/view/condizionatori-classe.htm condizionatori classe energetica b] [http://highbulp.ifrance.com/images/small/soluzione-final/ soluzione final fantasy x] [http://akmokanzen.ifrance.com/images/small/semi-di.htm semi di sesamo] [http://yeeden.ifrance.com/img/styles/manolete/ manolete] [http://lordsander.ifrance.com/topic/musica-do.htm musica do the o c] [http://lordsander.ifrance.com/topic/haiducii-dragostea.htm haiducii dragostea din tei haiducii vs] [http://tizolaa.ifrance.com/web/foto-di/ foto di catrina del gf 5] [http://tizolaa.ifrance.com/web/chat-sicilia/ chat sicilia] [http://toofarfrommaybe.ifrance.com/view/new/costantino-vitigliano/ costantino vitigliano official site] [http://highbulp.ifrance.com/images/small/lg-plasma/ lg plasma 42px4rv] [http://demurediablo.ifrance.com/library/html/disco-mare/ disco mare 2002] [http://yeeden.ifrance.com/img/styles/luomo-del/ luomo del klan] [http://tizolaa.ifrance.com/web/stay-shakes/ stay shakes] [http://demurediablo.ifrance.com/library/html/testo-breath/ testo breath easy blue] [http://tat-ooin.ifrance.com/resources/articles/pelleterie.htm pelleterie] [http://lordsander.ifrance.com/topic/www-ecdl.htm www ecdl it] [http://deviantrus.ifrance.com/topic/volkswagen-/ volkswagen          passat 1.8i aut. clx] [http://akmokanzen.ifrance.com/images/small/squadre-serie.htm squadre serie d] [http://tat-ooin.ifrance.com/resources/articles/the-mask.htm the mask of phantasm] [http://lovereceier.ifrance.com/lib/polipone.htm polipone] [http://demurediablo.ifrance.com/library/html/s-francesco/ s. francesco di sales] [http://lovereceier.ifrance.com/lib/batterie-duracell.htm batterie duracell plus] [http://speedofsoun.ifrance.com/text/directory/dolci-riso.htm dolci riso] [http://singaporepets.ifrance.com/library/html/doanload.htm doanload] [http://highbulp.ifrance.com/images/small/cbc/ cbc] [http://yeeden.ifrance.com/img/styles/l-americano/ l americano] [http://tizolaa.ifrance.com/web/gold/ gold] [http://noxuhax.ifrance.com/content/view/ufficio-teramo.htm ufficio teramo] [http://igaros.ifrance.com/lib/luomo-che/ luomo che non sapeva amare] [http://tizolaa.ifrance.com/web/congelatore-a/ congelatore a cassetti smeg] [http://igaros.ifrance.com/lib/raf-vita/ raf vita storie e pensieri di un alieno] [http://voltia.ifrance.com/content/view/showtvnet.htm showtvnet] [http://singaporepets.ifrance.com/library/html/desislava.htm desislava] [http://lordsander.ifrance.com/topic/lazzarini.htm lazzarini] [http://jdawsona.ifrance.com/data/dragonball-z/ dragonball z clips] [http://tat-ooin.ifrance.com/resources/articles/firmware-philips.htm firmware philips] [http://oiyaoi.ifrance.com/images/small/visure-pra/ visure pra] [http://broadwaylili.ifrance.com/content/view/yeu.htm yeu] [http://lovereceier.ifrance.com/lib/kazim-koyuncu.htm kazim koyuncu sevval sam] [http://oiyaoi.ifrance.com/images/small/residence-venere/ residence venere chianciano terme siena toscana it] [http://jdawsona.ifrance.com/data/reggiseno-ferretto/ reggiseno ferretto] [http://tizolaa.ifrance.com/web/agriturismo-san/ agriturismo san vito lo capo] [http://demurediablo.ifrance.com/library/html/jose/ jose] [http://girlwho-is.ifrance.com/img/styles/application-engineer.htm application engineer (italia nord ovest)] [http://voltia.ifrance.com/content/view/foto-di.htm foto di valeria marini] [http://kalian42.ifrance.com/text/directory/intel-processori/ intel processori dual core] [http://speedofsoun.ifrance.com/text/directory/castele-cat.htm castele cat] [http://jdawsona.ifrance.com/data/grande-fratello/ grande fratello 2 mascia] [http://oiyaoi.ifrance.com/images/small/ducati-/ ducati 900 ss] [http://speedofsoun.ifrance.com/text/directory/la-tortura.htm la tortura delle vergini] [http://jdawsona.ifrance.com/data/mitiaro/ mitiaro] [http://deviantrus.ifrance.com/topic/la-seconda/ la seconda dimensione] [http://akmokanzen.ifrance.com/images/small/card-hard.htm card hard] [http://singaporepets.ifrance.com/library/html/campeggio-isola.htm campeggio isola d elba] [http://toofarfrommaybe.ifrance.com/view/new/land-sea/ land sea palmari] [http://toofarfrommaybe.ifrance.com/view/new/carmenelectra/ carmenelectra] [http://singaporepets.ifrance.com/library/html/dhfh.htm dhfh] [http://jdawsona.ifrance.com/data/lettini-da/ lettini da viaggio bimbo] [http://voltia.ifrance.com/content/view/dana-e.htm dana e roby] [http://speedofsoun.ifrance.com/text/directory/dragons-tea.htm dragons tea din tei] [http://broadwaylili.ifrance.com/content/view/carnaby-street.htm carnaby street london england] [http://voltia.ifrance.com/content/view/www-viamichelin.htm www viamichelin] [http://highbulp.ifrance.com/images/small/sistema-dolby/ sistema dolby sorround 5 1] [http://highbulp.ifrance.com/images/small/nvidia-geforce/ nvidia geforce 6600 256mb pci-express tv] [http://singaporepets.ifrance.com/library/html/www-new.htm www new york visit com] [http://akmokanzen.ifrance.com/images/small/roubaix.htm roubaix] [http://noxuhax.ifrance.com/content/view/ati-sapphire.htm ati sapphire 9250 256] [http://highbulp.ifrance.com/images/small/revo/ revo 2013] [http://tizolaa.ifrance.com/web/esami-avvocato/ esami avvocato roma] [http://voltia.ifrance.com/content/view/philips-monitor.htm philips monitor 17 crt] [http://demurediablo.ifrance.com/library/html/generation-golf/ generation golf] [http://broadwaylili.ifrance.com/content/view/panca-multiuso.htm panca multiuso] [http://kalian42.ifrance.com/text/directory/search-gogle/ search gogle] [http://tizolaa.ifrance.com/web/umberta-comi/ umberta comi sex gratis] [http://lordsander.ifrance.com/topic/philips-.htm philips 28 tv] [http://kalian42.ifrance.com/text/directory/cartoon-bondage/ cartoon bondage] [http://jdawsona.ifrance.com/data/translate/ translate] [http://toofarfrommaybe.ifrance.com/view/new/diavolino/ diavolino] [http://igaros.ifrance.com/lib/cristano-ronaldo/ cristano ronaldo] [http://akmokanzen.ifrance.com/images/small/rommel-la.htm rommel la volpe del deserto] [http://lovereceier.ifrance.com/lib/randy-quaid.htm randy quaid] [http://yeeden.ifrance.com/img/styles/elgaucho/ elgaucho] [http://oiyaoi.ifrance.com/images/small/monitor-tv/ monitor tv lcd samsung] [http://kalian42.ifrance.com/text/directory/singola-di/ singola di udine] [http://akmokanzen.ifrance.com/images/small/mayara.htm mayara] [http://akmokanzen.ifrance.com/images/small/la-casa.htm la casa senza amore] [http://speedofsoun.ifrance.com/text/directory/zionn-y.htm zionn y lennox] [http://oiyaoi.ifrance.com/images/small/lancio-coltelli/ lancio coltelli] [http://singaporepets.ifrance.com/library/html/paopop.htm paopop] [http://broadwaylili.ifrance.com/content/view/video-erotici.htm video erotici gratuiti] [http://tizolaa.ifrance.com/web/napoli-/ napoli - ibiza] [http://lovereceier.ifrance.com/lib/casting-per.htm casting per fotomodelle] [http://singaporepets.ifrance.com/library/html/razza-padrona.htm razza padrona] [http://yeeden.ifrance.com/img/styles/sancho/ sancho] [http://voltia.ifrance.com/content/view/barcellona-napoli.htm barcellona napoli] [http://lordsander.ifrance.com/topic/antenna-amplificata.htm antenna amplificata per auto] [http://lovereceier.ifrance.com/lib/hp-.htm hp 6840 wireless] [http://oiyaoi.ifrance.com/images/small/studio-di/ studio di funzioni] [http://tat-ooin.ifrance.com/resources/articles/scheda-video.htm scheda video gainward] [http://broadwaylili.ifrance.com/content/view/didll-mania.htm didll mania] [http://lovereceier.ifrance.com/lib/vomero.htm vomero] [http://lordsander.ifrance.com/topic/cani-razze.htm cani razze foto] [http://speedofsoun.ifrance.com/text/directory/foto-capezzoli.htm foto capezzoli] [http://yeeden.ifrance.com/img/styles/wecker/ wecker] [http://deviantrus.ifrance.com/topic/tesi-in/ tesi in economia e gestione delle impres] [http://demurediablo.ifrance.com/library/html/display/ display 8850] [http://broadwaylili.ifrance.com/content/view/incidentale.htm incidentale] [http://akmokanzen.ifrance.com/images/small/alfa-q.htm alfa q4] [http://girlwho-is.ifrance.com/img/styles/xxx-anal.htm xxx anal vree] [http://tat-ooin.ifrance.com/resources/articles/italiano-ucciso.htm italiano ucciso quatrocchi] [http://igaros.ifrance.com/lib/immagini-e/ immagini e artwork da phantom kingdom] [http://deviantrus.ifrance.com/topic/asiacarrera/ asiacarrera] [http://tat-ooin.ifrance.com/resources/articles/peuterey-it.htm peuterey it] [http://tizolaa.ifrance.com/web/wasn-t/ wasn t] [http://igaros.ifrance.com/lib/hot-videos/ hot videos] == Part 6 - 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