Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(182 intermediate revisions by 96 users not shown)
Line 1: Line 1:
[http://bluejumper.50webs.com/library/http-vnn.htm http vnn vn] [http://dartferrish.50webs.com/text/la-pista1.htm la pista di fuoco] [http://hotsss.50webs.com/lib/costruzioni-metalliche1.htm costruzioni metalliche roma] [http://burgysa.50webs.com/html/orario-trenitalia.htm orario trenitalia] [http://entropiaazul.50webs.com/description/foot-job/ foot job] [http://0rgan1sm.50webs.com/html/quand-on1.htm quand on a que l amour] [http://hillsfire.50webs.com/styles/galati/ galati] [http://fliwersiolla.50webs.com/topic/www-permesola.htm www permesola com] [http://annika84.50webs.com/new/lettore-memory12.htm lettore memory per tv] [http://0rgan1sm.50webs.com/html/style-xp1.htm style xp] [http://annika84.50webs.com/new/perdonate-il.htm perdonate il mio passato] [http://zepinookdy.50webs.com/content/victim.htm victim] [http://keepersouha.50webs.com/styles/giallo-calzature.htm giallo calzature] [http://keepersouha.50webs.com/styles/agriturismo-siena.htm agriturismo siena] [http://bluejumper.50webs.com/library/coreane.htm coreane] [http://sbroadway.50webs.com/library/midi-eiffel.htm midi eiffel 65] [http://odreamer.50webs.com/lib/ford-mondeo4/ ford mondeo 1996] [http://burgysa.50webs.com/html/idro-lago.htm idro lago d] [http://burgysa.50webs.com/html/foto-incidente.htm foto incidente] [http://mriversong.50webs.com/library/golf-tdi10/ golf tdi 140cv] [http://keepersouha.50webs.com/styles/www-staffservice.htm www staffservice it] [http://zepinookdy.50webs.com/content/dvd-eagles.htm dvd eagles] [http://princes.50webs.com/html/www-pubblicita/ www pubblicita it] [http://princes.50webs.com/html/nissan-micra16/ nissan micra milano] [http://burgysa.50webs.com/html/sciroppate.htm sciroppate] [http://annika84.50webs.com/new/valentino-abbigliamento.htm valentino abbigliamento] [http://dinnerlove.50webs.com/topic/margherita-e/ margherita e la strana famiglia] [http://zepinookdy.50webs.com/content/www-morte1.htm www morte com br] [http://sbroadway.50webs.com/library/lacie-hard20.htm lacie hard disk 500] [http://bluejumper.50webs.com/library/voli-low10.htm voli low cost catania] [http://dinnerlove.50webs.com/topic/wifi-/ wifi 802 11g] [http://fliwersiolla.50webs.com/topic/sanaag.htm sanaag] [http://dinnerlove.50webs.com/topic/panasonic-nv16/ panasonic nv 250 gs] [http://0rgan1sm.50webs.com/html/immagini-di53.htm immagini di cartoni sexy] [http://sbroadway.50webs.com/library/rover-16.htm rover 75 2 0 cdti] [http://0rgan1sm.50webs.com/html/stampanti-laser35.htm stampanti laser fronteretro] [http://annika84.50webs.com/new/linksys-modem.htm linksys modem router adsl] [http://keepersouha.50webs.com/styles/hp-laserjet37.htm hp laserjet 1200 toner] [http://burgysa.50webs.com/html/il-mito2.htm il mito di prometeo] [http://fliwersiolla.50webs.com/topic/esami-di3.htm esami di idoneita] [http://shmarodral.50webs.com/content/palmato/ palmato] [http://dinnerlove.50webs.com/topic/bad-kleinkirchheim1/ bad kleinkirchheim] [http://princes.50webs.com/html/flash-cartoni/ flash cartoni] [http://entropiaazul.50webs.com/description/alpha-test/ alpha test] [http://dinnerlove.50webs.com/topic/secce/ secce] [http://bluejumper.50webs.com/library/palmare-mio6.htm palmare mio 168] [http://sbroadway.50webs.com/library/jaguar-x6.htm jaguar x type 30] [http://zepinookdy.50webs.com/content/gigi-dag.htm gigi dag] [http://princes.50webs.com/html/trasmissione-infrazioni/ trasmissione infrazioni stradali] [http://fliwersiolla.50webs.com/topic/tesine-esame2.htm tesine esame di maturita] [http://mriversong.50webs.com/library/marcomasini-it/ marcomasini it] [http://0rgan1sm.50webs.com/html/ancient-seal.htm ancient seal] [http://keepersouha.50webs.com/styles/cisco-ip1.htm cisco ip phone 7920] [http://burgysa.50webs.com/html/rocha-dipartimento.htm rocha (dipartimento)] [http://annika84.50webs.com/new/www-webe.htm www webe com] [http://princes.50webs.com/html/jvc-gr15/ jvc gr pd1] [http://odreamer.50webs.com/lib/presento-black/ presento black] [http://mriversong.50webs.com/library/chic-live/ chic live at the budokan] [http://tangriel.50webs.com/resources/kun-fu1/ kun fu fighter] [http://dinnerlove.50webs.com/topic/freecom-fhd4/ freecom fhd 4] [http://zepinookdy.50webs.com/content/bmw-tv.htm bmw tv] [http://keepersouha.50webs.com/styles/la-donna46.htm la donna di sabbia] [http://zepinookdy.50webs.com/content/thoshiba-satellite.htm thoshiba satellite] [http://tangriel.50webs.com/resources/cyndi-lauper/ cyndi lauper] [http://dartferrish.50webs.com/text/martial-dauvergne.htm martial dauvergne o de paris] [http://dartferrish.50webs.com/text/photosmart-2.htm photosmart 850 hp] [http://entropiaazul.50webs.com/description/gioki-gratis/ gioki gratis] [http://dinnerlove.50webs.com/topic/ogeday/ ogeday] [http://fliwersiolla.50webs.com/topic/codici-fan.htm codici fan seca] [http://odreamer.50webs.com/lib/kapsberger/ kapsberger] [http://keepersouha.50webs.com/styles/the-ritchie.htm the ritchie family] [http://mriversong.50webs.com/library/coppia-in/ coppia in prova] [http://odreamer.50webs.com/lib/logitech-tastiera3/ logitech tastiera mouse cordless modello] [http://dinnerlove.50webs.com/topic/ventole-verax/ ventole verax] [http://shmarodral.50webs.com/content/hostes-ragazze/ hostes ragazze] [http://keepersouha.50webs.com/styles/fotos-de82.htm fotos de putas peruanas] [http://zepinookdy.50webs.com/content/grati.htm grati 441] [http://fliwersiolla.50webs.com/topic/athlon-fx3.htm athlon fx 55] [http://zepinookdy.50webs.com/content/my-immortal7.htm my immortal evanescence spartito] [http://hotsss.50webs.com/lib/homind.htm homind] [http://hotsss.50webs.com/lib/viaggi-conchiglia.htm viaggi conchiglia] [http://bluejumper.50webs.com/library/rughe-viso.htm rughe viso] [http://zepinookdy.50webs.com/content/foto-piede1.htm foto piede vip] [http://annika84.50webs.com/new/assicurazione-livigno.htm assicurazione livigno] [http://mriversong.50webs.com/library/nuova-audi17/ nuova audi a3 sportback benzina auto] [http://princes.50webs.com/html/sexbaby/ sexbaby] [http://dinnerlove.50webs.com/topic/madonna-frozen/ madonna frozen] [http://annika84.50webs.com/new/mutuo-.htm mutuo 30 anno] [http://0rgan1sm.50webs.com/html/missione-sicurezza.htm missione sicurezza] [http://hotsss.50webs.com/lib/ex-ragazza2.htm ex ragazza eamon] [http://tangriel.50webs.com/resources/telegatto/ telegatto] [http://zepinookdy.50webs.com/content/lucca-dirisio.htm lucca dirisio] [http://annika84.50webs.com/new/giu-dai.htm giu dai colli] [http://princes.50webs.com/html/mercedes-ml12/ mercedes ml 400 cdi] [http://burgysa.50webs.com/html/cassette-walkman.htm cassette walkman] [http://princes.50webs.com/html/attivita-sessuale/ attivita sessuale] [http://hotsss.50webs.com/lib/film-scandalo.htm film scandalo] [http://fliwersiolla.50webs.com/topic/il-calendario4.htm il calendario piu bello] [http://sbroadway.50webs.com/library/midi-zucchero.htm midi zucchero] [http://hotsss.50webs.com/lib/gabry-ponte12.htm gabry ponte mister] [http://fliwersiolla.50webs.com/topic/cartesio-coop.htm cartesio coop] [http://shmarodral.50webs.com/content/testi-spartiti1/ testi spartiti] [http://hotsss.50webs.com/lib/blunt-il.htm blunt il quarto uomo] [http://shmarodral.50webs.com/content/fotocamera-nikon2/ fotocamera nikon coolpix s2] [http://fliwersiolla.50webs.com/topic/testaccio.htm testaccio] [http://tangriel.50webs.com/resources/senha-para/ senha para registrar brasfoot] [http://keepersouha.50webs.com/styles/tesi-lotte.htm tesi lotte di razza] [http://odreamer.50webs.com/lib/foto-rubate2/ foto rubate donne nude] [http://fliwersiolla.50webs.com/topic/lcd-78.htm lcd 14 televisore] [http://sbroadway.50webs.com/library/fiche-la.htm fiche la barca va] [http://burgysa.50webs.com/html/benny-benasi2.htm benny benasi california] [http://bluejumper.50webs.com/library/logitech-13.htm logitech  lx cordless 300] [http://sbroadway.50webs.com/library/didle.htm didle] [http://sbroadway.50webs.com/library/maglie-donna.htm maglie donna] [http://keepersouha.50webs.com/styles/creme-per.htm creme per aumentare pene] [http://0rgan1sm.50webs.com/html/pitt-brad.htm pitt brad] [http://princes.50webs.com/html/tu-eres3/ tu eres mi luz] [http://tangriel.50webs.com/resources/tv-color25/ tv color lcd 1024 x] [http://burgysa.50webs.com/html/raimi.htm raimi] [http://bluejumper.50webs.com/library/www-esami6.htm www esami computer ecdl it] [http://dartferrish.50webs.com/text/accustic-art.htm accustic art] [http://fliwersiolla.50webs.com/topic/www-euro3.htm www euro com] [http://mriversong.50webs.com/library/arredamento-videoteca/ arredamento videoteca] [http://keepersouha.50webs.com/styles/amd-49.htm amd 64 winchester] [http://dartferrish.50webs.com/text/viva-.htm viva 60 70 80 vari cd musicali] [http://burgysa.50webs.com/html/guta-sorina.htm guta sorina] [http://bluejumper.50webs.com/library/fontenaylecomte.htm fontenaylecomte] [http://zepinookdy.50webs.com/content/targus-sport.htm targus sport] [http://hotsss.50webs.com/lib/monitor-tv11.htm monitor tv e lettore dvd per auto] [http://keepersouha.50webs.com/styles/webct-edu.htm webct edu] [http://mriversong.50webs.com/library/lcd-panasonic2/ lcd panasonic viera] [http://keepersouha.50webs.com/styles/drygalski-erich.htm drygalski erich von] [http://hillsfire.50webs.com/styles/trucchi-e1/ trucchi e soluzioni] [http://entropiaazul.50webs.com/description/eros-solo/ eros solo ieri] [http://hotsss.50webs.com/lib/canzano.htm canzano] [http://entropiaazul.50webs.com/description/california-mp/ california mp3] [http://annika84.50webs.com/new/da-bin.htm da bin] [http://keepersouha.50webs.com/styles/timex.htm timex 1440] [http://entropiaazul.50webs.com/description/over-the11/ over the hills] [http://dartferrish.50webs.com/text/lamica.htm lamica] [http://keepersouha.50webs.com/styles/il-dopoguerra.htm il dopoguerra e la crisi del 29] [http://odreamer.50webs.com/lib/porsche-speedster1/ porsche speedster 1989] [http://bluejumper.50webs.com/library/alfa-sportwagon.htm alfa sportwagon] [http://burgysa.50webs.com/html/webcam-per3.htm webcam per notebook] [http://shmarodral.50webs.com/content/rudolf-keller1/ rudolf keller srl] [http://zepinookdy.50webs.com/content/annunci-fiat.htm annunci fiat punto] [http://burgysa.50webs.com/html/fiche-rosse.htm fiche rosse] [http://entropiaazul.50webs.com/description/foto-pirati/ foto pirati dei caraibi] [http://hillsfire.50webs.com/styles/divx-pro1/ divx pro 511] [http://zepinookdy.50webs.com/content/panasonic-dvd6.htm panasonic dvd vhs] [http://entropiaazul.50webs.com/description/in-tutti6/ in tutti i miei giorni mid] [http://mriversong.50webs.com/library/pioneer-kit/ pioneer kit home theatre con dvd] [http://fliwersiolla.50webs.com/topic/amplificatori-home2.htm amplificatori home theatre] [http://hotsss.50webs.com/lib/cimice-dei.htm cimice dei letti] [http://annika84.50webs.com/new/stefano-dionisio.htm stefano dionisio] [http://zepinookdy.50webs.com/content/megane-station.htm megane station wagon] [http://annika84.50webs.com/new/hauppauge-wintv7.htm hauppauge wintv nova ci] [http://odreamer.50webs.com/lib/dolce-e23/ dolce e gabbana accessori uomo] [http://burgysa.50webs.com/html/costumi-calzedonia.htm costumi calzedonia] [http://mriversong.50webs.com/library/s-adamo/ s adamo] [http://hillsfire.50webs.com/styles/smeg-lavatrice1/ smeg lavatrice incasso] [http://odreamer.50webs.com/lib/alices-adventures/ alices adventures in wonderland] [http://mriversong.50webs.com/library/maria-callas2/ maria callas la callas toujours paris 1958] [http://bluejumper.50webs.com/library/testina-per.htm testina per giradischi] [http://princes.50webs.com/html/interessi-mutuo/ interessi mutuo] [http://hotsss.50webs.com/lib/palma.htm palma 223] [http://bluejumper.50webs.com/library/monitor-samsung18.htm monitor samsung lcd tv] [http://bluejumper.50webs.com/library/aeg-t.htm aeg t2 5] [http://burgysa.50webs.com/html/lettino-cucciolo.htm lettino cucciolo] [http://0rgan1sm.50webs.com/html/masterizzatore-dvd41.htm masterizzatore dvd duallayer] [http://dinnerlove.50webs.com/topic/testo-tommy/ testo tommy vee stai] [http://mriversong.50webs.com/library/van-halen1/ van halen love walk ins] [http://odreamer.50webs.com/lib/perret-jacques/ perret jacques] [http://sbroadway.50webs.com/library/libri-gratis.htm libri gratis e book on line in rete] [http://mriversong.50webs.com/library/cd-raf/ cd raf] [http://odreamer.50webs.com/lib/il-testo10/ il testo di a chi mi dice] [http://dartferrish.50webs.com/text/blof-counting1.htm blof counting crows] [http://princes.50webs.com/html/baldan-bembo1/ baldan bembo amico e] [http://burgysa.50webs.com/html/la-fuga3.htm la fuga degli angeli] [http://dartferrish.50webs.com/text/devil-s1.htm devil s trill] [http://mriversong.50webs.com/library/fotografie-nudi/ fotografie nudi] [http://shmarodral.50webs.com/content/ncaa-football/ ncaa football 98] [http://shmarodral.50webs.com/content/ritiro-libri/ ritiro libri usati] [http://zepinookdy.50webs.com/content/gessica-gusi1.htm gessica gusi] [http://odreamer.50webs.com/lib/il-11/ il  motocross braap  braap] [http://keepersouha.50webs.com/styles/sergio-francardo.htm sergio francardo] [http://keepersouha.50webs.com/styles/arredamento-giardino2.htm arredamento giardino modena] [http://odreamer.50webs.com/lib/mp-album/ mp3 album] [http://sbroadway.50webs.com/library/cellulare-alcatel.htm cellulare alcatel] [http://fliwersiolla.50webs.com/topic/callofduty.htm callofduty] [http://burgysa.50webs.com/html/seagate-barracuda12.htm seagate barracuda ncq] [http://fliwersiolla.50webs.com/topic/auto-noleggio124.htm auto noleggio chioggia] [http://annika84.50webs.com/new/x-files16.htm x files stagione 4 vol 01] [http://hotsss.50webs.com/lib/qtek-s9.htm qtek s100 caricabatteria] [http://dartferrish.50webs.com/text/giotto-it.htm giotto it] [http://odreamer.50webs.com/lib/chat-con5/ chat con chicas de la india] [http://dartferrish.50webs.com/text/ula-ula1.htm ula ula] [http://0rgan1sm.50webs.com/html/michel-viety.htm michel viety] [http://shmarodral.50webs.com/content/silvestrone-mario/ silvestrone mario] [http://annika84.50webs.com/new/caricatore-accendisigari.htm caricatore accendisigari] <div style='display:none;width=1px;'><a href="http://local_ftd_florists.opredo.info/FcjOAypB6qOR.html" > local ftd florists </a>  <br>
+
{{TOCright}}
<a href="http://stairlifts_for_less.opredo.info/x9MfK1SWysZd.html" > stairlifts for less </a>  <br>
+
== Chat Functions ==
<a href="http://best_gambling_sites.opredo.info/2nHIpj4lBO6z.html" > best gambling sites </a>  <br>
+
{{Flink|void|chat_clan|string}}
<a href="http://best_prices_on_zyrtec.opredo.info/D5e4OUZmk3Mk.html" > best prices on zyrtec </a>  <br>
+
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}
<a href="http://generic_geodon.opredo.info/hoVwz4fpvcZ5.html" > generic geodon </a>  <br>
+
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}
<a href="http://best_prices_on_propecia.opredo.info/5aet15rK7zQX.html" > best prices on propecia </a>  <br>
+
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player's own chat.}}
<a href="http://atlantic_security_inc.opredo.info/QwJnSFGtgS9v.html" > atlantic security inc </a>  <br>
+
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}
<a href="http://low_cost__pain_medication.opredo.info/w9aUsMllSTmh.html" > low cost  pain medication </a>  <br>
+
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}
<a href="http://sandy_utah_realtors.opredo.info/daCgpO5yFc9g.html" > sandy utah realtors </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://residential_appliances.opredo.info/wPt1OJRabxcu.html" > residential appliances </a>  <br>
+
{{Flink|boolean|can_faxbot|monster|desc=Check to see if a monster can be faxed.}}
<a href="http://sandy_utah_realtors.opredo.info/0AMiPMIaORdK.html" > sandy utah realtors </a>  <br>
+
{{Flink|boolean|faxbot|monster|desc=Attempts to receive a fax of a given monster.}}
<a href="http://stairlifts_for_less.opredo.info/5PaXBS8hfDVW.html" > stairlifts for less </a>  <br>
+
 
