Equipment: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Alhifar
imported>StDoodle
No edit summary
Line 1: Line 1:
== Part 3 - Equipment ==
{{Flink|boolean|equip|{{opt|slot}}|item|desc=Equips the specified item and reports success.}}
<em>Time to get dressed!</em>
{{Flink|item|equipped_item|slot|desc=Returns the item equipped in the specified slot. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])}}
 
{{Flink|boolean|have_equipped|item|desc=Reports if the specified item is currently equipped by your character.}}
'''boolean [[equip|equip( item it )]]''' - equips the specified [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item]] in the &#8220;natural&#8221; slot.  Only equips accessories in empty slots.
{{Flink|boolean|can_equip|item|desc=Tells if you meet the requirements for equipping the given item (regardless of its availability).}}
 
{{Flink|string|item_type|item|desc=Returns the type of item specified.}}
'''boolean [[equip|equip( slot sl, item it )]]''' - equips the specified [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item]] in the specified [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot]].
{{Flink|int|weapon_hands|item|desc=Reports how many weapon-hand slots are required for a given item (0 - 2). Off-hand items return 0. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])}}
 
{{Flink|stat|weapon_type|item|desc=Reports the stat used to calculate to-hit percentage with the specified weapon or $stat[none] if the item is not a weapon. Still reports myst for stuff.}}
'''item [[equipped_item|equipped_item( slot sl )]]''' - returns the item currently equipped in the given slot. (<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
{{Flink|boolean|have_familiar|familiar|desc=Reports on whether you have the specified familiar either in your Terrarium or equipped.}}
 
{{Flink|boolean|use_familiar|familiar|desc=Attempts to make the specified familiar your currently used one and reports success.}}
'''boolean [[have_equipped|have_equipped( item it )]]''' - tells you if the specified item is currently equipped (as it would not otherwise show up in [[item_amount]]).
{{Flink|item|familiar_equipment|familiar|desc=Reports the most commonly associated familiar equipment for the specified familiar.}}
 
{{Flink|item|familiar_equipped_equipment|familiar|desc=Returns the item currently equipped on the specified familiar (or $item[none] if you don't have that familiar).}}
'''boolean [[can_equip|can_equip( item it )]]''' - tells you if you meet the requirements to equip the given item (regardless of whether you own it).
{{Flink|boolean|have_outfit|string|desc=Reports on whether or not you're currently capable of equipping the specified (in-game or custom) outfit, based on your stats & inventory availability of all outfit pieces.}}
 
{{Flink|boolean|outfit|string|desc=Attempts to wear the specified outfit and reports success.}}
'''string [[item_type|item_type( item it )]]''' - returns a string indicating the type of weapon which was passed as a parameter.
 
'''int [[weapon_hands|weapon_hands( item it )]]''' - tells you if a weapon will keep you from using your off-hand slot. Even if a weapon is described as being 3-handed, this function will return 2. (<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
 
'''stat [[weapon_type|weapon_type( item it )]]''' - tells you what stat your weapon bases its hit chance on.
 
'''boolean [[have_familiar|have_familiar( familiar pet )]]''' - tells you if you have placed the specified [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar]] in your Terrarium (or have it equipped now).
 
'''boolean [[use_familiar|use_familiar( familiar pet )]]''' - equips the specified [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar]].  Use [[equip]] to change your familiar&#8217;s gear.
 
'''item [[familiar_equipment|familiar_equipment( familiar pet )]]''' - returns the most common piece of equipment that is specially designed for the familiar&#8217;s type.
 
'''item [[familiar_equipped_equipment|familiar_equipped_equipment( familiar pet )]]''' - returns the current item equipped on a [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar]], as opposed to familiar_equipment( familiar ) which returns the special item only the familiar can use.
 
'''boolean [[have_outfit|have_outfit( string outfit_name )]]''' - returns ''true'' if you could wear a specified outfit right now, either an in-game or a custom outfit.  A false result means either that you are missing one or more pieces of the outfit or that your stats are not high enough to equip all of the pieces. (<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
 
'''boolean [[outfit|outfit( string outfit_name )]]''' - wears the specified outfit. (<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])

Revision as of 01:15, 2 March 2010

boolean equip( [slot], item )

Equips the specified item and reports success.

item equipped_item( slot )

Returns the item equipped in the specified slot. (Sample: Battlefield_gather)

boolean have_equipped( item )

Reports if the specified item is currently equipped by your character.

boolean can_equip( item )

Tells if you meet the requirements for equipping the given item (regardless of its availability).

string item_type( item )

Returns the type of item specified.

int weapon_hands( item )

Reports how many weapon-hand slots are required for a given item (0 - 2). Off-hand items return 0. (Sample:Battlefield_gather)

stat weapon_type( item )

Reports the stat used to calculate to-hit percentage with the specified weapon or $stat[none] if the item is not a weapon. Still reports myst for stuff.

boolean have_familiar( familiar )

Reports on whether you have the specified familiar either in your Terrarium or equipped.

boolean use_familiar( familiar )

Attempts to make the specified familiar your currently used one and reports success.

item familiar_equipment( familiar )

Reports the most commonly associated familiar equipment for the specified familiar.

item familiar_equipped_equipment( familiar )

Returns the item currently equipped on the specified familiar (or $item[none] if you don't have that familiar).

boolean have_outfit( string )

Reports on whether or not you're currently capable of equipping the specified (in-game or custom) outfit, based on your stats & inventory availability of all outfit pieces.

boolean outfit( string )

Attempts to wear the specified outfit and reports success.