Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
(Add "gCLI Command Functions" section)
 
(283 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[http://wc1.worldcrossing.com/WebX/.1de609dc albuterol online] [http://wc1.worldcrossing.com/WebX/.1de60a2e cheap xanax] [http://news.engin.brown.edu/forums/thread-view.asp?tid=156 fioricet] [http://wc1.worldcrossing.com/WebX/.1de60a10 cheap didrex] [http://wc1.worldcrossing.com/WebX/.1de60a35 verizon ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=176 ultracet online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=356 free tracfone ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=92&forum=13 cheap clomid] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=344 ativan] [http://news.engin.brown.edu/forums/thread-view.asp?tid=155 buy xanax] [http://news.engin.brown.edu/forums/thread-view.asp?tid=178 buy nexium] [http://wc1.worldcrossing.com/WebX/.1de60a04 free sonyericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=182 cheap clomid] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=82&forum=13 adipex online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=343 cialis] [http://news.engin.brown.edu/forums/thread-view.asp?tid=170 cheap hydrocodone] [http://news.engin.brown.edu/forums/thread-view.asp?tid=169 levitra online] [http://wc1.worldcrossing.com/WebX/.1de609f3 free midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=111&forum=13 lisinopril online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=224 wwe ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=153 phentermine online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=147&forum=13 tracfone ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=181 sildenafil online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=212 verizon ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=223 free midi ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=335 buy phentermine] [http://wc1.worldcrossing.com/WebX/.1de60a00 cheap rivotril] [http://wc1.worldcrossing.com/WebX/.1de60a0a vicodin online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=187 cheap celexa] [http://wc1.worldcrossing.com/WebX/.1de609eb funny ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=197 flexeril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=105&forum=13 hoodia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=188 cheap tenuate] [http://news.engin.brown.edu/forums/thread-view.asp?tid=180 buy prozac] [http://wc1.worldcrossing.com/WebX/.1de60a05 free sprint ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f9 norco online] [http://wc1.worldcrossing.com/WebX/.1de609f2 meridia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=145&forum=13 sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=96&forum=13 diazepam online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=338 online fioricet] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=358 free mp3 ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a21 paxil online] [http://wc1.worldcrossing.com/WebX/.1de60a31 zanaflex online] [http://wc1.worldcrossing.com/WebX/.1de609de cheap alprazolam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=141&forum=13 cheap soma] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=342 order diazepam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=157&forum=13 wwe ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=161&forum=13 cheap zoloft] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=112&forum=13 lorazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=124&forum=13 norco] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=355 free ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=88&forum=13 carisoprodol online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=360 qwest ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=167 cheap clonazepam] [http://wc1.worldcrossing.com/WebX/.1de60a0e celexa online] [http://wc1.worldcrossing.com/WebX/.1de609e4 cheap clonazepam] [http://wc1.worldcrossing.com/WebX/.1de60a17 lipitor online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=123&forum=13 nokia ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=184 lisinopril online] [http://wc1.worldcrossing.com/WebX/.1de60a24 cheap propecia] [http://wc1.worldcrossing.com/WebX/.1de609f8 nokia ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fd free punk ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=154 buy carisoprodol] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=339 order ultram] [http://wc1.worldcrossing.com/WebX/.1de60a34 sony ericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=202 tracfone ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=199 cheap zyban] [http://news.engin.brown.edu/forums/thread-view.asp?tid=198 hoodia online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=332 cheap tramadol] [http://wc1.worldcrossing.com/WebX/.1de60a1d free cingular ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=107&forum=13 free jazz ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=219 free alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=101&forum=13 flexeril] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=359 nextel ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a15 kyocera ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=363 samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=117&forum=13 motorola ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=346 cheap meridia] [http://wc1.worldcrossing.com/WebX/.1de60a30 cheap xenical] [http://wc1.worldcrossing.com/WebX/.1de60a03 sony ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=168 cheap paxil] [http://wc1.worldcrossing.com/WebX/.1de60a01 sagem ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=160 ativan online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=136&forum=13 cheap rivotril] [http://wc1.worldcrossing.com/WebX/.1de609fb ortho online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=89&forum=13 cheap celexa] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=139&forum=13 free sharp ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=163 cheap adipex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=125&forum=13 cheap ortho] [http://wc1.worldcrossing.com/WebX/.1de609ee but hydrocodone] [http://news.engin.brown.edu/forums/thread-view.asp?tid=177 propecia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=91&forum=13 free cingular ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f7 free nextel ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=215 sagem ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=347 adipex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=132&forum=13 punk ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=97&forum=13 buy didrex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=144&forum=13 free sonyericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=179 cheap didrex] [http://news.engin.brown.edu/forums/thread-view.asp?tid=158 cheap diazepam] [http://wc1.worldcrossing.com/WebX/.1de60a25 samsung ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a26 sharp ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=162 meridia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=217 free mono ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=152 cheap valium] [http://wc1.worldcrossing.com/WebX/.1de609ec buy hgh] [http://news.engin.brown.edu/forums/thread-view.asp?tid=205 nextel ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=357 free funny ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=191 lortab online] [http://wc1.worldcrossing.com/WebX/.1de60a2b but ultracet] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=153&forum=13 buy viagra] [http://news.engin.brown.edu/forums/thread-view.asp?tid=183 albuterol] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=349 cheap vicodin] [http://wc1.worldcrossing.com/WebX/.1de60a18 motorola ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f0 lorazepam online] [http://wc1.worldcrossing.com/WebX/.1de60a12 free ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a19 mp3 ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=216 sonyericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=161 viagra online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=95&forum=13 cheap cyclobenzaprine] [http://news.engin.brown.edu/forums/thread-view.asp?tid=192 but vigrx] [http://wc1.worldcrossing.com/WebX/.1de60a0d wwe ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=185 zoloft online] [http://wc1.worldcrossing.com/WebX/.1de609e3 cheap clomid] [http://wc1.worldcrossing.com/WebX/.1de60a13 fioricet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=138&forum=13 free samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=83&forum=13 cheap albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a29 tramadol online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=173 xenical online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=350 online alprazolam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=93&forum=13 cheap clonazepam] [http://news.engin.brown.edu/forums/thread-view.asp?tid=204 mp3 ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=164 cheap norco] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=337 xanax] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=119&forum=13 free mtv ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=206 free qwest ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=151&forum=13 valium online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=140&forum=13 sildenafil online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=162&forum=13 cheap zyban] [http://news.engin.brown.edu/forums/thread-view.asp?tid=166 alprazolam online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=353 levitra online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=333 soma online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=189 cheap ortho] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=159&forum=13 xenical online] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://wc1.worldcrossing.com/WebX/.1de60a23 free polyphonic ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=208 motorola ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a1f lisinopril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=137&forum=13 sagem ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a1b music ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e0 cheap ativan] [http://news.engin.brown.edu/forums/thread-view.asp?tid=229 free jazz ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e5 cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=99&forum=13 free ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a07 tracfone ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=348 norco] [http://wc1.worldcrossing.com/WebX/.1de60a09 cheap viagra] [http://news.engin.brown.edu/forums/thread-view.asp?tid=218 sony ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=121&forum=13 nexium online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=126&forum=13 cheap paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=94&forum=13 free cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=154&forum=13 vicodin online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=108&forum=13 free kyocera ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a14 free jazz ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=210 free sprint ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0f cialis online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=175 cyclobenzaprine online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=200 free nokia ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=352 paxil online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=110&forum=13 cheap lipitor] [http://wc1.worldcrossing.com/WebX/.1de609e6 cyclobenzaprine online] [http://wc1.worldcrossing.com/WebX/.1de60a33 prozac online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=157 cheap ultram] [http://news.engin.brown.edu/forums/thread-view.asp?tid=190 pharmacy online online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=195 cheap rivotril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=143&forum=13 sony ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=100&forum=13 fioricet online] [http://wc1.worldcrossing.com/WebX/.1de60a06 tenuate online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=345 cheap viagra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=135&forum=13 real ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=193 zanaflex online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=115&forum=13 free midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=87&forum=13 ativan online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=351 buy clonazepam] [http://wc1.worldcrossing.com/WebX/.1de60a11 diethylpropion online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=152&forum=13 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ea free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fa free online pharmacy] [http://news.engin.brown.edu/forums/thread-view.asp?tid=151 order soma] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=102&forum=13 free free ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=155&forum=13 vigrx online] [http://wc1.worldcrossing.com/WebX/.1de609f1 cheap lortab] [http://news.engin.brown.edu/forums/thread-view.asp?tid=226 free sony ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0c buy wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=104&forum=13 cheap hgh] [http://news.engin.brown.edu/forums/thread-view.asp?tid=225 kyocera ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=227 ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=118&forum=13 free mp3 ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2c ultram] [http://wc1.worldcrossing.com/WebX/.1de609e1 cheap carisoprodol] == Part 6 - Miscellaneous ==
+
{{TOCright}}
<p><em>Mostly internal stuff. Some good for everyone, some only for ASH wizards.</em></p>
+
== Chat Functions ==
 +
{{Flink|void|chat_clan|string}}
 +
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}
 +
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}
 +
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player's own chat.}}
 +
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}
 +
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}
 +
{{Flink|boolean [string]|who_clan|desc=Returns a list of whom is in your clan and if they are in chat.}}
 +
{{Flink|boolean|can_faxbot|monster|desc=Check to see if a monster can be faxed.}}
 +
{{Flink|boolean|faxbot|monster|desc=Attempts to receive a fax of a given monster.}}
  
