Your Character: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
No edit summary
 
(60 intermediate revisions by 7 users not shown)
Line 1: Line 1:
=== '''The Basics''' ===
{{TOCright}}
<hr>
==Viewable Info==
<p><em>We'll start with a long look in the mirror. Here's how to tell about you.</em></p>
{{flink|string|my_name|desc=Returns your character's name in lowercase.}}
{{flink|string|my_id|desc=Returns your character ID.}}
{{flink|int|get_clan_id|desc=Returns the ID number of the character's current clan.}}
{{flink|string|get_clan_name|desc=Returns the name of the character's current clan.}}
{{Flink|int|my_ascensions|desc=Returns the number of times your character has ascended.}}
{{flink|class|my_class|desc=Returns your class.}}
{{flink|int|my_level|desc=Returns your level.}}
{{flink|int|my_adventures|desc=Returns the number of adventures you have remaining.}}
{{flink|int|total_turns_played|desc=Returns total turns played since the character was created.}}
{{flink|int|turns_played}}
{{flink|int|my_turncount|desc=Both functions return the number of adventures used this ascension.}}
{{flink|int|my_daycount|desc=Return the number of days used this ascension.}}
{{flink|stat|my_primestat|desc=Returns the main stat of your current class.}}
{{flink|int|my_basestat|stat|desc=Returns your base value in the given stat (or substat).}}
{{flink|int|my_buffedstat|stat|desc=Returns your buffed value in the given stat (or substat).}}
{{flink|boolean|hippy_stone_broken|desc=Reports if your Hippy Stone is currently broken.}}
{{flink|int|pvp_attacks_left|desc=Returns number of PvP attacks remaining.}}
{{flink|int|total_free_rests|desc=Returns the total number of free rests available to your character.}}
{{flink|int [item]|get_campground|desc=Returns a map of your campground items as integers, keyed by item names.}}
{{flink|item|get_dwelling|desc=Returns the item corresponding with your dwelling (the item used to get the dwelling).}}
{{flink|thrall|my_thrall|desc=Returns your current pasta thrall.}}


'''string [[my_name|my_name()]]''' - returns your character&#8217;s name in all-lowercase.
==Resources==
{{flink|int|my_hp|desc=Returns your current HP.}}
{{flink|int|my_mp|desc=Returns your current MP.}}
{{flink|int|my_maxhp|desc=Returns your current maximum HP.}}
{{flink|int|my_maxmp|desc=Returns your current maximum MP.}}
{{flink|int|my_soulsauce|desc=Returns your current Soulsauce.}}
{{flink|int|my_audience|desc=Returns your current Audience.}}
{{flink|int|my_thunder|desc=Returns your current Thunder.}}
{{flink|int|my_rain|desc=Returns your current Rain.}}
{{flink|int|my_lightning|desc=Returns your current Lightning.}}


'''string [[my_id|my_id()]]''' - returns your character&#8217;s id.
==Familiars and Substitutes==
{{flink|familiar|my_familiar|desc=Returns your current familiar.}}
{{flink|int|familiar_weight|familiar|desc=Returns the base weight of the specified familiar.}}
{{flink|boolean|is_familiar_equipment_locked|desc=Returns lock status of familiar equipment.}}
{{flink|void|lock_familiar_equipment|boolean|desc=Locks or Unlocks familiar equipment.}}
{{flink|int|minstrel_level|desc=Reports Clancy's level.}}
{{flink|item|minstrel_instrument|desc=Reports Clancy's equipped item.}}
{{flink|boolean|minstrel_quest|desc=Reports if Clancy has a new quest for you.}}
{{flink|string|my_companion|desc=Returns your current companion.}}


'''class [[my_class|my_class()]]''' - returns your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
==Hidden Info==
{{flink|string|my_hash|desc=Returns the password hash for your current session.}}
{{flink|stat|current_hit_stat|desc=Returns the stat currently used to calculate to-hit percentage.}}
{{flink|int|buffed_hit_stat|desc=Returns the buffed value of your currently used to-hit stat.}}
{{flink|int|raw_damage_absorption|desc=Returns your current DA total.}}
{{flink|float|damage_absorption_percent|desc=Returns the percentage of damage mitigated by your DA.}}
{{flink|int|damage_reduction|desc=Returns the amount of damage reduction your character currently has.}}
{{flink|float|elemental_resistance|element|desc=Returns the percentage of damage reduction to the given element based on your current resistance to that element.}}
{{flink|float|combat_rate_modifier|desc=Returns the percentage adjustment to your combat rate.}}
{{flink|float|initiative_modifier|desc=Returns the percentage adjustment to your chance of gaining initiative.}}
{{flink|float|experience_bonus|desc=Returns the amount of bonus experience your receive after combat.}}
{{flink|float|meat_drop_modifier|desc=Returns the percentage adjustment to meat drops after combat.}}
{{flink|float|item_drop_modifier|desc=Returns the percentage adjustment to item drops after combat.}}
{{flink|int|monster_level_adjustment|desc=Returns the total +ML you have active, including your sign-specific device.}}
{{flink|stat|stat_bonus_today}}
{{flink|stat|stat_bonus_tomorrow|desc=These two functions report on what stat has a stat-day bonus or $stat[none] if it isn't a stat day.}}
{{flink|int|current_mcd|desc=Returns the current setting of your sign-specific +ML device.}}
{{flink|int|weight_adjustment|desc=Returns the cumulative total of all familiar weight adjustments from all sources.}}
{{flink|boolean|get_ignore_zone_warnings|desc=Returns the value of the KoL option to disable "This area might be too tough for you" warnings.}}
{{flink|string [location] [int]|get_florist_plants|desc=Returns the a map of all plants currently planted in every location.}}


'''int [[my_level|my_level()]]''' - returns your level. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
==Sign & Path==
{{flink|boolean|can_eat|desc=Reports on whether your characters path allows food consumption.}}
{{flink|boolean|can_drink|desc=Reports on whether your characters path allows booze consumption}}
{{flink|boolean|can_interact|desc=Reports on whether your character can access the mall, gift packages, etc.}}
{{flink|boolean|in_hardcore|desc=Reports on whether your character is under Hardcore restrictions.}}
{{flink|item|daily_special|desc=Returns the daily special at your sign eatery.}}
{{flink|boolean|in_moxie_sign}}
{{flink|boolean|in_muscle_sign}}
{{flink|boolean|in_mysticality_sign}}
{{flink|boolean|in_bad_moon|desc=These four functions report on the stat gains granted by your character's ascension moon sign.}}
{{flink|path|my_path|desc=The ascension path your character chose.}}
{{flink|int|my_path_id|desc=The number of the ascension path your character chose.}}
{{flink|string|my_sign|desc=The moon sign your character ascended under.}}


'''int [[my_adventures|my_adventures()]]''' - returns the number of adventures that you have remaining. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]])
==Consumption==
{{flink|int|my_fullness|desc=Returns how full you are.}}
{{flink|int|fullness_limit|desc=Returns your maximum fullness.}}
{{flink|int|my_inebriety|desc=Returns your current drunkenness.}}
{{flink|int|inebriety_limit|desc=Returns your maximum safe drunk (before overdrinking).}}
{{flink|int|my_spleen_use|desc=Returns your current spleen use.}}
{{flink|int|spleen_limit|desc=Returns your spleen limit.}}


'''int [[my_turncount|my_turncount()]]''' - returns the number of adventures used so far in this ascension.
==Location Availability==
{{flink|boolean|black_market_available|desc=Returns the availability of the Black Market.}}
{{flink|boolean|canadia_available|desc=Returns the availability of Little Canadia.}}
{{flink|boolean|dispensary_available|desc=Returns the availability of the Knob Dispensary.}}
{{flink|boolean|florist_available|desc=Returns the availability of The Florist Friar's Cottage.}}
{{flink|boolean|gnomads_available|desc=Returns the availability of the Gnomish Gnomad Camp.}}
{{flink|boolean|guild_store_available|desc=Returns the availability of your guild store.}}
{{flink|boolean|hidden_temple_unlocked|desc=Returns the availability of the Hidden Temple.}}
{{flink|boolean|hippy_store_available|desc=Returns the availability of the Hippy Store.}}
{{flink|boolean|knoll_available|desc=Returns the availability of the Degrassi Knoll.}}
{{flink|boolean|white_citadel_available|desc=Returns the availability of White Citadel.}}


'''int [[my_inebriety|my_inebriety()]]''' - returns your current drunkenness.<br />
==Misc.==
'''int [[inebriety_limit|inebriety_limit()]]''' - returns your maximum safe drukenness level.
{{Flink|string|eudora|desc=Returns your current Eudora correspondent.}}
{{Flink|boolean|galaktik_cures_discounted|desc=Returns whether Doc's offers you a discount for quest completion.}}
{{Flink|int|is_unrestricted|desc=Checks whether a given game resource is available.}}
{{Flink|int|moon_light|desc=Returns the total lit moon segments.}}
{{Flink|int|moon_phase|desc=Returns the phase (0-15) of the main moons.}}


'''int [[my_spleen_use|my_spleen_use()]]''' - returns your current spleen use.<br />
[[Category:Scripting]]
'''int [[spleen_limit|spleen_limit()]]''' - returns your spleen limit.
 
'''int [[my_fullness|my_fullness()]]''' - returns how full you are.<br />
'''int [[fullness_limit|fullness_limit()]]''' - returns your maximum possible fullness.
 
'''boolean [[can_eat|can_eat()]]'''<br />
'''boolean [[can_drink|can_drink()]]'''<br />
'''boolean [[can_interact|can_interact()]]'''<br />
'''boolean [[in_hardcore|in_hardcore()]]'''<br />
Tells you about your limitations due to ronin, hardcore, or voluntary dietary restrictions
 
=== '''Basic Stats''' ===
<hr>
 
'''stat [[my_primestat|my_primestat()]]''' - returns the stat associated with your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
 
'''boolean [[in_moxie_sign|in_moxie_sign()]]'''<br />
'''boolean [[in_muscle_sign|in_muscle_sign()]]'''<br />
'''boolean [[in_mysticality_sign|in_mysticality_sign()]]'''<br />
Returns whether your ascension sign is associated with a specific stat zone.
 
'''int [[my_hp|my_hp()]]''' - returns your current HP.<br />
'''int [[my_mp|my_mp()]]''' - returns your current MP.<br />
'''int [[my_maxhp|my_maxhp()]]''' - returns your current maximum HP.<br />
'''int [[my_maxmp|my_maxmp()]]''' - returns your current maximum MP.<br />
'''int [[my_basestat|my_basestat( stat st )]]''' - returns your current base value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].  Passing $stat[SubMuscle], $stat[SubMysticality], or $stat[SubMoxie] to this function will return total substat points.<br />
'''int [[my_buffedstat|my_buffedstat( stat st )]]''' - returns your current buffed value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].
 
'''int [[current_mcd|current_mcd()]]''' - returns the current level of your mind-control device.<br />
'''boolean [[change_mcd|change_mcd( int level )]]''' - sets your mind-control device to the specified level.
 
'''stat [[stat_bonus_today|stat_bonus_today()]]'''<br />
'''stat [[stat_bonus_tomorrow|stat_bonus_tomorrow()]]'''<br />
Returns the stat that is benefitted by the moon phases today or tomorrow.  If it is an &#8220;ordinary&#8221; day, the return value is $stat[none].
 
=== '''More Advanced Stats''' ===
<hr>
 
'''stat [[current_hit_stat|current_hit_stat()]]''' - returns the stat that is currently used to calculate hit percentages.<br />
'''int [[buffed_hit_stat|buffed_hit_stat()]]''' - returns the current buffed value of your hit stat.  Identical to <tt>my_buffedstat(current_hit_stat())</tt>.
 
'''int [[raw_damage_absorption|raw_damage_absorption()]]''' - returns the total DA of all your gear and effects.<br />
'''float [[damage_absorption_percent|damage_absorption_percent()]]''' - returns the percentage of damage that is blocked by all your gear and effects.<br />
'''int [[damage_reduction|damage_reduction()]]''' - returns the amount of damage deducted from successful attacks due to the DR of your gear and effects.
 
'''float [[elemental_resistance|elemental_resistance( element elem )]]''' - returns the percentage of damage reduction from the indicated elemental damage.
 
'''float [[combat_rate_modifier|combat_rate_modifier()]]''' - returns the adjustment to your percentage of combat adventures.<br>
'''float [[initiative_modifier|initiative_modifier()]]''' - returns the adjustment to your chance of winning initiative in battle.<br />
'''float [[experience_bonus|experience_bonus()]]''' - returns the amount of bonus experience you receive.<br />
'''float [[meat_drop_modifier|meat_drop_modifier()]]''' - returns the adjustment to your amount of meat dropped.<br />
'''float [[item_drop_modifier|item_drop_modifier()]]''' - returns the adjustment to your percentage of item drops.
 
'''int [[monster_level_adjustment|monster_level_adjustment()]]''' - returns your total +ML (including the MCD).

Latest revision as of 19:39, 2 October 2022

Viewable Info

string my_name()

Returns your character's name in lowercase.

string my_id()

Returns your character ID.

int get_clan_id()

Returns the ID number of the character's current clan.

string get_clan_name()

Returns the name of the character's current clan.

int my_ascensions()

Returns the number of times your character has ascended.

class my_class()

Returns your class.

int my_level()

Returns your level.

int my_adventures()

Returns the number of adventures you have remaining.

int total_turns_played()

Returns total turns played since the character was created.

int turns_played()

int my_turncount()

Both functions return the number of adventures used this ascension.

int my_daycount()

Return the number of days used this ascension.

stat my_primestat()

Returns the main stat of your current class.

int my_basestat( stat )

Returns your base value in the given stat (or substat).

int my_buffedstat( stat )

Returns your buffed value in the given stat (or substat).

boolean hippy_stone_broken()

Reports if your Hippy Stone is currently broken.

int pvp_attacks_left()

Returns number of PvP attacks remaining.

int total_free_rests()

Returns the total number of free rests available to your character.

int [item] get_campground()

Returns a map of your campground items as integers, keyed by item names.

item get_dwelling()

Returns the item corresponding with your dwelling (the item used to get the dwelling).

thrall my_thrall()

Returns your current pasta thrall.


Resources

int my_hp()

Returns your current HP.

int my_mp()

Returns your current MP.

int my_maxhp()

Returns your current maximum HP.

int my_maxmp()

Returns your current maximum MP.

int my_soulsauce()

Returns your current Soulsauce.

int my_audience()

Returns your current Audience.

int my_thunder()

Returns your current Thunder.

int my_rain()

Returns your current Rain.

int my_lightning()

Returns your current Lightning.


Familiars and Substitutes

familiar my_familiar()

Returns your current familiar.

int familiar_weight( familiar )

Returns the base weight of the specified familiar.

boolean is_familiar_equipment_locked()

Returns lock status of familiar equipment.

void lock_familiar_equipment( boolean )

Locks or Unlocks familiar equipment.

int minstrel_level()

Reports Clancy's level.

item minstrel_instrument()

Reports Clancy's equipped item.

boolean minstrel_quest()

Reports if Clancy has a new quest for you.

string my_companion()

Returns your current companion.


Hidden Info

string my_hash()

Returns the password hash for your current session.

stat current_hit_stat()

Returns the stat currently used to calculate to-hit percentage.

int buffed_hit_stat()

Returns the buffed value of your currently used to-hit stat.

int raw_damage_absorption()

Returns your current DA total.

float damage_absorption_percent()

Returns the percentage of damage mitigated by your DA.

int damage_reduction()

Returns the amount of damage reduction your character currently has.

float elemental_resistance( element )

Returns the percentage of damage reduction to the given element based on your current resistance to that element.

float combat_rate_modifier()

Returns the percentage adjustment to your combat rate.

float initiative_modifier()

Returns the percentage adjustment to your chance of gaining initiative.

float experience_bonus()

Returns the amount of bonus experience your receive after combat.

float meat_drop_modifier()

Returns the percentage adjustment to meat drops after combat.

float item_drop_modifier()

Returns the percentage adjustment to item drops after combat.

int monster_level_adjustment()

Returns the total +ML you have active, including your sign-specific device.

stat stat_bonus_today()

stat stat_bonus_tomorrow()

These two functions report on what stat has a stat-day bonus or $stat[none] if it isn't a stat day.

int current_mcd()

Returns the current setting of your sign-specific +ML device.

int weight_adjustment()

Returns the cumulative total of all familiar weight adjustments from all sources.

boolean get_ignore_zone_warnings()

Returns the value of the KoL option to disable "This area might be too tough for you" warnings.

string [location] [int] get_florist_plants()

Returns the a map of all plants currently planted in every location.


Sign & Path

boolean can_eat()

Reports on whether your characters path allows food consumption.

boolean can_drink()

Reports on whether your characters path allows booze consumption

boolean can_interact()

Reports on whether your character can access the mall, gift packages, etc.

boolean in_hardcore()

Reports on whether your character is under Hardcore restrictions.

item daily_special()

Returns the daily special at your sign eatery.

boolean in_moxie_sign()

boolean in_muscle_sign()

boolean in_mysticality_sign()

boolean in_bad_moon()

These four functions report on the stat gains granted by your character's ascension moon sign.

path my_path()

The ascension path your character chose.

int my_path_id()

The number of the ascension path your character chose.

string my_sign()

The moon sign your character ascended under.


Consumption

int my_fullness()

Returns how full you are.

int fullness_limit()

Returns your maximum fullness.

int my_inebriety()

Returns your current drunkenness.

int inebriety_limit()

Returns your maximum safe drunk (before overdrinking).

int my_spleen_use()

Returns your current spleen use.

int spleen_limit()

Returns your spleen limit.


Location Availability

boolean black_market_available()

Returns the availability of the Black Market.

boolean canadia_available()

Returns the availability of Little Canadia.

boolean dispensary_available()

Returns the availability of the Knob Dispensary.

boolean florist_available()

Returns the availability of The Florist Friar's Cottage.

boolean gnomads_available()

Returns the availability of the Gnomish Gnomad Camp.

boolean guild_store_available()

Returns the availability of your guild store.

boolean hidden_temple_unlocked()

Returns the availability of the Hidden Temple.

boolean hippy_store_available()

Returns the availability of the Hippy Store.

boolean knoll_available()

Returns the availability of the Degrassi Knoll.

boolean white_citadel_available()

Returns the availability of White Citadel.


Misc.

string eudora()

Returns your current Eudora correspondent.

boolean galaktik_cures_discounted()

Returns whether Doc's offers you a discount for quest completion.

int is_unrestricted()

Checks whether a given game resource is available.

int moon_light()

Returns the total lit moon segments.

int moon_phase()

Returns the phase (0-15) of the main moons.