Miscellaneous Functions: Difference between revisions
imported>Bale to_json( aggregate ) |
imported>Bale r17892 add a whole lot of property functions! |
||
Line 48: | Line 48: | ||
{{Flink|boolean|user_confirm|string|desc=Allows user input in Y/N format.}} | {{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.}} | |||
{{Flink|boolean| property_exists|string}} | |||
{{Flink|boolean| property_exists|string|boolean|desc=Returns true if the named property exists.}} | |||
{{Flink|boolean| property_has_default|string name|desc=Returns true if the named property in has a default value.}} | |||
{{Flink|string| property_default_value|string name|desc=Returns the default value for a built-in property.}} | |||
{{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.}} | |||
{{Flink|string| remove_property|string}} | |||
{{Flink|string| remove_property|string|boolean|desc=Removes property or resets it to default.}} | |||
{{Flink|boolean| rename_property|string|string|desc=Changes name of a property.}} | |||
== Other Functions == | == Other Functions == | ||
{{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}} | {{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}} | ||
{{Flink|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}} | {{Flink|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}} | ||
{{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|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|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}} |
Revision as of 21:22, 12 March 2017
Chat Functions
void chat_clan( string )
void chat_clan( string, string )
void chat_macro( string )
void chat_notify( string, string )
void chat_private( string, string )
boolean is_online( string )
boolean [string] who_clan()
boolean can_faxbot( monster )
boolean faxbot( monster )
Debugging Functions
void disable( string )
void enable( string )
buffer load_html( string )
string make_url( string, boolean, boolean )
Map Management Functions
Note: Information about maps (including creating, assigning, and removing keys, can be found at Map Data Structures.
boolean file_to_map( string, aggregate )
boolean map_to_file( aggregate, string )
void clear( aggregate )
Time Functions
string format_date_time( string, string, string )
int gameday_to_int()
string gameday_to_string()
string now_to_string( string )
string time_to_string()
string today_to_string()
SVN Functions
There is much additional information in the SVN Primer.
boolean svn_exists( string )
boolean svn_at_head( string )
record svn_info( string )
User Interaction
void print( string, [string] )
void print_html( string )
void logprint( string )
void wait( int )
void waitq( int )
boolean user_confirm( string )
Property Functions
boolean [string] get_all_properties( string, boolean )
boolean property_exists( string )
boolean property_exists( string, boolean )
boolean property_has_default( string name )
string property_default_value( string name )
string get_property( string )
string get_property( string, boolean )
void set_property( string, string )
string remove_property( string )
string remove_property( string, boolean )
boolean rename_property( string, string )
Other Functions
void abort( [string] )
boolean cli_execute( string )
void batch_open()
batch_close()
for details).boolean batch_close()
int get_revision()
string get_version()
string get_player_id( string )
string to_json( aggregate )
Additional functions that are considered not really to be ash functions are available in Misc ASH Features