<p><strong>void print( string helloworld )</strong><br />
+
== Debugging Functions ==
Prints the given string to the graphical CLI window and to the status line of the main Adventuring window</p>
+
{{Flink|void|disable|string|desc=Disables the specified function.}}
 +
{{Flink|void|enable|string|desc=Enables the specified function.}}
 +
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}
 +
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}
  
<p><strong>boolean cli_execute( string command )</strong><br />
+
== File Input/Output Functions ==
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you
+
{{FunctionEmbed|buffer_to_file|format=signature|desc=yes}}
 +
{{FunctionEmbed|file_to_array|format=signature|desc=yes}}
 +
{{FunctionEmbed|file_to_buffer|format=signature|desc=yes}}
 +
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}
 +
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}
 +
 
 +
== gCLI Command Functions ==
 +
{{FunctionEmbed|cli_execute|format=signature|desc=yes}}
 +
{{FunctionEmbed|cli_execute_output|format=signature|desc=yes}}
 +
 
 +
== Map Management Functions ==
 +
''Note: Information about maps (including creating, assigning, and removing keys, can be found at [[Data Structures#Maps|Map Data Structures]].''
 +
 
 +
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}
 +
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}
 +
 
 +
== Time Functions ==
 +
{{Flink|string|format_date_time|string|string|string|desc=Reformats dates.}}
 +
{{Flink|int|gameday_to_int|desc=Returns the current KoL date as an integer.}}
 +
{{Flink|string|gameday_to_string|desc=Returns the current KoL date as a string.}}
 +
{{Flink|int|gametime_to_int|desc=Returns the current KoL time in ms as an integer.}}
 +
{{Flink|string|now_to_string|string|desc=Returns current local time/date in SimpleDateFormat format.}}
 +
{{Flink|string|time_to_string|desc=Returns the current local time in HH:mm:ss z format.}}
 +
{{Flink|string|today_to_string|desc=Returns the current local day in ISO format.}}
 +
 
 +
== SVN Functions ==
 +
''There is much additional information in the [[SVN Primer]]''.
 +
{{Flink|boolean|svn_exists|string|desc=Returns true if a valid working copy named projectname exists in the svn/ folder.}}
 +
{{Flink|boolean|svn_at_head|string|desc=Returns true if projectname exists, is a valid working copy, and is currently at the same revision number as the repository.}}
 +
{{Flink|record|svn_info|string|desc=Returns a record containing additional information about the given projectname: svnurl, last author, last revision, last change date.}}
 +
 
 +
== User Interaction ==
 +
{{Flink|void|print|string|{{opt|string}}|desc=Prints to CLI and status line of Adventuring window, optionally in a specified color.}}
 +
{{Flink|void|print_html|string|desc=Prints to CLI, parsing any included html.}}
 +
{{Flink|void|logprint|string|desc=Prints to the session log.}}
 +
{{Flink|void|wait|int}}
 +
{{Flink|void|waitq|int|desc=Sleeps for the specified number of seconds.}}
 +
{{Flink|boolean|user_confirm|string|desc=Allows user input in Y/N format.}}
 +
 
 +
== Property Functions ==
 +
{{Flink|boolean [string]|get_all_properties|string|boolean|desc=Returns a map of all user or global properties.}}
 +
{{FunctionEmbed|property_exists|format=signature|desc=yes}}
 +
{{FunctionEmbed|property_has_default|format=signature|desc=yes}}
 +
{{FunctionEmbed|property_default_value|format=signature|desc=yes}}
 +
{{Flink|string|get_property|string}}
 +
{{Flink|string|get_property|string|boolean|desc=Gets a global or user preference as appropriate.}}
 +
{{Flink|void|set_property|string|string|desc=Sets a global or user preference as appropriate.}}
 +
{{FunctionEmbed|remove_property|format=signature|desc=yes}}
 +
{{FunctionEmbed|rename_property|format=signature|desc=yes}}
 +
 
 +
== Other Functions ==
 +
{{FunctionEmbed|abort|format=signature|desc=yes}}
 +
{{FunctionEmbed|all_monsters_with_id|format=signature|desc=yes}}
 +
{{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for {{f|batch_close}} for details).}}
 +
{{Flink|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}
 +
{{Flink|int|get_revision|desc=Returns the current KoLmafia revision number.}}
 +
{{Flink|string|get_version|desc=Returns the most recent KoLmafia version.}}
 +
{{Flink|string|get_player_id|string|desc=Returns the user id number of a given player.}}
 +
{{FunctionEmbed|is_dark_mode|format=signature|desc=yes}}
 +
{{Flink|string|to_json|aggregate|desc=Converts a simple aggregate into JSON.}}
 +
 
 +
Additional functions that are considered not really to be ash functions are available in [[Miscellaneous ASH Features#Special Syntax Functions|Misc ASH Features]]
 +
 
 +
[[Category:Scripting]]

Latest revision as of 14:55, 23 December 2020

Chat Functions

void chat_clan( string )

void chat_clan( string, string )

Sends a message to clan chat.

void chat_macro( string )

Submits a chat macro to KoL.

void chat_notify( string, string )

Sends a notification to the player's own chat.

void chat_private( string, string )

Sends a private message to another player.

boolean is_online( string )

Check to see if a player is online.

boolean [string] who_clan()

Returns a list of whom is in your clan and if they are in chat.

boolean can_faxbot( monster )

Check to see if a monster can be faxed.

boolean faxbot( monster )

Attempts to receive a fax of a given monster.


Debugging Functions

void disable( string )

Disables the specified function.

void enable( string )

Enables the specified function.

buffer load_html( string )

Works like visit_url(), but for debugging.

string make_url( string, boolean, boolean )

Crafts the URL to visit.


File Input/Output Functions

boolean buffer_to_filebuffer, string )

Saves a buffer to a text file. Returns true on success, false on failure.

string [int] file_to_arraystring )

Reads data from a text file and returns a map of strings containing each line.

buffer file_to_bufferstring )

