Equipment: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
m typo
imported>Zarqon
consistent wiki formatting, more compact layout
Line 1: Line 1:
== Part 3 - Equipment ==
== Part 3 - Equipment ==
<p><em>Time to get dressed!</em></p>
<em>Time to get dressed!</em>


<p><strong>boolean equip( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''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.
Puts on the specified item in the &#8220;natural&#8221; slot.  For example, it won&#8217;t equip a weapon to the off-hand and it will only put a accessory into an empty slot.</p>


<p><strong>boolean equip( [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot sl]], [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''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]].
Puts on the specified item in the specified spot.</p>


<p><strong>item equipped_item( [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot sl]] )</strong><br />
'''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]])
Returns the item currently equipped in the given slot.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p>


<p><strong>boolean have_equipped( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''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()]]).
Tells you if the specified item is currently equipped (as it would not otherwise show up in item_amount()).</p>


<p><strong>boolean can_equip( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''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).
Tells you if you meet the requirements to equip the given item (regardless of whether you own it).</p>


<p><strong>string weapon_type( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''string [[weapon_type()|weapon_type( item it )]]''' - returns a string indicating the type of weapon which was passed as a parameter.
Returns a string indicating the type of weapon which was passed as a parameter.</p>


<p><strong>int weapon_hands( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''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]])
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.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p>


<p><strong>stat weapon_type( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
'''stat [[weapon_type()|weapon_type( item it )]]''' - tells you what stat your weapon bases its hit chance on.
Tells you what stat your weapon bases its hit chance on.</p>


<p><strong>boolean have_familiar( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br />
'''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).
Tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).</p>


<p><strong>boolean use_familiar( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br />
'''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.
Takes the specified familiar out of your Terrarium.  Use equip() and unequip() to manage your familiar&#8217;s gear.</p>


<p><strong>item familiar_equipment( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br />
'''item [[familiar_equipment()|familiar_equipment( familiar pet )]]''' - returns the most common piece of equipment that is specially designed for the familiar&#8217;s type.
Returns the most common piece of equipment that is specially designed for the familiar&#8217;s type. If you want to find out what item is being equipped by your familiar of a specific species, then you would need to take that familiar out of the Terrarium with equip_familiar() and then check equipped_item( $slot[ familiar ]).</p>


<p><strong>item familiar_equipped_equipment( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br />
'''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.
Returns the current item equipped on a familiar, as opposed to familiar_equipment( familiar ) which returns the special item only the familiar can use.</p>


<p><strong>boolean have_outfit( string outfit_name )</strong><br />
'''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]])
Lets you know 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.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]]</p>


<p><strong>boolean outfit( string outfit_name )</strong><br />
'''boolean [[outfit()|outfit( string outfit_name )]]''' - wears the specified outfit. (<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
Wears the specified outfit.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p>

Revision as of 10:09, 18 February 2009

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 weapon_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)