Miscellaneous Functions: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle m moved (ASHRM) Miscellaneous to Miscellaneous over redirect |
imported>StDoodle mNo edit summary |
||
Line 14: | Line 14: | ||
{{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|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|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|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|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|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.}} | {{Flink|float|square_root|float|desc=Returns the square root of the specified value.}} | ||
{{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 18:51, 4 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.
string set_property( 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( string, aggregate )
Saves a map to a tab-delimited text file.
Returns the number of defined keys for the specified aggregate.
void clear( aggregate )
Removes all keys from the specified aggregate.
int random( int )
Generates a random integer between 0 and 1 less than the specified number, inlcusive (produces an error when supplied a value of 1).
int ceil( float )
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).
int floor( float )
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).
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 )
Returns the square root of the specified value.
void disable( string )
Disables the specified function (for debugging purposes).
void enable( string )
Enables the specified function (for debugging purposes).