Ashref: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
Fixed a typo
imported>Alhifar
→‎Example: updated to 6192
Line 9: Line 9:


==Example==
==Example==
Entering "ashref string" into the GCLI in subversion 5449 yields:<Br/>
Entering "ashref string" into the GCLI in subversion 6192 yields:<Br/>


<TABLE CELLPADDING=1 cellspacing=3 BORDER=1px>
<TABLE CELLPADDING=1 cellspacing=3 BORDER=1px>
<tr><td>
<tr><td>
void enable( string )<Br/>
void enable( string )<br/>
void disable( string )<Br/>
void disable( string )<br/>
boolean user_confirm( string )<Br/>
boolean user_confirm( string )<br/>
void logprint( string )<Br/>
void logprint( string )<br/>
void print( string )<Br/>
void print( string )<br/>
void print( string, string )<Br/>
void print( string, string )<br/>
void print_html( string )<Br/>
void print_html( string )<br/>
void abort( string )<Br/>
void abort( string )<br/>
boolean cli_execute( string )<Br/>
void abort(  )<br/>
buffer load_html( string )<Br/>
boolean cli_execute( string )<br/>
void write( string )<Br/>
buffer load_html( string )<br/>
void writeln( string )<Br/>
void write( string )<br/>
string form_field( string )<Br/>
void writeln( string )<br/>
buffer visit_url( string )<Br/>
string form_field( string )<br/>
string to_string( any )<Br/>
buffer visit_url(  )<br/>
item to_item( string )<Br/>
buffer visit_url( string )<br/>
class to_class( string )<Br/>
void wait( int )<br/>
stat to_stat( string )<Br/>
string to_string( any )<br/>
skill to_skill( string )<Br/>
boolean to_boolean( any )<br/>
effect to_effect( string )<Br/>
int to_int( any )<br/>
location to_location( string )<Br/>
float to_float( any )<br/>
familiar to_familiar( string )<Br/>
item to_item( string )<br/>
monster to_monster( string )<Br/>
item to_item( int )<br/>
string today_to_string( )<Br/>
class to_class( string )<br/>
string [int] session_logs( string, int )<Br/>
stat to_stat( string )<br/>
boolean outfit( string )<Br/>
skill to_skill( int )<br/>
boolean have_outfit( string )<Br/>
skill to_skill( string )<br/>
boolean contains_text( string, string )<Br/>
skill to_skill( effect )<br/>
int extract_meat( string )<Br/>
effect to_effect( int )<br/>
int [item] extract_items( string )<Br/>
effect to_effect( string )<br/>
int length( string )<Br/>
effect to_effect( skill )<br/>
int index_of( string, string )<Br/>
location to_location( string )<br/>
int index_of( string, string, int )<Br/>
familiar to_familiar( int )<br/>
int last_index_of( string, string )<Br/>
familiar to_familiar( string )<br/>
int last_index_of( string, string, int )<Br/>
monster to_monster( string )<br/>
string substring( string, int )<Br/>
slot to_slot( item )<br/>
string substring( string, int, int )<Br/>
string to_url( location )<br/>
string to_lower_case( string )<Br/>
string today_to_string( )<br/>
string to_upper_case( string )<Br/>
int moon_phase(  )<br/>
matcher create_matcher( string, string )<Br/>
int moon_light(  )<br/>
string replace_string( buffer, string, string )<Br/>
stat stat_bonus_today(  )<br/>
buffer replace_string( string, string, string )<Br/>
stat stat_bonus_tomorrow(  )<br/>
string [int] split_string( string )<Br/>
string [int] session_logs( int )<br/>
string [int] split_string( string, string )<Br/>
string [int] session_logs( string, int )<br/>
string [int, int] group_string( string, string )<Br/>
boolean adventure( int, location )<br/>
void chat_reply( string )<Br/>
void add_item_condition( int, item )<br/>
string url_encode( string )<Br/>
boolean buy( int, item )<br/>
string url_decode( string )<Br/>
boolean create( int, item )<br/>
string get_property( string )<Br/>
boolean use( int, item )<br/>
void set_property( string, string )<Br/>
boolean eat( int, item )<br/>
boolean file_to_map( string, aggregate )<Br/>
boolean drink( int, item )<br/>
boolean file_to_map( string, aggregate, boolean )<Br/>
boolean put_closet( int, item )<br/>
float numeric_modifier( string )<Br/>
boolean put_shop( int, int, item )<br/>
boolean boolean_modifier( string )<Br/>
boolean put_stash( int, item )<br/>
boolean put_display( int, item )<br/>
boolean take_closet( int, item )<br/>
boolean take_storage( int, item )<br/>
boolean take_display( int, item )<br/>
boolean take_stash( int, item )<br/>
boolean autosell( int, item )<br/>
boolean hermit( int, item )<br/>
boolean retrieve_item( int, item )<br/>
int [item] get_inventory(  )<br/>
boolean is_npc_item( item )<br/>
boolean is_tradeable( item )<br/>
item daily_special(  )<br/>
boolean refresh_stash(  )<br/>
int available_amount( item )<br/>
int item_amount( item )<br/>
int closet_amount( item )<br/>
int creatable_amount( item )<br/>
int [item] get_ingredients( item )<br/>
int storage_amount( item )<br/>
int display_amount( item )<br/>
int shop_amount( item )<br/>
int stash_amount( item )<br/>
int pulls_remaining(  )<br/>
int stills_available(  )<br/>
boolean have_mushroom_plot(  )<br/>
boolean refresh_status(  )<br/>
boolean restore_hp( int )<br/>
boolean restore_mp( int )<br/>
string my_name(  )<br/>
string my_id(  )<br/>
string my_hash(  )<br/>
boolean in_muscle_sign(  )<br/>
boolean in_mysticality_sign(  )<br/>
boolean in_moxie_sign(  )<br/>
boolean in_bad_moon(  )<br/>
class my_class(  )<br/>
int my_level(  )<br/>
int my_hp(  )<br/>
int my_maxhp(  )<br/>
int my_mp(  )<br/>
int my_maxmp(  )<br/>
stat my_primestat(  )<br/>
int my_basestat( stat )<br/>
int my_buffedstat( stat )<br/>
int my_meat(  )<br/>
int my_adventures(  )<br/>
int my_turncount(  )<br/>
int my_fullness(  )<br/>
int fullness_limit(  )<br/>
int my_inebriety(  )<br/>
int inebriety_limit(  )<br/>
int my_spleen_use(  )<br/>
int spleen_limit(  )<br/>
boolean can_eat(  )<br/>
boolean can_drink(  )<br/>
int turns_played(  )<br/>
boolean can_interact(  )<br/>
boolean in_hardcore(  )<br/>
boolean have_skill( skill )<br/>
int mp_cost( skill )<br/>
int turns_per_cast( skill )<br/>
int have_effect( effect )<br/>
boolean use_skill( int, skill )<br/>
boolean use_skill( int, skill, string )<br/>
buffer attack(  )<br/>
buffer steal(  )<br/>
buffer runaway(  )<br/>
buffer use_skill( skill )<br/>
buffer throw_item( item )<br/>
buffer throw_items( item, item )<br/>
buffer run_combat(  )<br/>
boolean can_equip( item )<br/>
boolean equip( item )<br/>
boolean equip( slot, item )<br/>
item equipped_item( slot )<br/>
boolean have_equipped( item )<br/>
boolean outfit( string )<br/>
boolean have_outfit( string )<br/>
familiar my_familiar(  )<br/>
boolean have_familiar( familiar )<br/>
boolean use_familiar( familiar )<br/>
item familiar_equipment( familiar )<br/>
int familiar_weight( familiar )<br/>
int weapon_hands( item )<br/>
string item_type( item )<br/>
stat weapon_type( item )<br/>
int get_power( item )<br/>
void council(  )<br/>
int current_mcd(  )<br/>
boolean change_mcd( int )<br/>
boolean have_chef(  )<br/>
boolean have_bartender(  )<br/>
boolean contains_text( string, string )<br/>
int extract_meat( string )<br/>
int [item] extract_items( string )<br/>
int length( string )<br/>
int index_of( string, string )<br/>
int index_of( string, string, int )<br/>
int last_index_of( string, string )<br/>
int last_index_of( string, string, int )<br/>
string substring( string, int )<br/>
string substring( string, int, int )<br/>
string to_lower_case( string )<br/>
string to_upper_case( string )<br/>
buffer append( buffer, string )<br/>
buffer insert( buffer, int, string )<br/>
boolean replace( buffer, int, int, string )<br/>
buffer delete( buffer, int, int )<br/>
buffer append_tail( matcher, buffer )<br/>
buffer append_replacement( matcher, buffer, string )<br/>
matcher create_matcher( string, string )<br/>
boolean find( matcher )<br/>
boolean start( matcher )<br/>
boolean end( matcher )<br/>
boolean group( matcher )<br/>
boolean group( matcher, int )<br/>
boolean group_count( matcher )<br/>
string replace_first( matcher, string )<br/>
string replace_all( matcher, string )<br/>
matcher reset( matcher )<br/>
matcher reset( matcher, string )<br/>
buffer replace_string( buffer, string, string )<br/>
buffer replace_string( string, string, string )<br/>
string [int] split_string( string )<br/>
string [int] split_string( string, string )<br/>
string [int, int] group_string( string, string )<br/>
void chat_reply( string )<br/>
boolean entryway(  )<br/>
boolean hedgemaze(  )<br/>
item guardians(  )<br/>
boolean chamber(  )<br/>
int tavern(  )<br/>
int random( int )<br/>
int round( float )<br/>
int truncate( float )<br/>
int floor( float )<br/>
int ceil( float )<br/>
float square_root( float )<br/>
string url_encode( string )<br/>
string url_decode( string )<br/>
string get_property( string )<br/>
void set_property( string, string )<br/>
int count( aggregate )<br/>
void clear( aggregate )<br/>
boolean file_to_map( string, aggregate )<br/>
boolean file_to_map( string, aggregate, boolean )<br/>
boolean map_to_file( aggregate, string )<br/>
boolean map_to_file( aggregate, string, boolean )<br/>
location my_location(  )<br/>
monster [int] get_monsters( location )<br/>
int expected_damage(  )<br/>
int expected_damage( monster )<br/>
int monster_level_adjustment(  )<br/>
int weight_adjustment(  )<br/>
int mana_cost_modifier(  )<br/>
int raw_damage_absorption(  )<br/>
float damage_absorption_percent(  )<br/>
int damage_reduction(  )<br/>
float elemental_resistance( element )<br/>
float elemental_resistance(  )<br/>
float elemental_resistance( monster )<br/>
float combat_rate_modifier(  )<br/>
float initiative_modifier(  )<br/>
float experience_bonus(  )<br/>
float meat_drop_modifier(  )<br/>
float item_drop_modifier(  )<br/>
int buffed_hit_stat(  )<br/>
stat current_hit_stat(  )<br/>
element monster_element(  )<br/>
element monster_element( monster )<br/>
int monster_attack(  )<br/>
int monster_attack( monster )<br/>
int monster_defense(  )<br/>
int monster_defense( monster )<br/>
int monster_hp(  )<br/>
int monster_hp( monster )<br/>
int item_drops(  )<br/>
int item_drops( monster )<br/>
boolean will_usually_miss(  )<br/>
boolean will_usually_dodge(  )<br/>
float numeric_modifier( string )<br/>
float numeric_modifier( item, string )<br/>
float numeric_modifier( effect, string )<br/>
float numeric_modifier( skill, string )<br/>
boolean boolean_modifier( string )<br/>
boolean boolean_modifier( item, string )<br/>
effect effect_modifier( item, string )<br/>
class class_modifier( item, string )<br/>
stat stat_modifier( effect, string )<br/>
</td></tr>
</td></tr>
</table>
</table>

