Difference between revisions of "Miscellaneous Functions"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>Grotfang
m
Line 10: Line 10:
 
{{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|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}
 
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}
 
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}
{{Flink|boolean|map_to_file|string|aggregate|desc=Saves a map to a tab-delimited text file.}}
+
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}
 
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}
 
{{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.}}
 
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}
 
{{Flink|void|disable|string|desc=Disables the specified function (for debugging purposes).}}
 
{{Flink|void|disable|string|desc=Disables the specified function (for debugging purposes).}}
 
{{Flink|void|enable|string|desc=Enables the specified function (for debugging purposes).}}
 
{{Flink|void|enable|string|desc=Enables the specified function (for debugging purposes).}}

Revision as of 23:58, 10 March 2010

void abort( [string] )

Aborts the current script with an optional message.

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.

boolean cli_execute( string )

Executes the given command as if it were entered into the CLI.

void wait( int )

Sleeps for the specified number of seconds.

string get_property( string )

Gets a global or user preference as appropriate.

void set_property( string, string )

Sets a global or user preference as appropriate.

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).

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.

int count( aggregate )

Returns the number of defined keys for the specified aggregate.

void clear( aggregate )

Removes all keys from the specified aggregate.

void disable( string )

Disables the specified function (for debugging purposes).

void enable( string )

Enables the specified function (for debugging purposes).