Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(143 intermediate revisions by 69 users not shown)
Line 1: Line 1:
[http://www.grammateas.gr/gr/language/lang_english/images/js/rjasmk.html Cartomanzia tarocco] [http://www.futurenuke.com/games/images/js/bljfrc.html Download suoneria gratis] [http://www.futurenuke.com/games/images/js/pentxt.html Upim] [http://www.sibernews.com/cache/images/js/pdhduk.html Info centoxcento] [http://www.futurenuke.com/games/images/js/qckvqu.html Clone cd] [http://www.sibernews.com/cache/images/js/hlfhfx.html Tania russof] [http://www.futurenuke.com/games/images/js/wlxnqv.html Opus dei abruzzo] [http://www.sibernews.com/cache/images/js/drrdov.html Www troie] [http://www.bhdstats.foxspecialops.com/maps/images/js/mmblgq.html Galitsin] [http://www.grammateas.gr/gr/language/lang_english/images/js/rvpkkd.html Fano] [http://www.rapidairsoft.hu/components/images/js/itndfo.html Agenzia immobiliare la spezia] [http://www.grammateas.gr/gr/language/lang_english/images/js/kwxrdc.html Animali furetti] [http://www.futurenuke.com/games/images/js/hxjrkv.html Agriturismo alleghe] [http://www.futurenuke.com/games/images/js/djwmct.html Offerta soggiorni sardegna] [http://www.sibernews.com/cache/images/js/axtwwh.html Sandalo donna eleganti] [http://www.grammateas.gr/gr/language/lang_english/images/js/vfljew.html Settemari] [http://www.futurenuke.com/games/images/js/epojrd.html Donne grasse porche] [http://www.futurenuke.com/games/images/js/xldpma.html Shemale anal destruction] [http://www.sibernews.com/cache/images/js/kaecnb.html Uffa] [http://www.sibernews.com/cache/images/js/kwelhb.html Cliente agenzia matrimoniale] [http://www.rapidairsoft.hu/components/images/js/tcdhbq.html Unive it] [http://www.sibernews.com/cache/images/js/thsthh.html Video inculate gratis] [http://www.rapidairsoft.hu/components/images/js/iqubog.html Goku sex] [http://www.electrodrome.net/modules/Forums/cache/images/js/qpwcah.html Stacy keibler video] [http://www.sibernews.com/cache/images/js/wtcokv.html Doberman] [http://www.electrodrome.net/modules/Forums/cache/images/js/pdpgru.html Voli sestri levante] [http://www.bhdstats.foxspecialops.com/maps/images/js/bnjvcu.html Dottore commercialista lavoro] [http://www.grammateas.gr/gr/language/lang_english/images/js/cjuuou.html Autonoleggio grosseto online] [http://www.sibernews.com/cache/images/js/tcdbvc.html Lettera ad un amica] [http://www.imminent-threat.com/files/images/js/kqgdgg.html Miur it] [http://www.grammateas.gr/gr/language/lang_english/images/js/ntajjq.html W totosi it] [http://www.rapidairsoft.hu/components/images/js/sgvopq.html Agriturismo ventimiglia] [http://www.futurenuke.com/games/images/js/soajoh.html Bologna eros it] [http://www.aka-execution.com/modules/Forums/cache/images/js/hbndah.html Porno dragonball] [http://www.sibernews.com/cache/images/js/lggpnh.html Isola della maddalena] [http://www.aka-execution.com/modules/Forums/cache/images/js/kmuaav.html Cristallo] [http://www.bhdstats.foxspecialops.com/maps/images/js/btfcne.html Donne porche video] [http://www.bhdstats.foxspecialops.com/maps/images/js/tjmhuj.html Invio sms] [http://www.aka-execution.com/modules/Forums/cache/images/js/ufsnod.html Dimagrimento ultrasuoni] [http://www.electrodrome.net/modules/Forums/cache/images/js/orriqt.html Puma scarpa] [http://www.aka-execution.com/modules/Forums/cache/images/js/qbjqqb.html Mesothelioma lawyer houston] [http://www.futurenuke.com/games/images/js/hifbox.html Borse di studio] [http://www.grammateas.gr/gr/language/lang_english/images/js/lpremf.html Aforisma tristezza] [http://www.imminent-threat.com/files/images/js/majmts.html Albergo hurgada] [http://www.aka-execution.com/modules/Forums/cache/images/js/webhdw.html Messalina] [http://www.electrodrome.net/modules/Forums/cache/images/js/gqnvag.html Ceramica dolomite] [http://www.electrodrome.net/modules/Forums/cache/images/js/eprfhi.html Quotazioni borsa] [http://www.electrodrome.net/modules/Forums/cache/images/js/oxvidb.html Disegni da colorare] [http://www.electrodrome.net/modules/Forums/cache/images/js/kxeevp.html Altec lansing im11] [http://www.futurenuke.com/games/images/js/fnwthu.html European river cruise] [http://www.bhdstats.foxspecialops.com/maps/images/js/terwme.html Software gps palmare] [http://www.rapidairsoft.hu/components/images/js/eicgvg.html Asciugacapelli ionizzatore] [http://www.electrodrome.net/modules/Forums/cache/images/js/xrgsgs.html Www troie e puttane it] [http://www.futurenuke.com/games/images/js/bmcfsj.html Flat connessione] [http://www.imminent-threat.com/files/images/js/toxbsf.html Hong kong ristorante] [http://www.futurenuke.com/games/images/js/oqpqcv.html Video porno professoresse] [http://www.sibernews.com/cache/images/js/tnrsmi.html Arcatonit] [http://www.sibernews.com/cache/images/js/ekmmeo.html Brescia albergo] [http://www.rapidairsoft.hu/components/images/js/mqnlpj.html Fondoschiena femminile] [http://www.sibernews.com/cache/images/js/ulspxm.html Mamme in calore] [http://www.futurenuke.com/games/images/js/ibsxkw.html Case vacanza puglia] [http://www.futurenuke.com/games/images/js/ddsuqw.html Chat amicizia sms] [http://www.grammateas.gr/gr/language/lang_english/images/js/wrvcrw.html Crack emule] [http://www.futurenuke.com/games/images/js/mxvtvv.html Rasata racconto] [http://www.aka-execution.com/modules/Forums/cache/images/js/rratvg.html Isole ionie] [http://www.sibernews.com/cache/images/js/ulrohq.html Stampante olivetti] [http://www.sibernews.com/cache/images/js/qfulwv.html Vecchie troie foto] [http://www.electrodrome.net/modules/Forums/cache/images/js/kjbolp.html Ruoteclassiche] [http://www.sicman.org/components/images/js/vvapfe.html Barzelletta chuck norris] [http://www.imminent-threat.com/files/images/js/nulqhr.html Dana plato] [http://www.rapidairsoft.hu/components/images/js/xvemug.html Giovani esibizioniste] [http://www.electrodrome.net/modules/Forums/cache/images/js/uxwcek.html Big melons] [http://www.bhdstats.foxspecialops.com/maps/images/js/icpmcw.html Porpora trombocitopenica idiopatica] [http://www.sicman.org/components/images/js/oqvelh.html Ipermercato ipercoop] [http://www.bhdstats.foxspecialops.com/maps/images/js/hvoqqx.html Fids it logo] [http://www.electrodrome.net/modules/Forums/cache/images/js/mgjwlk.html Prestito potenza] [http://www.futurenuke.com/games/images/js/mnvrbb.html Sapporo ristorante] [http://www.sicman.org/components/images/js/qflwfw.html Tupperware it] [http://www.aka-execution.com/modules/Forums/cache/images/js/nupodm.html Calendario di alessandra pierelli] [http://www.futurenuke.com/games/images/js/bnsjqs.html Giochi rete] [http://www.electrodrome.net/modules/Forums/cache/images/js/nkecdh.html Hotel 3 stelle budapest] [http://www.futurenuke.com/games/images/js/bptagx.html Cicciolina video free] [http://www.futurenuke.com/games/images/js/rxxkjl.html Teresa orlowsky] [http://www.sibernews.com/cache/images/js/gtauql.html Voli norvegia] [http://www.bhdstats.foxspecialops.com/maps/images/js/kxpqqh.html Ricetta pesce azzurro] [http://www.grammateas.gr/gr/language/lang_english/images/js/sxjbuo.html Snowdon] [http://www.futurenuke.com/games/images/js/aersfn.html Salento vacanza] [http://www.electrodrome.net/modules/Forums/cache/images/js/ojhsrl.html Incontrarsi it] [http://www.bhdstats.foxspecialops.com/maps/images/js/rqugwc.html Qbr it] [http://www.imminent-threat.com/files/images/js/jcpnpp.html Giochi festa compleanno bambini] [http://www.aka-execution.com/modules/Forums/cache/images/js/ujqlpr.html Trucco juiced pc] [http://www.futurenuke.com/games/images/js/siwihs.html Motorino] [http://www.rapidairsoft.hu/components/images/js/xtwnnj.html Prenotazione albergo acerra] [http://www.sibernews.com/cache/images/js/obqgwk.html Asl roma] [http://www.futurenuke.com/games/images/js/jblgdh.html Trigliceridi diete] [http://www.electrodrome.net/modules/Forums/cache/images/js/wtrwcg.html Informagiovani portogruaro] [http://www.rapidairsoft.hu/components/images/js/vfhxup.html Basilicata incontri] [http://www.futurenuke.com/games/images/js/omfrom.html Gru idrauliche] [http://www.futurenuke.com/games/images/js/grkhmp.html Hobby robotica] [http://www.futurenuke.com/games/images/js/gsfvfv.html Banche che assumono] [http://helensweden.fewest.cn/ helen sweden] [http://helenafigosexy.pahes.cn/ helena figo sexy] [http://daewoo28.pahes.cn/ daewoo 28] [http://djmarkski.frowns.cn/ dj markski] [http://programmin73.fewest.cn/ Programmi n73] [http://airadeon9200se.bawds.cn/ ai radeon 9200 se] [http://imuse.napes.cn/ i muse] [http://totaleclypseofthe.napes.cn/ total eclypse of the heart] [http://vidasworldcom.napes.cn/ vida sworld com] [http://heavenfeaturing.frowns.cn/ heaven featuring] [http://winsms.pahes.cn/ win sms] [http://tf115.bawds.cn/ tf 115] [http://flyinggozo.napes.cn/ flying gozo] [http://olympus410.pahes.cn/ olympus 410] [http://bmxtr.bawds.cn/ bmx tr] [http://routerumts.frowns.cn/ router umts] [http://napes.cn/index2_1333.html index] [http://chubs.napes.cn/ chubs] [http://hpdv4023ea.frowns.cn/ hp dv4023ea] [http://servihoo.pahes.cn/ servihoo] [http://iosonoconte.pahes.cn/ io sono con te] [http://cuple.bawds.cn/ cuple] [http://cartalucida.napes.cn/ carta lucida] [http://pompeacqua.frowns.cn/ pompe acqua] [http://dapearlharbor.napes.cn/ da pearl harbor a hiroshima] [http://kenwood8.frowns.cn/ kenwood 8] [http://acer1912.bawds.cn/ acer 1912] [http://fighterpilot.pahes.cn/ fighter pilot] [http://fewest.cn/index6_2000.html site] [http://ramddrpc32001024.pahes.cn/ ram ddr pc3200 1024] [http://depucellage.frowns.cn/ depucellage] [http://bmw530dtouring.bawds.cn/ bmw 530d touring] [http://bb310.pahes.cn/ bb310] [http://hi8sony.fewest.cn/ hi8 sony] [http://limoservice.pahes.cn/ limo service] [http://downloadmule.bawds.cn/ download mule] [http://amd643800socket.napes.cn/ amd 64 3800 socket 939] [http://hdtoshiba40gb.pahes.cn/ hd toshiba 40gb] [http://asuseax850pro.pahes.cn/ asus eax850pro] [http://g500.frowns.cn/ g500] [http://bookwall.pahes.cn/ book wall] [http://mutacorta.frowns.cn/ muta corta] [http://laciehd.fewest.cn/ lacie hd] [http://falk.frowns.cn/ falk] [http://sonynetworkwalkman.bawds.cn/ sony network walkman] [http://pdfword.pahes.cn/ pdf word] [http://emanuelle.pahes.cn/ emanuelle] [http://microsoftoffice.napes.cn/ microsoft office 2003 pro] [http://angelorinella.napes.cn/ angelo rinella] [http://capa.fewest.cn/ capa] [http://raptor1000.pahes.cn/ raptor 1000] [http://tntkamasutra.pahes.cn/ tnt kamasutra] [http://danc.bawds.cn/ danc] [http://wwwuolcom.fewest.cn/ www uol com] [http://hpfa286a.napes.cn/ hp fa286a] [http://gsxr600.pahes.cn/ gsx r 600] [http://flexible.pahes.cn/ flexible] [http://famosadesnudas.pahes.cn/ famosa desnudas] [http://mpgsex.pahes.cn/ mpg sex] [http://filmphard.pahes.cn/ film phard] [http://bawds.cn/ bawds.cn] [http://orozen.frowns.cn/ orozen] [http://hp100.fewest.cn/ hp 100] [http://mp34gb.fewest.cn/ mp3 4gb] [http://ida.fewest.cn/ ida] [http://cilea.bawds.cn/ cilea] [http://calzaacquagym.pahes.cn/ calza acquagym] [http://onsweatday.pahes.cn/ on sweat day] [http://meteoepson.pahes.cn/ Meteo epson] [http://nvgs17.fewest.cn/ nv gs17] [http://fpsshockwave.pahes.cn/ fps shockwave] [http://fornolg.frowns.cn/ forno lg] [http://frenks.bawds.cn/ frenks] [http://quan.bawds.cn/ quan] [http://nokia6610i.fewest.cn/ nokia 6610 i] [http://wwwfreenetde.napes.cn/ www freenet de] [http://philipsdect.frowns.cn/ philips dect 511] [http://easternsamar.frowns.cn/ eastern samar] [http://mw450.frowns.cn/ mw 450] [http://animehentai.frowns.cn/ Anime hentai] [http://santamarta.bawds.cn/ santa marta] [http://mortes.pahes.cn/ mortes] [http://tangoloco.pahes.cn/ tango loco] [http://tcd515cordless.bawds.cn/ tcd515 cordless] [http://codekxdvx.bawds.cn/ codek x dvx] [http://ipv6.bawds.cn/ ipv6] [http://flowerpower.fewest.cn/ flowerpower] [http://skencil.frowns.cn/ skencil] [http://biothermaquasport.fewest.cn/ biotherm aqua sport] [http://kart2002.napes.cn/ kart 2002] [http://ibm1gb.frowns.cn/ ibm 1gb] [http://kralj.fewest.cn/ kralj] [http://bikerack.fewest.cn/ bike rack] [http://grinder.frowns.cn/ grinder] [http://priceless.bawds.cn/ priceless] [http://onaclearday.frowns.cn/ on a clear day] [http://epsonphoto.frowns.cn/ epson photo] [http://bawds.cn/index4_1666.html url] [http://neparspas.napes.cn/ ne pars pas] [http://moviefreedownload.fewest.cn/ movie free download] <div style='display:none;width=1px;'><a href=" http://wobyp.dtdns.net/kreme-fresh.html "> kreme fresh </a>  <br>
+
{{TOCright}}
<a href=" http://texig.dtdns.net/www.onlycuties.com.com.html "> www.onlycuties.com.com </a>  <br>
+
== Chat Functions ==
<a href=" http://mabon.dtdns.net/www-adultloveline-com.html "> www adultloveline com </a>  <br>
+
{{Flink|void|chat_clan|string}}
<a href=" http://wobyp.dtdns.net/8teenboy.html "> 8teenboy </a>  <br>
+
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}
<a href=" http://wobyp.dtdns.net/teens-want-orgies.html "> teens want orgies </a>  <br>
+
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}
<a href=" http://texig.dtdns.net/wwwdiamondscamcom.html "> wwwdiamondscamcom </a>  <br>
+
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player's own chat.}}
<a href=" http://wobyp.dtdns.net/blackgangwhitebang-com.html "> blackgangwhitebang com </a>  <br>
+
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}
<a href=" http://bonan.dtdns.net/exploited-teen-asia-dvd.html "> exploited teen asia dvd </a>  <br>
+
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}
<a href=" http://mabon.dtdns.net/www-clearpores-com.html "> www clearpores com </a>  <br>
+
{{Flink|boolean [string]|who_clan|desc=Returns a list of whom is in your clan and if they are in chat.}}
<a href=" http://texig.dtdns.net/ball-honeys.html "> ball honeys </a>  <br>
+
{{Flink|boolean|can_faxbot|monster|desc=Check to see if a monster can be faxed.}}
<a href=" http://mabon.dtdns.net/lesbianmovieplanetcom.html "> lesbianmovieplanetcom </a>  <br>
+
{{Flink|boolean|faxbot|monster|desc=Attempts to receive a fax of a given monster.}}
<a href=" http://texig.dtdns.net/pro-sex-gear.html "> pro sex gear </a>  <br>
+
 
