Difference between revisions of "Equipment"

From Kolmafia
Jump to navigation Jump to search
imported>Therealtahu
m (Fixed double weapon_type(). First one should have been item_type().)
imported>Alhifar
Line 2: Line 2:
 
<em>Time to get dressed!</em>
 
<em>Time to get dressed!</em>
  
'''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.
+
'''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.
  
'''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]].
+
'''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]].
  
'''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]])
+
'''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]])
  
'''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()]]).
+
'''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]]).
  
'''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).
+
'''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).
  
'''string [[item_type()|item_type( item it )]]''' - returns a string indicating the type of weapon which was passed as a parameter.
+
'''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]])
+
'''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.
+
'''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 [[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.
+
'''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_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.
+
'''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 [[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]])
+
'''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 00:24, 2 March 2010

Part 3 - Equipment

Time to get dressed!

boolean equip( item it ) - equips the specified item in the “natural” slot. Only equips accessories in empty slots.

boolean equip( slot sl, item it ) - equips the specified item in the specified slot.

item equipped_item( slot sl ) - returns the item currently equipped in the given slot. (Sample:Battlefield_gather)

boolean have_equipped( item it ) - tells you if the specified item is currently equipped (as it would not otherwise show up in item_amount).

boolean can_equip( item it ) - tells you if you meet the requirements to equip the given item (regardless of whether you own it).

string item_type( item it ) - returns a string indicating the type of weapon which was passed as a parameter.

int 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. (Sample:Battlefield_gather)

stat weapon_type( item it ) - tells you what stat your weapon bases its hit chance on.

boolean have_familiar( familiar pet ) - tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).

boolean use_familiar( familiar pet ) - equips the specified familiar. Use equip to change your familiar’s gear.

item familiar_equipment( familiar pet ) - returns the most common piece of equipment that is specially designed for the familiar’s type.

item familiar_equipped_equipment( familiar pet ) - returns the current item equipped on a familiar, as opposed to familiar_equipment( familiar ) which returns the special item only the familiar can use.

boolean 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. (Sample:Seltzer)

boolean outfit( string outfit_name ) - wears the specified outfit. (Sample:Battlefield_gather)