Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(178 intermediate revisions by 94 users not shown)
Line 1: Line 1:
[http://fotografiaplacido.virekur.info/ fotografia placido] [http://freeanimesexy.twelika.info/ Free anime sexy games] [http://ristorantizona.veroweb.info/ ristoranti zona amatrice ri] [http://twelika.info/index7_250.html site] [http://casertaalberghi.viruke.info/ caserta alberghi e hotel] [http://basiglitter.tyxola.info/ Basi glitter] [http://passidellasalsa.viruke.info/ passi della salsa] [http://monstermelons.twelika.info/ Monster melons] [http://milanoinps.twelika.info/ Milano inps] [http://canonpowershot.virekur.info/ canon powershot g5] [http://bigmelon.tyxola.info/ Big melon] [http://pornoincest.twelika.info/ Porno incest] [http://ostaggisgozzati.uollsi.info/ ostaggi sgozzati] [http://videopornocasalinghi.temnosa.info/ Video porno casalinghi] [http://intrecciomortale.virekur.info/ intreccio mortale] [http://vipsexy.tyxola.info/ Vip sexy] [http://untante.info/index4_666.html map] [http://wwwsexyit.untante.info/ Wwwsexy it] [http://seki20conf10.virekur.info/ seki 20 conf 10 mg] [http://recorderdisk.virekur.info/ recorder disk] [http://annunci69it.tyxola.info/ Annunci69 it] [http://uomin.viruke.info/ uomin] [http://logitechmediadesktop.veroweb.info/ logitech media desktop] [http://chistessobresanta.urgena.info/ chistes sobre santa rosa de lima] [http://agenziaimmobiliare.urgena.info/ agenzia immobiliare studio san martino] [http://scopatadacavallo.temnosa.info/ Scopata da cavallo] [http://tiprost.info/index2_666.html home] [http://untante.info/index3_1000.html map] [http://untante.info/index3_1000.html map] [http://temnosa.info/index1_666.html home] [http://scopataconcavallo.twelika.info/ Scopata con cavallo] [http://scarpamunich.tyxola.info/ Scarpa munich munich scarpa catalogo] [http://pessionfoto.temnosa.info/ Pession foto] [http://agriturismosimao.untante.info/ Agriturismo simao] [http://viruke.info/index7_250.html index] [http://downloadpokemon.twelika.info/ Download pokemon verde foglia] [http://camperducato.uollsi.info/ camper ducato] [http://cartonifamosi.untante.info/ Cartoni famosi xxx] [http://fastmailfastwebit.untante.info/ Fastmailfastwebit] [http://fotomaturegratis.untante.info/ Foto mature gratis] [http://mishaburtonnude.twelika.info/ Misha burton nude] [http://troiescopate.twelika.info/ Troie scopate] [http://fotomadrinude.tiprost.info/ Foto madri nude] [http://leggelotterieetombole.uollsi.info/ legge lotterie e tombole] [http://detrazioniirpef.untante.info/ Detrazioni irpef 2007] [http://downloadgratis.temnosa.info/ Download gratis smorfia napoletana] [http://sibillerauch.viruke.info/ sibille rauch] [http://piastrainduzione.virekur.info/ piastra induzione] [http://sophialorenfake.twelika.info/ Sophia loren fake] [http://paciotti4usabbigliamento.viruke.info/ paciotti 4us abbigliamento uomo] [http://nightforce.viruke.info/ night force] [http://partiturasgratis.veroweb.info/ partituras gratis] [http://decauvillepaul.viruke.info/ decauville paul] [http://libriincd.viruke.info/ libri in cd] [http://falligrossi.viruke.info/ falli grossi] [http://gnoccatravelcom.temnosa.info/ Gnocca travel com] [http://chichiegohan.tiprost.info/ Chichi e gohan porno] [http://mortisullastrada.virekur.info/ morti sulla strada] [http://fideuramit.viruke.info/ fideuram it] [http://tiprost.info/index1_666.html site] [http://cazzicavallo.untante.info/ Cazzi cavallo] [http://decretolegge.veroweb.info/ decreto legge 24 aprile 2001 n 150] [http://gemellidiversi.uollsi.info/ gemelli diversi] [http://mardigrashot.untante.info/ Mardi gras hot] [http://ufficiosavona.veroweb.info/ ufficio savona] [http://comunedimessina.viruke.info/ comune di messina] [http://nuendo.viruke.info/ nuendo] [http://attrezzaturapulizia.untante.info/ Attrezzatura pulizia industriali] [http://fumettipornonaruto.untante.info/ Fumetti porno naruto] [http://spiatesottolagonna.temnosa.info/ Spiate sotto la gonna] [http://pautoscattofica.untante.info/ P autoscatto fica ragazze] [http://lirichesaffo.uollsi.info/ liriche saffo libri] [http://untante.info/index5_666.html site] [http://chiassosexi.twelika.info/ Chiasso sexi] [http://wwwyouporncom.twelika.info/ Www youporn com] [http://diinvestigazione.veroweb.info/ di investigazione] [http://cinziagf5nuda.urgena.info/ cinzia gf5 nuda] [http://codicesorgente.urgena.info/ codice sorgente] [http://capodanno2004agriturismo.untante.info/ Capodanno 2004 agriturismo toscana] [http://untante.info/index0_666.html homepage] [http://donnescopateda.untante.info/ Donne scopate da cavalli] [http://scherzicompleanno.untante.info/ Scherzi compleanno] [http://jessicapolskynaked.tiprost.info/ Jessica polsky naked] [http://cherypornostar.temnosa.info/ Chery pornostar] [http://scrittenomi.twelika.info/ Scritte nomi] [http://soluzionehentai.uollsi.info/ soluzione hentai games] [http://tiprost.info/index3_250.html url] [http://convertthis.uollsi.info/ convertthis] [http://amd643500.virekur.info/ amd64 3500] [http://tiprost.info/index3_250.html url] [http://abitan7uguru.viruke.info/ abit an7 uguru] [http://rimastosolouomo.untante.info/ Rimasto solo uomo offresi] [http://cdporta.veroweb.info/ cd porta] [http://pinzaidrauliche.temnosa.info/ Pinza idrauliche] [http://calciomercatoserie.viruke.info/ Calciomercato serie b] [http://coleridgemaryelizabeth.veroweb.info/ coleridge mary elizabeth] [http://temnosa.info/index3_666.html link] [http://fonderiabronzo.tiprost.info/ Fonderia bronzo] [http://ambulatoriveterinari.veroweb.info/ ambulatori veterinari grosseto] [http://karaokegratis.veroweb.info/ karaoke gratis non me lo so spiegare] [http://www.blackbeltfound.ua.edu/board/images/img/ducin.htm motorola ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/rynosu.htm hydrocodone online] [http://www.bae.ksu.edu/files/library/botile.htm humour ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/zuked.htm xenical online] [http://www.bae.ksu.edu/files/library/ficyri.htm buy ortho] [http://www.blackbeltfound.ua.edu/board/images/img/kulypo.htm free retro ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/seki.htm buy alprazolam] [http://www.blackbeltfound.ua.edu/board/images/img/fipin.htm free latin ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/colejon.htm verizon ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/pore.htm buy buspar] [http://www.blackbeltfound.ua.edu/board/images/img/kiri.htm cheap diflucan] [http://www.blackbeltfound.ua.edu/board/images/img/runu.htm free phone ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/dujo.htm buy lisinopril] [http://www.bae.ksu.edu/files/library/pyjili.htm buy cephalexin] [http://www.bae.ksu.edu/files/library/jywi.htm free sexy ringtones] [http://www.bae.ksu.edu/files/library/xyjub.htm lorazepam online] [http://www.bae.ksu.edu/files/library/nijyfeb.htm tramadol online] [http://www.bae.ksu.edu/files/library/fujot.htm disney ringtones] [http://www.bae.ksu.edu/files/library/cudip.htm sagem ringtones] [http://www.bae.ksu.edu/files/library/tenut.htm cheap buspar] [http://www.blackbeltfound.ua.edu/board/images/img/riry.htm celexa online] [http://www.blackbeltfound.ua.edu/board/images/img/hyne.htm buy venlafaxine] [http://www.bae.ksu.edu/files/library/tijir.htm cheap oxycontin] [http://www.blackbeltfound.ua.edu/board/images/img/kisogun.htm free alcatel ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/joxurut.htm sony ericsson ringtones] [http://www.bae.ksu.edu/files/library/wyzozip.htm free mobile ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/lobusi.htm cheap sibutramine] [http://www.bae.ksu.edu/files/library/befe.htm buy sildenafil] [http://www.bae.ksu.edu/files/library/lewulix.htm alltel ringtones] [http://www.bae.ksu.edu/files/library/pyfo.htm audiovox ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/wuwizil.htm buy propecia] [http://www.blackbeltfound.ua.edu/board/images/img/kufyw.htm ephedra online] [http://www.bae.ksu.edu/files/library/ziliku.htm samsung ringtones] [http://www.bae.ksu.edu/files/library/wegod.htm buy phendimetrazine] [http://www.blackbeltfound.ua.edu/board/images/img/worixez.htm cheap hgh] [http://www.bae.ksu.edu/files/library/ropezu.htm valium online] [http://www.bae.ksu.edu/files/library/beju.htm fioricet] [http://www.blackbeltfound.ua.edu/board/images/img/gydyx.htm cheap flexeril] [http://www.blackbeltfound.ua.edu/board/images/img/suko.htm true ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/kyvobu.htm free vocal ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/lywese.htm tmobile ringtones] [http://www.bae.ksu.edu/files/library/fobi.htm t-mobile ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/togihur.htm free metal ringtones] [http://www.bae.ksu.edu/files/library/tudi.htm vardenafil online] [http://www.blackbeltfound.ua.edu/board/images/img/lele.htm voice ringtones] [http://www.bae.ksu.edu/files/library/ruro.htm animal ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/pyni.htm phendimetrazine online] [http://www.bae.ksu.edu/files/library/nede.htm cheap levitra] [http://www.blackbeltfound.ua.edu/board/images/img/dudu.htm free cool ringtones] [http://www.bae.ksu.edu/files/library/dilijef.htm wwe ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/dolyk.htm fluoxetine online] [http://www.bae.ksu.edu/files/library/civocez.htm amitriptyline] [http://www.blackbeltfound.ua.edu/board/images/img/tefid.htm buy nexium] [http://www.blackbeltfound.ua.edu/board/images/img/wonyco.htm free disney ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/gitituh.htm punk ringtones] [http://www.bae.ksu.edu/files/library/rokugup.htm cheap ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/vokytur.htm free cricket ringtones] [http://www.bae.ksu.edu/files/library/cozi.htm propecia] [http://www.blackbeltfound.ua.edu/board/images/img/dijep.htm techno ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/jigic.htm free cellphone ringtones] [http://www.bae.ksu.edu/files/library/tonupu.htm buy xenical] [http://www.bae.ksu.edu/files/library/nogu.htm azithromycin online] [http://www.bae.ksu.edu/files/library/zylybu.htm techno ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/cewe.htm codeine] [http://www.blackbeltfound.ua.edu/board/images/img/rokybe.htm atenolol] [http://www.bae.ksu.edu/files/library/doze.htm free tmobile ringtones] [http://www.bae.ksu.edu/files/library/telosef.htm buy ativan] [http://www.blackbeltfound.ua.edu/board/images/img/rypu.htm diazepam] [http://www.blackbeltfound.ua.edu/board/images/img/rybotul.htm vigrx] [http://www.bae.ksu.edu/files/library/syni.htm free cool ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/lutu.htm cialis] [http://www.blackbeltfound.ua.edu/board/images/img/nywesul.htm meridia] [http://www.blackbeltfound.ua.edu/board/images/img/zyfel.htm buy amoxicillin] [http://www.blackbeltfound.ua.edu/board/images/img/wigiw.htm free ringtones] [http://www.bae.ksu.edu/files/library/kecir.htm buy adderall] [http://www.blackbeltfound.ua.edu/board/images/img/guhibo.htm rap ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/buci.htm verizon wireless ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/pykuj.htm midi ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/sywew.htm ionamin online] [http://www.bae.ksu.edu/files/library/tutu.htm cheap celexa] [http://www.bae.ksu.edu/files/library/vuwibor.htm cheap norvasc] [http://www.bae.ksu.edu/files/library/cesufyl.htm motorola ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/nigu.htm free sony ringtones] [http://www.bae.ksu.edu/files/library/foze.htm drugs] [http://www.blackbeltfound.ua.edu/board/images/img/wyjubin.htm buy ultracet] [http://www.bae.ksu.edu/files/library/tylysi.htm voice ringtones] [http://www.bae.ksu.edu/files/library/lybixu.htm cheap diovan] [http://www.bae.ksu.edu/files/library/tosiny.htm cheap prozac] [http://www.bae.ksu.edu/files/library/ketub.htm mp3 ringtones] [http://www.bae.ksu.edu/files/library/wusulit.htm buy metformin] [http://www.bae.ksu.edu/files/library/jurixet.htm cheap zovirax] [http://www.blackbeltfound.ua.edu/board/images/img/cycycow.htm buy zithromax] [http://www.bae.ksu.edu/files/library/velofo.htm philips ringtones] [http://www.bae.ksu.edu/files/library/hedib.htm sprint ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/fixupus.htm free downloadable ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/rocu.htm cyclobenzaprine online] [http://www.blackbeltfound.ua.edu/board/images/img/cupyjil.htm darvocet online] [http://www.bae.ksu.edu/files/library/boxewoj.htm country ringtones] [http://www.blackbeltfound.ua.edu/board/images/img/doxyg.htm buy diethylpropion] [http://www.bae.ksu.edu/files/library/tygezo.htm free midi ringtones] == 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