Loads the entire contents of a text file into a buffer.

boolean file_to_map( string, aggregate )

Loads a map from a tab-delimited text file.

boolean map_to_file( aggregate, string )

Saves a map to a tab-delimited text file.


gCLI Command Functions

boolean cli_executestring )

Executes a string as a gCLI command. Returns true on success, false on failure.

string cli_execute_outputstring )

Executes a gCLI command, capturing and returning the gCLI output.

Map Management Functions

Note: Information about maps (including creating, assigning, and removing keys, can be found at Map Data Structures.

int count( aggregate )

Returns the number of defined keys for the specified aggregate.

void clear( aggregate )

Removes all keys from the specified aggregate.


Time Functions

string format_date_time( string, string, string )

Reformats dates.

int gameday_to_int()

Returns the current KoL date as an integer.

string gameday_to_string()

Returns the current KoL date as a string.

int gametime_to_int()

Returns the current KoL time in ms as an integer.

string now_to_string( string )

Returns current local time/date in SimpleDateFormat format.

string time_to_string()

Returns the current local time in HH:mm:ss z format.

string today_to_string()

Returns the current local day in ISO format.


SVN Functions

There is much additional information in the SVN Primer.

boolean svn_exists( string )

Returns true if a valid working copy named projectname exists in the svn/ folder.

boolean svn_at_head( string )

Returns true if projectname exists, is a valid working copy, and is currently at the same revision number as the repository.

record svn_info( string )

Returns a record containing additional information about the given projectname: svnurl, last author, last revision, last change date.


User Interaction

void print( string, [string] )

Prints to CLI and status line of Adventuring window, optionally in a specified color.

void print_html( string )

Prints to CLI, parsing any included html.

void logprint( string )

Prints to the session log.

void wait( int )

void waitq( int )

Sleeps for the specified number of seconds.

boolean user_confirm( string )

Allows user input in Y/N format.


Property Functions

boolean [string] get_all_properties( string, boolean )

Returns a map of all user or global properties.

boolean property_existsstring, boolean? )

Checks whether a property exists.

boolean property_has_defaultstring )

Checks if a property has a built-in default value.

string property_default_valuestring )

Returns the default value of a property, or an empty string if a default value does not exist.

string get_property( string )

string get_property( string, boolean )

Gets a global or user preference as appropriate.

void set_property( string, string )

Sets a global or user preference as appropriate.

string remove_propertystring, boolean? )

Removes or resets a property and returns its previous value.

boolean rename_propertystring, string )

Renames a property. Returns true on success, false on failure.

Other Functions

void abortstring? )

Immediately halts the current script and all queued functions.

boolean [monster] all_monsters_with_id()

Returns a map of all monsters that have a non-zero monster ID.

void batch_open()

Used to mark the beginning of a block of functions to operate in batch mode (see page for batch_close() for details).

boolean batch_close()

Used to mark the end of a block of functions to operate in batch mode (see page for details).

int get_revision()

Returns the current KoLmafia revision number.

string get_version()

Returns the most recent KoLmafia version.

string get_player_id( string )

Returns the user id number of a given player.

boolean is_dark_mode()

Checks if the current KoLmafia theme is dark mode.

string to_json( aggregate )

Converts a simple aggregate into JSON.


Additional functions that are considered not really to be ash functions are available in Misc ASH Features