Difference between revisions of "Miscellaneous Functions"
imported>StDoodle |
imported>StDoodle |
||
Line 1: | Line 1: | ||
− | = | + | {{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}} |
− | + | {{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|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}} | |
− | Prints | + | {{Flink|void|wait|int|desc=Sleeps for the specified number of seconds.}} |
− | + | {{Flink|string|get_property|string|desc=Gets a global or user preference as appropriate.}} | |
− | + | {{Flink|string|set_property|string|desc=Sets a global or user preference as appropriate.}} | |
− | Prints | + | {{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for [[batch_close|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|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}} | |
− | Prints | + | {{Flink|boolean|map_to_file|string|aggregate|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|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}} | |
− | Executes the given command as if it were entered into the | + | {{Flink|int|random|int|desc=Generates a random integer between 0 and 1 less than the specified number, inlcusive (produces an error when supplied a value of 1).}} |
− | + | {{Flink|int|ceil|float|desc=Returns the next highest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0). | |
− | + | {{Flink|int|floor|float|desc=Returns the next lowest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0). | |
− | + | {{Flink|int|truncate|float|desc=Returns the decimal-stripped value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0). | |
− | + | {{Flink|float|square_root|float|desc=Returns the square root of the specified value.}} | |
− | Sleeps for | + | {{Flink|void|disable|string|desc=Disables the specified function (for debugging purposes).}} |
− | + | {{Flink|void|enable|string|desc=Enables the specified function (for debugging purposes).}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | boolean map_to_file | ||
− | |||
− | |||
− | |||
− | Generates a random integer between 0 and ( | ||
− | |||
− | |||
− | int floor | ||
− | |||
− | int truncate | ||
− | Returns | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 18:46, 4 March 2010
void abort( [string] )
void print( string, [string] )
void print_html( string )
void logprint( string )
boolean cli_execute( string )
void wait( int )
string get_property( string )
string set_property( string )
void batch_open()
boolean batch_close()
boolean file_to_map( string, aggregate )
boolean map_to_file( string, aggregate )
void clear( aggregate )
int random( int )
{{Flink|int|ceil|float|desc=Returns the next highest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0). {{Flink|int|floor|float|desc=Returns the next lowest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0). {{Flink|int|truncate|float|desc=Returns the decimal-stripped value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0).
float square_root( float )
void disable( string )
void enable( string )