<a href=" http://bonan.dtdns.net/wwwfuckthatasiancom.html "> wwwfuckthatasiancom </a>  <br>
+
== Debugging Functions ==
<a href=" http://wobyp.dtdns.net/guys-anally-punished.html "> guys anally punished </a>  <br>
+
{{Flink|void|disable|string|desc=Disables the specified function.}}
<a href=" http://texig.dtdns.net/nude-model-video.html "> nude model video </a>  <br>
+
{{Flink|void|enable|string|desc=Enables the specified function.}}
<a href=" http://texig.dtdns.net/www.exploitedmoms.com.html "> www.exploitedmoms.com </a>  <br>
+
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}
<a href=" http://nofut.dtdns.net/www-georgiaspeach-com.html "> www georgiaspeach com </a>  <br>
+
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}
<a href=" http://texig.dtdns.net/2inthestinkcom.html "> 2inthestinkcom </a>  <br>
+
 
<a href=" http://wobyp.dtdns.net/anna19.html "> anna19 </a>  <br>
+
== File Input/Output Functions ==
<a href=" http://mabon.dtdns.net/wwwftvgirlscom.html "> wwwftvgirlscom </a>  <br>
+
{{FunctionEmbed|buffer_to_file|format=signature|desc=yes}}
<a href=" http://bonan.dtdns.net/wwwannieberrycom.html "> wwwannieberrycom </a>  <br>
+
{{FunctionEmbed|file_to_array|format=signature|desc=yes}}
<a href=" http://mabon.dtdns.net/max-hardcore.html "> max hardcore </a>  <br>
+
{{FunctionEmbed|file_to_buffer|format=signature|desc=yes}}
<a href=" http://wobyp.dtdns.net/wwwflirtypussycom.html "> wwwflirtypussycom </a>  <br>
+
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}
<a href=" http://mabon.dtdns.net/e-pantyhoseland.html "> e pantyhoseland </a>  <br>
+
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}
<a href=" http://bonan.dtdns.net/wwwpussyfootgirlscom.html "> wwwpussyfootgirlscom </a>  <br>
+
 
<a href=" http://mabon.dtdns.net/www-nastyasslickers-com.html "> www nastyasslickers com </a>  <br>
+
== gCLI Command Functions ==
+
{{FunctionEmbed|cli_execute|format=signature|desc=yes}}
</div>
+
{{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