Revision as of 02:27, 13 July 2008

ashref

AshRef is not an actual ash function, it is a cli function.

Enter "ashref" into the Graphical cli with no parameters will display a list of all available ASH scripting functions.

Entering "ashref " and a partial command name will display all commands matching the partial command name entered.


Example

Entering "ashref string" into the GCLI in subversion 6192 yields:

void enable( string )
void disable( string )
boolean user_confirm( string )
void logprint( string )
void print( string )
void print( string, string )
void print_html( string )
void abort( string )
void abort( )
boolean cli_execute( string )
buffer load_html( string )
void write( string )
void writeln( string )
string form_field( string )
buffer visit_url( )
buffer visit_url( string )
void wait( int )
string to_string( any )
boolean to_boolean( any )
int to_int( any )
float to_float( any )
item to_item( string )
item to_item( int )
class to_class( string )
stat to_stat( string )
skill to_skill( int )
skill to_skill( string )
skill to_skill( effect )
effect to_effect( int )
effect to_effect( string )
effect to_effect( skill )
location to_location( string )
familiar to_familiar( int )
familiar to_familiar( string )
monster to_monster( string )
slot to_slot( item )
string to_url( location )
string today_to_string( )
int moon_phase( )
int moon_light( )
stat stat_bonus_today( )
stat stat_bonus_tomorrow( )
string [int] session_logs( int )
string [int] session_logs( string, int )
boolean adventure( int, location )
void add_item_condition( int, item )
boolean buy( int, item )
boolean create( int, item )
boolean use( int, item )
boolean eat( int, item )
boolean drink( int, item )
boolean put_closet( int, item )
boolean put_shop( int, int, item )
boolean put_stash( int, item )
boolean put_display( int, item )
boolean take_closet( int, item )
boolean take_storage( int, item )
boolean take_display( int, item )
boolean take_stash( int, item )
boolean autosell( int, item )
boolean hermit( int, item )
boolean retrieve_item( int, item )
int [item] get_inventory( )
boolean is_npc_item( item )
boolean is_tradeable( item )
item daily_special( )
boolean refresh_stash( )
int available_amount( item )
int item_amount( item )
int closet_amount( item )
int creatable_amount( item )
int [item] get_ingredients( item )
int storage_amount( item )
int display_amount( item )
int shop_amount( item )
int stash_amount( item )
int pulls_remaining( )
int stills_available( )
boolean have_mushroom_plot( )
boolean refresh_status( )
boolean restore_hp( int )
boolean restore_mp( int )
string my_name( )
string my_id( )
string my_hash( )
boolean in_muscle_sign( )
boolean in_mysticality_sign( )
boolean in_moxie_sign( )
boolean in_bad_moon( )
class my_class( )
int my_level( )
int my_hp( )
int my_maxhp( )
int my_mp( )
int my_maxmp( )
stat my_primestat( )
int my_basestat( stat )
int my_buffedstat( stat )
int my_meat( )
int my_adventures( )
int my_turncount( )
int my_fullness( )
int fullness_limit( )
int my_inebriety( )
int inebriety_limit( )
int my_spleen_use( )
int spleen_limit( )
boolean can_eat( )
boolean can_drink( )
int turns_played( )
boolean can_interact( )
boolean in_hardcore( )
boolean have_skill( skill )
int mp_cost( skill )
int turns_per_cast( skill )
int have_effect( effect )
boolean use_skill( int, skill )
boolean use_skill( int, skill, string )
buffer attack( )
buffer steal( )
buffer runaway( )
buffer use_skill( skill )
buffer throw_item( item )
buffer throw_items( item, item )
buffer run_combat( )
boolean can_equip( item )
boolean equip( item )
boolean equip( slot, item )
item equipped_item( slot )
boolean have_equipped( item )
boolean outfit( string )
boolean have_outfit( string )
familiar my_familiar( )
boolean have_familiar( familiar )
boolean use_familiar( familiar )
item familiar_equipment( familiar )
int familiar_weight( familiar )
int weapon_hands( item )
string item_type( item )
stat weapon_type( item )
int get_power( item )
void council( )
int current_mcd( )
boolean change_mcd( int )
boolean have_chef( )
boolean have_bartender( )
boolean contains_text( string, string )
int extract_meat( string )
int [item] extract_items( string )
int length( string )
int index_of( string, string )
int index_of( string, string, int )
int last_index_of( string, string )
int last_index_of( string, string, int )
string substring( string, int )
string substring( string, int, int )
string to_lower_case( string )
string to_upper_case( string )
buffer append( buffer, string )
buffer insert( buffer, int, string )
boolean replace( buffer, int, int, string )
buffer delete( buffer, int, int )
buffer append_tail( matcher, buffer )
buffer append_replacement( matcher, buffer, string )
matcher create_matcher( string, string )
boolean find( matcher )
boolean start( matcher )
boolean end( matcher )
boolean group( matcher )
boolean group( matcher, int )
boolean group_count( matcher )
string replace_first( matcher, string )
string replace_all( matcher, string )
matcher reset( matcher )
matcher reset( matcher, string )
buffer replace_string( buffer, string, string )
buffer replace_string( string, string, string )
string [int] split_string( string )
string [int] split_string( string, string )
string [int, int] group_string( string, string )
void chat_reply( string )
boolean entryway( )
boolean hedgemaze( )
item guardians( )
boolean chamber( )
int tavern( )
int random( int )
int round( float )
int truncate( float )
int floor( float )
int ceil( float )
float square_root( float )
string url_encode( string )
string url_decode( string )
string get_property( string )
void set_property( string, string )
int count( aggregate )
void clear( aggregate )
boolean file_to_map( string, aggregate )
boolean file_to_map( string, aggregate, boolean )
boolean map_to_file( aggregate, string )
boolean map_to_file( aggregate, string, boolean )
location my_location( )
monster [int] get_monsters( location )
int expected_damage( )
int expected_damage( monster )
int monster_level_adjustment( )
int weight_adjustment( )
int mana_cost_modifier( )
int raw_damage_absorption( )
float damage_absorption_percent( )
int damage_reduction( )
float elemental_resistance( element )
float elemental_resistance( )
float elemental_resistance( monster )
float combat_rate_modifier( )
float initiative_modifier( )
float experience_bonus( )
float meat_drop_modifier( )
float item_drop_modifier( )
int buffed_hit_stat( )
stat current_hit_stat( )
element monster_element( )
element monster_element( monster )
int monster_attack( )
int monster_attack( monster )
int monster_defense( )
int monster_defense( monster )
int monster_hp( )
int monster_hp( monster )
int item_drops( )
int item_drops( monster )
boolean will_usually_miss( )
boolean will_usually_dodge( )
float numeric_modifier( string )
float numeric_modifier( item, string )
float numeric_modifier( effect, string )
float numeric_modifier( skill, string )
boolean boolean_modifier( string )
boolean boolean_modifier( item, string )
effect effect_modifier( item, string )
class class_modifier( item, string )
stat stat_modifier( effect, string )