Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(98 intermediate revisions by 36 users not shown)
Line 1: Line 1:
[http://nutribun.profil.in/resources/bandanas/ bandanas] [http://theiamina.w8w.pl/content/metering.html metering] [http://lord-griever.nightmail.ru/small/jimmy-hoffa/ jimmy hoffa] [http://theunknowntao.profil.bz/styles/namco.html namco] [http://theiamina.w8w.pl/content/american-greeting.html american greeting free ecard] [http://twinkletoeash.profil.bz/topic/trampoline-sales/ trampoline sales] [http://dannyboy2007.profil.cc/directory/usb-cd.html usb cd burner linux] [http://theunknowntao.profil.bz/styles/amsterdam-sin.html amsterdam sin city] [http://kinkyjedi.about.vg/text/dolly-parton/ dolly parton mp3] [http://wwwisevil.profil.bz/lib/ass-latinas/ ass latinas phat] [http://gogenator.friko.pl/library/el-paso/ el paso tx police department] [http://theiamina.w8w.pl/content/bigcocksex.html bigcocksex] [http://amoresperros812.profil.in/text/cheap-package/ cheap package] [http://baler.ugu.pl/new/perkins/ perkins] [http://baler.ugu.pl/new/mortal-third/ mortal third] [http://krisbabe47.ugu.pl/small/eric-carle.html eric carle] [http://gogenator.friko.pl/library/wains-world/ wains world 2] [http://krisbabe47.ugu.pl/small/guerra.html guerra] [http://baler.ugu.pl/new/wholesale-fashion/ wholesale fashion accessories] [http://krisbabe47.ugu.pl/small/catalyst.html catalyst] [http://theiamina.w8w.pl/content/cup.html cup] [http://baler.ugu.pl/new/army-correspondence/ army correspondence course answers] [http://twinkletoeash.profil.bz/topic/ml/ 350ml] [http://krisbabe47.ugu.pl/small/teasing-and.html teasing and denial] [http://theiamina.w8w.pl/content/aol-im.html aol im] [http://yhwhadonai.profil.ms/topic/hotties.html hotties] [http://cah9i.friko.pl/new/early-symptoms/ early symptoms of hiv] [http://baler.ugu.pl/new/young-snatch/ young snatch] [http://nutribun.profil.in/resources/charlton-heston/ charlton heston] [http://nehpetsca.profil.cn/new/protected-area/ protected area] [http://cah9i.friko.pl/new/women-butts/ women butts] [http://cah9i.friko.pl/new/bk-bump/ b2k bump bump bump] [http://krisbabe47.ugu.pl/small/home-equity.html home equity line of credit] [http://theiamina.w8w.pl/content/rockos-modern.html rockos modern life] [http://twinkletoeash.profil.bz/topic/ten-years/ ten years after] [http://gogenator.friko.pl/library/evil-angel/ evil angel] [http://cahert.aboutus.vg/styles/fire-proof/ fire proof safe] [http://theunknowntao.profil.bz/styles/assgm.html assgm] [http://misssakic.profil.ms/data/cheerleader-lesbians.html cheerleader lesbians] [http://closedforlunch.profil.in/obese.html obese] [http://dannyboy2007.profil.cc/directory/giving-good.html giving good head] [http://closedforlunch.profil.in/underage-girls.html underage girls having sex] [http://theiamina.w8w.pl/content/outlaws.html outlaws] [http://theiamina.w8w.pl/content/schusters.html schusters] [http://antilos.profil.in/html/head-shop.html head shop] [http://theunknowntao.profil.bz/styles/arbour-court.html arbour court seattle] [http://krisbabe47.ugu.pl/small/pinay-big.html pinay big] [http://dannyboy2007.profil.cc/directory/lusty-mexican.html lusty mexican girls] [http://silivrenglaur.nm.ru/description/internet-options/ internet options history] [http://silivrenglaur.nm.ru/description/weak-bladder/ weak bladder] [http://krisbabe47.ugu.pl/small/fully-fashioned.html fully fashioned stockings] [http://theiamina.w8w.pl/content/little-tits.html little tits] [http://yhwhadonai.profil.ms/topic/mature-blow.html mature blow job] [http://baler.ugu.pl/new/business-coaching/ business coaching] [http://nehpetsca.profil.cn/new/nude-paradise/ nude paradise hotel] [http://krisbabe47.ugu.pl/small/journal.html journal] [http://thesaucernews.profil.bz/public-records/ public records] [http://cah9i.friko.pl/new/celeb-paparazzi/ celeb paparazzi] [http://gogenator.friko.pl/library/cartoon-sex/ cartoon sex anime] [http://theiamina.w8w.pl/content/xbox.html xbox360] [http://thesaucernews.profil.bz/mowers/ mowers] [http://baler.ugu.pl/new/horny-jocks/ horny jocks] [http://krisbabe47.ugu.pl/small/insurance-lead.html insurance lead life senior] [http://cah9i.friko.pl/new/norton-antivirus/ norton antivirus] [http://wwwisevil.profil.bz/lib/wcw-sting/ wcw sting] [http://antisilence.profil.gs/topic/prevention-program/ prevention program evaluation] [http://cah9i.friko.pl/new/whale/ whale] [http://tersky.profil.bz/library/vermont-real.html vermont real estate] [http://kinkyjedi.about.vg/text/st-christopher/ st christopher medals] [http://baler.ugu.pl/new/meta-tag/ meta tag editor] [http://krisbabe47.ugu.pl/small/clay-walker.html clay walker] [http://baler.ugu.pl/new/drunk-driving/ drunk driving facts] [http://twinkletoeash.profil.bz/topic/shower-favors/ shower favors] [http://antilos.profil.in/html/minute-maid.html minute maid park] [http://cah9i.friko.pl/new/makers-of/ makers of diamond jewellery] [http://amoresperros812.profil.in/text/health-care/ health care] [http://yhwhadonai.profil.ms/topic/baywatch-hawaii.html baywatch hawaii] [http://gogenator.friko.pl/library/theme-from/ theme from robinhood] [http://theiamina.w8w.pl/content/pre-teen.html pre teen nudist beach] [http://wwwisevil.profil.bz/lib/las-vegas/ las vegas wrongful death lawyer] [http://gogenator.friko.pl/library/casio-watch/ casio watch] [http://antisilence.profil.gs/topic/composting/ composting] [http://antisilence.profil.gs/topic/hun/ hun] [http://gogenator.friko.pl/library/jamie-lynn/ jamie lynn spears nude] [http://amoresperros812.profil.in/text/pico-green/ pico green] [http://cah9i.friko.pl/new/nick-j/ nick j] [http://nutribun.profil.in/resources/lasagna-recipes/ lasagna recipes] [http://baler.ugu.pl/new/fingering-lesbians/ fingering lesbians] [http://cahert.aboutus.vg/styles/orgasm-sleep/ orgasm sleep] [http://nutribun.profil.in/resources/wild-party/ wild party girls] [http://dannyboy2007.profil.cc/directory/kohls.html kohls] [http://baler.ugu.pl/new/hack-runescape/ hack runescape character] [http://baler.ugu.pl/new/catfights/ catfights] [http://theunknowntao.profil.bz/styles/best-home.html best home security companies] [http://gogenator.friko.pl/library/hot-girls/ hot girls ass] [http://baler.ugu.pl/new/crock-pot/ crock pot recipes] [http://cah9i.friko.pl/new/hp-ipaq/ hp ipaq] [http://klgrem.aboutus.vg/library/montana-hunting.html montana hunting outfitters] [http://nehpetsca.profil.cn/new/cartoon-donkey/ cartoon donkey] [http://eldritchrainbow.hotmail.ru/library/girls-kissing.html girls kissing teenage] [http://credit-report-repair.com/yg/CSS/data/cache/cjvarw.html time share tour san diego] [http://mesotheliomalaywer.com/yg/CSS/data/touch/ffxpge.html blonde pubic hair] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/hnpcws.html accident lawyer colorado] [http://freeseotips.com/wp-content/themes/classic/cache/rmbuju.html tunisie voyages] [http://freeseotips.com/wp-content/themes/classic/cache/wfxudd.html physical exam stories] [http://mesotheliomalaywer.com/yg/CSS/data/touch/spipvh.html final fantasy and hentai] [http://mesotheliomalaywer.com/yg/CSS/data/touch/mgfnlq.html shareza] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/emrkcb.html big tit movies] [http://mesotheliomalaywer.com/yg/CSS/data/touch/vfgeio.html dmv virginia] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/rdgdvm.html black chick] [http://mesotheliomalaywer.com/yg/CSS/data/touch/ohhbbp.html fresh teen] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lvbmvk.html social security number validation] [http://credit-report-repair.com/yg/CSS/data/cache/mwlvih.html asian sucking] [http://mesotheliomalaywer.com/yg/CSS/data/touch/neixao.html tranny porn] [http://mesotheliomalaywer.com/yg/CSS/data/touch/mitbpp.html anal babe] [http://instantinfocenter.com/CP/images/pic/dnqwir.html pantyhose preteens] [http://freeseotips.com/wp-content/themes/classic/cache/kxnokk.html yamaha jet skis] [http://mesotheliomalaywer.com/yg/CSS/data/touch/rijipa.html girl masterbation] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/wdxlnt.html truck drivers] [http://credit-report-repair.com/yg/CSS/data/cache/kmdqbk.html wimbledon] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/bakhwb.html conflict management] [http://mesotheliomalaywer.com/yg/CSS/data/touch/bqieuu.html topographic maps] [http://mesotheliomalaywer.com/yg/CSS/data/touch/mqmmma.html volcano girls] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/nfdmjb.html zoey101] [http://freeseotips.com/wp-content/themes/classic/cache/gjscxr.html girl teen websites] [http://freeseotips.com/wp-content/themes/classic/cache/jlgivd.html jenny morris music] [http://credit-report-repair.com/yg/CSS/data/cache/eaiijo.html snow screen saver] [http://credit-report-repair.com/yg/CSS/data/cache/ilcvvd.html play times production] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lnixja.html cartoon futurama] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/bmpirx.html tight black ass] [http://instantinfocenter.com/CP/images/pic/wsjcpf.html dune buggy frames] [http://mesotheliomalaywer.com/yg/CSS/data/touch/ppwigr.html watt casey] [http://credit-report-repair.com/yg/CSS/data/cache/sgjeba.html booba] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/pgfewd.html invitation to bid form] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/mkcxlv.html against me] [http://credit-report-repair.com/yg/CSS/data/cache/batqhw.html meade] [http://freeseotips.com/wp-content/themes/classic/cache/tdqbjw.html che] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/qwhrmc.html nail product professional] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lriues.html discount bridesmaid dresses] [http://instantinfocenter.com/CP/images/pic/xccgho.html vinpocetine] [http://credit-report-repair.com/yg/CSS/data/cache/codrfh.html cheating boyfriend] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/cpamvu.html wheel weight chart] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/kvojrq.html an apple a day keeps the doctor] [http://mesotheliomalaywer.com/yg/CSS/data/touch/blfave.html ladies shoes] [http://mesotheliomalaywer.com/yg/CSS/data/touch/mxodkq.html watching wife fuck] [http://freeseotips.com/wp-content/themes/classic/cache/pmcgqs.html lesbians cum] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/mppvsk.html iowa city entertainment] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/oghexw.html peoms] [http://instantinfocenter.com/CP/images/pic/itiqrw.html online sex videos] [http://credit-report-repair.com/yg/CSS/data/cache/japmgj.html pipe cleaning] [http://mesotheliomalaywer.com/yg/CSS/data/touch/wdvwvt.html tony yayo so seductive] [http://mesotheliomalaywer.com/yg/CSS/data/touch/fqlahu.html flag patches] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/tuggmn.html impeach bush] [http://mesotheliomalaywer.com/yg/CSS/data/touch/kquhdx.html batman forever] [http://credit-report-repair.com/yg/CSS/data/cache/cngvfm.html grosgrain ribbon] [http://instantinfocenter.com/CP/images/pic/soxlnf.html oregon labor law posters] [http://mesotheliomalaywer.com/yg/CSS/data/touch/jpxlbo.html now much money for webmasters] [http://instantinfocenter.com/CP/images/pic/hwxswk.html chilli] [http://mesotheliomalaywer.com/yg/CSS/data/touch/rwtecj.html rick warren] [http://freeseotips.com/wp-content/themes/classic/cache/vqehkb.html sign banners] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lgppks.html very young girls masturbating] [http://instantinfocenter.com/CP/images/pic/mwlfow.html male fitness models] [http://freeseotips.com/wp-content/themes/classic/cache/fslnln.html preteen nude lolita] [http://mesotheliomalaywer.com/yg/CSS/data/touch/nwctdu.html englewood colorado real estate] [http://freeseotips.com/wp-content/themes/classic/cache/sdtunm.html mens knee high boots] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/woxvwf.html wanking girls] [http://freeseotips.com/wp-content/themes/classic/cache/hloejd.html pregnant anal] [http://mesotheliomalaywer.com/yg/CSS/data/touch/flhmiq.html tv soap babes] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/ionhdx.html juno email] [http://mesotheliomalaywer.com/yg/CSS/data/touch/ejcvcj.html indian breast] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/bgliie.html cat penis] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lcswlt.html automobile california case law] [http://freeseotips.com/wp-content/themes/classic/cache/hwkxuc.html lips reading program] [http://mesotheliomalaywer.com/yg/CSS/data/touch/kjfchr.html motorway driving lessons] [http://freeseotips.com/wp-content/themes/classic/cache/subwll.html zeno] [http://mesotheliomalaywer.com/yg/CSS/data/touch/vginic.html lia 19] [http://freeseotips.com/wp-content/themes/classic/cache/tkdisi.html teen in panties] [http://mesotheliomalaywer.com/yg/CSS/data/touch/albvie.html older naked women] [http://instantinfocenter.com/CP/images/pic/rgaueq.html catamarans] [http://instantinfocenter.com/CP/images/pic/hwxlbm.html megan mullally] [http://credit-report-repair.com/yg/CSS/data/cache/mitfuh.html free penis] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/wefwia.html lauryn hill] [http://instantinfocenter.com/CP/images/pic/opbvsq.html las vegas nv homes] [http://freeseotips.com/wp-content/themes/classic/cache/jovrbg.html amerie gallery] [http://instantinfocenter.com/CP/images/pic/ofepxo.html first date] [http://freeseotips.com/wp-content/themes/classic/cache/rcaucr.html fucking in the woods] [http://instantinfocenter.com/CP/images/pic/sxfixb.html wet to straight hair] [http://instantinfocenter.com/CP/images/pic/jxjaqf.html van der sloot] [http://freeseotips.com/wp-content/themes/classic/cache/ehgvro.html family fucking incest family fucking] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/gnmsmj.html wet girls] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/davxmg.html lupine] [http://freeseotips.com/wp-content/themes/classic/cache/bionxw.html female glamour models] [http://mesotheliomalaywer.com/yg/CSS/data/touch/cwlehh.html incest stories xxx] [http://instantinfocenter.com/CP/images/pic/trqmvr.html lets get it started black eyed peas] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/fakitk.html map of paris] [http://mesotheliomalaywer.com/yg/CSS/data/touch/eerhdf.html motorcycle stands] [http://instantinfocenter.com/CP/images/pic/hpgcdo.html independence airlines] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/arjoba.html bi girls kissing] [http://credit-report-repair.com/yg/CSS/data/cache/adejks.html pc game controllers] [http://freeseotips.com/wp-content/themes/classic/cache/bhoumg.html innovation] == 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 output )</strong><br />
+
== Debugging Functions ==
<strong>void print( string output, string color )</strong><br />
+
{{Flink|void|disable|string|desc=Disables the specified function.}}
Prints <i>output</i> to the CLI buffer and displays it in the status line of the main Adventuring window.  If <i>color</i> is specified any HTML in <i>output</i> is escaped and the string is wrapped in a font tag before being printed.</p>
+
{{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