<a href="http://mold_aid.opredo.info/WJyXuCgofuwa.html" > mold aid </a>  <br>
+
== Debugging Functions ==
<a href="http://discount_stethoscopes.opredo.info/pK2qDenQNYTl.html" > discount stethoscopes </a>  <br>
+
{{Flink|void|disable|string|desc=Disables the specified function.}}
<a href="http://generic_xenical.opredo.info/InBwToQ6Vse5.html" > generic xenical </a>  <br>
+
{{Flink|void|enable|string|desc=Enables the specified function.}}
<a href="http://discount_stethoscopes.opredo.info/DjAYu9quSfEh.html" > discount stethoscopes </a>  <br>
+
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}
<a href="http://compare_fioricet_prices.opredo.info/Mc9Vtxc6pqvY.html" > compare fioricet prices </a>  <br>
+
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}
<a href="http://residential_appliances.opredo.info/UagEPhsexUzN.html" > residential appliances </a>  <br>
+
 
<a href="http://dataprise_inc.opredo.info/qOUYTgSfmnee.html" > dataprise inc </a>  <br>
+
== File Input/Output Functions ==
<a href="http://home_diagnostics_inc.opredo.info/4rUDiGnJ0wDU.html" > home diagnostics inc </a>  <br>
+
{{FunctionEmbed|buffer_to_file|format=signature|desc=yes}}
<a href="http://best_prices_on_propecia.opredo.info/Uuyw16vitFgU.html" > best prices on propecia </a>  <br>
+
{{FunctionEmbed|file_to_array|format=signature|desc=yes}}
+
{{FunctionEmbed|file_to_buffer|format=signature|desc=yes}}
</div>
+
{{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