Equipment: Difference between revisions
imported>Efilnikufecin |
Fixed multiple link typos: "Dataype" -> "Datatype" |
||
Line 2: | Line 2: | ||
<p><em>Time to get dressed!</em></p> | <p><em>Time to get dressed!</em></p> | ||
<p><strong>boolean equip( [[%28ASHRM% | <p><strong>boolean equip( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Puts on the specified item in the “natural” slot. For example, it won’t equip a weapon to the off-hand and it will only put a accessory into an empty slot.</p> | Puts on the specified item in the “natural” slot. For example, it won’t equip a weapon to the off-hand and it will only put a accessory into an empty slot.</p> | ||
<p><strong>boolean unequip( [[%28ASHRM% | <p><strong>boolean unequip( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Takes off one of the specified item.</p> | Takes off one of the specified item.</p> | ||
<p><strong>boolean equip_slot( [[%28ASHRM% | <p><strong>boolean equip_slot( [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot sl]], [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )<br /> | ||
boolean unequip_slot( [[%28ASHRM% | boolean unequip_slot( [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot sl]] )</strong><br /> | ||
Equipment management that targets a specific slot.</p> | Equipment management that targets a specific slot.</p> | ||
<p><strong>item current_equipment( [[%28ASHRM% | <p><strong>item current_equipment( [[%28ASHRM%29_Datatype_Constants#.24slot.5Bconstant.5D|slot sl]] )</strong><br /> | ||
Returns the item currently equipped in the given slot.<br /> | Returns the item currently equipped in the given slot.<br /> | ||
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p> | <em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p> | ||
<p><strong>boolean have_equipped( [[%28ASHRM% | <p><strong>boolean have_equipped( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Tells you if the specified item is currently equipped (as it would not otherwise show up in item_amount()).</p> | 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% | <p><strong>boolean can_equip( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Tells you if you meet the requirements to equip the given item (regardless of whether you own it).</p> | 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% | <p><strong>string weapon_type( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Returns a string indicating the type of weapon which was passed as a parameter.</p> | Returns a string indicating the type of weapon which was passed as a parameter.</p> | ||
<p><strong>int weapon_hands( [[%28ASHRM% | <p><strong>int weapon_hands( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
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 /> | 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> | <em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p> | ||
<p><strong>boolean ranged_weapon( [[%28ASHRM% | <p><strong>boolean ranged_weapon( [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br /> | ||
Tells you if a weapon’s chance of hitting the opponent is based on your Moxie instead of your Muscle.</p> | Tells you if a weapon’s chance of hitting the opponent is based on your Moxie instead of your Muscle.</p> | ||
<p><strong>boolean have_familiar( [[%28ASHRM% | <p><strong>boolean have_familiar( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br /> | ||
Tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).</p> | Tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).</p> | ||
<p><strong>boolean equip_familiar( [[%28ASHRM% | <p><strong>boolean equip_familiar( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br /> | ||
Takes the specified familiar out of your Terrarium. Use equip() and unequip() to manage your familiar’s gear.</p> | Takes the specified familiar out of your Terrarium. Use equip() and unequip() to manage your familiar’s gear.</p> | ||
<p><strong>item familiar_equipment( [[%28ASHRM% | <p><strong>item familiar_equipment( [[%28ASHRM%29_Datatype_Constants#.24familiar.5Bconstant.5D|familiar pet]] )</strong><br /> | ||
Returns the most common piece of equipment that is specially designed for the familiar’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 current_equipment( $slot[ familiar ]).</p> | Returns the most common piece of equipment that is specially designed for the familiar’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 current_equipment( $slot[ familiar ]).</p> | ||
Revision as of 07:26, 22 July 2007
Part 3 - Equipment
Time to get dressed!
boolean equip( item it )
Puts on the specified item in the “natural” slot. For example, it won’t equip a weapon to the off-hand and it will only put a accessory into an empty slot.
boolean unequip( item it )
Takes off one of the specified item.
boolean equip_slot( slot sl, item it )
boolean unequip_slot( slot sl )
Equipment management that targets a specific slot.
item current_equipment( 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
boolean ranged_weapon( item it )
Tells you if a weapon’s chance of hitting the opponent is based on your Moxie instead of your Muscle.
boolean have_familiar( familiar pet )
Tells you if you have placed the specified familiar in your Terrarium (or have it equipped now).
boolean equip_familiar( familiar pet )
Takes the specified familiar out of your Terrarium. Use equip() and unequip() to manage 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. 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 current_equipment( $slot[ familiar ]).
boolean have_outfit( string outfit_name )
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.
Sample:Seltzer
boolean outfit( string outfit_name )
Wears the specified outfit.
Sample:Battlefield_gather