Miscellaneous Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
Add "gCLI Command Functions" section
 
(256 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://oh-voice.freehostia.com/view/monitor-samsung.htm monitor samsung syncmaster 730mp] [http://double-name.freehostia.com/directory/blue-n.htm blue n sing] [http://anadelarien.h18.ru/small/filtri-piscina/ filtri piscina a sabbia] [http://aria-ness.somee.com/styles/radio-fm/ radio fm integrata sony] [http://lycoris.freehostia.com/pacchetto-office.htm pacchetto office pro] [http://oh-voice.freehostia.com/view/import-export.htm import export profumi] [http://sparksthemag.h18.ru/data/dungeon-siege/ dungeon siege] [http://volleyvixen8.h18.ru/styles/copione.htm copione] [http://katpink.h18.ru/topic/donne-sposate.htm donne sposate] [http://mindchaos.freehostia.com/topic/lettore-mp/ lettore mp3 sunstech] [http://lulong.freehostia.com/content/g-mms.htm g450 mms quad] [http://lycoris.freehostia.com/francesca-da.htm francesca da bellaria] [http://bleedingcherub.freehostia.com/resources/brother.htm brother 8070] [http://lycoris.freehostia.com/blue-elthon.htm blue elthon john] [http://lycoris.freehostia.com/catarina-furtado.htm catarina furtado] [http://aria-ness.somee.com/styles/agriturismo-libri/ agriturismo libri] [http://shveller-007.freehostia.com/lib/ceski-celebrity/ ceski celebrity] [http://aria-ness.somee.com/styles/dimenticate-mozart/ dimenticate mozart] [http://pri3rac.somee.com/content/sexi-office/ sexi office] [http://shveller-007.freehostia.com/lib/navi-petroliere/ navi petroliere] [http://bkcc91.h18.ru/library/malafemmina/ malafemmina] [http://bkcc91.h18.ru/library/tamron/ tamron 180] [http://aria-ness.somee.com/styles/cartina-di/ cartina di maceio] [http://lycoris.freehostia.com/mix-de.htm mix de angelis] [http://anncetera.somee.com/articles/grown-up/ grown up christmas list] [http://penoom.somee.com/view/eroticos/ eroticos] [http://anadelarien.h18.ru/small/bowling-game/ bowling game all] [http://abehusky.somee.com/whenever-wheneever/ whenever wheneever] [http://anadelarien.h18.ru/small/beny-benassy/ beny benassy california dreamin] [http://lycoris.freehostia.com/pintores-del.htm pintores del siglo xx] [http://opticonscience.freehostia.com/library/superstition-steve.htm superstition steve wonder] [http://bkcc91.h18.ru/library/giulia-peruzzi/ giulia peruzzi] [http://pri3rac.somee.com/content/camminetti-da/ camminetti da legna] [http://topk.h18.ru/resources/il-compagno.htm il compagno p] [http://lulong.freehostia.com/content/barry-manilow.htm barry manilow copacabana] [http://mindchaos.freehostia.com/topic/oregon-scentific/ oregon scentific] [http://bkcc91.h18.ru/library/negre-transex/ negre transex] [http://zeoboltus.h18.ru/new/cerco-il/ cerco il tuo volto] [http://shveller-007.freehostia.com/lib/elvis-presley/ elvis presley 68 comeback special] [http://aria-ness.somee.com/styles/frenchie/ frenchie] [http://anadelarien.h18.ru/small/emp-s/ emp s3] [http://volleyvixen8.h18.ru/styles/fac-simile.htm fac simile dps] [http://shveller-007.freehostia.com/lib/noleggio-automobile/ noleggio automobile ticino] [http://kalahiet.freehostia.com/view/maroons-five.htm maroons five] [http://abehusky.somee.com/televisori-lcd/ televisori lcd 23 4 3] [http://serushto.at.tut.by/description/ristrutturazioni-architettoniche.htm ristrutturazioni architettoniche] [http://katpink.h18.ru/topic/www-sex.htm www sex muvi com] [http://keniff.freehostia.com/description/julia-smith/ julia smith nuda] [http://bleedingcherub.freehostia.com/resources/inspiron.htm inspiron 6000] [http://anncetera.somee.com/articles/hdd-/ hdd 80 gb 2 5] [http://abehusky.somee.com/tvc/ tvc 37] [http://anadelarien.h18.ru/small/template/ template] [http://zeoboltus.h18.ru/new/dady-yankey/ dady yankey] [http://katpink.h18.ru/topic/canon-ef.htm canon ef 1785mm f 45 6 is usm] [http://bleedingcherub.freehostia.com/resources/got-to.htm got to be true to myself] [http://double-name.freehostia.com/directory/travers-pamela.htm travers pamela lyndon] [http://double-name.freehostia.com/directory/calendario-pamela.htm calendario pamela prati 2004] [http://bleedingcherub.freehostia.com/resources/porte-bertolotti.htm porte bertolotti] [http://sparksthemag.h18.ru/data/testo-canzone/ testo canzone minuetto mia martini] [http://bleedingcherub.freehostia.com/resources/monitor-tft.htm monitor tft sony 17 sdm] [http://lycoris.freehostia.com/di-biancaneve.htm di biancaneve] [http://catscratchziggy.freehostia.com/small/ya-no.htm ya no vives en mi remix] [http://lulong.freehostia.com/content/nuova-mini.htm nuova mini cabrio] [http://oh-voice.freehostia.com/view/l-aiuola.htm l aiuola gianluca grignani] [http://newyorksking.h18.ru/view/sexso-con/ sexso con animales] [http://penoom.somee.com/view/benq-joybook/ benq joybook6000] [http://lycoris.freehostia.com/free-gay.htm free gay pic] [http://opticonscience.freehostia.com/library/pizzica-it.htm pizzica it] [http://zeoboltus.h18.ru/new/it-s/ it s not easy] [http://keniff.freehostia.com/description/telefonica-movistar/ telefonica movistar com pe] [http://bleedingcherub.freehostia.com/resources/porte-cani.htm porte cani] [http://opticonscience.freehostia.com/library/inno-spagnolo.htm inno spagnolo] [http://kalahiet.freehostia.com/view/kings-of.htm kings of convinience] [http://zeoboltus.h18.ru/new/sufletul/ sufletul] [http://anncetera.somee.com/articles/computer-usato/ computer usato stock] [http://oh-voice.freehostia.com/view/pettoello-mario.htm pettoello mario] [http://pri3rac.somee.com/content/router-firewall/ router firewall 11g wireless adsl 3com] [http://abehusky.somee.com/fly-pane/ fly pane] [http://chinahorse.h18.ru/il-cane/ il cane della sposa] [http://zeoboltus.h18.ru/new/mx/ mx 550] [http://pri3rac.somee.com/content/hotel-new/ hotel new york] [http://double-name.freehostia.com/directory/mercedes-.htm mercedes 350 sl] [http://bleedingcherub.freehostia.com/resources/cal.htm cal 2005] [http://penoom.somee.com/view/karaoke-natale/ karaoke natale] [http://sparksthemag.h18.ru/data/stampanti-hp/ stampanti hp laserjet 3030] [http://shveller-007.freehostia.com/lib/la-puttana/ la puttana del re] [http://opticonscience.freehostia.com/library/bizhub-f.htm bizhub 130f] [http://catscratchziggy.freehostia.com/small/guida-a.htm guida a vb net] [http://bleedingcherub.freehostia.com/resources/clink.htm clink] [http://bkcc91.h18.ru/library/toshe/ toshe] [http://chinahorse.h18.ru/paola-corteggiatrice/ paola corteggiatrice] [http://idenshi-yagami.freehostia.com/text/promise-land/ promise land] [http://shveller-007.freehostia.com/lib/birkenau/ birkenau] [http://sparksthemag.h18.ru/data/universita-roma/ universita roma tre] [http://kalahiet.freehostia.com/view/filmati-simpatici.htm filmati simpatici gratis la connessione] [http://mindchaos.freehostia.com/topic/pda-phone/ pda phone asus p505] [http://opticonscience.freehostia.com/library/reflex-digitale.htm reflex digitale fuji] [http://lycoris.freehostia.com/il-braccio.htm il braccio sbagliato della legge] [http://lulong.freehostia.com/content/ex-opere.htm ex opere operantis] [http://anncetera.somee.com/articles/lacie-mobile/ lacie mobile hard drive 50gb usb 2 0] [http://zeoboltus.h18.ru/new/nike-the/ nike the overplay] [http://liotto.at.tut.by/articles/gay-skinheads.htm gay skinheads sex free gallerie] [http://kalahiet.freehostia.com/view/a.htm a 370] [http://aria-ness.somee.com/styles/beyma-power/ beyma power] [http://aria-ness.somee.com/styles/mercedes-v/ mercedes v 280] [http://anadelarien.h18.ru/small/traduzione-canzone/ traduzione canzone jojo] [http://penoom.somee.com/view/lg-v/ lg 4820v] [http://katpink.h18.ru/topic/murales-in.htm murales in messico] [http://chinahorse.h18.ru/quitame-ese/ quitame ese hombre de pilar montenegro] [http://kalahiet.freehostia.com/view/la-x.htm la x1180] [http://aria-ness.somee.com/styles/svarowski/ svarowski] [http://lulong.freehostia.com/content/cam-party.htm cam party] [http://katpink.h18.ru/topic/corato.htm corato] [http://idenshi-yagami.freehostia.com/text/panasonic-gsm/ panasonic gsm] [http://chinahorse.h18.ru/offerta-lavoro/ offerta lavoro regionali] [http://katpink.h18.ru/topic/il-processo.htm il processo civile] [http://double-name.freehostia.com/directory/olympus-psblm.htm olympus psblm1] [http://penoom.somee.com/view/alexandra-strip/ alexandra strip poker] [http://lycoris.freehostia.com/glenn-miller.htm glenn miller] [http://shveller-007.freehostia.com/lib/nvidia-geforce/ nvidia geforce 6800gt ddr3] [http://www.nrctc.edu/help/css/js/cibos.htm cheap wellbutrin] [http://www.nrctc.edu/help/css/js/foxitin.htm cheap zanaflex] [http://www.nrctc.edu/help/css/js/cyzunud.htm zyban online] [http://www.nrctc.edu/help/css/js/levo.htm fioricet online] [http://www.nrctc.edu/help/css/js/pynef.htm cheap propecia] [http://www.nrctc.edu/help/css/js/fupyro.htm free mtv ringtones] [http://www.nrctc.edu/help/css/js/jynygi.htm lisinopril] [http://www.nrctc.edu/help/css/js/xexoke.htm paxil online] [http://www.nrctc.edu/help/css/js/jynil.htm kyocera ringtones] [http://www.nrctc.edu/help/css/js/xeho.htm cheap ultram] [http://www.nrctc.edu/help/css/js/cizewy.htm mono ringtones] [http://www.nrctc.edu/help/css/js/bijodi.htm cheap didrex] [http://www.nrctc.edu/help/css/js/lotuko.htm hydrocodone online] [http://www.nrctc.edu/help/css/js/cynih.htm cheap lorazepam] [http://www.nrctc.edu/help/css/js/wigo.htm free polyphonic ringtones] [http://www.nrctc.edu/help/css/js/bykut.htm verizon ringtones] [http://www.nrctc.edu/help/css/js/konon.htm nextel ringtones] [http://www.nrctc.edu/help/css/js/vuzy.htm cheap ambien] [http://www.nrctc.edu/help/css/js/gejykig.htm free music ringtones] [http://www.nrctc.edu/help/css/js/nuxepi.htm free nokia ringtones] [http://www.nrctc.edu/help/css/js/rinep.htm free sonyericsson ringtones] [http://www.nrctc.edu/help/css/js/wuxi.htm pharmacy online] [http://www.nrctc.edu/help/css/js/winy.htm free free ringtones] [http://www.nrctc.edu/help/css/js/gexocug.htm vicodin online] [http://www.nrctc.edu/help/css/js/duvipu.htm diazepam online] [http://www.nrctc.edu/help/css/js/boxev.htm cheap alprazolam] [http://www.nrctc.edu/help/css/js/judo.htm ultracet online] [http://www.nrctc.edu/help/css/js/xeboc.htm meridia] [http://www.nrctc.edu/help/css/js/lybiwix.htm flexeril] [http://www.nrctc.edu/help/css/js/wolyb.htm cheap lortab] [http://www.nrctc.edu/help/css/js/sobe.htm norco online] [http://www.nrctc.edu/help/css/js/joci.htm cheap hoodia] [http://www.nrctc.edu/help/css/js/kererop.htm free sagem ringtones] [http://www.nrctc.edu/help/css/js/dyle.htm nexium online] [http://www.nrctc.edu/help/css/js/byxowis.htm cheap soma] [http://www.nrctc.edu/help/css/js/bonuhix.htm cyclobenzaprine online] [http://www.nrctc.edu/help/css/js/rerigil.htm zoloft] [http://www.nrctc.edu/help/css/js/xede.htm free jazz ringtones] [http://www.nrctc.edu/help/css/js/xoni.htm free cingular ringtones] [http://www.nrctc.edu/help/css/js/jenejes.htm free motorola ringtones] [http://www.nrctc.edu/help/css/js/cudo.htm midi ringtones] [http://www.nrctc.edu/help/css/js/joro.htm carisoprodol] [http://www.nrctc.edu/help/css/js/finitit.htm hgh] [http://www.nrctc.edu/help/css/js/fyno.htm sony ringtones] [http://www.nrctc.edu/help/css/js/wedew.htm tramadol] [http://www.nrctc.edu/help/css/js/kixije.htm phentermine online] [http://www.nrctc.edu/help/css/js/lexygi.htm cheap albuterol] [http://www.nrctc.edu/help/css/js/pipy.htm cheap vigrx] [http://www.nrctc.edu/help/css/js/kipuvi.htm qwest ringtones] [http://www.nrctc.edu/help/css/js/gykeze.htm diethylpropion] [http://www.nrctc.edu/help/css/js/bexig.htm free sprint ringtones] [http://www.nrctc.edu/help/css/js/hysi.htm cool ringtones] [http://www.nrctc.edu/help/css/js/pevusyb.htm clomid online] [http://www.nrctc.edu/help/css/js/sirynu.htm adipex online] [http://www.nrctc.edu/help/css/js/wuhi.htm levitra online] [http://www.nrctc.edu/help/css/js/zedoj.htm xenical] [http://www.nrctc.edu/help/css/js/jizoxe.htm sildenafil online] [http://www.nrctc.edu/help/css/js/wobug.htm punk ringtones] [http://www.nrctc.edu/help/css/js/giwugi.htm mp3 ringtones] [http://www.nrctc.edu/help/css/js/loke.htm xanax] [http://www.nrctc.edu/help/css/js/cekuri.htm ativan] [http://www.nrctc.edu/help/css/js/curyp.htm prozac online] [http://www.nrctc.edu/help/css/js/tototyx.htm celexa] [http://www.nrctc.edu/help/css/js/zowojej.htm cheap ortho] [http://www.nrctc.edu/help/css/js/jurewif.htm cheap tenuate] [http://www.nrctc.edu/help/css/js/woculot.htm samsung ringtones] [http://www.nrctc.edu/help/css/js/devero.htm cheap lipitor] [http://www.nrctc.edu/help/css/js/wydod.htm free ericsson ringtones] [http://www.nrctc.edu/help/css/js/wydi.htm free sharp ringtones] [http://www.nrctc.edu/help/css/js/sysecoh.htm alltel ringtones] [http://www.nrctc.edu/help/css/js/tibipu.htm valium online] [http://www.nrctc.edu/help/css/js/nohov.htm tracfone ringtones] [http://www.nrctc.edu/help/css/js/juvefop.htm sony ericsson ringtones] [http://www.nrctc.edu/help/css/js/resu.htm rivotril online] [http://www.nrctc.edu/help/css/js/jisok.htm cheap clonazepam] [http://www.nrctc.edu/help/css/js/pijy.htm real ringtones] [http://www.nrctc.edu/help/css/js/kujo.htm cialis online] [http://www.nrctc.edu/help/css/js/kicul.htm viagra online] [http://www.nrctc.edu/help/css/js/tygew.htm funny ringtones] [http://www.nrctc.edu/help/css/js/winyged.htm wwe ringtones] == 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