Miscellaneous Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
Add "gCLI Command Functions" section
 
(275 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://roaliano.125mb.com/content/view/i-sette.htm i sette peccati capitali] [http://tomems.125mb.com/html/pensioni-integrative/ pensioni integrative] [http://roaliano.125mb.com/content/view/evansence-immortal.htm evansence immortal] [http://tomems.125mb.com/html/rsmmc-dual/ rs-mmc dual voltage per cellulari nokia] [http://oooohhnnnooooo.freehostia.com/content/view/galop-excelsior.htm galop excelsior] [http://tomems.125mb.com/html/acer-aspire/ acer aspire 1363 sempron] [http://roaliano.125mb.com/content/view/roma-torino.htm roma torino biglietti aerei] [http://redobsession.freehostia.com/web/rock-and.htm rock and roll robot] [http://roaliano.125mb.com/content/view/docup-toscana.htm docup toscana it] [http://behaverf.125mb.com/view/new/estratti-video/ estratti video danza classica] [http://curti2iag.125mb.com/description/lib/modem-pci/ modem pci 56k v92] [http://edmei.125mb.com/html/freestyler-push.htm freestyler push uo] [http://oooohhnnnooooo.freehostia.com/content/view/appartamenti-bilocali.htm appartamenti bilocali affitto pavia] [http://redobsession.freehostia.com/web/gaborone.htm gaborone] [http://redobsession.freehostia.com/web/panasonic-uf.htm panasonic uf 4100] [http://edmei.125mb.com/html/boxplosion-linux.htm boxplosion linux] [http://redobsession.freehostia.com/web/civilization.htm civilization 4] [http://tomems.125mb.com/html/comune-taranto/ comune taranto] [http://edmei.125mb.com/html/she-is.htm she is my baby] [http://behaverf.125mb.com/view/new/haciendo-el/ haciendo el amor] [http://roaliano.125mb.com/content/view/frigorifero-domestico.htm frigorifero domestico] [http://edmei.125mb.com/html/revista-atomix.htm revista atomix] [http://behaverf.125mb.com/view/new/languedoc/ languedoc] [http://curti2iag.125mb.com/description/lib/colomba-di/ colomba di pasqua] [http://tomems.125mb.com/html/sfiammare/ sfiammare] [http://oooohhnnnooooo.freehostia.com/content/view/elezioni-provinciali.htm elezioni provinciali di cosenza] [http://ginger-tea.freehostia.com/topic/moglie-esibizionista/ moglie esibizionista] [http://ginger-tea.freehostia.com/topic/warm-agobot/ warm agobot] [http://edmei.125mb.com/html/pizzica-na.htm pizzica na ni na] [http://behaverf.125mb.com/view/new/billigflieger-von/ billigflieger von koeln] [http://roaliano.125mb.com/content/view/sunrise-classifica.htm sunrise classifica] [http://tomems.125mb.com/html/ratones-coloraos/ ratones coloraos] [http://tomems.125mb.com/html/atlant/ atlant] [http://edmei.125mb.com/html/trans-sport.htm trans sport by pontiac] [http://redobsession.freehostia.com/web/u-s.htm u s caratese] [http://behaverf.125mb.com/view/new/vecchio-squalo/ vecchio squalo] [http://redobsession.freehostia.com/web/negozi-di.htm negozi di giocattoli di genova] [http://tomems.125mb.com/html/elio-petri/ elio petri] [http://ginger-tea.freehostia.com/topic/gloria-/ gloria - una notte destate] [http://tomems.125mb.com/html/basino/ basino] [http://redobsession.freehostia.com/web/hp-ink.htm hp ink jet a3] [http://redobsession.freehostia.com/web/mozzino.htm mozzino] [http://edmei.125mb.com/html/siti-gay.htm siti gay di oggi] [http://roaliano.125mb.com/content/view/top-gun.htm top gun film dvd] [http://redobsession.freehostia.com/web/la-primula.htm la primula rosa] [http://behaverf.125mb.com/view/new/esterno-dvd/ esterno dvd recorder] [http://edmei.125mb.com/html/segreteria-digitale.htm segreteria digitale] [http://tomems.125mb.com/html/dissipatore-ram/ dissipatore ram] [http://edmei.125mb.com/html/milione.htm milione] [http://behaverf.125mb.com/view/new/vanessa-carlto/ vanessa carlto] [http://redobsession.freehostia.com/web/erotic-live.htm erotic live] [http://oooohhnnnooooo.freehostia.com/content/view/la-vergine.htm la vergine scaltra] [http://oooohhnnnooooo.freehostia.com/content/view/outlet-castel.htm outlet castel romano] [http://behaverf.125mb.com/view/new/decapitazioni-americano/ decapitazioni americano] [http://roaliano.125mb.com/content/view/vaporizzatore-portatile.htm vaporizzatore portatile] [http://oooohhnnnooooo.freehostia.com/content/view/nvidia-geforce.htm nvidia geforce 6600gt agp] [http://tomems.125mb.com/html/coppia-di/ coppia di jack] [http://tomems.125mb.com/html/no-body/ no body wants to be lonely] [http://redobsession.freehostia.com/web/olympus-e.htm olympus e 10] [http://behaverf.125mb.com/view/new/nel-mondo/ nel mondo ci sono piu fiocchi azzurri] [http://behaverf.125mb.com/view/new/nvidia-asus/ nvidia asus agp] [http://curti2iag.125mb.com/description/lib/diadora-abbigliamento/ diadora abbigliamento] [http://ginger-tea.freehostia.com/topic/accessori-per/ accessori per palmari auto acer] [http://roaliano.125mb.com/content/view/risultati-coppa.htm risultati coppa uefa] [http://redobsession.freehostia.com/web/ombralonga.htm ombralonga] [http://ginger-tea.freehostia.com/topic/auto-da/ auto da rally] [http://roaliano.125mb.com/content/view/clockwatchers.htm clockwatchers] [http://oooohhnnnooooo.freehostia.com/content/view/sharp-xvz.htm sharp xv-z200] [http://redobsession.freehostia.com/web/il-gorilla.htm il gorilla di soho] [http://ginger-tea.freehostia.com/topic/hard-disk/ hard disk iomega 80 gb usb] [http://curti2iag.125mb.com/description/lib/case-in/ case in vendita valle d aosta] [http://edmei.125mb.com/html/nxpm-hp.htm nx8220-pm740 hp] [http://oooohhnnnooooo.freehostia.com/content/view/obesi.htm obesi] [http://behaverf.125mb.com/view/new/laser/ laser 3030] [http://ginger-tea.freehostia.com/topic/ferri-da/ ferri da stiro a secco] [http://redobsession.freehostia.com/web/www-seyx.htm www seyx net] [http://roaliano.125mb.com/content/view/jeep-grand.htm jeep grand cheeroke] [http://curti2iag.125mb.com/description/lib/luigi-i/ luigi i (re di portogallo)] [http://curti2iag.125mb.com/description/lib/pldvm-asus/ p5ld2-vm asus] [http://roaliano.125mb.com/content/view/scaricare-filmati.htm scaricare filmati gratis] [http://redobsession.freehostia.com/web/copertina-guns.htm copertina guns and roses greatest hits] [http://edmei.125mb.com/html/monitor-belinea.htm monitor belinea 19 tft] [http://ginger-tea.freehostia.com/topic/canzone-amandoti/ canzone amandoti gianna nannini] [http://curti2iag.125mb.com/description/lib/johann-sebastian/ johann sebastian bach. st. matthew passion] [http://oooohhnnnooooo.freehostia.com/content/view/sharm-egitto.htm sharm egitto] [http://redobsession.freehostia.com/web/video-julio.htm video julio nava] [http://edmei.125mb.com/html/tapis-magnetico.htm tapis magnetico] [http://redobsession.freehostia.com/web/non-me.htm non me lo so spiegare spartito] [http://oooohhnnnooooo.freehostia.com/content/view/cliniche-private.htm cliniche private di lione] [http://oooohhnnnooooo.freehostia.com/content/view/kwa.htm kwa] [http://oooohhnnnooooo.freehostia.com/content/view/copertina-dvd.htm copertina dvd cartoni animati] [http://ginger-tea.freehostia.com/topic/cartoline-illustrate/ cartoline illustrate] [http://ginger-tea.freehostia.com/topic/dil/ dil] [http://edmei.125mb.com/html/amd-athlon.htm amd athlon 64 3200 socket 754] [http://curti2iag.125mb.com/description/lib/asahi-shinbun/ asahi shinbun] [http://ginger-tea.freehostia.com/topic/piano-di/ piano di america] [http://tomems.125mb.com/html/resisto/ resisto] [http://ginger-tea.freehostia.com/topic/vietnamese-girls/ vietnamese girls] [http://behaverf.125mb.com/view/new/dfi-lanparty/ dfi lanparty nf4 sli] [http://redobsession.freehostia.com/web/collistar-prodotti.htm collistar prodotti per i capelli] [http://redobsession.freehostia.com/web/toshiba-libretto.htm toshiba libretto u100 portatili] [http://redobsession.freehostia.com/web/alberghi-scambisti.htm alberghi scambisti] [http://redobsession.freehostia.com/web/hadi-cicegim.htm hadi cicegim] [http://oooohhnnnooooo.freehostia.com/content/view/honda-vtr.htm honda vtr sp2] [http://oooohhnnnooooo.freehostia.com/content/view/www-quattro.htm www quattro ruote it] [http://oooohhnnnooooo.freehostia.com/content/view/quadro-malinconia.htm quadro malinconia di una bella giornata] [http://oooohhnnnooooo.freehostia.com/content/view/balli-jazz.htm balli jazz] [http://tomems.125mb.com/html/voli-da/ voli da pescara] [http://ginger-tea.freehostia.com/topic/logitech-quickcam/ logitech quickcam messenger] [http://curti2iag.125mb.com/description/lib/daddy-yankee/ daddy yankee ringtones] [http://roaliano.125mb.com/content/view/catania-sposa.htm catania sposa vestito] [http://ginger-tea.freehostia.com/topic/truro/ truro] [http://edmei.125mb.com/html/islah.htm islah] [http://roaliano.125mb.com/content/view/www-divertimento.htm www divertimento it] [http://oooohhnnnooooo.freehostia.com/content/view/giochi-da.htm giochi da tavolo gratis] [http://redobsession.freehostia.com/web/hotel-a.htm hotel a antibes] [http://roaliano.125mb.com/content/view/eno.htm eno] [http://edmei.125mb.com/html/video-scopate.htm video scopate amatoriali] [http://ginger-tea.freehostia.com/topic/te-ci/ te ci hanno mai mandato] [http://behaverf.125mb.com/view/new/lcd-tv/ lcd tv hyundai] [http://edmei.125mb.com/html/herman-swoboda.htm herman swoboda] [http://ginger-tea.freehostia.com/topic/lucio-fontana/ lucio fontana] [http://oooohhnnnooooo.freehostia.com/content/view/euro-football.htm euro football] [http://behaverf.125mb.com/view/new/italia/ italia 1400] [http://behaverf.125mb.com/view/new/white-trash/ white trash] [http://ginger-tea.freehostia.com/topic/taglia-bordi/ taglia bordi] [http://tomems.125mb.com/html/enigmistica-gioco/ enigmistica gioco] [http://redobsession.freehostia.com/web/martn-lutero.htm martn lutero] [http://ginger-tea.freehostia.com/topic/pubblicita-esterna/ pubblicita esterna] [http://roaliano.125mb.com/content/view/acha.htm acha] [http://ginger-tea.freehostia.com/topic/clinica-la/ clinica la madonnina] [http://behaverf.125mb.com/view/new/chocobo-racing/ chocobo racing] [http://redobsession.freehostia.com/web/figha.htm figha] [http://behaverf.125mb.com/view/new/mercedes-e/ mercedes e 280 elegance] [http://edmei.125mb.com/html/hot-webcam.htm hot webcam] [http://oooohhnnnooooo.freehostia.com/content/view/foto-ragazza.htm foto ragazza amatoriale] [http://tomems.125mb.com/html/shemale/ shemale] [http://behaverf.125mb.com/view/new/scheda-video/ scheda video ati radeon 9250 128mb] [http://tomems.125mb.com/html/hardware-pc/ hardware pc] [http://edmei.125mb.com/html/immagini-croci.htm immagini croci templari] [http://tomems.125mb.com/html/tv-plasma/ tv plasma jvc] [http://tomems.125mb.com/html/dlgs-/ dlgs 30 marzo 2001 n 165] [http://oooohhnnnooooo.freehostia.com/content/view/lidi-ferraresi.htm lidi ferraresi] [http://oooohhnnnooooo.freehostia.com/content/view/amori-incontri.htm amori incontri chat] [http://ginger-tea.freehostia.com/topic/samsung-lettore/ samsung lettore mp3 10] [http://redobsession.freehostia.com/web/rete-per.htm rete per letto] [http://oooohhnnnooooo.freehostia.com/content/view/mp-wav.htm mp3 wav converter] [http://behaverf.125mb.com/view/new/crack-lotto/ crack lotto] [http://ginger-tea.freehostia.com/topic/zecchino-d/ zecchino d oro 41] [http://tomems.125mb.com/html/amd-venice/ amd venice 3000] [http://tomems.125mb.com/html/video-di/ video di nicholas berger] [http://edmei.125mb.com/html/thomson-mp.htm thomson mp3 20gb] [http://oooohhnnnooooo.freehostia.com/content/view/romanina-midi.htm romanina midi] [http://oooohhnnnooooo.freehostia.com/content/view/elettrostimolatori-tens.htm elettrostimolatori tens] [http://redobsession.freehostia.com/web/la-descarada.htm la descarada] [http://behaverf.125mb.com/view/new/novi-vinodolski/ novi vinodolski] [http://behaverf.125mb.com/view/new/lonney-toon/ lonney toon] [http://tomems.125mb.com/html/canon-laser/ canon laser lbp 1120] [http://behaverf.125mb.com/view/new/anno/ anno 1503] [http://behaverf.125mb.com/view/new/madness-combat/ madness combat] [http://roaliano.125mb.com/content/view/vip-nudi.htm vip nudi al mare] [http://curti2iag.125mb.com/description/lib/lettori-mp/ lettori mp3 512mb fm integrata] [http://redobsession.freehostia.com/web/gramolatrice.htm gramolatrice] [http://edmei.125mb.com/html/vizcaya.htm vizcaya] [http://curti2iag.125mb.com/description/lib/art-faber/ art faber] [http://tomems.125mb.com/html/farmacie-agricole/ farmacie agricole] [http://behaverf.125mb.com/view/new/linus-torvalds/ linus torvalds] [http://roaliano.125mb.com/content/view/diva-futura.htm diva futura] [http://tomems.125mb.com/html/o-gorizia/ o gorizia] [http://ginger-tea.freehostia.com/topic/los-angeles/ los angeles milano biglietti aerei] [http://roaliano.125mb.com/content/view/california-testo.htm california testo telefilm the o c] [http://ginger-tea.freehostia.com/topic/dts-amplificatore/ dts amplificatore amplificatori] [http://redobsession.freehostia.com/web/scarpa-asics.htm scarpa asics] [http://ginger-tea.freehostia.com/topic/business-soluzione/ business soluzione] [http://behaverf.125mb.com/view/new/dualshock/ dualshock 2] [http://edmei.125mb.com/html/personal-jesus.htm personal jesus depeche mode] [http://ginger-tea.freehostia.com/topic/mappa-concettuale/ mappa concettuale tesina maturita] [http://redobsession.freehostia.com/web/eminem-vs.htm eminem vs mundian to bach ke] [http://redobsession.freehostia.com/web/chst.htm chst] [http://tomems.125mb.com/html/lancia-delta/ lancia delta hf integrale] [http://roaliano.125mb.com/content/view/tecniche-nuove.htm tecniche nuove editore] [http://ginger-tea.freehostia.com/topic/moto-dominator/ moto dominator] [http://curti2iag.125mb.com/description/lib/canon-ef/ canon ef usm 28-105 3 5-4 5] [http://curti2iag.125mb.com/description/lib/con-la/ con la bava alla bocca] [http://oooohhnnnooooo.freehostia.com/content/view/foto-di.htm foto di ragazze porno] [http://behaverf.125mb.com/view/new/futuro-oroscopo/ futuro oroscopo] [http://edmei.125mb.com/html/una-moglie.htm una moglie tradita gianni celeste] [http://redobsession.freehostia.com/web/temi-film.htm temi film] [http://ginger-tea.freehostia.com/topic/d-alessio/ d alessio testi e accordi] [http://behaverf.125mb.com/view/new/www-daddyyankee/ www daddyyankee com] [http://curti2iag.125mb.com/description/lib/offerta-venezia/ offerta venezia] [http://edmei.125mb.com/html/tomtom-go.htm tomtom go 500 italia] [http://tomems.125mb.com/html/mutuo-fineco/ mutuo fineco] [http://oooohhnnnooooo.freehostia.com/content/view/simon.htm simon] [http://roaliano.125mb.com/content/view/suzette.htm suzette] [http://behaverf.125mb.com/view/new/new-boys/ new boys production srl] [http://edmei.125mb.com/html/thrustmaster-.htm thrustmaster 360 modena wheel] [http://edmei.125mb.com/html/mr-president.htm mr president] [http://edmei.125mb.com/html/narcan-im.htm narcan im iv 1 f 1 ml 0,4 mg] [http://tomems.125mb.com/html/historia-del/ historia del mause] == 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