Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(243 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://xlivyoux.somee.com/tracce-temi-maturita/index.html tracce temi maturita 2004] [http://cmelak.110mb.com/view/diete-personali/ diete personali] [http://m-power.110mb.com/topic/panasonic-segs.htm panasonic s29eg-s] [http://m-power.110mb.com/topic/sur-coreano.htm sur coreano decapitado] [http://knuckles-lives.110mb.com/ricevitore-gps/ ricevitore gps a 32 canali] [http://technoshiza.110mb.com/styles/netgear-max.htm netgear max] [http://gryphon-s.somee.com/tav-vetralla.html tav vetralla] [http://drondulet.somee.com/videochat-con-carta.html videochat con carta] [http://shadowlab.110mb.com/data/moto-monster.htm moto monster] [http://some1crazyornot.110mb.com/text/grandi-mammelle.htm grandi mammelle] [http://cephiedvariable.110mb.com/titoli-hit-mania.html titoli hit mania champion 2004] [http://menosgrande.110mb.com/html/anzemet-iv.htm anzemet iv 1 f 100 mg] [http://bladespark.somee.com/u-kaka-ritka/index.html u kaka ritka] [http://technoshiza.110mb.com/styles/lettori-cd.htm lettori cd per dj mp3] [http://bladespark.somee.com/upload-seca2/index.html upload seca2] [http://miss-hide.somee.com/valentina-stella/index.html valentina stella] [http://assclown69.somee.com/tony-d-aloja.html tony d aloja] [http://honeybee43.110mb.com/night-visitors/ night visitors] [http://shadowlab.110mb.com/data/uci-cinema.htm uci cinema bologna] [http://cephiedvariable.110mb.com/te-necesito-luis.html te necesito luis miguel] [http://some1crazyornot.110mb.com/text/lettori-mp.htm lettori mp3 usb radio] [http://eugenii.somee.com/tragedie-je-reste.html tragedie je reste ghetto mp3] [http://jareth-kg.somee.com/www-bancacrt.html www bancacrt it] [http://rgreystrix.somee.com/www-gogli-com.html www gogli com] [http://technoshiza.110mb.com/styles/catania-napoli.htm catania napoli] [http://shadowlab.110mb.com/data/orzowei-mp.htm orzowei mp3] [http://xlivyoux.somee.com/traduzione-leave/index.html traduzione leave] [http://menosgrande.110mb.com/html/le-avventure.htm le avventure del barone di munchausen] [http://auraxcore.110mb.com/gruppo-ingross.htm gruppo ingross] [http://piratl-map.somee.com/www-frauenklinik.html www frauenklinik ch] [http://menosgrande.110mb.com/html/cartoon-superstars.htm cartoon superstars] [http://honeybee43.110mb.com/fiat-punto/ fiat punto speedgear] [http://rgreystrix.somee.com/www-bew-it.html www bew it] [http://honeybee43.110mb.com/toner-lexmark/ toner lexmark 12s0400] [http://assclown69.somee.com/trich-me.html trich me] [http://assclown69.somee.com/testi-gratis-linda.html testi gratis linda] [http://eugenii.somee.com/tutti-i-testi-canzoni.html tutti i testi canzoni degli u2] [http://hoochie-maamie.110mb.com/visura-targhe-auto/index.html visura targhe auto] [http://cmelak.110mb.com/view/gastronomia-di/ gastronomia di alghero] [http://eugenii.somee.com/ti-penso.html ti penso] [http://krychan.110mb.com/library/salsa-medley/ salsa medley] [http://benicek.110mb.com/resources/km-mitsubishi.htm km0 mitsubishi space star diesel auto km] [http://tayna-svobodnay.110mb.com/acquisto-gioco.htm acquisto gioco pc] [http://deadvision.110mb.com/data/milano-mikonos/ milano mikonos biglietti aerei] [http://jareth-kg.somee.com/www-pompini-com.html www pompini com] [http://chiqalife.110mb.com/new/palmireno-lorenzo/ palmireno, lorenzo] [http://0rgan1sm.somee.com/volare-offerte.html volare offerte] [http://deadvision.110mb.com/data/lucia-tova/ lucia tova] [http://tutorgirllamb.110mb.com/techno-2004/index.html techno 2004] [http://gryphon-s.somee.com/tps-codice.html tps codice] [http://technoshiza.110mb.com/styles/chintara-sukapatana.htm chintara sukapatana] [http://shadowlab.110mb.com/data/poliziotti-in.htm poliziotti in bici] [http://knuckles-lives.110mb.com/aspire-wlmi/ aspire 5002wlmi amd turion ml30] [http://piratl-map.somee.com/www-sonnybarger.html www sonnybarger com] [http://bladespark.somee.com/uccisione-bulgaro/index.html uccisione bulgaro] [http://lichvell-r.somee.com/un-gaou-a-ouran.html un gaou a ouran] [http://honeybee43.110mb.com/funcard-file/ funcard file] [http://0rgan1sm.somee.com/varano-de-melegari.html varano de melegari] [http://some1crazyornot.110mb.com/text/beny-benassy.htm beny benassy] [http://technoshiza.110mb.com/styles/thomson-lettori.htm thomson lettori dvd] [http://auraxcore.110mb.com/paulina-rubio.htm paulina rubio] [http://xlivyoux.somee.com/trigliceridi/index.html trigliceridi] [http://assclown69.somee.com/toro-loco-piero-pelu.html toro loco piero pelu] [http://failed-hope.110mb.com/lib/hp-deskjet.htm hp deskjet 3845 usb] [http://miss-hide.somee.com/videobank/index.html videobank] [http://gryphon-s.somee.com/treccine.html treccine] [http://hoochie-maamie.110mb.com/video-max-pezzali/index.html video max pezzali] [http://0rgan1sm.somee.com/w-w-w-cameracafe.html w w w cameracafe it] [http://knuckles-lives.110mb.com/vini-italiani/ vini italiani] [http://failed-hope.110mb.com/lib/rebel-moves.htm rebel moves sheep] [http://knuckles-lives.110mb.com/notebook-intel/ notebook intel pentium m 1 8] [http://cenee.110mb.com/resources/rgbm-mares/ rgbm mares] [http://some1crazyornot.110mb.com/text/vacanza-verona.htm vacanza verona] [http://m-power.110mb.com/topic/bandiere-europee.htm bandiere europee] [http://yeeden.somee.com/video-baby-boy.html video baby boy] [http://eugenii.somee.com/tributi.html tributi] [http://hoochie-maamie.110mb.com/vanigliaecioccolato/index.html vanigliaecioccolato] [http://lichvell-r.somee.com/uahex-file.html uahex file] [http://auraxcore.110mb.com/film-porno.htm film porno eva hengher] [http://tayna-svobodnay.110mb.com/toshiba-tecra.htm toshiba tecra 14 centrino] [http://cmelak.110mb.com/view/cile-ristorante/ cile ristorante] [http://miss-hide.somee.com/valentino-vince/index.html valentino vince al mugello] [http://technoshiza.110mb.com/styles/vesna-pocuca.htm vesna pocuca sana] [http://krychan.110mb.com/library/rollerblade-microblade/ rollerblade microblade] [http://rgreystrix.somee.com/www-azlyrics.html www azlyrics it] [http://benicek.110mb.com/resources/nightswimming-r.htm nightswimming r e m] [http://jareth-kg.somee.com/www-minitruckinweb.html www minitruckinweb com] [http://gryphon-s.somee.com/testi-celin-dion.html testi celin dion] [http://failed-hope.110mb.com/lib/einaudi-ludovico.htm einaudi ludovico] [http://chiqalife.110mb.com/new/home-theatre/ home theatre mustek] [http://piratl-map.somee.com/wherwi-the-love.html wherwi the love] [http://gryphon-s.somee.com/testo-tradotto-gratis.html testo tradotto gratis di eamon f h it] [http://rgreystrix.somee.com/www-campermania.html www campermania it] [http://drondulet.somee.com/v220-motorola.html v220 motorola] [http://cephiedvariable.110mb.com/top-ten-group.html top ten group] [http://lichvell-r.somee.com/uomini-dotati.html uomini dotati] [http://honeybee43.110mb.com/prime-notizie/ prime notizie per enclave 2] [http://chiqalife.110mb.com/new/rhapsody-symphony/ rhapsody symphony of enchanted] [http://honeybee43.110mb.com/stampante-aghi/ stampante aghi epson] [http://jareth-kg.somee.com/www-tecnocasa-it.html www tecnocasa it] [http://www.howardcollege.edu/Athletics/components/com_news/valavina.htm lorazepam] [http://esi.mit.edu/help/img/vesicy.htm imitrex online] [http://www.howardcollege.edu/Athletics/components/com_news/codrybre.htm free sonyericsson ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/irwisema.htm free ericsson ringtones] [http://esi.mit.edu/help/img/nygitit.htm prozac online] [http://esi.mit.edu/help/img/horete.htm free sharp ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/histrebi.htm cheap metronidazole] [http://www.howardcollege.edu/Athletics/components/com_news/rulivy.htm cheap pharmacy online] [http://www.jeffco.edu/ctl/help/godycyl.htm norco online] [http://www.jeffco.edu/ctl/help/lyhikih.htm ativan online] [http://www.howardcollege.edu/Athletics/components/com_news/gijoel.htm cheap ephedrine] [http://www.howardcollege.edu/Athletics/components/com_news/ghaalund.htm cheap pharmacy] [http://www.howardcollege.edu/Athletics/components/com_news/mismoot.htm pharmacy online online] [http://www.howardcollege.edu/Athletics/components/com_news/ludepeys.htm buy provigil] [http://www.howardcollege.edu/Athletics/components/com_news/maseale.htm hydrocodone] [http://www.jeffco.edu/ctl/help/kubeliw.htm free verizon ringtones] [http://www.jeffco.edu/ctl/help/dedive.htm lorazepam online] [http://www.howardcollege.edu/Athletics/components/com_news/brjulian.htm latin ringtones] [http://www.jeffco.edu/ctl/help/degyv.htm cheap atenolol] [http://esi.mit.edu/help/img/luwijyx.htm cool ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/hemahali.htm cheap hydrocodone] [http://www.howardcollege.edu/Athletics/components/com_news/phvestrie.htm northwest airline] [http://www.jeffco.edu/ctl/help/sytecu.htm oxycontin online] [http://www.howardcollege.edu/Athletics/components/com_news/hidunlop.htm cheap effexor] [http://www.jeffco.edu/ctl/help/vulugo.htm dianabol online] [http://esi.mit.edu/help/img/dyvowe.htm free true ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/noapenbr.htm cheap zanaflex] [http://www.howardcollege.edu/Athletics/components/com_news/mamallet.htm cheap phendimetrazine] [http://www.howardcollege.edu/Athletics/components/com_news/weharsin.htm replica rolex watches] [http://www.howardcollege.edu/Athletics/components/com_news/camendes.htm free verizon ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/mecypria.htm free country ringtones] [http://esi.mit.edu/help/img/zowefyx.htm lorazepam online] [http://www.howardcollege.edu/Athletics/components/com_news/trbarnet.htm sildenafil online] [http://www.jeffco.edu/ctl/help/hyjyrej.htm free mp3 ringtones] [http://www.jeffco.edu/ctl/help/fidowo.htm but pharmacy] [http://esi.mit.edu/help/img/nywuhyg.htm latin ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/lofrick.htm free alltel ringtones] [http://esi.mit.edu/help/img/xotofy.htm flexeril online] [http://www.howardcollege.edu/Athletics/components/com_news/drtruby.htm cheap flexeril] [http://www.howardcollege.edu/Athletics/components/com_news/pewiles.htm cheap hoodia] [http://www.jeffco.edu/ctl/help/fevy.htm lipitor online] [http://www.howardcollege.edu/Athletics/components/com_news/shheine.htm ativan online] [http://www.howardcollege.edu/Athletics/components/com_news/wipenny.htm buy soma] [http://esi.mit.edu/help/img/wuguvo.htm synthroid online] [http://esi.mit.edu/help/img/pyfihus.htm but hgh] [http://esi.mit.edu/help/img/nyponos.htm propecia online] [http://www.jeffco.edu/ctl/help/wosod.htm free t-mobile ringtones] [http://www.jeffco.edu/ctl/help/sofun.htm motorola ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/giedwin.htm cheap venlafaxine] [http://esi.mit.edu/help/img/kivuro.htm free hindi ringtones] [http://esi.mit.edu/help/img/loge.htm mtv ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/amlamper.htm cheap xenical] [http://www.howardcollege.edu/Athletics/components/com_news/poeaken.htm free sharp ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/orerie.htm pantech ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/gidailly.htm mortgage second] [http://www.howardcollege.edu/Athletics/components/com_news/hutildon.htm qwest ringtones] [http://www.jeffco.edu/ctl/help/dolewed.htm sharp ringtones] [http://esi.mit.edu/help/img/lury.htm cellphone ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/poboggs.htm cheap clomid] [http://esi.mit.edu/help/img/tejobu.htm phentermine] [http://www.howardcollege.edu/Athletics/components/com_news/lagambil.htm cheap synthroid] [http://www.jeffco.edu/ctl/help/geze.htm ionamin online] [http://www.howardcollege.edu/Athletics/components/com_news/keshaffe.htm buy atenolol] [http://www.jeffco.edu/ctl/help/govolu.htm cheap xenical] [http://www.howardcollege.edu/Athletics/components/com_news/stmcleod.htm effexor] [http://www.jeffco.edu/ctl/help/lywogi.htm lg ringtones] [http://esi.mit.edu/help/img/dukuho.htm pantech ringtones] [http://esi.mit.edu/help/img/puvu.htm ambien online] [http://www.jeffco.edu/ctl/help/bejy.htm sildenafil online] [http://www.howardcollege.edu/Athletics/components/com_news/stwhison.htm cheap phentermine] [http://www.howardcollege.edu/Athletics/components/com_news/craquill.htm carisoprodol online] [http://www.howardcollege.edu/Athletics/components/com_news/grlobdel.htm free sagem ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/buevelet.htm cheap imitrex] [http://www.howardcollege.edu/Athletics/components/com_news/learva.htm cheap viagra] [http://www.howardcollege.edu/Athletics/components/com_news/kaola.htm free mtv ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/jubeekma.htm tmobile ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/cefairch.htm weird ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/brsherid.htm turkey ringtones] [http://www.jeffco.edu/ctl/help/vozywod.htm free weird ringtones] [http://esi.mit.edu/help/img/fogus.htm free rock ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/qyhorsey.htm buy diazepam] [http://www.howardcollege.edu/Athletics/components/com_news/denighti.htm buy ephedrine] [http://www.howardcollege.edu/Athletics/components/com_news/magill.htm free sexy ringtones] [http://esi.mit.edu/help/img/wupi.htm paxil] [http://esi.mit.edu/help/img/fosofol.htm toques ringtones] [http://www.jeffco.edu/ctl/help/byzuje.htm free philips ringtones] [http://www.jeffco.edu/ctl/help/rygeje.htm accutane online] [http://www.howardcollege.edu/Athletics/components/com_news/tivineya.htm free blackberry ringtones] [http://esi.mit.edu/help/img/jicoh.htm cheap didrex] [http://www.howardcollege.edu/Athletics/components/com_news/pomanvel.htm texas holdem poker] [http://esi.mit.edu/help/img/jycofib.htm free mp3 ringtones] [http://www.jeffco.edu/ctl/help/kygewe.htm cheap clomid] [http://www.howardcollege.edu/Athletics/components/com_news/fetichno.htm cheap azithromycin] [http://www.howardcollege.edu/Athletics/components/com_news/adwaltrie.htm norvasc online] [http://www.jeffco.edu/ctl/help/xefonu.htm latin ringtones] [http://www.jeffco.edu/ctl/help/depi.htm cheap valtrex] [http://www.jeffco.edu/ctl/help/puku.htm free qwest ringtones] [http://www.jeffco.edu/ctl/help/gozofil.htm free wwe ringtones] [http://esi.mit.edu/help/img/gujosix.htm free real ringtones] [http://www.howardcollege.edu/Athletics/components/com_news/pewart.htm zithromax] == 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